From 8f2e8e7dc5334edfea6a7d23f5b901f286fda6d4 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Tue, 13 Sep 2011 23:12:49 +0200 Subject: draft implementation of http://wiki.documentfoundation.org/QA-Projects-Incubator#Bug_Submission_Assistant --- bug/Makefile | 13 + bug/bug.xhtml | 141 + bug/bug.xsl | 18 + bug/bug/2011-02-form.html | 150 + bug/bug/2011-08-27-form.html | 82 + bug/bug/Makefile | 2 + bug/bug/bg-sidebar.png | Bin 0 -> 1375 bytes bug/bug/bug.css | 116 + bug/bug/bug.js | 213 + bug/bug/frame.html | 21 + bug/bug/icons/Chart.png | Bin 0 -> 1407 bytes bug/bug/icons/Database.png | Bin 0 -> 2176 bytes bug/bug/icons/Documentation.png | Bin 0 -> 1353 bytes bug/bug/icons/Drawing.png | Bin 0 -> 1916 bytes bug/bug/icons/Extensions.png | Bin 0 -> 1963 bytes bug/bug/icons/Formula_editor.png | Bin 0 -> 1676 bytes bug/bug/icons/Installation.png | Bin 0 -> 1549 bytes .../icons/LibreOffice_Initial_Icons-pre_final.svg | 44463 +++++++++++++++++++ bug/bug/icons/Libreoffice.png | Bin 0 -> 970 bytes bug/bug/icons/PDF_export.png | Bin 0 -> 1438 bytes bug/bug/icons/Presentation.png | Bin 0 -> 1750 bytes bug/bug/icons/Spreadsheet.png | Bin 0 -> 1395 bytes bug/bug/icons/WRITER.png | Bin 0 -> 1509 bytes bug/bug/icons/WWW.png | Bin 0 -> 1803 bytes bug/bug/jquery-1.6.2.js | 8981 ++++ bug/bug/jquery-validation-1.8.1.zip | Bin 0 -> 617461 bytes bug/bug/jquery-validation-1.8.1/README.md | 8 + .../jquery-validation-1.8.1/additional-methods.js | 280 + .../additional-methods.min.js | 28 + bug/bug/jquery-validation-1.8.1/changelog.txt | 258 + .../demo/ajaxSubmit-intergration-demo.html | 85 + .../demo/captcha/captcha.js | 27 + .../demo/captcha/fonts/Anorexia.ttf | Bin 0 -> 14300 bytes .../demo/captcha/image_req.php | 6 + .../demo/captcha/images/button.png | Bin 0 -> 1546 bytes .../demo/captcha/images/button.psd | Bin 0 -> 23968 bytes .../demo/captcha/images/image.php | 35 + .../jquery-validation-1.8.1/demo/captcha/index.php | 66 + .../demo/captcha/newsession.php | 12 + .../demo/captcha/process.php | 14 + .../jquery-validation-1.8.1/demo/captcha/rand.php | 11 + .../jquery-validation-1.8.1/demo/captcha/style.css | 140 + bug/bug/jquery-validation-1.8.1/demo/css/chili.css | 15 + .../jquery-validation-1.8.1/demo/css/cmxform.css | 46 + .../demo/css/cmxformTemplate.css | 55 + bug/bug/jquery-validation-1.8.1/demo/css/core.css | 21 + bug/bug/jquery-validation-1.8.1/demo/css/reset.css | 61 + .../jquery-validation-1.8.1/demo/css/screen.css | 11 + .../demo/custom-messages-metadata-demo.html | 92 + .../demo/custom-methods-demo.html | 122 + .../demo/dynamic-totals.html | 151 + .../demo/errorcontainer-demo.html | 161 + bug/bug/jquery-validation-1.8.1/demo/example.html | 53 + bug/bug/jquery-validation-1.8.1/demo/form.php | 10 + bug/bug/jquery-validation-1.8.1/demo/form.phps | 10 + bug/bug/jquery-validation-1.8.1/demo/images/bg.gif | Bin 0 -> 1175 bytes .../demo/images/checked.gif | Bin 0 -> 220 bytes .../demo/images/cmxform-divider.gif | Bin 0 -> 43 bytes .../demo/images/cmxform-fieldset.gif | Bin 0 -> 314 bytes .../demo/images/loading.gif | Bin 0 -> 418 bytes .../demo/images/unchecked.gif | Bin 0 -> 223 bytes bug/bug/jquery-validation-1.8.1/demo/index.html | 230 + .../demo/js/chili-1.7.pack.js | 1 + .../demo/login/images/bg.gif | Bin 0 -> 89 bytes .../demo/login/images/header1.jpg | Bin 0 -> 442 bytes .../demo/login/images/page.gif | Bin 0 -> 664 bytes .../demo/login/images/required_star.gif | Bin 0 -> 121 bytes .../jquery-validation-1.8.1/demo/login/index.html | 76 + .../jquery-validation-1.8.1/demo/login/screen.css | 457 + .../demo/marketo/emails.php | 10 + .../demo/marketo/emails.phps | 10 + .../jquery-validation-1.8.1/demo/marketo/ie6.css | 35 + .../demo/marketo/images/backRequiredGray.gif | Bin 0 -> 137 bytes .../demo/marketo/images/back_green-fade.gif | Bin 0 -> 2421 bytes .../demo/marketo/images/back_nav_blue.gif | Bin 0 -> 1668 bytes .../demo/marketo/images/blank.gif | Bin 0 -> 799 bytes .../demo/marketo/images/button-submit.gif | Bin 0 -> 4527 bytes .../demo/marketo/images/favicon.ico | Bin 0 -> 1150 bytes .../demo/marketo/images/help.png | Bin 0 -> 1615 bytes .../demo/marketo/images/left-nav-callout-long.png | Bin 0 -> 1381 bytes .../demo/marketo/images/login-sprite.gif | Bin 0 -> 2017 bytes .../demo/marketo/images/logo_marketo.gif | Bin 0 -> 8363 bytes .../demo/marketo/images/sf.png | Bin 0 -> 3745 bytes .../demo/marketo/images/step1-24.gif | Bin 0 -> 1357 bytes .../demo/marketo/images/step2-24.gif | Bin 0 -> 1355 bytes .../demo/marketo/images/step3-24.gif | Bin 0 -> 1362 bytes .../demo/marketo/images/tab-sprite.gif | Bin 0 -> 4710 bytes .../demo/marketo/images/tab_green.gif | Bin 0 -> 1652 bytes .../demo/marketo/images/time.png | Bin 0 -> 793 bytes .../demo/marketo/images/toggle.gif | Bin 0 -> 845 bytes .../demo/marketo/images/warning.gif | Bin 0 -> 234 bytes .../demo/marketo/index.html | 247 + .../demo/marketo/jquery.maskedinput.js | 267 + .../demo/marketo/mktSignup.js | 125 + .../jquery-validation-1.8.1/demo/marketo/step2.htm | 291 + .../demo/marketo/stylesheet.css | 1179 + bug/bug/jquery-validation-1.8.1/demo/milk/bg.gif | Bin 0 -> 73 bytes .../jquery-validation-1.8.1/demo/milk/emails.php | 10 + .../jquery-validation-1.8.1/demo/milk/emails.phps | 10 + .../jquery-validation-1.8.1/demo/milk/index.html | 235 + .../demo/milk/left_white.png | Bin 0 -> 538 bytes bug/bug/jquery-validation-1.8.1/demo/milk/milk.css | 236 + bug/bug/jquery-validation-1.8.1/demo/milk/milk.png | Bin 0 -> 5121 bytes .../demo/milk/right_white.png | Bin 0 -> 1579 bytes .../jquery-validation-1.8.1/demo/milk/users.php | 12 + .../jquery-validation-1.8.1/demo/milk/users.phps | 10 + .../demo/multipart/index.html | 412 + .../demo/multipart/js/jquery.maskedinput-1.0.js | 246 + .../demo/multipart/js/ui.accordion.js | 477 + .../demo/multipart/js/ui.core.js | 519 + .../demo/multipart/style.css | 705 + .../demo/radio-checkbox-select-demo.html | 155 + .../jquery-validation-1.8.1/demo/tabs/index.html | 157 + .../demo/themerollered.html | 227 + .../demo/tinymce/index.html | 75 + .../demo/tinymce/themes/simple/editor_template.js | 1 + .../demo/tinymce/themes/simple/img/icons.gif | Bin 0 -> 1440 bytes .../demo/tinymce/themes/simple/langs/en.js | 11 + .../tinymce/themes/simple/skins/default/ui.css | 32 + .../demo/tinymce/tiny_mce.js | 1 + bug/bug/jquery-validation-1.8.1/jquery.validate.js | 1166 + .../jquery-validation-1.8.1/jquery.validate.min.js | 51 + .../jquery-validation-1.8.1/lib/jquery-1.3.2.js | 4376 ++ .../jquery-validation-1.8.1/lib/jquery-1.4.2.js | 6240 +++ .../jquery-validation-1.8.1/lib/jquery-1.4.4.js | 7179 +++ .../jquery-validation-1.8.1/lib/jquery-1.5.2.js | 8374 ++++ .../jquery-validation-1.8.1/lib/jquery-1.6.1.js | 8936 ++++ bug/bug/jquery-validation-1.8.1/lib/jquery.form.js | 660 + bug/bug/jquery-validation-1.8.1/lib/jquery.js | 4376 ++ .../jquery-validation-1.8.1/lib/jquery.metadata.js | 122 + .../jquery-validation-1.8.1/lib/jquery.mockjax.js | 382 + .../localization/messages_ar.js | 24 + .../localization/messages_bg.js | 23 + .../localization/messages_ca.js | 23 + .../localization/messages_cn.js | 23 + .../localization/messages_cs.js | 23 + .../localization/messages_da.js | 20 + .../localization/messages_de.js | 20 + .../localization/messages_el.js | 24 + .../localization/messages_es.js | 23 + .../localization/messages_fa.js | 23 + .../localization/messages_fi.js | 21 + .../localization/messages_fr.js | 23 + .../localization/messages_ge.js | 23 + .../localization/messages_he.js | 23 + .../localization/messages_hu.js | 20 + .../localization/messages_it.js | 23 + .../localization/messages_ja.js | 23 + .../localization/messages_kk.js | 23 + .../localization/messages_lt.js | 23 + .../localization/messages_lv.js | 23 + .../localization/messages_nl.js | 23 + .../localization/messages_no.js | 23 + .../localization/messages_pl.js | 23 + .../localization/messages_ptbr.js | 23 + .../localization/messages_ptpt.js | 23 + .../localization/messages_ro.js | 23 + .../localization/messages_ru.js | 23 + .../localization/messages_se.js | 21 + .../localization/messages_si.js | 23 + .../localization/messages_sk.js | 20 + .../localization/messages_sr.js | 23 + .../localization/messages_th.js | 23 + .../localization/messages_tr.js | 23 + .../localization/messages_tw.js | 23 + .../localization/messages_ua.js | 23 + .../localization/messages_vi.js | 23 + .../localization/methods_de.js | 12 + .../localization/methods_nl.js | 9 + .../localization/methods_pt.js | 9 + bug/bug/jquery-validation-1.8.1/test/events.html | 71 + .../test/firebug/errorIcon.png | Bin 0 -> 457 bytes .../test/firebug/firebug.css | 209 + .../test/firebug/firebug.html | 23 + .../test/firebug/firebug.js | 672 + .../test/firebug/firebugx.js | 10 + .../test/firebug/infoIcon.png | Bin 0 -> 524 bytes .../test/firebug/warningIcon.png | Bin 0 -> 516 bytes bug/bug/jquery-validation-1.8.1/test/index.html | 277 + bug/bug/jquery-validation-1.8.1/test/jquery.js | 25 + bug/bug/jquery-validation-1.8.1/test/large.html | 188 + bug/bug/jquery-validation-1.8.1/test/messages.js | 62 + bug/bug/jquery-validation-1.8.1/test/methods.js | 584 + .../jquery-validation-1.8.1/test/qunit/qunit.css | 225 + .../jquery-validation-1.8.1/test/qunit/qunit.js | 1442 + bug/bug/jquery-validation-1.8.1/test/rules.js | 267 + .../test/selects/index.html | 444 + bug/bug/jquery-validation-1.8.1/test/tabs.html | 78 + bug/bug/jquery-validation-1.8.1/test/test.js | 1139 + bug/bug/jquery-validation-1.8.1/todo | 172 + bug/bug/jquery-validation-1.8.1/version.txt | 1 + bug/bug/jquery.iframe-post-form.js | 92 + bug/bug/portal-break.png | Bin 0 -> 242 bytes bug/bug/qunit.css | 197 + bug/bug/qunit.js | 1415 + bug/bug/test.html | 110 + bug/bug/test.js | 243 + bug/component_comments.xsl | 28 + bug/components.xsl | 25 + bug/index.html | 3 + bug/libreoffice-bug.html | 75 + bug/query.pl | 27 + bug/subcomponents.pl | 0 bug/subcomponents.xsl | 26 + 204 files changed, 113273 insertions(+) create mode 100644 bug/Makefile create mode 100644 bug/bug.xhtml create mode 100644 bug/bug.xsl create mode 100644 bug/bug/2011-02-form.html create mode 100644 bug/bug/2011-08-27-form.html create mode 100644 bug/bug/Makefile create mode 100644 bug/bug/bg-sidebar.png create mode 100644 bug/bug/bug.css create mode 100644 bug/bug/bug.js create mode 100644 bug/bug/frame.html create mode 100644 bug/bug/icons/Chart.png create mode 100644 bug/bug/icons/Database.png create mode 100644 bug/bug/icons/Documentation.png create mode 100644 bug/bug/icons/Drawing.png create mode 100644 bug/bug/icons/Extensions.png create mode 100644 bug/bug/icons/Formula_editor.png create mode 100644 bug/bug/icons/Installation.png create mode 100644 bug/bug/icons/LibreOffice_Initial_Icons-pre_final.svg create mode 100644 bug/bug/icons/Libreoffice.png create mode 100644 bug/bug/icons/PDF_export.png create mode 100644 bug/bug/icons/Presentation.png create mode 100644 bug/bug/icons/Spreadsheet.png create mode 100644 bug/bug/icons/WRITER.png create mode 100644 bug/bug/icons/WWW.png create mode 100644 bug/bug/jquery-1.6.2.js create mode 100644 bug/bug/jquery-validation-1.8.1.zip create mode 100644 bug/bug/jquery-validation-1.8.1/README.md create mode 100644 bug/bug/jquery-validation-1.8.1/additional-methods.js create mode 100644 bug/bug/jquery-validation-1.8.1/additional-methods.min.js create mode 100644 bug/bug/jquery-validation-1.8.1/changelog.txt create mode 100644 bug/bug/jquery-validation-1.8.1/demo/ajaxSubmit-intergration-demo.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/captcha/captcha.js create mode 100644 bug/bug/jquery-validation-1.8.1/demo/captcha/fonts/Anorexia.ttf create mode 100644 bug/bug/jquery-validation-1.8.1/demo/captcha/image_req.php create mode 100644 bug/bug/jquery-validation-1.8.1/demo/captcha/images/button.png create mode 100644 bug/bug/jquery-validation-1.8.1/demo/captcha/images/button.psd create mode 100644 bug/bug/jquery-validation-1.8.1/demo/captcha/images/image.php create mode 100644 bug/bug/jquery-validation-1.8.1/demo/captcha/index.php create mode 100644 bug/bug/jquery-validation-1.8.1/demo/captcha/newsession.php create mode 100644 bug/bug/jquery-validation-1.8.1/demo/captcha/process.php create mode 100644 bug/bug/jquery-validation-1.8.1/demo/captcha/rand.php create mode 100644 bug/bug/jquery-validation-1.8.1/demo/captcha/style.css create mode 100644 bug/bug/jquery-validation-1.8.1/demo/css/chili.css create mode 100644 bug/bug/jquery-validation-1.8.1/demo/css/cmxform.css create mode 100644 bug/bug/jquery-validation-1.8.1/demo/css/cmxformTemplate.css create mode 100644 bug/bug/jquery-validation-1.8.1/demo/css/core.css create mode 100644 bug/bug/jquery-validation-1.8.1/demo/css/reset.css create mode 100644 bug/bug/jquery-validation-1.8.1/demo/css/screen.css create mode 100644 bug/bug/jquery-validation-1.8.1/demo/custom-messages-metadata-demo.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/custom-methods-demo.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/dynamic-totals.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/errorcontainer-demo.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/example.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/form.php create mode 100644 bug/bug/jquery-validation-1.8.1/demo/form.phps create mode 100644 bug/bug/jquery-validation-1.8.1/demo/images/bg.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/images/checked.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/images/cmxform-divider.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/images/cmxform-fieldset.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/images/loading.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/images/unchecked.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/index.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/js/chili-1.7.pack.js create mode 100644 bug/bug/jquery-validation-1.8.1/demo/login/images/bg.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/login/images/header1.jpg create mode 100644 bug/bug/jquery-validation-1.8.1/demo/login/images/page.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/login/images/required_star.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/login/index.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/login/screen.css create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/emails.php create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/emails.phps create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/ie6.css create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/backRequiredGray.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/back_green-fade.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/back_nav_blue.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/blank.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/button-submit.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/favicon.ico create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/help.png create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/left-nav-callout-long.png create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/login-sprite.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/logo_marketo.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/sf.png create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/step1-24.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/step2-24.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/step3-24.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/tab-sprite.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/tab_green.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/time.png create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/toggle.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/images/warning.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/index.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/jquery.maskedinput.js create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/mktSignup.js create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/step2.htm create mode 100644 bug/bug/jquery-validation-1.8.1/demo/marketo/stylesheet.css create mode 100644 bug/bug/jquery-validation-1.8.1/demo/milk/bg.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/milk/emails.php create mode 100644 bug/bug/jquery-validation-1.8.1/demo/milk/emails.phps create mode 100644 bug/bug/jquery-validation-1.8.1/demo/milk/index.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/milk/left_white.png create mode 100644 bug/bug/jquery-validation-1.8.1/demo/milk/milk.css create mode 100644 bug/bug/jquery-validation-1.8.1/demo/milk/milk.png create mode 100644 bug/bug/jquery-validation-1.8.1/demo/milk/right_white.png create mode 100644 bug/bug/jquery-validation-1.8.1/demo/milk/users.php create mode 100644 bug/bug/jquery-validation-1.8.1/demo/milk/users.phps create mode 100644 bug/bug/jquery-validation-1.8.1/demo/multipart/index.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/multipart/js/jquery.maskedinput-1.0.js create mode 100644 bug/bug/jquery-validation-1.8.1/demo/multipart/js/ui.accordion.js create mode 100644 bug/bug/jquery-validation-1.8.1/demo/multipart/js/ui.core.js create mode 100644 bug/bug/jquery-validation-1.8.1/demo/multipart/style.css create mode 100644 bug/bug/jquery-validation-1.8.1/demo/radio-checkbox-select-demo.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/tabs/index.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/themerollered.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/tinymce/index.html create mode 100644 bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/editor_template.js create mode 100644 bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/img/icons.gif create mode 100644 bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/langs/en.js create mode 100644 bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/skins/default/ui.css create mode 100644 bug/bug/jquery-validation-1.8.1/demo/tinymce/tiny_mce.js create mode 100644 bug/bug/jquery-validation-1.8.1/jquery.validate.js create mode 100644 bug/bug/jquery-validation-1.8.1/jquery.validate.min.js create mode 100644 bug/bug/jquery-validation-1.8.1/lib/jquery-1.3.2.js create mode 100644 bug/bug/jquery-validation-1.8.1/lib/jquery-1.4.2.js create mode 100644 bug/bug/jquery-validation-1.8.1/lib/jquery-1.4.4.js create mode 100644 bug/bug/jquery-validation-1.8.1/lib/jquery-1.5.2.js create mode 100644 bug/bug/jquery-validation-1.8.1/lib/jquery-1.6.1.js create mode 100644 bug/bug/jquery-validation-1.8.1/lib/jquery.form.js create mode 100644 bug/bug/jquery-validation-1.8.1/lib/jquery.js create mode 100644 bug/bug/jquery-validation-1.8.1/lib/jquery.metadata.js create mode 100644 bug/bug/jquery-validation-1.8.1/lib/jquery.mockjax.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_ar.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_bg.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_ca.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_cn.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_cs.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_da.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_de.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_el.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_es.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_fa.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_fi.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_fr.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_ge.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_he.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_hu.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_it.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_ja.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_kk.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_lt.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_lv.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_nl.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_no.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_pl.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_ptbr.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_ptpt.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_ro.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_ru.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_se.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_si.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_sk.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_sr.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_th.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_tr.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_tw.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_ua.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/messages_vi.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/methods_de.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/methods_nl.js create mode 100644 bug/bug/jquery-validation-1.8.1/localization/methods_pt.js create mode 100644 bug/bug/jquery-validation-1.8.1/test/events.html create mode 100644 bug/bug/jquery-validation-1.8.1/test/firebug/errorIcon.png create mode 100644 bug/bug/jquery-validation-1.8.1/test/firebug/firebug.css create mode 100644 bug/bug/jquery-validation-1.8.1/test/firebug/firebug.html create mode 100644 bug/bug/jquery-validation-1.8.1/test/firebug/firebug.js create mode 100644 bug/bug/jquery-validation-1.8.1/test/firebug/firebugx.js create mode 100644 bug/bug/jquery-validation-1.8.1/test/firebug/infoIcon.png create mode 100644 bug/bug/jquery-validation-1.8.1/test/firebug/warningIcon.png create mode 100644 bug/bug/jquery-validation-1.8.1/test/index.html create mode 100644 bug/bug/jquery-validation-1.8.1/test/jquery.js create mode 100644 bug/bug/jquery-validation-1.8.1/test/large.html create mode 100644 bug/bug/jquery-validation-1.8.1/test/messages.js create mode 100644 bug/bug/jquery-validation-1.8.1/test/methods.js create mode 100644 bug/bug/jquery-validation-1.8.1/test/qunit/qunit.css create mode 100644 bug/bug/jquery-validation-1.8.1/test/qunit/qunit.js create mode 100644 bug/bug/jquery-validation-1.8.1/test/rules.js create mode 100644 bug/bug/jquery-validation-1.8.1/test/selects/index.html create mode 100644 bug/bug/jquery-validation-1.8.1/test/tabs.html create mode 100644 bug/bug/jquery-validation-1.8.1/test/test.js create mode 100644 bug/bug/jquery-validation-1.8.1/todo create mode 100644 bug/bug/jquery-validation-1.8.1/version.txt create mode 100644 bug/bug/jquery.iframe-post-form.js create mode 100644 bug/bug/portal-break.png create mode 100644 bug/bug/qunit.css create mode 100644 bug/bug/qunit.js create mode 100644 bug/bug/test.html create mode 100644 bug/bug/test.js create mode 100644 bug/component_comments.xsl create mode 100644 bug/components.xsl create mode 100644 bug/index.html create mode 100644 bug/libreoffice-bug.html create mode 100644 bug/query.pl create mode 100644 bug/subcomponents.pl create mode 100644 bug/subcomponents.xsl diff --git a/bug/Makefile b/bug/Makefile new file mode 100644 index 0000000..da6d621 --- /dev/null +++ b/bug/Makefile @@ -0,0 +1,13 @@ +all: extract compose + #jscoverage --no-instrument=jquery-validation-1.8.1 bug bug-cover + +extract: + curl --silent http://wiki.documentfoundation.org/BugReport_Details | tidy --numeric-entities yes -asxhtml 2>/dev/null | perl -pe 's|xmlns="http://www.w3.org/1999/xhtml"||' > BugReport_Details.xhtml + xsltproc --encoding UTF-8 --novalid component_comments.xsl BugReport_Details.xhtml > component_comments.xhtml + xsltproc --encoding UTF-8 --novalid subcomponents.xsl BugReport_Details.xhtml > subcomponents.xhtml + xsltproc --encoding UTF-8 --novalid components.xsl BugReport_Details.xhtml > components.xhtml + curl --silent 'https://bugs.freedesktop.org/query.cgi?product=LibreOffice&query_format=advanced' > query.xhtml + perl query.pl versions < query.xhtml > versions.xhtml + +compose: + xsltproc --encoding UTF-8 --novalid bug.xsl bug.xhtml > bug/bug.html diff --git a/bug/bug.xhtml b/bug/bug.xhtml new file mode 100644 index 0000000..1b0355d --- /dev/null +++ b/bug/bug.xhtml @@ -0,0 +1,141 @@ + + + + + ] + > + + + Bug Filing Form + + + + + + + + +
+
+
Steps
+
+
1/5 Component
+
2/5 Subcomponent
+
3/5 Version
+
4/5 Description
+
5/5 Submit
+
+
+
+
+ Thank you for using LibreOffice, we regret that you seem to have found a problem in our software, so that you decided to report a bug. This assistant will lead you step by step through the bug report process. +
+ + + +
+
+
+
+ BASIC + Chart + Contrib + Database + Documentation + Drawing + Extensions + Formula + Installation +
+
+ Libreoffice + Linguistic + Localization + PDF + Presentation + Spreadsheet + UI + WRITER + WWW +
+
+
+ +
+
Component
+
&components;
+
&component_comments;
+
+ +
+ Sub component
+
+ +
+ Version &versions; +
+ +
+
Subject: (5 chars min).
+
Long description (10 chars min):
+
+ +
+
SUBMIT
+
+
+
+ +
+ Related bug reports + +
+ +
+
&subcomponents;
+
+ +
+ +
+ The bug report has been successfully submitted +
+ +
+ Upload an attachment illustrating the problem +
+ + + + + + + +
+
+ +
+ +
+
+ + + diff --git a/bug/bug.xsl b/bug/bug.xsl new file mode 100644 index 0000000..30c516e --- /dev/null +++ b/bug/bug.xsl @@ -0,0 +1,18 @@ + + + + + + + + + + + + + diff --git a/bug/bug/2011-02-form.html b/bug/bug/2011-02-form.html new file mode 100644 index 0000000..577d268 --- /dev/null +++ b/bug/bug/2011-02-form.html @@ -0,0 +1,150 @@ + + + + Bug Filing Form + + + + +

Before You File Your Bug

+ +

Is this bug specific to a certain document? YesNo

+ + + +

+

+ +

Extra information:

+ + + + + + + +
Crashes the programCauses loss of contentCauses loss of layoutetc.
+ + +

+

+

+

+

+

+

Or skip straight to a fresh bug report here.

+ + \ No newline at end of file diff --git a/bug/bug/2011-08-27-form.html b/bug/bug/2011-08-27-form.html new file mode 100644 index 0000000..ce1fea2 --- /dev/null +++ b/bug/bug/2011-08-27-form.html @@ -0,0 +1,82 @@ + + + + Bug Filing Form + + + + + + + +
+

Before You File Your Bug

+

+ Is this bug specific to a certain document? + Yes + No +

+ +
+
+ Can you attach the document to this bug report? + Yes + No + +

+ Without the document related to your bug it will be difficult or impossible for us to solve your problem. +

+ +
+
+ Can you trim the document down to reproduce the bug only, and attach that document? + Yes + No + +

+ Great! Please make the file as small as possible, making sure to reproduce only the intended bug and attach it to the bug report. +

+ +

+ Without trimming the document down it will be difficult for us to diagnose the problem and fix it. However, we might be able to fix it regardless. +

+
+
+
+
+ + + +
+ + diff --git a/bug/bug/Makefile b/bug/bug/Makefile new file mode 100644 index 0000000..06b769a --- /dev/null +++ b/bug/bug/Makefile @@ -0,0 +1,2 @@ +all: + jscoverage --no-instrument=js/jquery.placeholder-1.0.1.js --no-instrument=js/jquery.query-2.1.7.js static static-coverage \ No newline at end of file diff --git a/bug/bug/bg-sidebar.png b/bug/bug/bg-sidebar.png new file mode 100644 index 0000000..cfd37e6 Binary files /dev/null and b/bug/bug/bg-sidebar.png differ diff --git a/bug/bug/bug.css b/bug/bug/bug.css new file mode 100644 index 0000000..1302565 --- /dev/null +++ b/bug/bug/bug.css @@ -0,0 +1,116 @@ +body { + margin: 0; + height: 650px; +} + +.content { + width: 800px; +} + +.content > div { + display: inline-block; + vertical-align: top; +} + +.left { + background: #FFF url('bg-sidebar.png') no-repeat top left; + padding-top: 75px; + width: 200px; + height: 100%; + font-size: 0.75em; +} + +.left > div { + margin-left: 40px; +} + +.left .steps { + background: transparent url('portal-break.png') no-repeat top left; + height: 100%; + width: 140px; +} + +.right { + padding: 20px; + width: 550px; +} + +.right .state { + margin: 5px; + border: 3px solid #18A303; +} + +/* signin */ +.signin { + margin: 5px; + border: 3px solid #18A303; + display: none; +} + +.signin .error { + background-color: #ff5555; +} + +.signin .go { + background-color: #BADA55; +} + +/* state_component */ +.state_component > div { + vertical-align: top; + display: inline-block; +} + +.state_component { + display: none; +} + +.state_component .comments { + width: 250px; +} + +.state_component .comments .comment { + display: none; +} + +/* state_subcomponent */ +.state_subcomponent { + display: none; +} + +.state_subcomponent .subcomponents { + display: none; +} + +/* state_version */ +.state_version { + display: none; +} + +/* state_description */ +.state_description { + display: none; +} + +/* state_submit */ +.state_submit { + display: none; +} + +.state_submit .error { + background-color: #ff5555; +} + +.state_submit .go { + background-color: #BADA55; +} + +/* state_success */ +.state_success { + display: none; +} + +/* state_attach */ +.state_attach { + display: none; +} diff --git a/bug/bug/bug.js b/bug/bug/bug.js new file mode 100644 index 0000000..baf86f2 --- /dev/null +++ b/bug/bug/bug.js @@ -0,0 +1,213 @@ +// +// Copyright (C) 2011 Loic Dachary +// +// 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 3 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, see . +// +(function($) { + + $.bug = { + + post: $.post, + + get: $.get, + + // if this string is found in the page returned when + // trying to login, it means the login / password combination + // is invalid. + state_signin_error_string: 'throw_error', + + state_signin: function() { + var element = $('.signin'); + $('.go', element).click(function() { + $('.error', element).empty(); + $.bug.post('/index.cgi', { + Bugzilla_login: $('.user', element).val(), + Bugzilla_password: $('.password', element).val() + }, function(data) { + if(data.indexOf($.bug.state_signin_error_string) < 0) { + element.hide(); + $.bug.state_component(); + } else { + $('.error', element).text('invalid user or password'); + } + }); + }); + element.show(); + }, + + state_component: function() { + var element = $('.state_component'); + + var change_component = function() { + var component = $(this).val(); + $('.comment', element).hide(); + $('.comment.' + component, element).show(); + $.bug.state_subcomponent(); + }; + + $('.component', element).change(change_component); + $('.component', element).prop("selectedIndex", 0); + + element.show(); + }, + + state_subcomponent: function() { + var element = $('.state_subcomponent'); + var component = $('.state_component .component').val(); + var subcomponent = $('.subcomponents .' + component, element).html(); + $('.active_subcomponent', element).html(subcomponent); + var change_subcomponent = function() { + $.bug.refresh_related_bugs(); + $.bug.state_version(); + }; + + $('.subcomponent', element).change(change_subcomponent); + $('.subcomponent', element).prop("selectedIndex", 0); + + element.show(); + }, + + state_version: function() { + var element = $('.state_version'); + if(!element.hasClass('initialized')) { + $(".versions", element).change(function() { + $.bug.state_description(); + }); + $(".versions").prop("selectedIndex", 0); + element.addClass('initialized'); + element.show(); + } + }, + + state_description: function() { + var element = $('.state_description'); + if(!element.hasClass('initialized')) { + var validate = function() { + if($(".short", element).val().length > 3 && + $(".long", element).val().length > 10) { + $.bug.state_submit(); + } + }; + + $(".short", element).change(function() { validate(); }); + $(".long", element).keyup(function() { validate(); }); + element.addClass('initialized'); + element.show(); + } + }, + + state_submit_error_string: 'font size="+2">', + state_submit_success_string: 'title>Bug ', + + state_submit: function() { + var element = $('.state_submit'); + if(!element.hasClass('initialized')) { + $('.go', element).click(function() { + $.bug.post('/post_bug.cgi', { + product: 'LibreOffice', + bug_status: 'UNCONFIRMED', + rep_platform: 'Other', + op_sys: 'All', + bug_severity: 'normal', + priority: 'medium', + assigned_to: 'libreoffice-bugs@lists.freedesktop.org', + component: $('.state_component .component').val(), + short_desc: $('.state_subcomponent .active_subcomponent .subcomponent').val() + ': ' + $('.state_description .short').val(), + version: $('.state_version .versions').val(), + comment: $('.state_description .long').val(), + }, function(data) { + var error = data.indexOf($.bug.state_submit_error_string); + if(error >= 0) { + $('.error', element).text(data.substring(error + $.bug.state_submit_error_string.length, data.indexOf('<', error))); + } else { + var success = data.indexOf($.bug.state_submit_success_string); + var start = success + $.bug.state_submit_success_string.length; + $('.bug', element).text(data.substring(start, data.indexOf(' ', start))); + $.bug.state_success(); + $.bug.state_attach(); + } + }); + }); + element.addClass('initialized'); + element.show(); + } + }, + + state_attach_error_string: 'class="throw_error">', + state_attach_success_string: 'Attachment #', + + state_attach: function() { + var element = $('.state_attach'); + var bug = $('.state_submit .bug').text(); + $('.bug', element).val(bug); + $('form', element).iframePostForm({ complete: function(data) { + var error = data.indexOf($.bug.state_attach_error_string); + if(error >= 0) { + $('.error', element).text(data.substring(error + $.bug.state_attach_error_string.length, data.indexOf('<', error))); + } else { + var success = data.indexOf($.bug.state_attach_success_string); + var attachment = data.substring(success + $.bug.state_attach_success_string.length, data.indexOf('<', success)); + $('img', element).attr('src', '/attachment.cgi?id=' + attachment); + } + }}); + element.show(); + }, + + state_success: function() { + $('.submission').hide(); + var element = $('.state_success'); + var bug = $('.state_submit .bug').text(); + $('.bug', element).attr('href', '/show_bug.cgi?id=' + bug); + element.show(); + }, + + // if this string is found in the page returned when + // trying to fill a bug, it means the user is not logged in + logged_in_false: 'form name="login"', + + logged_in: function() { + $("body").css("cursor", "progress"); + return $.bug.get('/enter_bug.cgi').pipe(function(data) { + $("body").css("cursor", "default"); + return data.indexOf($.bug.logged_in_false) < 0; + }); + }, + + refresh_related_bugs: function() { + $('.related_bugs').empty(); + var component = $('.state_component .component').val().replace('_','%20'); + var subcomponent = $('.state_subcomponent .subcomponent').val(); + var list = '/buglist.cgi?columnlist=short_desc&component=' + component + '&product=LibreOffice&query_format=advanced&short_desc_type=allwordssubstr&ctype=csv&short_desc=' + subcomponent; + $.bug.get(list, undefined, function(data) { + var lines = data.split('\n'); + var bug_urls = []; + for(var i = 1; i < lines.length; i++) { + bug_urls.push(lines[i].replace(/([0-9]*),"(.*)"/,'$2')); + } + $('.related_bugs').html(bug_urls.join('
')); + }); + }, + + main: function() { + $.bug.logged_in().done(function(status) { + if(status) { + $.bug.state_component(); + } else { + $.bug.state_signin(); + } + }); + } + }; + +})(jQuery); diff --git a/bug/bug/frame.html b/bug/bug/frame.html new file mode 100644 index 0000000..a522f14 --- /dev/null +++ b/bug/bug/frame.html @@ -0,0 +1,21 @@ + + + Bug Filing Form + + + + +
+ + + + diff --git a/bug/bug/icons/Chart.png b/bug/bug/icons/Chart.png new file mode 100644 index 0000000..c45c8cb Binary files /dev/null and b/bug/bug/icons/Chart.png differ diff --git a/bug/bug/icons/Database.png b/bug/bug/icons/Database.png new file mode 100644 index 0000000..7817eec Binary files /dev/null and b/bug/bug/icons/Database.png differ diff --git a/bug/bug/icons/Documentation.png b/bug/bug/icons/Documentation.png new file mode 100644 index 0000000..5f6ecd8 Binary files /dev/null and b/bug/bug/icons/Documentation.png differ diff --git a/bug/bug/icons/Drawing.png b/bug/bug/icons/Drawing.png new file mode 100644 index 0000000..94f9890 Binary files /dev/null and b/bug/bug/icons/Drawing.png differ diff --git a/bug/bug/icons/Extensions.png b/bug/bug/icons/Extensions.png new file mode 100644 index 0000000..cc17fed Binary files /dev/null and b/bug/bug/icons/Extensions.png differ diff --git a/bug/bug/icons/Formula_editor.png b/bug/bug/icons/Formula_editor.png new file mode 100644 index 0000000..6d3dbd6 Binary files /dev/null and b/bug/bug/icons/Formula_editor.png differ diff --git a/bug/bug/icons/Installation.png b/bug/bug/icons/Installation.png new file mode 100644 index 0000000..08edcec Binary files /dev/null and b/bug/bug/icons/Installation.png differ diff --git a/bug/bug/icons/LibreOffice_Initial_Icons-pre_final.svg b/bug/bug/icons/LibreOffice_Initial_Icons-pre_final.svg new file mode 100644 index 0000000..5a6a8c2 --- /dev/null +++ b/bug/bug/icons/LibreOffice_Initial_Icons-pre_final.svg @@ -0,0 +1,44463 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Dokument-Symbol:- Hauptprogramm- Dokument (farbig)- Template (teilweise farbig, Ringlochung)Applikations-Symbol:- Abhängig von Applikation bzw. Dokument-TypZusatz-Informationen: keineBesonderheit:16px kleine Symbole haben A150 Hintergrund, damit blauer Hintergrund besser durchscheint ---> Feedback von Ivan 2011-01-06 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 01011000110101101011010100101001010100 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LibreOffice + Text (Writer) + Spreadsheet (Calc) + Presentation (Impress) + Drawing (Draw) + Database (Base) + Math + Chart + Macro + Printer Administration + High Contrast + Default Color + 256px x 256px + LibreOffice Installer + Text HTML / Empty (Writer Web) + Document Icons and Application Icons + Text (Writer) + Spreadsheet (Calc) + Presentation (Impress) + Drawing (Draw) + Database (Base) + Text HTML / Empty (Writer Web) + Template Icons + Master Document + Additional Document Icons + Tools Icons + Main Application Icon + 128px x 128px + High Contrast + Default Color + DC + 48px x 48px + HC + 32px + + 16px + DC + HC + D + H + InformationMore Information: See the The Document Foundation, LibreOffice Wiki + Export Images1. Make sure the "Size Placeholder Document Symbols" rects are labelled correctly:2. Naming convention has to be <name>_<size>[_hc] - see the existing ones for examples3. Select the "Size Placeholder Document Symbols" layer, make it fully transparent4. Run the cnvsvg.py script + LibreOffice Initial Icons + not required + Very low Priority--> doubled 12ßpx icons? + Low Priority + Needed? + Draft Area Below This Line + + + + + + diff --git a/bug/bug/icons/Libreoffice.png b/bug/bug/icons/Libreoffice.png new file mode 100644 index 0000000..314bee9 Binary files /dev/null and b/bug/bug/icons/Libreoffice.png differ diff --git a/bug/bug/icons/PDF_export.png b/bug/bug/icons/PDF_export.png new file mode 100644 index 0000000..3b717e8 Binary files /dev/null and b/bug/bug/icons/PDF_export.png differ diff --git a/bug/bug/icons/Presentation.png b/bug/bug/icons/Presentation.png new file mode 100644 index 0000000..f3c1d60 Binary files /dev/null and b/bug/bug/icons/Presentation.png differ diff --git a/bug/bug/icons/Spreadsheet.png b/bug/bug/icons/Spreadsheet.png new file mode 100644 index 0000000..c314d04 Binary files /dev/null and b/bug/bug/icons/Spreadsheet.png differ diff --git a/bug/bug/icons/WRITER.png b/bug/bug/icons/WRITER.png new file mode 100644 index 0000000..1a0c507 Binary files /dev/null and b/bug/bug/icons/WRITER.png differ diff --git a/bug/bug/icons/WWW.png b/bug/bug/icons/WWW.png new file mode 100644 index 0000000..64a8bc4 Binary files /dev/null and b/bug/bug/icons/WWW.png differ diff --git a/bug/bug/jquery-1.6.2.js b/bug/bug/jquery-1.6.2.js new file mode 100644 index 0000000..f3201aa --- /dev/null +++ b/bug/bug/jquery-1.6.2.js @@ -0,0 +1,8981 @@ +/*! + * jQuery JavaScript Library v1.6.2 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Jun 30 14:16:56 2011 -0400 + */ +(function( window, undefined ) { + +// Use the correct document accordingly with window argument (sandbox) +var document = window.document, + navigator = window.navigator, + location = window.location; +var jQuery = (function() { + +// Define a local copy of jQuery +var jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // A central reference to the root jQuery(document) + rootjQuery, + + // A simple way to check for HTML strings or ID strings + // (both of which we optimize for) + quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + + // Check if a string has a non-whitespace character in it + rnotwhite = /\S/, + + // Used for trimming whitespace + trimLeft = /^\s+/, + trimRight = /\s+$/, + + // Check for digits + rdigit = /\d/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, + rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + + // Useragent RegExp + rwebkit = /(webkit)[ \/]([\w.]+)/, + ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, + rmsie = /(msie) ([\w.]+)/, + rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, + + // Matches dashed string for camelizing + rdashAlpha = /-([a-z])/ig, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }, + + // Keep a UserAgent string for use with jQuery.browser + userAgent = navigator.userAgent, + + // For matching the engine and version of the browser + browserMatch, + + // The deferred used on DOM ready + readyList, + + // The ready event handler + DOMContentLoaded, + + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + trim = String.prototype.trim, + indexOf = Array.prototype.indexOf, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), or $(undefined) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // The body element only exists once, optimize finding it + if ( selector === "body" && !context && document.body ) { + this.context = document; + this[0] = document.body; + this.selector = selector; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = quickExpr.exec( selector ); + } + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + doc = (context ? context.ownerDocument || context : document); + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + ret = rsingleTag.exec( selector ); + + if ( ret ) { + if ( jQuery.isPlainObject( context ) ) { + selector = [ document.createElement( ret[1] ) ]; + jQuery.fn.attr.call( selector, context, true ); + + } else { + selector = [ doc.createElement( ret[1] ) ]; + } + + } else { + ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); + selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes; + } + + return jQuery.merge( this, selector ); + + // HANDLE: $("#id") + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return (context || rootjQuery).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if (selector.selector !== undefined) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.6.2", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return slice.call( this, 0 ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = this.constructor(); + + if ( jQuery.isArray( elems ) ) { + push.apply( ret, elems ); + + } else { + jQuery.merge( ret, elems ); + } + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + (this.selector ? " " : "") + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Attach the listeners + jQuery.bindReady(); + + // Add the callback + readyList.done( fn ); + + return this; + }, + + eq: function( i ) { + return i === -1 ? + this.slice( i ) : + this.slice( i, +i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ), + "slice", slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + // Either a released hold or an DOMready/load event and not yet ready + if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger( "ready" ).unbind( "ready" ); + } + } + }, + + bindReady: function() { + if ( readyList ) { + return; + } + + readyList = jQuery._Deferred(); + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + return setTimeout( jQuery.ready, 1 ); + } + + // Mozilla, Opera and webkit nightlies currently support this event + if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else if ( document.attachEvent ) { + // ensure firing before onload, + // maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", DOMContentLoaded ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var toplevel = false; + + try { + toplevel = window.frameElement == null; + } catch(e) {} + + if ( document.documentElement.doScroll && toplevel ) { + doScrollCheck(); + } + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + // A crude way of determining if an object is a window + isWindow: function( obj ) { + return obj && typeof obj === "object" && "setInterval" in obj; + }, + + isNaN: function( obj ) { + return obj == null || !rdigit.test( obj ) || isNaN( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + for ( var name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw msg; + }, + + parseJSON: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return (new Function( "return " + data ))(); + + } + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + // (xml & tmp used internally) + parseXML: function( data , xml , tmp ) { + + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + + tmp = xml.documentElement; + + if ( ! tmp || ! tmp.nodeName || tmp.nodeName === "parsererror" ) { + jQuery.error( "Invalid XML: " + data ); + } + + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && rnotwhite.test( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Converts a dashed string to camelCased string; + // Used by both the css and data modules + camelCase: function( string ) { + return string.replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, + length = object.length, + isObj = length === undefined || jQuery.isFunction( object ); + + if ( args ) { + if ( isObj ) { + for ( name in object ) { + if ( callback.apply( object[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( object[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in object ) { + if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { + break; + } + } + } + } + + return object; + }, + + // Use native String.trim function wherever possible + trim: trim ? + function( text ) { + return text == null ? + "" : + trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); + }, + + // results is for internal usage only + makeArray: function( array, results ) { + var ret = results || []; + + if ( array != null ) { + // The window, strings (and functions) also have 'length' + // The extra typeof function check is to prevent crashes + // in Safari 2 (See: #3039) + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + var type = jQuery.type( array ); + + if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { + push.call( ret, array ); + } else { + jQuery.merge( ret, array ); + } + } + + return ret; + }, + + inArray: function( elem, array ) { + + if ( indexOf ) { + return indexOf.call( array, elem ); + } + + for ( var i = 0, length = array.length; i < length; i++ ) { + if ( array[ i ] === elem ) { + return i; + } + } + + return -1; + }, + + merge: function( first, second ) { + var i = first.length, + j = 0; + + if ( typeof second.length === "number" ) { + for ( var l = second.length; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var ret = [], retVal; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, key, ret = [], + i = 0, + length = elems.length, + // jquery objects are treated as arrays + isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( key in elems ) { + value = callback( elems[ key ], key, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return ret.concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + if ( typeof context === "string" ) { + var tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + var args = slice.call( arguments, 2 ), + proxy = function() { + return fn.apply( context, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; + + return proxy; + }, + + // Mutifunctional method to get and set values to a collection + // The value/s can optionally be executed if it's a function + access: function( elems, key, value, exec, fn, pass ) { + var length = elems.length; + + // Setting many attributes + if ( typeof key === "object" ) { + for ( var k in key ) { + jQuery.access( elems, k, key[k], exec, fn, value ); + } + return elems; + } + + // Setting one attribute + if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = !pass && exec && jQuery.isFunction(value); + + for ( var i = 0; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + + return elems; + } + + // Getting an attribute + return length ? fn( elems[0], key ) : undefined; + }, + + now: function() { + return (new Date()).getTime(); + }, + + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + uaMatch: function( ua ) { + ua = ua.toLowerCase(); + + var match = rwebkit.exec( ua ) || + ropera.exec( ua ) || + rmsie.exec( ua ) || + ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || + []; + + return { browser: match[1] || "", version: match[2] || "0" }; + }, + + sub: function() { + function jQuerySub( selector, context ) { + return new jQuerySub.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySub, this ); + jQuerySub.superclass = this; + jQuerySub.fn = jQuerySub.prototype = this(); + jQuerySub.fn.constructor = jQuerySub; + jQuerySub.sub = this.sub; + jQuerySub.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { + context = jQuerySub( context ); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); + }; + jQuerySub.fn.init.prototype = jQuerySub.fn; + var rootjQuerySub = jQuerySub(document); + return jQuerySub; + }, + + browser: {} +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +browserMatch = jQuery.uaMatch( userAgent ); +if ( browserMatch.browser ) { + jQuery.browser[ browserMatch.browser ] = true; + jQuery.browser.version = browserMatch.version; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +// IE doesn't match non-breaking spaces with \s +if ( rnotwhite.test( "\xA0" ) ) { + trimLeft = /^[\s\xA0]+/; + trimRight = /[\s\xA0]+$/; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch(e) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +return jQuery; + +})(); + + +var // Promise methods + promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ), + // Static reference to slice + sliceDeferred = [].slice; + +jQuery.extend({ + // Create a simple deferred (one callbacks list) + _Deferred: function() { + var // callbacks list + callbacks = [], + // stored [ context , args ] + fired, + // to avoid firing when already doing so + firing, + // flag to know if the deferred has been cancelled + cancelled, + // the deferred itself + deferred = { + + // done( f1, f2, ...) + done: function() { + if ( !cancelled ) { + var args = arguments, + i, + length, + elem, + type, + _fired; + if ( fired ) { + _fired = fired; + fired = 0; + } + for ( i = 0, length = args.length; i < length; i++ ) { + elem = args[ i ]; + type = jQuery.type( elem ); + if ( type === "array" ) { + deferred.done.apply( deferred, elem ); + } else if ( type === "function" ) { + callbacks.push( elem ); + } + } + if ( _fired ) { + deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] ); + } + } + return this; + }, + + // resolve with given context and args + resolveWith: function( context, args ) { + if ( !cancelled && !fired && !firing ) { + // make sure args are available (#8421) + args = args || []; + firing = 1; + try { + while( callbacks[ 0 ] ) { + callbacks.shift().apply( context, args ); + } + } + finally { + fired = [ context, args ]; + firing = 0; + } + } + return this; + }, + + // resolve with this as context and given arguments + resolve: function() { + deferred.resolveWith( this, arguments ); + return this; + }, + + // Has this deferred been resolved? + isResolved: function() { + return !!( firing || fired ); + }, + + // Cancel + cancel: function() { + cancelled = 1; + callbacks = []; + return this; + } + }; + + return deferred; + }, + + // Full fledged deferred (two callbacks list) + Deferred: function( func ) { + var deferred = jQuery._Deferred(), + failDeferred = jQuery._Deferred(), + promise; + // Add errorDeferred methods, then and promise + jQuery.extend( deferred, { + then: function( doneCallbacks, failCallbacks ) { + deferred.done( doneCallbacks ).fail( failCallbacks ); + return this; + }, + always: function() { + return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments ); + }, + fail: failDeferred.done, + rejectWith: failDeferred.resolveWith, + reject: failDeferred.resolve, + isRejected: failDeferred.isResolved, + pipe: function( fnDone, fnFail ) { + return jQuery.Deferred(function( newDefer ) { + jQuery.each( { + done: [ fnDone, "resolve" ], + fail: [ fnFail, "reject" ] + }, function( handler, data ) { + var fn = data[ 0 ], + action = data[ 1 ], + returned; + if ( jQuery.isFunction( fn ) ) { + deferred[ handler ](function() { + returned = fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise().then( newDefer.resolve, newDefer.reject ); + } else { + newDefer[ action ]( returned ); + } + }); + } else { + deferred[ handler ]( newDefer[ action ] ); + } + }); + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + if ( obj == null ) { + if ( promise ) { + return promise; + } + promise = obj = {}; + } + var i = promiseMethods.length; + while( i-- ) { + obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ]; + } + return obj; + } + }); + // Make sure only one callback list will be used + deferred.done( failDeferred.cancel ).fail( deferred.cancel ); + // Unexpose cancel + delete deferred.cancel; + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + return deferred; + }, + + // Deferred helper + when: function( firstParam ) { + var args = arguments, + i = 0, + length = args.length, + count = length, + deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? + firstParam : + jQuery.Deferred(); + function resolveFunc( i ) { + return function( value ) { + args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + if ( !( --count ) ) { + // Strange bug in FF4: + // Values changed onto the arguments object sometimes end up as undefined values + // outside the $.when method. Cloning the object into a fresh array solves the issue + deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) ); + } + }; + } + if ( length > 1 ) { + for( ; i < length; i++ ) { + if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) { + args[ i ].promise().then( resolveFunc(i), deferred.reject ); + } else { + --count; + } + } + if ( !count ) { + deferred.resolveWith( deferred, args ); + } + } else if ( deferred !== firstParam ) { + deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); + } + return deferred.promise(); + } +}); + + + +jQuery.support = (function() { + + var div = document.createElement( "div" ), + documentElement = document.documentElement, + all, + a, + select, + opt, + input, + marginDiv, + support, + fragment, + body, + testElementParent, + testElement, + testElementStyle, + tds, + events, + eventName, + i, + isSupported; + + // Preliminary tests + div.setAttribute("className", "t"); + div.innerHTML = "
a"; + + all = div.getElementsByTagName( "*" ); + a = div.getElementsByTagName( "a" )[ 0 ]; + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return {}; + } + + // First batch of supports tests + select = document.createElement( "select" ); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName( "input" )[ 0 ]; + + support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: ( div.firstChild.nodeType === 3 ), + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName( "tbody" ).length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName( "link" ).length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: ( a.getAttribute( "href" ) === "/a" ), + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.55$/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: ( input.value === "on" ), + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // Will be defined later + submitBubbles: true, + changeBubbles: true, + focusinBubbles: false, + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: true + }; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { + div.attachEvent( "onclick", function() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + support.noCloneEvent = false; + }); + div.cloneNode( true ).fireEvent( "onclick" ); + } + + // Check if a radio maintains it's value + // after being appended to the DOM + input = document.createElement("input"); + input.value = "t"; + input.setAttribute("type", "radio"); + support.radioValue = input.value === "t"; + + input.setAttribute("checked", "checked"); + div.appendChild( input ); + fragment = document.createDocumentFragment(); + fragment.appendChild( div.firstChild ); + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + div.innerHTML = ""; + + // Figure out if the W3C box model works as expected + div.style.width = div.style.paddingLeft = "1px"; + + body = document.getElementsByTagName( "body" )[ 0 ]; + // We use our own, invisible, body unless the body is already present + // in which case we use a div (#9239) + testElement = document.createElement( body ? "div" : "body" ); + testElementStyle = { + visibility: "hidden", + width: 0, + height: 0, + border: 0, + margin: 0 + }; + if ( body ) { + jQuery.extend( testElementStyle, { + position: "absolute", + left: -1000, + top: -1000 + }); + } + for ( i in testElementStyle ) { + testElement.style[ i ] = testElementStyle[ i ]; + } + testElement.appendChild( div ); + testElementParent = body || documentElement; + testElementParent.insertBefore( testElement, testElementParent.firstChild ); + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + support.boxModel = div.offsetWidth === 2; + + if ( "zoom" in div.style ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.style.display = "inline"; + div.style.zoom = 1; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = ""; + div.innerHTML = "
"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); + } + + div.innerHTML = "
t
"; + tds = div.getElementsByTagName( "td" ); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE < 8 fail this test) + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + div.innerHTML = ""; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. For more + // info see bug #3333 + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + if ( document.defaultView && document.defaultView.getComputedStyle ) { + marginDiv = document.createElement( "div" ); + marginDiv.style.width = "0"; + marginDiv.style.marginRight = "0"; + div.appendChild( marginDiv ); + support.reliableMarginRight = + ( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; + } + + // Remove the body element we added + testElement.innerHTML = ""; + testElementParent.removeChild( testElement ); + + // Technique from Juriy Zaytsev + // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( div.attachEvent ) { + for( i in { + submit: 1, + change: 1, + focusin: 1 + } ) { + eventName = "on" + i; + isSupported = ( eventName in div ); + if ( !isSupported ) { + div.setAttribute( eventName, "return;" ); + isSupported = ( typeof div[ eventName ] === "function" ); + } + support[ i + "Bubbles" ] = isSupported; + } + } + + // Null connected elements to avoid leaks in IE + testElement = fragment = select = opt = body = marginDiv = div = input = null; + + return support; +})(); + +// Keep track of boxModel +jQuery.boxModel = jQuery.support.boxModel; + + + + +var rbrace = /^(?:\{.*\}|\[.*\])$/, + rmultiDash = /([a-z])([A-Z])/g; + +jQuery.extend({ + cache: {}, + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var internalKey = jQuery.expando, getByName = typeof name === "string", thisCache, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ jQuery.expando ] = id = ++jQuery.uuid; + } else { + id = jQuery.expando; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery + // metadata on plain JS objects when the object is serialized using + // JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name); + } else { + cache[ id ] = jQuery.extend(cache[ id ], name); + } + } + + thisCache = cache[ id ]; + + // Internal jQuery data is stored in a separate object inside the object's data + // cache in order to avoid key collisions between internal data and user-defined + // data + if ( pvt ) { + if ( !thisCache[ internalKey ] ) { + thisCache[ internalKey ] = {}; + } + + thisCache = thisCache[ internalKey ]; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should + // not attempt to inspect the internal events object using jQuery.data, as this + // internal data object is undocumented and subject to change. + if ( name === "events" && !thisCache[name] ) { + return thisCache[ internalKey ] && thisCache[ internalKey ].events; + } + + return getByName ? + // Check for both converted-to-camel and non-converted data property names + thisCache[ jQuery.camelCase( name ) ] || thisCache[ name ] : + thisCache; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var internalKey = jQuery.expando, isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + + // See jQuery.data for more information + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + var thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ]; + + if ( thisCache ) { + delete thisCache[ name ]; + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !isEmptyDataObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( pvt ) { + delete cache[ id ][ internalKey ]; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject(cache[ id ]) ) { + return; + } + } + + var internalCache = cache[ id ][ internalKey ]; + + // Browsers that fail expando deletion also refuse to delete expandos on + // the window, but it will allow it on all other JS objects; other browsers + // don't care + if ( jQuery.support.deleteExpando || cache != window ) { + delete cache[ id ]; + } else { + cache[ id ] = null; + } + + // We destroyed the entire user cache at once because it's faster than + // iterating through each key, but we need to continue to persist internal + // data if it existed + if ( internalCache ) { + cache[ id ] = {}; + // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery + // metadata on plain JS objects when the object is serialized using + // JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + + cache[ id ][ internalKey ] = internalCache; + + // Otherwise, we need to eliminate the expando on the node to avoid + // false lookups in the cache for entries that no longer exist + } else if ( isNode ) { + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( jQuery.support.deleteExpando ) { + delete elem[ jQuery.expando ]; + } else if ( elem.removeAttribute ) { + elem.removeAttribute( jQuery.expando ); + } else { + elem[ jQuery.expando ] = null; + } + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + if ( elem.nodeName ) { + var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; + + if ( match ) { + return !(match === true || elem.getAttribute("classid") !== match); + } + } + + return true; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var data = null; + + if ( typeof key === "undefined" ) { + if ( this.length ) { + data = jQuery.data( this[0] ); + + if ( this[0].nodeType === 1 ) { + var attr = this[0].attributes, name; + for ( var i = 0, l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.substring(5) ); + + dataAttr( this[0], name, data[ name ] ); + } + } + } + } + + return data; + + } else if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + var parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + // Try to fetch any internally stored data first + if ( data === undefined && this.length ) { + data = jQuery.data( this[0], key ); + data = dataAttr( this[0], key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + + } else { + return this.each(function() { + var $this = jQuery( this ), + args = [ parts[0], value ]; + + $this.triggerHandler( "setData" + parts[1] + "!", args ); + jQuery.data( this, key, value ); + $this.triggerHandler( "changeData" + parts[1] + "!", args ); + }); + } + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + var name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + !jQuery.isNaN( data ) ? parseFloat( data ) : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON +// property to be considered empty objects; this property always exists in +// order to make sure JSON.stringify does not expose internal metadata +function isEmptyDataObject( obj ) { + for ( var name in obj ) { + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + + + + +function handleQueueMarkDefer( elem, type, src ) { + var deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + defer = jQuery.data( elem, deferDataKey, undefined, true ); + if ( defer && + ( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) && + ( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) { + // Give room for hard-coded callbacks to fire first + // and eventually mark/queue something else on the element + setTimeout( function() { + if ( !jQuery.data( elem, queueDataKey, undefined, true ) && + !jQuery.data( elem, markDataKey, undefined, true ) ) { + jQuery.removeData( elem, deferDataKey, true ); + defer.resolve(); + } + }, 0 ); + } +} + +jQuery.extend({ + + _mark: function( elem, type ) { + if ( elem ) { + type = (type || "fx") + "mark"; + jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true ); + } + }, + + _unmark: function( force, elem, type ) { + if ( force !== true ) { + type = elem; + elem = force; + force = false; + } + if ( elem ) { + type = type || "fx"; + var key = type + "mark", + count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 ); + if ( count ) { + jQuery.data( elem, key, count, true ); + } else { + jQuery.removeData( elem, key, true ); + handleQueueMarkDefer( elem, type, "mark" ); + } + } + }, + + queue: function( elem, type, data ) { + if ( elem ) { + type = (type || "fx") + "queue"; + var q = jQuery.data( elem, type, undefined, true ); + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !q || jQuery.isArray(data) ) { + q = jQuery.data( elem, type, jQuery.makeArray(data), true ); + } else { + q.push( data ); + } + } + return q || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(), + defer; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift("inprogress"); + } + + fn.call(elem, function() { + jQuery.dequeue(elem, type); + }); + } + + if ( !queue.length ) { + jQuery.removeData( elem, type + "queue", true ); + handleQueueMarkDefer( elem, type, "queue" ); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + } + + if ( data === undefined ) { + return jQuery.queue( this[0], type ); + } + return this.each(function() { + var queue = jQuery.queue( this, type, data ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; + type = type || "fx"; + + return this.queue( type, function() { + var elem = this; + setTimeout(function() { + jQuery.dequeue( elem, type ); + }, time ); + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, object ) { + if ( typeof type !== "string" ) { + object = type; + type = undefined; + } + type = type || "fx"; + var defer = jQuery.Deferred(), + elements = this, + i = elements.length, + count = 1, + deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + tmp; + function resolve() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + } + while( i-- ) { + if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || + ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || + jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && + jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) { + count++; + tmp.done( resolve ); + } + } + resolve(); + return defer.promise(); + } +}); + + + + +var rclass = /[\n\t\r]/g, + rspace = /\s+/, + rreturn = /\r/g, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea)?$/i, + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + rinvalidChar = /\:|^on/, + formHook, boolHook; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.attr ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.prop ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classNames, i, l, elem, + setClass, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call(this, j, this.className) ); + }); + } + + if ( value && typeof value === "string" ) { + classNames = value.split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className && classNames.length === 1 ) { + elem.className = value; + + } else { + setClass = " " + elem.className + " "; + + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { + setClass += classNames[ c ] + " "; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classNames, i, l, elem, className, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call(this, j, this.className) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + classNames = (value || "").split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + className = (" " + elem.className + " ").replace( rclass, " " ); + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[ c ] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( rspace ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " "; + for ( var i = 0, l = this.length; i < l; i++ ) { + if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var hooks, ret, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return undefined; + } + + var isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var self = jQuery(this), val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, + index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + // Fixes Bug #2551 -- select.val() broken in IE after form.reset() + if ( one && !values.length && options.length ) { + return jQuery( options[ index ] ).val(); + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attrFix: { + // Always normalize to ensure hook usage + tabindex: "tabIndex" + }, + + attr: function( elem, name, value, pass ) { + var nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return undefined; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery( elem )[ name ]( value ); + } + + // Fallback to prop when attributes are not supported + if ( !("getAttribute" in elem) ) { + return jQuery.prop( elem, name, value ); + } + + var ret, hooks, + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // Normalize the name if needed + if ( notxml ) { + name = jQuery.attrFix[ name ] || name; + + hooks = jQuery.attrHooks[ name ]; + + if ( !hooks ) { + // Use boolHook for boolean attributes + if ( rboolean.test( name ) ) { + + hooks = boolHook; + + // Use formHook for forms and if the name contains certain characters + } else if ( formHook && name !== "className" && + (jQuery.nodeName( elem, "form" ) || rinvalidChar.test( name )) ) { + + hooks = formHook; + } + } + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return undefined; + + } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, "" + value ); + return value; + } + + } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + ret = elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return ret === null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, name ) { + var propName; + if ( elem.nodeType === 1 ) { + name = jQuery.attrFix[ name ] || name; + + if ( jQuery.support.getSetAttribute ) { + // Use removeAttribute in browsers that support it + elem.removeAttribute( name ); + } else { + jQuery.attr( elem, name, "" ); + elem.removeAttributeNode( elem.getAttributeNode( name ) ); + } + + // Set corresponding property to false for boolean attributes + if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) { + elem[ propName ] = false; + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to it's default in case type is set after value + // This is for element creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + }, + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode("tabIndex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + }, + // Use the value property for back compat + // Use the formHook for button elements in IE6/7 (#1954) + value: { + get: function( elem, name ) { + if ( formHook && jQuery.nodeName( elem, "button" ) ) { + return formHook.get( elem, name ); + } + return name in elem ? + elem.value : + null; + }, + set: function( elem, value, name ) { + if ( formHook && jQuery.nodeName( elem, "button" ) ) { + return formHook.set( elem, value, name ); + } + // Does not return so that setAttribute is also used + elem.value = value; + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return undefined; + } + + var ret, hooks, + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return (elem[ name ] = value); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== undefined ) { + return ret; + + } else { + return elem[ name ]; + } + } + }, + + propHooks: {} +}); + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + // Align boolean attributes with corresponding properties + return jQuery.prop( elem, name ) ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + var propName; + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + // value is true since we know at this point it's type boolean and not false + // Set boolean attributes to the same name and set the DOM property + propName = jQuery.propFix[ name ] || name; + if ( propName in elem ) { + // Only set the IDL specifically if it already exists on the element + elem[ propName ] = true; + } + + elem.setAttribute( name, name.toLowerCase() ); + } + return name; + } +}; + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !jQuery.support.getSetAttribute ) { + + // propFix is more comprehensive and contains all fixes + jQuery.attrFix = jQuery.propFix; + + // Use this for any attribute on a form in IE6/7 + formHook = jQuery.attrHooks.name = jQuery.attrHooks.title = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret; + ret = elem.getAttributeNode( name ); + // Return undefined if nodeValue is empty string + return ret && ret.nodeValue !== "" ? + ret.nodeValue : + undefined; + }, + set: function( elem, value, name ) { + // Check form objects in IE (multiple bugs related) + // Only use nodeValue if the attribute node exists on the form + var ret = elem.getAttributeNode( name ); + if ( ret ) { + ret.nodeValue = value; + return value; + } + } + }; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); +} + + +// Some attributes require a special call on IE +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret === null ? undefined : ret; + } + }); + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Normalize to lowercase since IE uppercases css property names + return elem.style.cssText.toLowerCase() || undefined; + }, + set: function( elem, value ) { + return (elem.style.cssText = "" + value); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + }); +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0); + } + } + }); +}); + + + + +var rnamespaces = /\.(.*)$/, + rformElems = /^(?:textarea|input|select)$/i, + rperiod = /\./g, + rspaces = / /g, + rescape = /[^\w\s.|`]/g, + fcleanup = function( nm ) { + return nm.replace(rescape, "\\$&"); + }; + +/* + * A number of helper functions used for managing events. + * Many of the ideas behind this code originated from + * Dean Edwards' addEvent library. + */ +jQuery.event = { + + // Bind an event to an element + // Original by Dean Edwards + add: function( elem, types, handler, data ) { + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + if ( handler === false ) { + handler = returnFalse; + } else if ( !handler ) { + // Fixes bug #7229. Fix recommended by jdalton + return; + } + + var handleObjIn, handleObj; + + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + } + + // Make sure that the function being executed has a unique ID + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure + var elemData = jQuery._data( elem ); + + // If no elemData is found then we must be trying to bind to one of the + // banned noData elements + if ( !elemData ) { + return; + } + + var events = elemData.events, + eventHandle = elemData.handle; + + if ( !events ) { + elemData.events = events = {}; + } + + if ( !eventHandle ) { + elemData.handle = eventHandle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.handle.apply( eventHandle.elem, arguments ) : + undefined; + }; + } + + // Add elem as a property of the handle function + // This is to prevent a memory leak with non-native events in IE. + eventHandle.elem = elem; + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = types.split(" "); + + var type, i = 0, namespaces; + + while ( (type = types[ i++ ]) ) { + handleObj = handleObjIn ? + jQuery.extend({}, handleObjIn) : + { handler: handler, data: data }; + + // Namespaced event handlers + if ( type.indexOf(".") > -1 ) { + namespaces = type.split("."); + type = namespaces.shift(); + handleObj.namespace = namespaces.slice(0).sort().join("."); + + } else { + namespaces = []; + handleObj.namespace = ""; + } + + handleObj.type = type; + if ( !handleObj.guid ) { + handleObj.guid = handler.guid; + } + + // Get the current list of functions bound to this event + var handlers = events[ type ], + special = jQuery.event.special[ type ] || {}; + + // Init the event handler queue + if ( !handlers ) { + handlers = events[ type ] = []; + + // Check for a special event handler + // Only use addEventListener/attachEvent if the special + // events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add the function to the element's handler list + handlers.push( handleObj ); + + // Keep track of which events have been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, pos ) { + // don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + if ( handler === false ) { + handler = returnFalse; + } + + var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ), + events = elemData && elemData.events; + + if ( !elemData || !events ) { + return; + } + + // types is actually an event object here + if ( types && types.type ) { + handler = types.handler; + types = types.type; + } + + // Unbind all events for the element + if ( !types || typeof types === "string" && types.charAt(0) === "." ) { + types = types || ""; + + for ( type in events ) { + jQuery.event.remove( elem, type + types ); + } + + return; + } + + // Handle multiple events separated by a space + // jQuery(...).unbind("mouseover mouseout", fn); + types = types.split(" "); + + while ( (type = types[ i++ ]) ) { + origType = type; + handleObj = null; + all = type.indexOf(".") < 0; + namespaces = []; + + if ( !all ) { + // Namespaced event handlers + namespaces = type.split("."); + type = namespaces.shift(); + + namespace = new RegExp("(^|\\.)" + + jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + eventType = events[ type ]; + + if ( !eventType ) { + continue; + } + + if ( !handler ) { + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( all || namespace.test( handleObj.namespace ) ) { + jQuery.event.remove( elem, origType, handleObj.handler, j ); + eventType.splice( j--, 1 ); + } + } + + continue; + } + + special = jQuery.event.special[ type ] || {}; + + for ( j = pos || 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( handler.guid === handleObj.guid ) { + // remove the given handler for the given type + if ( all || namespace.test( handleObj.namespace ) ) { + if ( pos == null ) { + eventType.splice( j--, 1 ); + } + + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + + if ( pos != null ) { + break; + } + } + } + + // remove generic event handler if no more handlers exist + if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + ret = null; + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + var handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + delete elemData.events; + delete elemData.handle; + + if ( jQuery.isEmptyObject( elemData ) ) { + jQuery.removeData( elem, undefined, true ); + } + } + }, + + // Events that are safe to short-circuit if no handlers are attached. + // Native DOM events should not be added, they may have inline handlers. + customEvent: { + "getData": true, + "setData": true, + "changeData": true + }, + + trigger: function( event, data, elem, onlyHandlers ) { + // Event object or event type + var type = event.type || event, + namespaces = [], + exclusive; + + if ( type.indexOf("!") >= 0 ) { + // Exclusive events trigger only for the exact event (no namespaces) + type = type.slice(0, -1); + exclusive = true; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + + if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { + // No jQuery handlers for this event type, and it can't have inline handlers + return; + } + + // Caller can pass in an Event, Object, or just an event type string + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + new jQuery.Event( type, event ) : + // Just the event type (string) + new jQuery.Event( type ); + + event.type = type; + event.exclusive = exclusive; + event.namespace = namespaces.join("."); + event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)"); + + // triggerHandler() and global events don't bubble or run the default action + if ( onlyHandlers || !elem ) { + event.preventDefault(); + event.stopPropagation(); + } + + // Handle a global trigger + if ( !elem ) { + // TODO: Stop taunting the data cache; remove global events and always attach to document + jQuery.each( jQuery.cache, function() { + // internalKey variable is just used to make it easier to find + // and potentially change this stuff later; currently it just + // points to jQuery.expando + var internalKey = jQuery.expando, + internalCache = this[ internalKey ]; + if ( internalCache && internalCache.events && internalCache.events[ type ] ) { + jQuery.event.trigger( event, data, internalCache.handle.elem ); + } + }); + return; + } + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // Clean up the event in case it is being reused + event.result = undefined; + event.target = elem; + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data != null ? jQuery.makeArray( data ) : []; + data.unshift( event ); + + var cur = elem, + // IE doesn't like method names with a colon (#3533, #8272) + ontype = type.indexOf(":") < 0 ? "on" + type : ""; + + // Fire event on the current element, then bubble up the DOM tree + do { + var handle = jQuery._data( cur, "handle" ); + + event.currentTarget = cur; + if ( handle ) { + handle.apply( cur, data ); + } + + // Trigger an inline bound script + if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) { + event.result = false; + event.preventDefault(); + } + + // Bubble up to document, then to window + cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window; + } while ( cur && !event.isPropagationStopped() ); + + // If nobody prevented the default action, do it now + if ( !event.isDefaultPrevented() ) { + var old, + special = jQuery.event.special[ type ] || {}; + + if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction)() check here because IE6/7 fails that test. + // IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch. + try { + if ( ontype && elem[ type ] ) { + // Don't re-trigger an onFOO event when we call its FOO() method + old = elem[ ontype ]; + + if ( old ) { + elem[ ontype ] = null; + } + + jQuery.event.triggered = type; + elem[ type ](); + } + } catch ( ieError ) {} + + if ( old ) { + elem[ ontype ] = old; + } + + jQuery.event.triggered = undefined; + } + } + + return event.result; + }, + + handle: function( event ) { + event = jQuery.event.fix( event || window.event ); + // Snapshot the handlers list since a called handler may add/remove events. + var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0), + run_all = !event.exclusive && !event.namespace, + args = Array.prototype.slice.call( arguments, 0 ); + + // Use the fix-ed Event rather than the (read-only) native event + args[0] = event; + event.currentTarget = this; + + for ( var j = 0, l = handlers.length; j < l; j++ ) { + var handleObj = handlers[ j ]; + + // Triggered event must 1) be non-exclusive and have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event. + if ( run_all || event.namespace_re.test( handleObj.namespace ) ) { + // Pass in a reference to the handler function itself + // So that we can later remove it + event.handler = handleObj.handler; + event.data = handleObj.data; + event.handleObj = handleObj; + + var ret = handleObj.handler.apply( this, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + return event.result; + }, + + props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // store a copy of the original event object + // and "clone" to set read-only properties + var originalEvent = event; + event = jQuery.Event( originalEvent ); + + for ( var i = this.props.length, prop; i; ) { + prop = this.props[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary + if ( !event.target ) { + // Fixes #1925 where srcElement might not be defined either + event.target = event.srcElement || document; + } + + // check if target is a textnode (safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && event.fromElement ) { + event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; + } + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && event.clientX != null ) { + var eventDocument = event.target.ownerDocument || document, + doc = eventDocument.documentElement, + body = eventDocument.body; + + event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); + event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); + } + + // Add which for key events + if ( event.which == null && (event.charCode != null || event.keyCode != null) ) { + event.which = event.charCode != null ? event.charCode : event.keyCode; + } + + // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) + if ( !event.metaKey && event.ctrlKey ) { + event.metaKey = event.ctrlKey; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && event.button !== undefined ) { + event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); + } + + return event; + }, + + // Deprecated, use jQuery.guid instead + guid: 1E8, + + // Deprecated, use jQuery.proxy instead + proxy: jQuery.proxy, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady, + teardown: jQuery.noop + }, + + live: { + add: function( handleObj ) { + jQuery.event.add( this, + liveConvert( handleObj.origType, handleObj.selector ), + jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); + }, + + remove: function( handleObj ) { + jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj ); + } + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !this.preventDefault ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // timeStamp is buggy for some events on Firefox(#3843) + // So we won't rely on the native value + this.timeStamp = jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Checks if an event happened on an element within another element +// Used in jQuery.event.special.mouseenter and mouseleave handlers +var withinElement = function( event ) { + + // Check if mouse(over|out) are still within the same parent element + var related = event.relatedTarget, + inside = false, + eventType = event.type; + + event.type = event.data; + + if ( related !== this ) { + + if ( related ) { + inside = jQuery.contains( this, related ); + } + + if ( !inside ) { + + jQuery.event.handle.apply( this, arguments ); + + event.type = eventType; + } + } +}, + +// In case of event delegation, we only need to rename the event.type, +// liveHandler will take care of the rest. +delegate = function( event ) { + event.type = event.data; + jQuery.event.handle.apply( this, arguments ); +}; + +// Create mouseenter and mouseleave events +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + setup: function( data ) { + jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); + }, + teardown: function( data ) { + jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); + } + }; +}); + +// submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function( data, namespaces ) { + if ( !jQuery.nodeName( this, "form" ) ) { + jQuery.event.add(this, "click.specialSubmit", function( e ) { + var elem = e.target, + type = elem.type; + + if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { + trigger( "submit", this, arguments ); + } + }); + + jQuery.event.add(this, "keypress.specialSubmit", function( e ) { + var elem = e.target, + type = elem.type; + + if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { + trigger( "submit", this, arguments ); + } + }); + + } else { + return false; + } + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialSubmit" ); + } + }; + +} + +// change delegation, happens here so we have bind. +if ( !jQuery.support.changeBubbles ) { + + var changeFilters, + + getVal = function( elem ) { + var type = elem.type, val = elem.value; + + if ( type === "radio" || type === "checkbox" ) { + val = elem.checked; + + } else if ( type === "select-multiple" ) { + val = elem.selectedIndex > -1 ? + jQuery.map( elem.options, function( elem ) { + return elem.selected; + }).join("-") : + ""; + + } else if ( jQuery.nodeName( elem, "select" ) ) { + val = elem.selectedIndex; + } + + return val; + }, + + testChange = function testChange( e ) { + var elem = e.target, data, val; + + if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) { + return; + } + + data = jQuery._data( elem, "_change_data" ); + val = getVal(elem); + + // the current data will be also retrieved by beforeactivate + if ( e.type !== "focusout" || elem.type !== "radio" ) { + jQuery._data( elem, "_change_data", val ); + } + + if ( data === undefined || val === data ) { + return; + } + + if ( data != null || val ) { + e.type = "change"; + e.liveFired = undefined; + jQuery.event.trigger( e, arguments[1], elem ); + } + }; + + jQuery.event.special.change = { + filters: { + focusout: testChange, + + beforedeactivate: testChange, + + click: function( e ) { + var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; + + if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) { + testChange.call( this, e ); + } + }, + + // Change has to be called before submit + // Keydown will be called before keypress, which is used in submit-event delegation + keydown: function( e ) { + var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; + + if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) || + (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || + type === "select-multiple" ) { + testChange.call( this, e ); + } + }, + + // Beforeactivate happens also before the previous element is blurred + // with this event you can't trigger a change event, but you can store + // information + beforeactivate: function( e ) { + var elem = e.target; + jQuery._data( elem, "_change_data", getVal(elem) ); + } + }, + + setup: function( data, namespaces ) { + if ( this.type === "file" ) { + return false; + } + + for ( var type in changeFilters ) { + jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); + } + + return rformElems.test( this.nodeName ); + }, + + teardown: function( namespaces ) { + jQuery.event.remove( this, ".specialChange" ); + + return rformElems.test( this.nodeName ); + } + }; + + changeFilters = jQuery.event.special.change.filters; + + // Handle when the input is .focus()'d + changeFilters.focus = changeFilters.beforeactivate; +} + +function trigger( type, elem, args ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + // Don't pass args or remember liveFired; they apply to the donor event. + var event = jQuery.extend( {}, args[ 0 ] ); + event.type = type; + event.originalEvent = {}; + event.liveFired = undefined; + jQuery.event.handle.call( elem, event ); + if ( event.isDefaultPrevented() ) { + args[ 0 ].preventDefault(); + } +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + + function handler( donor ) { + // Donor event is always a native one; fix it and switch its type. + // Let focusin/out handler cancel the donor focus/blur event. + var e = jQuery.event.fix( donor ); + e.type = fix; + e.originalEvent = {}; + jQuery.event.trigger( e, null, e.target ); + if ( e.isDefaultPrevented() ) { + donor.preventDefault(); + } + } + }); +} + +jQuery.each(["bind", "one"], function( i, name ) { + jQuery.fn[ name ] = function( type, data, fn ) { + var handler; + + // Handle object literals + if ( typeof type === "object" ) { + for ( var key in type ) { + this[ name ](key, data, type[key], fn); + } + return this; + } + + if ( arguments.length === 2 || data === false ) { + fn = data; + data = undefined; + } + + if ( name === "one" ) { + handler = function( event ) { + jQuery( this ).unbind( event, handler ); + return fn.apply( this, arguments ); + }; + handler.guid = fn.guid || jQuery.guid++; + } else { + handler = fn; + } + + if ( type === "unload" && name !== "one" ) { + this.one( type, data, fn ); + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.add( this[i], type, handler, data ); + } + } + + return this; + }; +}); + +jQuery.fn.extend({ + unbind: function( type, fn ) { + // Handle object literals + if ( typeof type === "object" && !type.preventDefault ) { + for ( var key in type ) { + this.unbind(key, type[key]); + } + + } else { + for ( var i = 0, l = this.length; i < l; i++ ) { + jQuery.event.remove( this[i], type, fn ); + } + } + + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.live( types, data, fn, selector ); + }, + + undelegate: function( selector, types, fn ) { + if ( arguments.length === 0 ) { + return this.unbind( "live" ); + + } else { + return this.die( types, null, fn, selector ); + } + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + + triggerHandler: function( type, data ) { + if ( this[0] ) { + return jQuery.event.trigger( type, data, this[0], true ); + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + guid = fn.guid || jQuery.guid++, + i = 0, + toggler = function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + }; + + // link all the functions, so any of them can unbind this click handler + toggler.guid = guid; + while ( i < args.length ) { + args[ i++ ].guid = guid; + } + + return this.click( toggler ); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +var liveMap = { + focus: "focusin", + blur: "focusout", + mouseenter: "mouseover", + mouseleave: "mouseout" +}; + +jQuery.each(["live", "die"], function( i, name ) { + jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { + var type, i = 0, match, namespaces, preType, + selector = origSelector || this.selector, + context = origSelector ? this : jQuery( this.context ); + + if ( typeof types === "object" && !types.preventDefault ) { + for ( var key in types ) { + context[ name ]( key, data, types[key], selector ); + } + + return this; + } + + if ( name === "die" && !types && + origSelector && origSelector.charAt(0) === "." ) { + + context.unbind( origSelector ); + + return this; + } + + if ( data === false || jQuery.isFunction( data ) ) { + fn = data || returnFalse; + data = undefined; + } + + types = (types || "").split(" "); + + while ( (type = types[ i++ ]) != null ) { + match = rnamespaces.exec( type ); + namespaces = ""; + + if ( match ) { + namespaces = match[0]; + type = type.replace( rnamespaces, "" ); + } + + if ( type === "hover" ) { + types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); + continue; + } + + preType = type; + + if ( liveMap[ type ] ) { + types.push( liveMap[ type ] + namespaces ); + type = type + namespaces; + + } else { + type = (liveMap[ type ] || type) + namespaces; + } + + if ( name === "live" ) { + // bind live handler + for ( var j = 0, l = context.length; j < l; j++ ) { + jQuery.event.add( context[j], "live." + liveConvert( type, selector ), + { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); + } + + } else { + // unbind live handler + context.unbind( "live." + liveConvert( type, selector ), fn ); + } + } + + return this; + }; +}); + +function liveHandler( event ) { + var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret, + elems = [], + selectors = [], + events = jQuery._data( this, "events" ); + + // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911) + if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) { + return; + } + + if ( event.namespace ) { + namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)"); + } + + event.liveFired = this; + + var live = events.live.slice(0); + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { + selectors.push( handleObj.selector ); + + } else { + live.splice( j--, 1 ); + } + } + + match = jQuery( event.target ).closest( selectors, event.currentTarget ); + + for ( i = 0, l = match.length; i < l; i++ ) { + close = match[i]; + + for ( j = 0; j < live.length; j++ ) { + handleObj = live[j]; + + if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) { + elem = close.elem; + related = null; + + // Those two events require additional checking + if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { + event.type = handleObj.preType; + related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; + + // Make sure not to accidentally match a child element with the same selector + if ( related && jQuery.contains( elem, related ) ) { + related = elem; + } + } + + if ( !related || related !== elem ) { + elems.push({ elem: elem, handleObj: handleObj, level: close.level }); + } + } + } + } + + for ( i = 0, l = elems.length; i < l; i++ ) { + match = elems[i]; + + if ( maxLevel && match.level > maxLevel ) { + break; + } + + event.currentTarget = match.elem; + event.data = match.handleObj.data; + event.handleObj = match.handleObj; + + ret = match.handleObj.origHandler.apply( match.elem, arguments ); + + if ( ret === false || event.isPropagationStopped() ) { + maxLevel = match.level; + + if ( ret === false ) { + stop = false; + } + if ( event.isImmediatePropagationStopped() ) { + break; + } + } + } + + return stop; +} + +function liveConvert( type, selector ) { + return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&"); +} + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.bind( name, data, fn ) : + this.trigger( name ); + }; + + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; + } +}); + + + +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true, + rBackslash = /\\/g, + rNonWord = /\W/; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var m, set, checkSet, extra, ret, cur, pop, i, + prune = true, + contextXML = Sizzle.isXML( context ), + parts = [], + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec( "" ); + m = chunker.exec( soFar ); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context ); + + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set ); + } + } + + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? + Sizzle.filter( ret.expr, ret.set )[0] : + ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + + set = ret.expr ? + Sizzle.filter( ret.expr, ret.set ) : + ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray( set ); + + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function( results ) { + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +Sizzle.matches = function( expr, set ) { + return Sizzle( expr, null, null, set ); +}; + +Sizzle.matchesSelector = function( node, expr ) { + return Sizzle( expr, null, null, [node] ).length > 0; +}; + +Sizzle.find = function( expr, context, isXML ) { + var set; + + if ( !expr ) { + return []; + } + + for ( var i = 0, l = Expr.order.length; i < l; i++ ) { + var match, + type = Expr.order[i]; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + var left = match[1]; + match.splice( 1, 1 ); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace( rBackslash, "" ); + set = Expr.find[ type ]( match, context, isXML ); + + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( "*" ) : + []; + } + + return { set: set, expr: expr }; +}; + +Sizzle.filter = function( expr, set, inplace, not ) { + var match, anyFound, + old = expr, + result = [], + curLoop = set, + isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); + + while ( expr && set.length ) { + for ( var type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + var found, item, + filter = Expr.filter[ type ], + left = match[1]; + + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( var i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + var pass = not ^ !!found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw "Syntax error, unrecognized expression: " + msg; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + + match: { + ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ + }, + + leftMatch: {}, + + attrMap: { + "class": "className", + "for": "htmlFor" + }, + + attrHandle: { + href: function( elem ) { + return elem.getAttribute( "href" ); + }, + type: function( elem ) { + return elem.getAttribute( "type" ); + } + }, + + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !rNonWord.test( part ), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + + ">": function( checkSet, part ) { + var elem, + isPartStr = typeof part === "string", + i = 0, + l = checkSet.length; + + if ( isPartStr && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + + "": function(checkSet, part, isXML){ + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); + }, + + "~": function( checkSet, part, isXML ) { + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); + } + }, + + find: { + ID: function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }, + + NAME: function( match, context ) { + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], + results = context.getElementsByName( match[1] ); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + + TAG: function( match, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( match[1] ); + } + } + }, + preFilter: { + CLASS: function( match, curLoop, inplace, result, not, isXML ) { + match = " " + match[1].replace( rBackslash, "" ) + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + + ID: function( match ) { + return match[1].replace( rBackslash, "" ); + }, + + TAG: function( match, curLoop ) { + return match[1].replace( rBackslash, "" ).toLowerCase(); + }, + + CHILD: function( match ) { + if ( match[1] === "nth" ) { + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + match[2] = match[2].replace(/^\+|\s*/g, ''); + + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + + ATTR: function( match, curLoop, inplace, result, not, isXML ) { + var name = match[1] = match[1].replace( rBackslash, "" ); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + // Handle if an un-quoted value was used + match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + + PSEUDO: function( match, curLoop, inplace, result, not ) { + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + + if ( !inplace ) { + result.push.apply( result, ret ); + } + + return false; + } + + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + + POS: function( match ) { + match.unshift( true ); + + return match; + } + }, + + filters: { + enabled: function( elem ) { + return elem.disabled === false && elem.type !== "hidden"; + }, + + disabled: function( elem ) { + return elem.disabled === true; + }, + + checked: function( elem ) { + return elem.checked === true; + }, + + selected: function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + parent: function( elem ) { + return !!elem.firstChild; + }, + + empty: function( elem ) { + return !elem.firstChild; + }, + + has: function( elem, i, match ) { + return !!Sizzle( match[3], elem ).length; + }, + + header: function( elem ) { + return (/h\d/i).test( elem.nodeName ); + }, + + text: function( elem ) { + var attr = elem.getAttribute( "type" ), type = elem.type; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); + }, + + radio: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; + }, + + checkbox: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; + }, + + file: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; + }, + + password: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; + }, + + submit: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "submit" === elem.type; + }, + + image: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; + }, + + reset: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "reset" === elem.type; + }, + + button: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && "button" === elem.type || name === "button"; + }, + + input: function( elem ) { + return (/input|select|textarea|button/i).test( elem.nodeName ); + }, + + focus: function( elem ) { + return elem === elem.ownerDocument.activeElement; + } + }, + setFilters: { + first: function( elem, i ) { + return i === 0; + }, + + last: function( elem, i, match, array ) { + return i === array.length - 1; + }, + + even: function( elem, i ) { + return i % 2 === 0; + }, + + odd: function( elem, i ) { + return i % 2 === 1; + }, + + lt: function( elem, i, match ) { + return i < match[3] - 0; + }, + + gt: function( elem, i, match ) { + return i > match[3] - 0; + }, + + nth: function( elem, i, match ) { + return match[3] - 0 === i; + }, + + eq: function( elem, i, match ) { + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function( elem, match, i, array ) { + var name = match[1], + filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; + + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + + } else { + Sizzle.error( name ); + } + }, + + CHILD: function( elem, match ) { + var type = match[1], + node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + + case "nth": + var first = match[2], + last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + var doneName = match[0], + parent = elem.parentNode; + + if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { + var count = 0; + + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + + parent.sizcache = doneName; + } + + var diff = elem.nodeIndex - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + + ID: function( elem, match ) { + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + + TAG: function( elem, match ) { + return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; + }, + + CLASS: function( elem, match ) { + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + + ATTR: function( elem, match ) { + var name = match[1], + result = Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + + POS: function( elem, match, i, array ) { + var name = match[2], + filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} + +var makeArray = function( array, results ) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch( e ) { + makeArray = function( array, results ) { + var i = 0, + ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder, siblingCheck; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + return a.compareDocumentPosition ? -1 : 1; + } + + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Fallback to using sourceIndex (in IE) if it's available on both nodes + } else if ( a.sourceIndex && b.sourceIndex ) { + return a.sourceIndex - b.sourceIndex; + } + + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // If the nodes are siblings (or identical) we can do a quick check + if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Utility function for retreiving the text value of an array of DOM nodes +Sizzle.getText = function( elems ) { + var ret = "", elem; + + for ( var i = 0; elems[i]; i++ ) { + elem = elems[i]; + + // Get the text from text nodes and CDATA nodes + if ( elem.nodeType === 3 || elem.nodeType === 4 ) { + ret += elem.nodeValue; + + // Traverse everything else, except comment nodes + } else if ( elem.nodeType !== 8 ) { + ret += Sizzle.getText( elem.childNodes ); + } + } + + return ret; +}; + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date()).getTime(), + root = document.documentElement; + + form.innerHTML = ""; + + // Inject it into the root element, check its status, and remove it quickly + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + + return m ? + m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? + [m] : + undefined : + []; + } + }; + + Expr.filter.ID = function( elem, match ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + + // release memory in IE + root = form = null; +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function( match, context ) { + var results = context.getElementsByTagName( match[1] ); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = ""; + + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + + Expr.attrHandle.href = function( elem ) { + return elem.getAttribute( "href", 2 ); + }; + } + + // release memory in IE + div = null; +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, + div = document.createElement("div"), + id = "__sizzle__"; + + div.innerHTML = "

"; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function( query, context, extra, seed ) { + context = context || document; + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && !Sizzle.isXML(context) ) { + // See if we find a selector to speed up + var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); + + if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { + // Speed-up: Sizzle("TAG") + if ( match[1] ) { + return makeArray( context.getElementsByTagName( query ), extra ); + + // Speed-up: Sizzle(".CLASS") + } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { + return makeArray( context.getElementsByClassName( match[2] ), extra ); + } + } + + if ( context.nodeType === 9 ) { + // Speed-up: Sizzle("body") + // The body element only exists once, optimize finding it + if ( query === "body" && context.body ) { + return makeArray( [ context.body ], extra ); + + // Speed-up: Sizzle("#ID") + } else if ( match && match[3] ) { + var elem = context.getElementById( match[3] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id === match[3] ) { + return makeArray( [ elem ], extra ); + } + + } else { + return makeArray( [], extra ); + } + } + + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(qsaError) {} + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var oldContext = context, + old = context.getAttribute( "id" ), + nid = old || id, + hasParent = context.parentNode, + relativeHierarchySelector = /^\s*[+~]/.test( query ); + + if ( !old ) { + context.setAttribute( "id", nid ); + } else { + nid = nid.replace( /'/g, "\\$&" ); + } + if ( relativeHierarchySelector && hasParent ) { + context = context.parentNode; + } + + try { + if ( !relativeHierarchySelector || hasParent ) { + return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); + } + + } catch(pseudoError) { + } finally { + if ( !old ) { + oldContext.removeAttribute( "id" ); + } + } + } + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + // release memory in IE + div = null; + })(); +} + +(function(){ + var html = document.documentElement, + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; + + if ( matches ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9 fails this) + var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); + + } catch( pseudoError ) { + pseudoWorks = true; + } + + Sizzle.matchesSelector = function( node, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + if ( !Sizzle.isXML( node ) ) { + try { + if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { + var ret = matches.call( node, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || !disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9, so check for that + node.document && node.document.nodeType !== 11 ) { + return ret; + } + } + } catch(e) {} + } + + return Sizzle(expr, null, null, [node]).length > 0; + }; + } +})(); + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "
"; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function( match, context, isXML ) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + // release memory in IE + div = null; +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +if ( document.documentElement.contains ) { + Sizzle.contains = function( a, b ) { + return a !== b && (a.contains ? a.contains(b) : true); + }; + +} else if ( document.documentElement.compareDocumentPosition ) { + Sizzle.contains = function( a, b ) { + return !!(a.compareDocumentPosition(b) & 16); + }; + +} else { + Sizzle.contains = function() { + return false; + }; +} + +Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; + + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function( selector, context ) { + var match, + tmpSet = [], + later = "", + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})(); + + +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + isSimple = /^.[^:#\[\.,]*$/, + slice = Array.prototype.slice, + POS = jQuery.expr.match.POS, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var self = this, + i, l; + + if ( typeof selector !== "string" ) { + return jQuery( selector ).filter(function() { + for ( i = 0, l = self.length; i < l; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }); + } + + var ret = this.pushStack( "", "find", selector ), + length, n, r; + + for ( i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( n = length; n < ret.length; n++ ) { + for ( r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && ( typeof selector === "string" ? + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var ret = [], i, l, cur = this[0]; + + // Array + if ( jQuery.isArray( selectors ) ) { + var match, selector, + matches = {}, + level = 1; + + if ( cur && selectors.length ) { + for ( i = 0, l = selectors.length; i < l; i++ ) { + selector = selectors[i]; + + if ( !matches[ selector ] ) { + matches[ selector ] = POS.test( selector ) ? + jQuery( selector, context || this.context ) : + selector; + } + } + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( selector in matches ) { + match = matches[ selector ]; + + if ( match.jquery ? match.index( cur ) > -1 : jQuery( cur ).is( match ) ) { + ret.push({ selector: selector, elem: cur, level: level }); + } + } + + cur = cur.parentNode; + level++; + } + } + + return ret; + } + + // String + var pos = POS.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( i = 0, l = this.length; i < l; i++ ) { + cur = this[i]; + + while ( cur ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + + } else { + cur = cur.parentNode; + if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { + break; + } + } + } + } + + ret = ret.length > 1 ? jQuery.unique( ret ) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + if ( !elem || typeof elem === "string" ) { + return jQuery.inArray( this[0], + // If it receives a string, the selector is used + // If it receives nothing, the siblings are used + elem ? jQuery( elem ) : this.parent().children() ); + } + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( elem.parentNode.firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ), + // The variable 'args' was introduced in + // https://github.com/jquery/jquery/commit/52a0238 + // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed. + // http://code.google.com/p/v8/issues/detail?id=1050 + args = slice.call(arguments); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, args.join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + nth: function( cur, result, dir, elem ) { + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return (elem === qualifier) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return (jQuery.inArray( elem, qualifier ) >= 0) === keep; + }); +} + + + + +var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /", "" ], + legend: [ 1, "
", "
" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + col: [ 2, "", "
" ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }; + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize and + + + + + + + + +

jQuery Validation Plugin Demo

+
+ +
+
+ Login Form (Enter "foobar" as password) +

+ + +

+

+ + +

+

+ +

+
+
+ +
Please login!
+ +
+ + + +

Backend file: form.phps

+ +Back to main page + +
+ + + + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/captcha/captcha.js b/bug/bug/jquery-validation-1.8.1/demo/captcha/captcha.js new file mode 100644 index 0000000..245bc45 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/captcha/captcha.js @@ -0,0 +1,27 @@ +$(function(){ + $("#refreshimg").click(function(){ + $.post('newsession.php'); + $("#captchaimage").load('image_req.php'); + return false; + }); + + $("#captchaform").validate({ + rules: { + captcha: { + required: true, + remote: "process.php" + } + }, + messages: { + captcha: "Correct captcha is required. Click the captcha to generate a new one" + }, + submitHandler: function() { + alert("Correct captcha!"); + }, + success: function(label) { + label.addClass("valid").text("Valid captcha!") + }, + onkeyup: false + }); + +}); diff --git a/bug/bug/jquery-validation-1.8.1/demo/captcha/fonts/Anorexia.ttf b/bug/bug/jquery-validation-1.8.1/demo/captcha/fonts/Anorexia.ttf new file mode 100644 index 0000000..453eeb0 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/demo/captcha/fonts/Anorexia.ttf differ diff --git a/bug/bug/jquery-validation-1.8.1/demo/captcha/image_req.php b/bug/bug/jquery-validation-1.8.1/demo/captcha/image_req.php new file mode 100644 index 0000000..6a65774 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/captcha/image_req.php @@ -0,0 +1,6 @@ +Captcha image'; + +?> \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/captcha/images/button.png b/bug/bug/jquery-validation-1.8.1/demo/captcha/images/button.png new file mode 100644 index 0000000..7ef79de Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/demo/captcha/images/button.png differ diff --git a/bug/bug/jquery-validation-1.8.1/demo/captcha/images/button.psd b/bug/bug/jquery-validation-1.8.1/demo/captcha/images/button.psd new file mode 100644 index 0000000..a3bee84 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/demo/captcha/images/button.psd differ diff --git a/bug/bug/jquery-validation-1.8.1/demo/captcha/images/image.php b/bug/bug/jquery-validation-1.8.1/demo/captcha/images/image.php new file mode 100644 index 0000000..bc571ab --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/captcha/images/image.php @@ -0,0 +1,35 @@ + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/captcha/index.php b/bug/bug/jquery-validation-1.8.1/demo/captcha/index.php new file mode 100644 index 0000000..74bd54f --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/captcha/index.php @@ -0,0 +1,66 @@ + + + + + + AJAX CAPTCHA + + + + + + + + + + + + + + +

AJAX CAPTCHA, based on http://psyrens.com/captcha/

+ +
+
+
Captcha image
+ + + +
+
+ +

If you can't decipher the text on the image, click it to dynamically generate a new one.

+ + + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/captcha/newsession.php b/bug/bug/jquery-validation-1.8.1/demo/captcha/newsession.php new file mode 100644 index 0000000..36ff45e --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/captcha/newsession.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/captcha/process.php b/bug/bug/jquery-validation-1.8.1/demo/captcha/process.php new file mode 100644 index 0000000..24fe3a8 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/captcha/process.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/captcha/rand.php b/bug/bug/jquery-validation-1.8.1/demo/captcha/rand.php new file mode 100644 index 0000000..88b595e --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/captcha/rand.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/captcha/style.css b/bug/bug/jquery-validation-1.8.1/demo/captcha/style.css new file mode 100644 index 0000000..c0bbe5f --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/captcha/style.css @@ -0,0 +1,140 @@ +body { + margin: 3% 5%; + padding: 0; + background-color: #fff; + color: #333; + font: 0.9em/1.3 Helvetica, Arial, Verdana, Sans-serif; +} + +a:link, a:visited { + background-color: #fff; + color: #333; + text-decoration: underline; +} + +a:hover, a:focus, a:active { + background-color: #ffb; + color: #454545; + text-decoration: underline; +} + +h1 { + margin: 2% 0%; + padding: 1%; + border-bottom: 1px solid #ddd; + background-color: #f8f8f8; + color: #666; + font: normal 1.5em Helvetica, Arial, Verdana, Sans-serif; +} + +h2 { + margin: 2% 0%; + padding: 1%; + border-bottom: 1px solid #ddd; + background-color: #f8f8f8; + color: #666; + font: normal 1.3em Helvetica, Arial, Verdana, Sans-serif; +} + +h3 { + margin: 2% 0%; + padding: 1%; + border-bottom: 1px solid #ddd; + background-color: #f8f8f8; + color: #666; + font: normal 1.2em Helvetica, Arial, Verdana, Sans-serif; +} + +table { + margin: 0; + padding: 0; + width: 100%; +} + +table th { + border: 1px solid #ddd; + font-weight: bold; + text-align: left; + padding: 1%; +} + +table td { + border: 1px solid #ddd; + padding: 1%; +} + +dl, dt, dd { + margin: 0; + padding: 0; +} + +form { + margin: 0; + padding: 0; +} + +fieldset { + border: 1px solid #ddd; + margin: 0% 0% 2% 0%; + padding: 2%; +} + +fieldset legend { + margin: 0; + padding: 0 4px; + background-color: inherit; + color: #333; +} + +code { + font: 1em "Courier New", Courier, Monospace; +} + +pre code { + font: 1.1em "Courier New", Courier, Monospace; + border-bottom: 1px solid #eee; +} + +img { + border: 1px solid #eee; +} + +p#statusgreen { + font-size: 1.2em; + background-color: #fff; + color: #0a0; +} + +p#statusred { + font-size: 1.2em; + background-color: #fff; + color: #a00; +} + +fieldset label { + display: block; +} + +fieldset label.error { + color: red; +} + +fieldset label.valid { + color: green; +} + +fieldset div#captchaimage { + float: left; + margin-right: 15px; +} + +fieldset input#captcha { + width: 25%; + border: 1px solid #ddd; + padding: 2px; +} + +fieldset input#submit { + display: block; + margin: 2% 0% 0% 0%; +} \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/css/chili.css b/bug/bug/jquery-validation-1.8.1/demo/css/chili.css new file mode 100644 index 0000000..6990449 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/css/chili.css @@ -0,0 +1,15 @@ +.jscom, .mix htcom { color: #4040c2; } +.com { color: green; } +.regexp { color: maroon; } +.string { color: teal; } +.keywords { color: blue; } +.global { color: #008; } +.numbers { color: #880; } +.comm { color: green; } +.tag { color: blue; } +.entity { color: blue; } +.string { color: teal; } +.aname { color: maroon; } +.avalue { color: maroon; } +.jquery { color: #00a; } +.plugin { color: red; } \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/css/cmxform.css b/bug/bug/jquery-validation-1.8.1/demo/css/cmxform.css new file mode 100644 index 0000000..120f5a4 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/css/cmxform.css @@ -0,0 +1,46 @@ +/********************************** + +Name: cmxform Styles + +***********************************/ +form.cmxform { + width: 370px; + font-size: 1.0em; + color: #333; +} + +form.cmxform legend { + padding-left: 0; +} + +form.cmxform legend, form.cmxform label { + color: #333; +} + +form.cmxform fieldset { + border: none; + border-top: 1px solid #C9DCA6; + background: url(../images/cmxform-fieldset.gif) left bottom repeat-x; + background-color: #F8FDEF; +} + +form.cmxform fieldset fieldset { + background: none; +} + +form.cmxform fieldset p, form.cmxform fieldset fieldset { + padding: 5px 10px 7px; + background: url(../images/cmxform-divider.gif) left bottom repeat-x; +} + +form.cmxform label.error, label.error { + /* remove the next line when you have trouble in IE6 with labels in list */ + color: red; + font-style: italic +} +div.error { display: none; } +input { border: 1px solid black; } +input.checkbox { border: none } +input:focus { border: 1px dotted black; } +input.error { border: 1px dotted red; } +form.cmxform .gray * { color: gray; } \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/css/cmxformTemplate.css b/bug/bug/jquery-validation-1.8.1/demo/css/cmxformTemplate.css new file mode 100644 index 0000000..ac52f71 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/css/cmxformTemplate.css @@ -0,0 +1,55 @@ +/********************************** + +Use: cmxform template + +***********************************/ +form.cmxform fieldset { + margin-bottom: 10px; +} + +form.cmxform legend { + padding: 0 2px; + font-weight: bold; + _margin: 0 -7px; /* IE Win */ +} + +form.cmxform label { + display: inline-block; + line-height: 1.8; + vertical-align: top; + cursor: hand; +} + +form.cmxform fieldset p { + list-style: none; + padding: 5px; + margin: 0; +} + +form.cmxform fieldset fieldset { + border: none; + margin: 3px 0 0; +} + +form.cmxform fieldset fieldset legend { + padding: 0 0 5px; + font-weight: normal; +} + +form.cmxform fieldset fieldset label { + display: block; + width: auto; +} + +form.cmxform label { width: 100px; } /* Width of labels */ +form.cmxform fieldset fieldset label { margin-left: 103px; } /* Width plus 3 (html space) */ +form.cmxform label.error { + margin-left: 103px; + width: 220px; +} + +form.cmxform input.submit { + margin-left: 103px; +} + +/*\*//*/ form.cmxform legend { display: inline-block; } /* IE Mac legend fix */ \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/css/core.css b/bug/bug/jquery-validation-1.8.1/demo/css/core.css new file mode 100644 index 0000000..84494e8 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/css/core.css @@ -0,0 +1,21 @@ +body, div { font-family: 'lucida grande', helvetica, verdana, arial, sans-serif } +body { margin: 0; padding: 0; font-size: small; color: #333 } +h1, h2 { font-family: 'trebuchet ms', verdana, arial; padding: 10px; margin: 0 } +h1 { font-size: large } +#main { padding: 1em; } +#banner { padding: 15px; background-color: #06b; color: white; font-size: large; border-bottom: 1px solid #ccc; + background: url(../images/bg.gif) repeat-x; text-align: center } +#banner a { color: white; } + +p { margin: 10px 0; } + +li { margin-left: 10px; } + +h3 { margin: 1em 0 0; } + +h1 { font-size: 2em; } +h2 { font-size: 1.8em; } +h3 { font-size: 1.6em; } +h4 { font-size: 1.4em; } +h5 { font-size: 1.2em; } + diff --git a/bug/bug/jquery-validation-1.8.1/demo/css/reset.css b/bug/bug/jquery-validation-1.8.1/demo/css/reset.css new file mode 100644 index 0000000..5c376b3 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/css/reset.css @@ -0,0 +1,61 @@ +/********************************** + +Use: Reset Styles for all browsers + +***********************************/ + +body, p, blockquote { + margin: 0; + padding: 0; +} + +a img, iframe { border: none; } + +/* Headers +------------------------------*/ + +h1, h2, h3, h4, h5, h6 { + margin: 0; + padding: 0; + font-size: 100%; +} + +/* Lists +------------------------------*/ + +ul, ol, dl, li, dt, dd { + margin: 0; + padding: 0; +} + +/* Links +------------------------------*/ + +a, a:link {} +a:visited {} +a:hover {} +a:active {} + +/* Forms +------------------------------*/ + +form, fieldset { + margin: 0; + padding: 0; +} + +fieldset { border: 1px solid #000; } + +legend { + padding: 0; + color: #000; +} + +input, textarea, select { + margin: 0; + padding: 1px; + font-size: 100%; + font-family: inherit; +} + +select { padding: 0; } \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/css/screen.css b/bug/bug/jquery-validation-1.8.1/demo/css/screen.css new file mode 100644 index 0000000..840f572 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/css/screen.css @@ -0,0 +1,11 @@ +/********************************** + +Use: Main Screen Import + +***********************************/ + +@import "reset.css"; +@import "core.css"; + +@import "cmxformTemplate.css"; +@import "cmxform.css"; \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/custom-messages-metadata-demo.html b/bug/bug/jquery-validation-1.8.1/demo/custom-messages-metadata-demo.html new file mode 100644 index 0000000..46e3d6e --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/custom-messages-metadata-demo.html @@ -0,0 +1,92 @@ + + + + +jQuery validation plug-in - comment form example + + + + + + + + + + + + + + +

jQuery Validation Plugin Demo

+
+ +

Take a look at the source to see how messages can be customized with metadata.

+ + +
+
+ Please enter your email address +

+ + + +

+

+ +

+
+
+ +
+
+ Please enter your email address +

+ + + +

+

+ +

+
+
+ +
+
+ Please enter your email address +

+ + + +

+

+ +

+
+
+ +Back to main page + + + + + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/custom-methods-demo.html b/bug/bug/jquery-validation-1.8.1/demo/custom-methods-demo.html new file mode 100644 index 0000000..89b8fa6 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/custom-methods-demo.html @@ -0,0 +1,122 @@ + + + + + +Test for jQuery validate() plugin + + + + + + + + + + + + + +

jQuery Validation Plugin Demo

+
+ +
+

+ +
+ Example with custom methods and heavily customized error display + + + + + + + + + + + + + + + + +
+
+ +
+
+ +

Your form contains tons of errors! Please try again.

+ +

Back to main page

+ +
+ + + + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/dynamic-totals.html b/bug/bug/jquery-validation-1.8.1/demo/dynamic-totals.html new file mode 100644 index 0000000..5ea4582 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/dynamic-totals.html @@ -0,0 +1,151 @@ + + + + + +jQuery validation plug-in - dynamic forms demo + + + + + + + + + + + + + +

jQuery Validation Plugin Demo

+
+ + + +
+

+ +
+ Example with custom methods and heavily customized error display + + + + + + + + + + + + + + + +
 
+
+
+ + + +

Your form contains tons of errors! Please try again.

+ +

Back to main page

+ +
+ + + + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/errorcontainer-demo.html b/bug/bug/jquery-validation-1.8.1/demo/errorcontainer-demo.html new file mode 100644 index 0000000..2c062ea --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/errorcontainer-demo.html @@ -0,0 +1,161 @@ + + + + + +Test for jQuery validate() plugin + + + + + + + + + + + + + + +

jQuery Validation Plugin Demo

+
+ +
+
+ Login Form +

+ + +

+

+ + +

+
+
+

+ +

+
+
+ + +
+

There are serious errors in your form submission, please see below for details.

+
    +
  1. +
  2. +
  3. +
  4. +
  5. +
+
+ +
+
+ Validating a complete form +

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+
+
+ +
+

There are serious errors in your form submission, please see details above the form!

+
+ +Back to main page + +
+ + + + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/example.html b/bug/bug/jquery-validation-1.8.1/demo/example.html new file mode 100644 index 0000000..5b83f6d --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/example.html @@ -0,0 +1,53 @@ + + + + +jQuery validation plug-in - comment form example + + + + + + + + + + + + + +
+
+ Please provide your name, email address (won't be published) and a comment +

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ +

+
+
+ + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/form.php b/bug/bug/jquery-validation-1.8.1/demo/form.php new file mode 100644 index 0000000..b25c6ef --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/form.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/form.phps b/bug/bug/jquery-validation-1.8.1/demo/form.phps new file mode 100644 index 0000000..b25c6ef --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/form.phps @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/images/bg.gif b/bug/bug/jquery-validation-1.8.1/demo/images/bg.gif new file mode 100644 index 0000000..846add0 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/demo/images/bg.gif differ diff --git a/bug/bug/jquery-validation-1.8.1/demo/images/checked.gif b/bug/bug/jquery-validation-1.8.1/demo/images/checked.gif new file mode 100644 index 0000000..5e33a78 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/demo/images/checked.gif differ diff --git a/bug/bug/jquery-validation-1.8.1/demo/images/cmxform-divider.gif b/bug/bug/jquery-validation-1.8.1/demo/images/cmxform-divider.gif new file mode 100644 index 0000000..718a977 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/demo/images/cmxform-divider.gif differ diff --git a/bug/bug/jquery-validation-1.8.1/demo/images/cmxform-fieldset.gif b/bug/bug/jquery-validation-1.8.1/demo/images/cmxform-fieldset.gif new file mode 100644 index 0000000..9c48ea4 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/demo/images/cmxform-fieldset.gif differ diff --git a/bug/bug/jquery-validation-1.8.1/demo/images/loading.gif b/bug/bug/jquery-validation-1.8.1/demo/images/loading.gif new file mode 100644 index 0000000..93c46a6 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/demo/images/loading.gif differ diff --git a/bug/bug/jquery-validation-1.8.1/demo/images/unchecked.gif b/bug/bug/jquery-validation-1.8.1/demo/images/unchecked.gif new file mode 100644 index 0000000..06ecaba Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/demo/images/unchecked.gif differ diff --git a/bug/bug/jquery-validation-1.8.1/demo/index.html b/bug/bug/jquery-validation-1.8.1/demo/index.html new file mode 100644 index 0000000..20087f7 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/index.html @@ -0,0 +1,230 @@ + + + + +jQuery validation plug-in - main demo + + + + + + + + + + + + + +

jQuery Validation Plugin Demo

+
+ +

Default submitHandler is set to display an alert into of submitting the form

+ +
+
+ Please provide your name, email address (won't be published) and a comment +

+ + +

+ + +

+

+ + +

+

+ + +

+

+ +

+
+
+ +
+
+ Validating a complete form +

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+
+ Topics (select at least two) - note: would be hidden when newsletter isn't selected, but is visible here for the demo + + + + +
+

+ +

+
+
+ +

Syntetic examples

+ +

Real-world examples

+ + +

Testsuite

+ + +
+ + + + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/js/chili-1.7.pack.js b/bug/bug/jquery-validation-1.8.1/demo/js/chili-1.7.pack.js new file mode 100644 index 0000000..90e7735 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/js/chili-1.7.pack.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('8={3b:"1.6",2o:"1B.1Y,1B.23,1B.2e",2i:"",2H:1a,12:"",2C:1a,Z:"",2a:\'$$\',R:"&#F;",1j:"&#F;&#F;&#F;&#F;",1f:"&#F;<1W/>",3c:5(){9 $(y).39("1k")[0]},I:{},N:{}};(5($){$(5(){5 1J(l,a){5 2I(A,h){4 3=(1v h.3=="1h")?h.3:h.3.1w;k.1m({A:A,3:"("+3+")",u:1+(3.c(/\\\\./g,"%").c(/\\[.*?\\]/g,"%").3a(/\\((?!\\?)/g)||[]).u,z:(h.z)?h.z:8.2a})}5 2z(){4 1E=0;4 1x=x 2A;Q(4 i=0;i\';8.N[X]=1H;7($.31.34){4 W=J.1L(Y);4 $W=$(W);$("2d").1O($W)}v{$("2d").1O(Y)}}}5 1q(e,a){4 l=e&&e.1g&&e.1g[0]&&e.1g[0].37;7(!l)l="";l=l.c(/\\r\\n?/g,"\\n");4 C=1J(l,a);7(8.1j){C=C.c(/\\t/g,8.1j)}7(8.1f){C=C.c(/\\n/g,8.1f)}$(e).38(C)}5 1o(q,13){4 1l={12:8.12,2x:q+".1d",Z:8.Z,2w:q+".2u"};4 B;7(13&&1v 13=="2l")B=$.35(1l,13);v B=1l;9{a:B.12+B.2x,1p:B.Z+B.2w}}7($.2q)$.2q({36:"2l.15"});4 2n=x 1u("\\\\b"+8.2i+"\\\\b","2j");4 1e=[];$(8.2o).2D(5(){4 e=y;4 1n=$(e).3i("V");7(!1n){9}4 q=$.3u(1n.c(2n,""));7(\'\'!=q){1e.1m(e);4 f=1o(q,e.15);7(8.2H||e.15){7(!8.N[f.a]){1D{8.N[f.a]=1H;$.3v(f.a,5(M){M.f=f.a;8.I[f.a]=M;7(8.2C){2B(f.1p)}$("."+q).2D(5(){4 f=1o(q,y.15);7(M.f==f.a){1q(y,M)}})})}1I(3s){3t("a 3w Q: "+q+\'@\'+3z)}}}v{4 a=8.I[f.a];7(a){1q(e,a)}}}});7(J.1i&&J.1i.29){5 22(p){7(\'\'==p){9""}1z{4 16=(x 3A()).2k()}19(p.3x(16)>-1);p=p.c(/\\<1W[^>]*?\\>/3y,16);4 e=J.1L(\'<1k>\');e.3l=p;p=e.3m.c(x 1u(16,"g"),\'\\r\\n\');9 p}4 T="";4 18=1G;$(1e).3j().G("1k").U("2c",5(){18=y}).U("1M",5(){7(18==y)T=J.1i.29().3k});$("3n").U("3q",5(){7(\'\'!=T){2p.3r.3o(\'3p\',22(T));2V.2R=1a}}).U("2c",5(){T=""}).U("1M",5(){18=1G})}})})(1Z);8.I["1Y.1d"]={k:{2M:{3:/\\/\\*[^*]*\\*+(?:[^\\/][^*]*\\*+)*\\//},25:{3:/\\ + +
+ + + + +
+ + +
+ + + +
+ + + + +
+ + + + +

Step 1 of 2

+

+

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+

Login Information

+
+ +
+ +
+ +
+
+
+ + +
+ +


+
+
+ + +
+ + + +
+
+
+ + + + +
+ + + + + + +
+ + + + diff --git a/bug/bug/jquery-validation-1.8.1/demo/marketo/jquery.maskedinput.js b/bug/bug/jquery-validation-1.8.1/demo/marketo/jquery.maskedinput.js new file mode 100644 index 0000000..0cd5cfc --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/marketo/jquery.maskedinput.js @@ -0,0 +1,267 @@ +/* + * Copyright (c) 2007 Josh Bush (digitalbush.com) + * + * 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. + */ + +/* + * Version: 1.1 + * Release: 2007-09-08 + */ +(function($) { + //Helper Functions for Caret positioning + function getCaretPosition(ctl){ + var res = {begin: 0, end: 0 }; + if (ctl.setSelectionRange){ + res.begin = ctl.selectionStart; + res.end = ctl.selectionEnd; + }else if (document.selection && document.selection.createRange){ + var range = document.selection.createRange(); + res.begin = 0 - range.duplicate().moveStart('character', -100000); + res.end = res.begin + range.text.length; + } + return res; + }; + + function setCaretPosition(ctl, pos){ + if(ctl.setSelectionRange){ + ctl.focus(); + ctl.setSelectionRange(pos,pos); + }else if (ctl.createTextRange){ + var range = ctl.createTextRange(); + range.collapse(true); + range.moveEnd('character', pos); + range.moveStart('character', pos); + range.select(); + } + }; + + //Predefined character definitions + var charMap={ + '9':"[0-9]", + 'a':"[A-Za-z]", + '*':"[A-Za-z0-9]" + }; + + //Helper method to inject character definitions + $.mask={ + addPlaceholder : function(c,r){ + charMap[c]=r; + } + }; + + $.fn.unmask=function(){ + return this.trigger("unmask"); + }; + + //Main Method + $.fn.mask = function(mask,settings) { + settings = $.extend({ + placeholder: "_", + completed: null + }, settings); + + //Build Regex for format validation + var reString="^"; + for(var i=0;i 16 && k < 32 ) || (k > 32 && k < 41)); + + //delete selection before proceeding + if((pos.begin-pos.end)!=0 && (!ignore || k==8 || k==46)){ + clearBuffer(pos.begin,pos.end); + } + //backspace and delete get special treatment + if(k==8){//backspace + while(pos.begin-->=0){ + if(!locked[pos.begin]){ + buffer[pos.begin]=settings.placeholder; + if($.browser.opera){ + //Opera won't let you cancel the backspace, so we'll let it backspace over a dummy character. + writeBuffer(pos.begin); + setCaretPosition(this,pos.begin+1); + }else{ + writeBuffer(); + setCaretPosition(this,pos.begin); + } + return false; + } + } + }else if(k==46){//delete + clearBuffer(pos.begin,pos.begin+1); + writeBuffer(); + setCaretPosition(this,pos.begin); + return false; + }else if (k==27){ + clearBuffer(0,mask.length); + writeBuffer(); + setCaretPosition(this,0); + return false; + } + + }; + input.bind("keydown",keydownEvent); + + function keypressEvent(e){ + if(ignore){ + ignore=false; + return; + } + e=e||window.event; + var k=e.charCode||e.keyCode||e.which; + + var pos=getCaretPosition(this); + var caretPos=pos.begin; + + if(e.ctrlKey || e.altKey){//Ignore + return true; + }else if ((k>=41 && k<=122) ||k==32 || k>186){//typeable characters + while(pos.begin=buffer.length) + settings.completed.call(input); + else + setCaretPosition(this,caretPos); + + return false; + }; + input.bind("keypress",keypressEvent); + + /*Helper Methods*/ + function clearBuffer(start,end){ + for(var i=start;i= 6 && /\d/.test(value) && /[a-z]/i.test(value); + if (!result) { + element.value = ""; + var validator = this; + setTimeout(function() { + validator.blockFocusCleanup = true; + element.focus(); + validator.blockFocusCleanup = false; + }, 1); + } + return result; + }, "Your password must be at least 6 characters long and contain at least one number and one character."); + + // a custom method making the default value for companyurl ("http://") invalid, without displaying the "invalid url" message + jQuery.validator.addMethod("defaultInvalid", function(value, element) { + return value != element.defaultValue; + }, ""); + + jQuery.validator.addMethod("billingRequired", function(value, element) { + if ($("#bill_to_co").is(":checked")) + return $(element).parents(".subTable").length; + return !this.optional(element); + }, ""); + + jQuery.validator.messages.required = ""; + $("form").validate({ + invalidHandler: function(e, validator) { + var errors = validator.numberOfInvalids(); + if (errors) { + var message = errors == 1 + ? 'You missed 1 field. It has been highlighted below' + : 'You missed ' + errors + ' fields. They have been highlighted below'; + $("div.error span").html(message); + $("div.error").show(); + } else { + $("div.error").hide(); + } + }, + onkeyup: false, + submitHandler: function() { + $("div.error").hide(); + alert("submit! use link below to go to the other step"); + }, + messages: { + password2: { + required: " ", + equalTo: "Please enter the same password as above" + }, + email: { + required: " ", + email: "Please enter a valid email address, example: you@yourdomain.com", + remote: jQuery.validator.format("{0} is already taken, please enter a different address.") + } + }, + debug:true + }); + + $(".resize").vjustify(); + $("div.buttonSubmit").hoverClass("buttonSubmitHover"); + + if ($.browser.safari) { + $("body").addClass("safari"); + } + + $("input.phone").mask("(999) 999-9999"); + $("input.zipcode").mask("99999"); + var creditcard = $("#creditcard").mask("9999 9999 9999 9999"); + + $("#cc_type").change( + function() { + switch ($(this).val()){ + case 'amex': + creditcard.unmask().mask("9999 999999 99999"); + break; + default: + creditcard.unmask().mask("9999 9999 9999 9999"); + break; + } + } + ); + + // toggle optional billing address + var subTableDiv = $("div.subTableDiv"); + var toggleCheck = $("input.toggleCheck"); + toggleCheck.is(":checked") + ? subTableDiv.hide() + : subTableDiv.show(); + $("input.toggleCheck").click(function() { + if (this.checked == true) { + subTableDiv.slideUp("medium"); + $("form").valid(); + } else { + subTableDiv.slideDown("medium"); + } + }); + + +}); + +$.fn.vjustify = function() { + var maxHeight=0; + $(".resize").css("height","auto"); + this.each(function(){ + if (this.offsetHeight > maxHeight) { + maxHeight = this.offsetHeight; + } + }); + this.each(function(){ + $(this).height(maxHeight); + if (this.offsetHeight > maxHeight) { + $(this).height((maxHeight-(this.offsetHeight-maxHeight))); + } + }); +}; + +$.fn.hoverClass = function(classname) { + return this.hover(function() { + $(this).addClass(classname); + }, function() { + $(this).removeClass(classname); + }); +}; \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/marketo/step2.htm b/bug/bug/jquery-validation-1.8.1/demo/marketo/step2.htm new file mode 100644 index 0000000..933d682 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/marketo/step2.htm @@ -0,0 +1,291 @@ + + + + + + + + + + +Subscription Signup | Marketo + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ + + +
+ + + + +
+ + + + +

Step 2 of 2

+

Billing Information

+

+

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Billing Address: +
+ + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
+ +
+ +
+
+
Credit Card Type: + +
Expiration: + + +
+ +
+ +
+
+ + +

+ +
+
+
+ +
+ + + +
+
+
+ + + + +
+ + + + + + +
+ + + + + + + diff --git a/bug/bug/jquery-validation-1.8.1/demo/marketo/stylesheet.css b/bug/bug/jquery-validation-1.8.1/demo/marketo/stylesheet.css new file mode 100644 index 0000000..7040c4f --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/marketo/stylesheet.css @@ -0,0 +1,1179 @@ +:-moz-any-link :focus { + outline: none; +} + +:focus { + -moz-outline-style: none; + outline: none; +} + +body { + font-size: 80%; + margin: 0; + padding: 0; + font-family: tahoma, geneva, sans-serif; + background-color: #000000; +} + +a { + color: #0653AB; + outline: 0px; + text-decoration: none; +} + +a:hover { + outline: 0px; + text-decoration: underline; +} + +img { + border: 0px; +} + +/* s1.0 - Page Containers */ +#letterbox { + margin: 10px auto; + width: 883px; + background-color: #364158; + border: 8px solid #D4D4D4; + padding: 1px 1px 10px 1px; +} + +#header-background { + background: url(images/back_nav_blue.gif) repeat-x; + margin: 0px auto; + padding: 0px; + height: 73px; + width: 883px; + border-top: 4px solid #CCEAFE; + border-bottom: 4px solid #D4D4D4; +} + +#page-container { + width: 866px; + margin: 0px auto; + margin-top: 33px; /* pad from top menu to actions buts*/ + margin-bottom: -11px; + padding-top: 8px; + padding-bottom: 8px; + background-color: #D4D4D4; /* light grey*/ + border-right: 1px solid #464646; +} + +#page-content-inner { + width: 849px; + margin: 0px auto; + border-top: 1px solid #9F9FA0; + border-left: 1px solid #A2A09A; + background-color: #F4F1E9; + position: relative; +} + +#page-content-inner #col-left { + width: 210px; + float: left; + background-color: #F4F1E9; +} + +#page-content-inner #col-main { + width: 639px; + background-color: #ffffff; + position: absolute; + right: 0px; + top: 0px; +} + +#footer-container { + width: 866px; + position: relative; + left: 8px; + padding: 2px 0px 10px 0px; + background-color: #D4D4D4; /* light grey*/ +} + +/* s2.0 - Global navigation bar */ +.nav-global-container { + width: 880px; + margin: 0px auto; + position: relative; +} + +* html .nav-global-container { /* ie6 fix*/ + margin-bottom: -6px; +} + +.login { + position: absolute; + right: 20px; + text-align: center; +} + +.login a,.login a span { + display: block; + height: 18px; + font-size: 11px; + background: url(images/login-sprite.gif) right -5px no-repeat; + text-decoration: none; + font-weight: bold; + padding: 5px 10px 5px 10px; + position: relative; +} + +.login a:hover { + color: #000000; + text-decoration: underline; +} + +div.login a span { + background-position: left -105px; + width: 4px; + position: absolute; + top: 0px; + left: 0px; + padding: 5px 0px 5px 0px;; +} + +div.login a:hover span { + +} + +.logo { + float: left; + margin: 0px 0px -5px 0px; /* neg marging for ie6 */ +} + +.logo img { + border: 0px; + margin-left: -1px; +} + +.nav-global { + float: left; + width: 645px; + margin: 40px 0px 0px 40px; + background-color: transparent; +} + +.nav-global ul { + margin: 0px; + padding: 0px; + list-style: none; +} + +.nav-global li { + float: left; + white-space: nowrap; +} + +div.nav-global li a,div.nav-global li a span { + background-image: url(images/tab-sprite.gif); + background-position: right 100px; + background-repeat: no-repeat; + height: 32px; + color: #666666; + text-decoration: none; + font: bold 16px 'trebuchet ms'; + margin-right: 15px; + display: block; + position: relative; + padding: 7px 15px 0px 15px; +} + +div.nav-global li a:hover { + background-position: right 0px; + color: #333333; +} + +div.nav-global li a:hover span { + background-position: left -100px; + display: block !important; +} + +div.nav-global li a span { + background-position: left 150px; + width: 4px; + position: absolute; + left: 0px; + top: 0px; + padding: 7px 0px 0px 0px; +} + +body.safari div.nav-global li a span { + display: none; +} + +div.nav-global li a.on,div.nav-global li a.on:hover { + background-position: right -55px; + color: #FFFFFF; +} + +div.nav-global li a.on span,div.nav-global li a.on:hover span { + background-position: left -155px; + display: block !important; +} + +div.action-container { + position: relative; + top: -45px; + cursor: pointer; +} + +div.action-icon-container { + position: absolute; + top: -17px; + left: -17px; + z-index: 10; + width: 100px; + height: 100px; + overflow: hidden; +} + +div.action-icon { + border: 0px; + position: absolute; + top: -0px; + left: 0px; +} + +div.action-button-container { + height: 106px; + width: 180px; + overflow: hidden; + position: absolute; + top: 0px; + left: 0px; + z-index: 5; +} + +img.action-icon { + border: 0px; + position: absolute; + top: 0px; + left: 0px; + z-index: 0 +} + +div.action-text { + z-index: 20; + color: #FFFFFF; + position: absolute; + left: 40px; + top: 12px; + font: 14px tahoma, geneva; + padding-top: 30px; +} + +div.bigbuttons { + top: -20px; +} + +div.action-header { + z-index: 21; + position: absolute; + left: 40px; + top: 10px; +} + +div.action-header b { + font: bold 17px tahoma, geneva; + display: block; + margin-bottom: 10px; + color: #0b2c89; + position: absolute; + top: 0px; + left: 0px; + width: 130px; +} + +div.action-header b.shadow { + top: 1px; + left: 1px; + color: #d5d5d5; +} + +img.action-button { + position: relative; +} + +div.hover img.action-button { + top: -131px; +} + +div.on img.action-button { + top: -261px; +} + +/* s3.0 - top of content Action Buttons */ +.action-buttons { + width: 100%; /* ie6 requires */ +} + +.action-buttons ul { + position: relative; + padding: 0px; +} + +.action-buttons li { + position: relative; /* ie6 fix */ + float: left; + list-style: none; + text-align: center; + line-height: 16px; + margin: -61px 0px 0px 0px; +} + +.action-home li { + margin: -49px 0px 0px 0px; +} + +.action-buttons a { + display: block; + height: 110px; + width: 175px; + padding: 14px 0px 0px 25px; + text-decoration: none; + font-size: 12px; + font-weight: bold; + color: #ffffff; +} + +.action-buttons li span { + color: #053880; + line-height: 47px; + font-size: 17px; +} + +div.action-bottom { + margin: 15px 0px 10px 0px; + float: left; +} + +div.action-bottom a { + height: 61px; + width: 178px; + border: 0px; + background: url(images/action-bottom.gif) no-repeat 0px 0px; + color: #0b2c89; + float: left; + position: relative; + font: bold 17px tahoma, geneva; + text-decoration: none; + margin-right: 10px; +} + +div.action-bottom a span { + position: absolute; + top: 15px; + left: 40px; +} + +div.action-bottom a span.shadow { + top: 16px; + left: 41px; + color: #d4d4d4; +} + +.line-grey { + background: url(images/line-grey.gif) 0 0 repeat-x; + height: 2px; + margin: 8px 25px 20px 0; +} + +/* s4.0 - Home Hero Area */ +.hero-background { + position: relative; + width: 880px; + background: url(images/back_home-hero.jpg) 10px 0px no-repeat; + height: 211px; + margin: -20px 0px 45px 0px; +} + +.hero-text { + float: right; + width: 626px; + margin-top: 26px; +} + +.hero-text a { /* Sign Up Now Button */ + padding: 5px 32px 0px 0px; + float: right; +} + +.hero-text h1 { + font-size: 2.3em; + line-height: 1.2em; + color: #333333; + font-family: Trebuchet MS; + margin: 12px 0px 10px 10px; +} + +.hero-text h2 { + margin: 0px; + font-weight: normal; + font-size: 1.35em; + margin: 5px 0px 13px 10px +} + +/* s4.1 - Home Left Header tab */ +.col-left-header-tab { + position: relative; /* ie6 fix */ + background: url(images/tab_green.gif) 0 0 no-repeat; + height: 30px; + width: 166px; + text-align: center; + color: #ffffff; + font: 20px 'trebuchet ms'; + padding-top: 2px; + margin-top: -41px; + margin-left: 20px; + line-height: 29px; + margin-bottom: 8px; + display: block; +} + +.col-left-header-tab a { + color: #FFFFFF; +} + +.callout-green { + background: url(images/back_green-fade.gif) 0 0 repeat-x; + font-size: 1.2em; + padding: 10px 15px 20px 13px; + color: #303B52; + line-height: 1.4em; +} + +/* s4.2 - Home Left Quote */ +.callout-tan { + color: #666666; +} + +.callout-tan h1 { + background: #F4F1E9 url(images/back_tan-fade.gif) 0 0 repeat-y; + font-size: 1.1em; + text-align: center; + margin: 0px; + padding: 11px 5px 11px 2px; + color: #333333; +} + +.callout-tan p { + margin: 0px; + margin-top: 5px; + line-height: 1.4em; + padding: 5px 10px 7px 13px; +} + +.callout-tan p img { + float: left; + margin: 5px 10px 5px 0px; +} + +.callout-tan div { + text-align: left; + padding: 5px 10px 7px 0px; + font-weight: bold; +} + +/* s4.3 - purple home boxes */ +.box-purple { + background: #C6C8E3 url(images/back_home-icons.png) 0px 0px repeat-x; + border-left: 1px solid #ffffff; + color: #333333; + width: 581px; + padding: 10px 15px 20px 15px; +} + +div.box-purple a { + +} + +.box-purple h1 { + font-size: 1.5em; + margin: 10px 0px -15px 0px; +} + +.box-purple li { + margin: 0px 0px 0px -23px; + line-height: 1.6em; + font-size: 1em; +} + +.box-purple div { + padding: 0px 0px 0px 110px; +} + +.icon-text01 { + background-image: url(images/icon_search-engine-market.png); + background-repeat: no-repeat; +} + +* html .icon-text01 { + width: 460px; /* must have a width or heigh tag for ie6*/ + background-image: none; + filter: progid : DXImageTransform . Microsoft . + AlphaImageLoader(src = "images/icon_search-engine-market.png", + sizingMethod = "crop"); +} + +.icon-text02 { + background: url(images/icon_landing-pages.png) 0 0 no-repeat; +} + +* html .icon-text02 { + width: 460px; /* must have a width or heigh tag for ie6*/ + background-image: none; + filter: progid : DXImageTransform . Microsoft . + AlphaImageLoader(src = "images/icon_landing-pages.png", sizingMethod = + "crop"); +} + +.icon-text03 { + background: url(images/icon_salesforce.png) 0 0 no-repeat; +} + +* html .icon-text03 { + width: 460px; /* must have a width or heigh tag for ie6*/ + background-image: none; + filter: progid : DXImageTransform . Microsoft . + AlphaImageLoader(src = "images/icon_salesforce.png", sizingMethod = + "crop"); +} + +/* s4.4 - news home boxes */ +.callout-news { + color: #555555; + float: left; + width: 49%; + margin: 10px 1px 0px 0px; + padding-bottom: 20px; + text-align: left; +} + +.line-news-r { + border-right: 1px solid #D4D4D4; +} + +.callout-news h1 { + background-color: #EEEEEE; + font-size: 1.2em; + margin: 0px; + padding: 11px 5px 11px 15px; + color: #333333; +} + +.callout-news p { + margin: 10px 0px 0px 10px; + padding: 0px 10px 7px 20px; + background: url(images/news.gif) no-repeat left 1px; +} + +.callout-news p a { + +} + +.callout-news ul { + list-style-type: none; + padding: 0; + margin: 10px 0 0 10px; +} + +.callout-news li { + background: url(images/icon_news.gif) no-repeat left 2px; + padding: 0px 5px 5px 20px; +} + +.callout-news li a { + display: block; + margin-bottom: 5px; +} + +.callout-news div { + text-align: right; +} + +#scrollup { + position: relative; + overflow: hidden; + height: 440px; + width: 200px +} + +.headline { + position: absolute; + top: 600px; + left: 5px; + height: 585px; + width: 190px; + font: normal 12px tahoma, geneva !important; +} + +div.more { + margin: 5px 0px 0px 0px; + padding: 0px 10px 0px 0px; + letter-spacing: inherit; +} + +div.more a { + background: transparent url(images/arrow_r-blue.gif) no-repeat right 2px + ; + font-weight: bold; + padding: 0px 20px 0px 0px; + font-weight: bold; + text-decoration: none; +} + +div.more a:hover { + text-decoration: underline; +} + +/* sX.0 - Left Nav */ +.nav-left-back { + background: url(images/back_nav_side.gif) 0 0 repeat-x; +} + +div.empty { + background: #F1F0E5 url(images/back_green-fade.gif) 0 0 repeat-x; +} + +div.empty div.callout-green { + +} + +.nav-left { + padding-top: 12px; + /*background: url(images/logo_marketo_square.gif) 0 0 no-repeat;*/ + width: 210px; +} + +.nav-left ul { + margin: 0px; + padding: 0px; + list-style: none; +} + +.nav-left li a { + display: block; + height: 24px; + text-decoration: none; + font-size: 12px; + font-weight: bold; + color: #ffffff; + border-top: 1px solid #B3D38D; + border-bottom: 1px solid #7CA84E; + border-left: 1px solid #97B973; + padding: 6px 0px 0px 20px; +} + +.nav-left a:hover,.nav-left a.active:hover,#nav-left-sub a:hover { + color: #4C6F28; + background-color: #F4F1E9; +} + +.nav-left a.open { + background-image: url(images/arrow_d-green.gif); + background-repeat: no-repeat; + background-position: 6px 11px; +} + +.nav-left-header-tab { + position: relative; /* ie6 fix */ + background: url(images/tab_green.gif) 0 0 no-repeat; + height: 32px; + width: 166px; + text-align: center; + color: #ffffff; + margin: -41px 0px 0px 22px; + line-height: 22px; + margin-bottom: 8px; + display: block; +} + +div.empty div.nav-left-header-tab { + background: url(images/tab_green2.gif) 0 0 no-repeat; +} + +.nav-left a.active { + /* background: url(images/arrow_d-green.gif) 5px 10px no-repeat; */ + display: block; + height: 24px; + text-decoration: none; + font-size: 12px; + font-weight: bold; + background-color: #F4F1E9; + color: #4C6F28; + border-top: 1px solid #D1E5BB; + border-bottom: 1px solid #B0CB95; + border-left: 1px solid #DADADA; + padding: 6px 0px 0px 20px; +} + +#nav-left-sub a { + display: block; + height: 24px; + text-decoration: none; + font-size: 12px; + font-weight: bold; + background-color: #D6E8C4; + color: #4C6F28; + border-top: 1px solid #D6E8C4; + border-bottom: 1px solid #B0CB95; + border-left: 1px solid #97B973; + border-right: 1px solid #8DBE5A; + padding: 6px 0px 0px 30px; +} + +* html #nav-left-sub { /* ie6 fix */ + margin-top: -1px; +} + +*+html #nav-left-sub { /* ie7 fix */ + margin-top: -1px; +} + +#nav-left-sub a.active-page { + display: block; + height: 24px; + text-decoration: none; + font-size: 12px; + font-weight: bold; + background-color: #ffffff; + color: #666666; + border-top: 0px solid #7CA84E; + border-bottom: 1px solid #B0CB95; + border-left: 1px solid #97B973; + border-right: 0px solid #8DBE5A; + padding: 6px 0px 0px 30px; + cursor: default; /* turns off hand icon for link */ +} + +/* sX.0 - Main Content */ +.main-content { + color: #666666; + position: absolute; + right: 20px; + padding-top: 20px; + width: 585px; + padding-bottom: 20px; +} + +div.main-content div.main-content { + +} + +.main-content h1 { + color: #5890D1; + font-size: 1.9em; + font-family: Trebuchet MS; + border-bottom: 1px solid #cccccc; + margin: 0px 10px 0px 0px; +} + +.main-content h2 { + color: #666666; + font-size: 1.3em; + font-weight: normal; + margin: 10px 10px 5px 0px; +} + +.main-content p { + margin: 10px 10px 10px 0px; + line-height: 1.55em; +} + +/* sX.1 - Main Content Sub Styles */ +.sub-grey { + border-top: 1px solid #D4D4D4; + border-bottom: 1px solid #D4D4D4; + background-color: #F4F4F4; + margin: 10px 10px 0px 0px; + padding: 0px 10px 20px 15px; +} + +.sub-white { + margin: 10px 10px 0px 0px; + padding: 0px 10px 20px 15px; +} + +img.screen-grab-r { + margin-right: -8px; + text-align: right; + padding: 0px 0px 0px 10px; +} + +div.main-content a.screenshot { + float: right; + padding: 10px 10px 0px 0px +} + +.content-foot { + border-top: 1px solid #D4D4D4; + font-size: .9em; + line-height: 1.45em; + margin: 10px 20px 0px 0px; + padding: 10px 10px 30px 0px; +} + +div.main-content ul { + position: relative; + left: -25px; +} + +div.main-content li { + margin-bottom: 5px; + list-style-type: disc +} + +div.main-content li a { + color: #6A6CB0; +} + +/* sX.0 - Footer */ +div.footer { + color: #666666; + font-size: .85em; + font-weight: normal; + height: 18px; + margin: 0px auto; + font-family: Tahoma, Geneva, sans-serif; + margin-top: 10px; +} + +.footer ul { + list-style-type: none; +} + +.footer li { + float: left; + border-right: 1px solid #666666; + padding: 0px 7px 0px 7px; + margin-top: 3px; +} + +.footer a { + color: #666666; + text-decoration: none; +} + +.footer a:hover { + color: #0653AB; + text-decoration: none; +} + +.footer li.line-off { + border-right: 0px solid #ffffff; +} + +div.footer strong { + font-weight: normal; +} + +/* sX.0 - General Colors */ +.line-grey,.line-grey-tier { + border-top: 1px solid #A3A3A2; +} + +.line-grey-tier { + padding-bottom: 25px; +} + +.bottom { + height: 10px; +} + +div.p10bottom { + padding-bottom: 10px; +} + +.clear { + clear: both; +} + +table.grid { + background: #EEEEEE; +} + +table.grid th { + background-color: #F4F4F4; +} + +table.grid td { + background-color: #FFFFFF; +} + +div.buttonSubmit { + position: relative; +} + +div.buttonSubmit input,div.buttonSubmit span { + height: 36px; + position: relative; + background-image: url(images/button-submit.gif); + background-repeat: no-repeat; + background-position: right 0px; + float: left; + color: #FFFFFF; + font-weight: bold; + padding: 0px 15px 2px 15px; + margin: 20px 0px 20px 0px; + border: 0px; + cursor: pointer; + z-index: 5; +} + +div.buttonSubmit input { + width: auto; +} + +div.buttonSubmit span { + width: 4px; + position: absolute; + left: 0px; + top: 0px; + background-position: left -36px; + padding: 0px 0px 0px 0px; + z-index: 10; +} + +body.safari div.buttonSubmit span { + display: none +} + +div.buttonSubmitHover input { + background-position: right -72px; +} + +div.buttonSubmitHover span { + background-position: left -108px; +} + +a.demoLink { + padding: 1px 10px 0px 17px; + height: 24px; + background: url(images/bullet_triangle_blue.gif) no-repeat 0px 4px; + display: block; + float: left; +} + +div.callout-tan a { + background: none; + color: #0653AB; + margin: auto; + display: block; +} + +div.callout-tan a:hover { + background: none; + color: #0653AB; +} + +label.error { + display: block; + color: red; + font-style: italic; + font-weight: normal; +} + +input.error { + border: 2px solid red; +} + +p.demoBlock { + border-bottom: 1px solid #DDDDDD; + padding-bottom: 10px; +} + +div.left-nav-callout { + height: 200px; + width: 190px; + top: 55px; + left: 5px; + position: relative; + padding-left: 9px; + padding-top: 13px; +} + +div.left-nav-callout img.png { + position: absolute; + z-index: 0; + top: 0px; + left: 0px; +} + +div.left-nav-callout h6 { + font: bold 14px tahoma, geneva; + color: #333333; + height: 36px; + padding-left: 5px; + margin: 0px; + position: relative; + z-index: 10; +} + +div.left-nav-callout a { + background: url(images/monitor24.gif) no-repeat 0px center; + padding: 5px 0px 5px 30px; + display: block; + font: bold 12px tahoma, geneva; + color: #336699; + margin-bottom: 5px; + position: relative; + z-index: 10; + width: 140px; +} + +form table td { + padding: 5px; +} + +form table input { + width: 200px; + padding: 3px; + margin: 0px; +} + +textarea { + width: 400px +} + +td.label { + width: 150px; +} + +tr.required td.label { + font-weight: bold; + background: url(/images/forms/backRequiredGray.gif) no-repeat right + center; +} + +div.subTableDiv { + width: 500px; +} + +div.subTableDiv td.label { + width: 135px; +} + +ul#homeBlog li div.description { + display: none; +} + +td.field input.error, td.field select.error, tr.errorRow td.field input,tr.errorRow td.field select { + border: 2px solid red; + background-color: #FFFFD5; + margin: 0px; + color: red; +} + +tr td.field div.formError { + display: none; + color: #FF0000; +} + +tr.errorRow td.field div.formError { + display: block; + font-weight: normal; +} + +div.error { + color: red; +} + +div.error a { + color: #336699; + font-size: 12px; + text-decoration: underline +} + +div.tooltip { + position: absolute; + left: 30px; + bottom: 0px; + display: none; /* in case javascript is disabled */ + width: 170px; + background-color: #F4F1E9; + z-index: 100; + padding: 10px; + border: 1px solid #CCCCCC; +} + +div.offerbox { + width: 125px; + float: left; + position: relative; +} + +div.offerbox h3 { + font: bold 17px tahoma, geneva; + color: #333333; + height: 55px; + margin: 0px auto; + text-align: center; +} + +div.offerbox h4 { + height: 100px; + font: normal 13px tahoma, geneva; + margin: 0px; +} + +div.offerbox h5 { + font: bold 14px tahoma, geneva; + margin: 0px; + height: 55px; +} + +div.offerbox h5 small { + float: left; + font-weight: normal; + font-size: 10px; +} + +div.offerbox div.learnmore { + padding-left: 25px; +} + +div#marketoEditions { + background: url(images/buynowBack.gif) no-repeat; + width: 584px; + height: 376px; + float: left; + position: relative; + margin-bottom: 10px; +} + +div.offerHeader { + background: #0D8BBD; + position: absolute; + top: 20px; + width: 266px; + height: 34px; + border: 1px solid #e1e4e2; +} + +div.offerHeader span { + font: 20px 'trebuchet ms'; + color: #FFFFFF; + position: absolute; + left: 0px; + top: 0px; +} + +div.offerHeader span.shadow { + font: 20px 'trebuchet ms'; + color: #333333; + position: absolute; +} + +div.offerbox div.buttonSubmit { + margin: 5px 0px 0px 10px; +} + +div.footerAddress { + position: absolute; + bottom: 30px; + left: 20px; + color: #666666; + font-size: 11px; + display: none; +} \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/milk/bg.gif b/bug/bug/jquery-validation-1.8.1/demo/milk/bg.gif new file mode 100644 index 0000000..2c7c358 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/demo/milk/bg.gif differ diff --git a/bug/bug/jquery-validation-1.8.1/demo/milk/emails.php b/bug/bug/jquery-validation-1.8.1/demo/milk/emails.php new file mode 100644 index 0000000..059ac14 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/milk/emails.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/milk/emails.phps b/bug/bug/jquery-validation-1.8.1/demo/milk/emails.phps new file mode 100644 index 0000000..d2219cc --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/milk/emails.phps @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/milk/index.html b/bug/bug/jquery-validation-1.8.1/demo/milk/index.html new file mode 100644 index 0000000..3516800 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/milk/index.html @@ -0,0 +1,235 @@ + + + + +Remember The Milk signup form - jQuery Validate plugin demo - with friendly permission from the RTM team + + + + + + + + + + + + + + +

jQuery Validation Plugin Demo

+
+ +
+ + +
+ + +
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + +
+
  +
+ + +
+
+ +
+
+
+
+
+ +
+ +
+ + + + + + + + + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/milk/left_white.png b/bug/bug/jquery-validation-1.8.1/demo/milk/left_white.png new file mode 100644 index 0000000..b889960 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/demo/milk/left_white.png differ diff --git a/bug/bug/jquery-validation-1.8.1/demo/milk/milk.css b/bug/bug/jquery-validation-1.8.1/demo/milk/milk.css new file mode 100644 index 0000000..d5f128b --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/milk/milk.css @@ -0,0 +1,236 @@ +/* GENERAL ELEMENTS */ + +* { margin: 0; padding: 0; } + +body, input, select, textarea { font-family: verdana, arial, helvetica, sans-serif; font-size: 11px; } +body { color: #333; background-color: #fff; text-align: center; } + +a:link { color:#0060BF; text-decoration: underline; } +a:visited { color:#0060BF; text-decoration: underline; } +a:active { color:#0060BF; text-decoration: underline; } +a:hover { color:#000000; text-decoration: underline; } + +h1, h2, h3, h4, h5, h6 { font-family: "Lucida Grande", "Lucida Sans Unicode", geneva, verdana, arial, helvetica, sans-serif; font-weight: bold; color: #666; } +h1 { font-size: 1.8em; margin: 0em 0em 0.6em 0em; color: #EC5800; } +h2 { font-size: 1.5em; margin: 1.2em 0em 0.4em 0em; } +h3 { font-size: 1.4em; margin: 1.2em 0em 0.4em 0em; color: #EC5800; } +h4 { font-size: 1.2em; margin: 1.2em 0em 0.4em 0em; } +h5 { font-size: 1.0em; margin: 1.2em 0em 0.4em 0em; } +h6 { font-size: 0.8em; margin: 1.2em 0em 0.4em 0em; } + +img { border: 0px; } + +p { font-size: 1.0em; line-height: 1.3em; margin: 1.2em 0em 1.2em 0em; } +li > p { margin-top: 0.2em; } +pre { font-family: monospace; font-size: 1.0em; } +strong, b { font-weight: bold; } + +/* PAGE ELEMENTS */ + +/* Content */ + +#content { margin: 0em auto; width: 765px; padding: 10px 0 10px 0; text-align: left; /* Win IE5 */ } +.content { margin-left: 4.5em; margin-right: 4.5em; } +.content ol, .content ul, .content li { font-size: 1.0em; line-height: 1.3em; margin: 0.2em 0 0.1em 1.5em; } +.content ol.terms li { margin-bottom: 1em; } + +/* Header */ + +#header { padding-bottom: 10em; } +#headerlogo { float: left; } +#headerlogo img { width: 188px; height: 83px; } +#headernav { float: right; } + +label { font-weight: bold; } +#reminders label { font-weight: normal; } + +table.tabbedtable { padding-left: 3em; } +table.tabbedtable td { padding-bottom: 5px; } +table.tabbedtable label { text-align: right; padding-right: 9px; } +.hiddenlabel { visibility: hidden; } +.largelink { border: 1px solid #cacaca; padding: 10px; background-color: #E8EEF7; font-size: 1.2em; font-weight: bold; } +.largelinkwrap { padding-top: 10px; padding-bottom: 10px; } + + + +#signuptab { + float:left; + width:100%; + background:#fff url("bg.gif") repeat-x bottom; + font-size: 1.0em; + line-height: normal; +} +#signuptab ul { + margin:0; + padding: 0px 10px 0px 10px; + list-style:none; +} +#signuptab li { + float:left; + background:url("left_white.png") no-repeat left top; + margin:0; + padding:0 3px 0 9px; + border-bottom:1px solid #CACACA; +} +#signuptab a { + float:left; + display:block; + width:.1em; + background:url("right_white.png") no-repeat right top; + padding:2px 15px 0px 6px; + text-decoration:none; + font-weight:bold; + color:#fff; + white-space: nowrap; +} +#signuptab > ul a {width:auto;} +/* Commented Backslash Hack hides rule from IE5-Mac \*/ +#signuptab a {float:none;} +/* End IE5-Mac hack */ +#signuptab a:hover { + color:#333; +} +#signuptab #signupcurrent { + background-position:0 -150px; + border-width:0; +} +#signuptab #signupcurrent a { + background-position:100% -150px; + padding-bottom:1px; + color:#000; +} +#signuptab li:hover, #signuptab li:hover a { + background-position:0% -150px; + color:#000; +} +#signuptab li:hover a { + background-position:100% -150px; +} + +/* Signup box */ + +#signupbox { + width: 100%; + text-align: center; + margin: 0em auto; +} + +#signupwrap { + border: 1px solid #CACACA; + border-top: 0; + text-align: left; + padding: 35px 10px 20px 30px; + clear: both; +} + +/* Unsupported browsers */ + +.orange_rbcontent { padding: 0.4em; } +.orange_rbroundbox { width: 100%; } + +#unsupported { + font-weight: bold; + text-align: left; +} + +/*#content { + padding-top: 15px; +}*/ + +/* Signup form */ + +#signupform table { + border-spacing: 0px; + border-collapse: collapse; + empty-cells: show; +} + +#signupform .label { + padding-top: 2px; + padding-right: 8px; + vertical-align: top; + text-align: right; + width: 125px; + white-space: nowrap; +} + +#signupform .field { + padding-bottom: 10px; + white-space: nowrap; +} + +#signupform .status { + padding-top: 2px; + padding-left: 8px; + vertical-align: top; + width: 246px; + white-space: nowrap; +} + +#signupform .textfield { + width: 150px; +} + +#signupform label.error { + background:url("../images/unchecked.gif") no-repeat 0px 0px; + padding-left: 16px; + padding-bottom: 2px; + font-weight: bold; + color: #EA5200; +} + +#signupform label.checked { + background:url("../images/checked.gif") no-repeat 0px 0px; +} + +#signupform .success_msg { + font-weight: bold; + color: #0060BF; + margin-left: 19px; +} + +#signupform #dateformatStatus, #signupform #termsStatus { + margin-left: 6px; +} + +#signupform #dateformat_eu { + vertical-align: middle; +} + +#signupform #ldateformat_eu { + font-weight: normal; + vertical-align: middle; +} + +#signupform #dateformat_am { + vertical-align: middle; +} + +#signupform #ldateformat_am { + font-weight: normal; + vertical-align: middle; +} + +#signupform #termswrap { + float: left; +} + +#signupform #terms { + vertical-align: middle; + float: left; + display: block; + margin-right: 5px; +} + +#signupform #lterms { + font-weight: normal; + vertical-align: middle; + float: left; + display: block; + width: 350px; + white-space: normal; +} + +#signupform #lsignupsubmit { + visibility: hidden; +} \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/milk/milk.png b/bug/bug/jquery-validation-1.8.1/demo/milk/milk.png new file mode 100644 index 0000000..b5e7151 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/demo/milk/milk.png differ diff --git a/bug/bug/jquery-validation-1.8.1/demo/milk/right_white.png b/bug/bug/jquery-validation-1.8.1/demo/milk/right_white.png new file mode 100644 index 0000000..393bbe2 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/demo/milk/right_white.png differ diff --git a/bug/bug/jquery-validation-1.8.1/demo/milk/users.php b/bug/bug/jquery-validation-1.8.1/demo/milk/users.php new file mode 100644 index 0000000..4fef967 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/milk/users.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/milk/users.phps b/bug/bug/jquery-validation-1.8.1/demo/milk/users.phps new file mode 100644 index 0000000..dfe4c8e --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/milk/users.phps @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/multipart/index.html b/bug/bug/jquery-validation-1.8.1/demo/multipart/index.html new file mode 100644 index 0000000..2fc5973 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/multipart/index.html @@ -0,0 +1,412 @@ + + + + +jQuery accordion form with validation + + + + + + + + + + + + + + + +
+
+ +

Help me Buy and Sell a House

+

This form is quick & easy to complete - in only 3 steps!

+
+ + +
    +
  • +
    +
    Step 1 of 3 +
    *Required Field
    +

    Tell us about the property you're buying

    +   No:      Yes: +
    +
    +
    +
    + +
    +
    +
    +
    +
  • +
  • + + +
    +
    Step 2 of 3 +
    *Required Field
    +

    Tell us about the property you're selling

    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
  • +
  • + + +
    +
    Step 3 of 3 +
    *Required Field
    +

    Tell us about yourself

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    This is a sample form, no information is sent anywhere.

    +
    +
    +
    +
  • +
+
+ +
+
+ + + diff --git a/bug/bug/jquery-validation-1.8.1/demo/multipart/js/jquery.maskedinput-1.0.js b/bug/bug/jquery-validation-1.8.1/demo/multipart/js/jquery.maskedinput-1.0.js new file mode 100644 index 0000000..9ba3ecf --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/multipart/js/jquery.maskedinput-1.0.js @@ -0,0 +1,246 @@ +/* + * Copyright (c) 2007 Josh Bush (digitalbush.com) + * + * 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. + */ + +/* + * Version: 1.0 + * Release: 2007-07-25 + */ +(function($) { + //Helper Functions for Caret positioning + function getCaretPosition(ctl){ + var res = {begin: 0, end: 0 }; + if (ctl.setSelectionRange){ + res.begin = ctl.selectionStart; + res.end = ctl.selectionEnd; + }else if (document.selection && document.selection.createRange){ + var range = document.selection.createRange(); + res.begin = 0 - range.duplicate().moveStart('character', -100000); + res.end = res.begin + range.text.length; + } + return res; + }; + + function setCaretPosition(ctl, pos){ + if(ctl.setSelectionRange){ + ctl.focus(); + ctl.setSelectionRange(pos,pos); + }else if (ctl.createTextRange){ + var range = ctl.createTextRange(); + range.collapse(true); + range.moveEnd('character', pos); + range.moveStart('character', pos); + range.select(); + } + }; + + //Predefined character definitions + var charMap={ + '9':"[0-9]", + 'a':"[A-Za-z]", + '*':"[A-Za-z0-9]" + }; + + //Helper method to inject character definitions + $.mask={ + addPlaceholder : function(c,r){ + charMap[c]=r; + } + }; + + //Main Method + $.fn.mask = function(mask,settings) { + settings = $.extend({ + placeholder: "_", + completed: null + }, settings); + + //Build Regex for format validation + var reString="^"; + for(var i=0;i 16 && k < 32 ) || (k > 32 && k < 41)); + + //delete selection before proceeding + if((pos.begin-pos.end)!=0 && (!ignore || k==8 || k==46)){ + clearBuffer(pos.begin,pos.end); + } + //backspace and delete get special treatment + if(k==8){//backspace + while(pos.begin-->=0){ + if(!locked[pos.begin]){ + buffer[pos.begin]=settings.placeholder; + if($.browser.opera){ + //Opera won't let you cancel the backspace, so we'll let it backspace over a dummy character. + writeBuffer(pos.begin); + setCaretPosition(this,pos.begin+1); + }else{ + writeBuffer(); + setCaretPosition(this,pos.begin); + } + return false; + } + } + }else if(k==46){//delete + clearBuffer(pos.begin,pos.begin+1); + writeBuffer(); + setCaretPosition(this,pos.begin); + return false; + }else if (k==27){ + clearBuffer(0,mask.length); + writeBuffer(); + setCaretPosition(this,0); + return false; + } + + }); + + input.keypress(function(e){ + if(ignore){ + ignore=false; + return; + } + e=e||window.event; + var k=e.charCode||e.keyCode||e.which; + + var pos=getCaretPosition(this); + var caretPos=pos.begin; + + if(e.ctrlKey || e.altKey){//Ignore + return true; + }else if ((k>=41 && k<=122) ||k==32 || k>186){//typeable characters + while(pos.begin=buffer.length) + settings.completed.call(input); + else + setCaretPosition(this,caretPos); + + return false; + }); + + /*Helper Methods*/ + function clearBuffer(start,end){ + for(var i=start;i").addClass("ui-icon " + o.icons.header).prependTo(this.headers); + this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected); + + // IE7-/Win - Extra vertical space in lists fixed + if ($.browser.msie) { + this.element.find('a').css('zoom', '1'); + } + + this.resize(); + + //ARIA + this.element.attr('role','tablist'); + + this.headers + .attr('role','tab') + .bind('keydown', function(event) { return self._keydown(event); }) + .next() + .attr('role','tabpanel'); + + this.headers + .not(this.active || "") + .attr('aria-expanded','false') + .attr("tabIndex", "-1") + .next() + .hide(); + + // make sure at least one header is in the tab order + if (!this.active.length) { + this.headers.eq(0).attr('tabIndex','0'); + } else { + this.active + .attr('aria-expanded','true') + .attr('tabIndex', '0'); + } + + // only need links in taborder for Safari + if (!$.browser.safari) + this.headers.find('a').attr('tabIndex','-1'); + + if (o.event) { + this.headers.bind((o.event) + ".accordion", function(event) { return self._clickHandler.call(self, event, this); }); + } + + }, + + destroy: function() { + var o = this.options; + + this.element + .removeClass("ui-accordion ui-widget ui-helper-reset") + .removeAttr("role") + .unbind('.accordion') + .removeData('accordion'); + + this.headers + .unbind(".accordion") + .removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top") + .removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex"); + + this.headers.find("a").removeAttr("tabindex"); + this.headers.children(".ui-icon").remove(); + var contents = this.headers.next().css("display", "").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active"); + if (o.autoHeight || o.fillHeight) { + contents.css("height", ""); + } + }, + + _setData: function(key, value) { + if(key == 'alwaysOpen') { key = 'collapsible'; value = !value; } + $.widget.prototype._setData.apply(this, arguments); + }, + + _keydown: function(event) { + + var o = this.options, keyCode = $.ui.keyCode; + + if (o.disabled || event.altKey || event.ctrlKey) + return; + + var length = this.headers.length; + var currentIndex = this.headers.index(event.target); + var 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: + return this._clickHandler({ target: event.target }, event.target); + } + + if (toFocus) { + $(event.target).attr('tabIndex','-1'); + $(toFocus).attr('tabIndex','0'); + toFocus.focus(); + return false; + } + + return true; + + }, + + resize: function() { + + var o = this.options, maxHeight; + + if (o.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(); + }); + + var maxPadding = 0; + this.headers.next().each(function() { + maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height()); + }).height(Math.max(0, maxHeight - maxPadding)) + .css('overflow', 'auto'); + + } else if ( o.autoHeight ) { + maxHeight = 0; + this.headers.next().each(function() { + maxHeight = Math.max(maxHeight, $(this).outerHeight()); + }).height(maxHeight); + } + + }, + + activate: function(index) { + // call clickHandler with custom event + var active = this._findActive(index)[0]; + this._clickHandler({ target: active }, active); + }, + + _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)"); + }, + + _clickHandler: function(event, target) { + + var o = this.options; + if (o.disabled) return false; + + // called only when using activate(false) to close all parts programmatically + if (!event.target && o.collapsible) { + this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all") + .find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header); + this.active.next().addClass('ui-accordion-content-active'); + var toHide = this.active.next(), + data = { + options: o, + newHeader: $([]), + oldHeader: o.active, + newContent: $([]), + oldContent: toHide + }, + toShow = (this.active = $([])); + this._toggle(toShow, toHide, data); + return false; + } + + // get the click target + var clicked = $(event.currentTarget || target); + var clickedIsActive = clicked[0] == this.active[0]; + + // if animations are still active, or the active header is the target, ignore click + if (this.running || (!o.collapsible && clickedIsActive)) { + return false; + } + + // switch classes + this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all") + .find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header); + this.active.next().addClass('ui-accordion-content-active'); + if (!clickedIsActive) { + clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top") + .find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected); + clicked.next().addClass('ui-accordion-content-active'); + } + + // find elements to show and hide + var toShow = clicked.next(), + toHide = this.active.next(), + data = { + options: o, + newHeader: clickedIsActive && o.collapsible ? $([]) : clicked, + oldHeader: this.active, + newContent: clickedIsActive && o.collapsible ? $([]) : toShow.find('> *'), + oldContent: toHide.find('> *') + }, + down = this.headers.index( this.active[0] ) > this.headers.index( clicked[0] ); + + this.active = clickedIsActive ? $([]) : clicked; + this._toggle(toShow, toHide, data, clickedIsActive, down); + + return false; + + }, + + _toggle: function(toShow, toHide, data, clickedIsActive, down) { + + var o = this.options, self = this; + + this.toShow = toShow; + this.toHide = toHide; + this.data = data; + + var complete = function() { if(!self) return; return self._completed.apply(self, arguments); }; + + // trigger changestart event + this._trigger("changestart", null, this.data); + + // count elements to animate + this.running = toHide.size() === 0 ? toShow.size() : toHide.size(); + + if (o.animated) { + + var animOptions = {}; + + if ( o.collapsible && clickedIsActive ) { + animOptions = { + toShow: $([]), + toHide: toHide, + complete: complete, + down: down, + autoHeight: o.autoHeight || o.fillSpace + }; + } else { + animOptions = { + toShow: toShow, + toHide: toHide, + complete: complete, + down: down, + autoHeight: o.autoHeight || o.fillSpace + }; + } + + if (!o.proxied) { + o.proxied = o.animated; + } + + if (!o.proxiedDuration) { + o.proxiedDuration = o.duration; + } + + o.animated = $.isFunction(o.proxied) ? + o.proxied(animOptions) : o.proxied; + + o.duration = $.isFunction(o.proxiedDuration) ? + o.proxiedDuration(animOptions) : o.proxiedDuration; + + var animations = $.ui.accordion.animations, + duration = o.duration, + easing = o.animated; + + if (!animations[easing]) { + animations[easing] = function(options) { + this.slide(options, { + easing: easing, + duration: duration || 700 + }); + }; + } + + animations[easing](animOptions); + + } else { + + if (o.collapsible && clickedIsActive) { + toShow.toggle(); + } else { + toHide.hide(); + toShow.show(); + } + + complete(true); + + } + + toHide.prev().attr('aria-expanded','false').attr("tabIndex", "-1").blur(); + toShow.prev().attr('aria-expanded','true').attr("tabIndex", "0").focus(); + + }, + + _completed: function(cancel) { + + var o = this.options; + + this.running = cancel ? 0 : --this.running; + if (this.running) return; + + if (o.clearStyle) { + this.toShow.add(this.toHide).css({ + height: "", + overflow: "" + }); + } + + this._trigger('change', null, this.data); + } + +}); + + +$.extend($.ui.accordion, { + version: "1.7.1", + defaults: { + active: null, + alwaysOpen: true, //deprecated, use collapsible + 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(); + } + }, + animations: { + slide: function(options, additions) { + options = $.extend({ + easing: "swing", + duration: 300 + }, options, additions); + if ( !options.toHide.size() ) { + options.toShow.animate({height: "show"}, options); + return; + } + if ( !options.toShow.size() ) { + options.toHide.animate({height: "hide"}, options); + return; + } + var overflow = options.toShow.css('overflow'), + percentDone, + 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( parseInt(s.parent().width(),10) - parseInt(s.css("paddingLeft"),10) - parseInt(s.css("paddingRight"),10) - (parseInt(s.css("borderLeftWidth"),10) || 0) - (parseInt(s.css("borderRightWidth"),10) || 0) ); + + $.each(fxAttrs, function(i, prop) { + hideProps[prop] = 'hide'; + + var parts = ('' + $.css(options.toShow[0], prop)).match(/^([\d+-.]+)(.*)$/); + showProps[prop] = { + value: parts[1], + unit: parts[2] || 'px' + }; + }); + options.toShow.css({ height: 0, overflow: 'hidden' }).show(); + options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{ + step: function(now, settings) { + // 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.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); + options.toShow.css({overflow: overflow}); + options.complete(); + } + }); + }, + bounceslide: function(options) { + this.slide(options, { + easing: options.down ? "easeOutBounce" : "swing", + duration: options.down ? 1000 : 200 + }); + }, + easeslide: function(options) { + this.slide(options, { + easing: "easeinout", + duration: 700 + }); + } + } +}); + +})(jQuery); diff --git a/bug/bug/jquery-validation-1.8.1/demo/multipart/js/ui.core.js b/bug/bug/jquery-validation-1.8.1/demo/multipart/js/ui.core.js new file mode 100644 index 0000000..6be9993 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/multipart/js/ui.core.js @@ -0,0 +1,519 @@ +/* + * jQuery UI 1.7.1 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI + */ +;jQuery.ui || (function($) { + +var _remove = $.fn.remove, + isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9); + +//Helper functions and ui object +$.ui = { + version: "1.7.1", + + // $.ui.plugin is deprecated. Use the proxy pattern instead. + plugin: { + add: function(module, option, set) { + var proto = $.ui[module].prototype; + for(var i in set) { + proto.plugins[i] = proto.plugins[i] || []; + proto.plugins[i].push([option, set[i]]); + } + }, + call: function(instance, name, args) { + var set = instance.plugins[name]; + if(!set || !instance.element[0].parentNode) { return; } + + for (var i = 0; i < set.length; i++) { + if (instance.options[set[i][0]]) { + set[i][1].apply(instance.element, args); + } + } + } + }, + + contains: function(a, b) { + return document.compareDocumentPosition + ? a.compareDocumentPosition(b) & 16 + : a !== b && a.contains(b); + }, + + hasScroll: function(el, a) { + + //If overflow is hidden, the element might have extra content, but the user wants to hide it + if ($(el).css('overflow') == 'hidden') { return false; } + + var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop', + has = false; + + if (el[scroll] > 0) { return true; } + + // TODO: determine which cases actually cause this to happen + // if the element doesn't have the scroll set, see if it's possible to + // set the scroll + el[scroll] = 1; + has = (el[scroll] > 0); + el[scroll] = 0; + return has; + }, + + isOverAxis: function(x, reference, size) { + //Determines when x coordinate is over "b" element axis + return (x > reference) && (x < (reference + size)); + }, + + isOver: function(y, x, top, left, height, width) { + //Determines when x, y coordinates is over "b" element + return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width); + }, + + keyCode: { + BACKSPACE: 8, + CAPS_LOCK: 20, + COMMA: 188, + CONTROL: 17, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + INSERT: 45, + LEFT: 37, + 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 + } +}; + +// WAI-ARIA normalization +if (isFF2) { + var attr = $.attr, + removeAttr = $.fn.removeAttr, + ariaNS = "http://www.w3.org/2005/07/aaa", + ariaState = /^aria-/, + ariaRole = /^wairole:/; + + $.attr = function(elem, name, value) { + var set = value !== undefined; + + return (name == 'role' + ? (set + ? attr.call(this, elem, name, "wairole:" + value) + : (attr.apply(this, arguments) || "").replace(ariaRole, "")) + : (ariaState.test(name) + ? (set + ? elem.setAttributeNS(ariaNS, + name.replace(ariaState, "aaa:"), value) + : attr.call(this, elem, name.replace(ariaState, "aaa:"))) + : attr.apply(this, arguments))); + }; + + $.fn.removeAttr = function(name) { + return (ariaState.test(name) + ? this.each(function() { + this.removeAttributeNS(ariaNS, name.replace(ariaState, "")); + }) : removeAttr.call(this, name)); + }; +} + +//jQuery plugins +$.fn.extend({ + remove: function() { + // Safari has a native remove event which actually removes DOM elements, + // so we have to use triggerHandler instead of trigger (#3037). + $("*", this).add(this).each(function() { + $(this).triggerHandler("remove"); + }); + return _remove.apply(this, arguments ); + }, + + enableSelection: function() { + return this + .attr('unselectable', 'off') + .css('MozUserSelect', '') + .unbind('selectstart.ui'); + }, + + disableSelection: function() { + return this + .attr('unselectable', 'on') + .css('MozUserSelect', 'none') + .bind('selectstart.ui', function() { return false; }); + }, + + 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; + } +}); + + +//Additional selectors +$.extend($.expr[':'], { + data: function(elem, i, match) { + return !!$.data(elem, match[3]); + }, + + focusable: function(element) { + var nodeName = element.nodeName.toLowerCase(), + tabIndex = $.attr(element, 'tabindex'); + return (/input|select|textarea|button|object/.test(nodeName) + ? !element.disabled + : 'a' == nodeName || 'area' == nodeName + ? element.href || !isNaN(tabIndex) + : !isNaN(tabIndex)) + // the element and all of its ancestors must be visible + // the browser may report that the area is hidden + && !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length; + }, + + tabbable: function(element) { + var tabIndex = $.attr(element, 'tabindex'); + return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable'); + } +}); + + +// $.widget is a factory to create jQuery plugins +// taking some boilerplate code out of the plugin code +function getter(namespace, plugin, method, args) { + function getMethods(type) { + var methods = $[namespace][plugin][type] || []; + return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods); + } + + var methods = getMethods('getter'); + if (args.length == 1 && typeof args[0] == 'string') { + methods = methods.concat(getMethods('getterSetter')); + } + return ($.inArray(method, methods) != -1); +} + +$.widget = function(name, prototype) { + var namespace = name.split(".")[0]; + name = name.split(".")[1]; + + // create plugin method + $.fn[name] = function(options) { + var isMethodCall = (typeof options == 'string'), + args = Array.prototype.slice.call(arguments, 1); + + // prevent calls to internal methods + if (isMethodCall && options.substring(0, 1) == '_') { + return this; + } + + // handle getter methods + if (isMethodCall && getter(namespace, name, options, args)) { + var instance = $.data(this[0], name); + return (instance ? instance[options].apply(instance, args) + : undefined); + } + + // handle initialization and non-getter methods + return this.each(function() { + var instance = $.data(this, name); + + // constructor + (!instance && !isMethodCall && + $.data(this, name, new $[namespace][name](this, options))._init()); + + // method call + (instance && isMethodCall && $.isFunction(instance[options]) && + instance[options].apply(instance, args)); + }); + }; + + // create widget constructor + $[namespace] = $[namespace] || {}; + $[namespace][name] = function(element, options) { + var self = this; + + this.namespace = namespace; + this.widgetName = name; + this.widgetEventPrefix = $[namespace][name].eventPrefix || name; + this.widgetBaseClass = namespace + '-' + name; + + this.options = $.extend({}, + $.widget.defaults, + $[namespace][name].defaults, + $.metadata && $.metadata.get(element)[name], + options); + + this.element = $(element) + .bind('setData.' + name, function(event, key, value) { + if (event.target == element) { + return self._setData(key, value); + } + }) + .bind('getData.' + name, function(event, key) { + if (event.target == element) { + return self._getData(key); + } + }) + .bind('remove', function() { + return self.destroy(); + }); + }; + + // add widget prototype + $[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype); + + // TODO: merge getter and getterSetter properties from widget prototype + // and plugin prototype + $[namespace][name].getterSetter = 'option'; +}; + +$.widget.prototype = { + _init: function() {}, + destroy: function() { + this.element.removeData(this.widgetName) + .removeClass(this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled') + .removeAttr('aria-disabled'); + }, + + option: function(key, value) { + var options = key, + self = this; + + if (typeof key == "string") { + if (value === undefined) { + return this._getData(key); + } + options = {}; + options[key] = value; + } + + $.each(options, function(key, value) { + self._setData(key, value); + }); + }, + _getData: function(key) { + return this.options[key]; + }, + _setData: function(key, value) { + this.options[key] = value; + + if (key == 'disabled') { + this.element + [value ? 'addClass' : 'removeClass']( + this.widgetBaseClass + '-disabled' + ' ' + + this.namespace + '-state-disabled') + .attr("aria-disabled", value); + } + }, + + enable: function() { + this._setData('disabled', false); + }, + disable: function() { + this._setData('disabled', true); + }, + + _trigger: function(type, event, data) { + var callback = this.options[type], + eventName = (type == this.widgetEventPrefix + ? type : this.widgetEventPrefix + type); + + event = $.Event(event); + event.type = eventName; + + // copy original event properties over to the new event + // this would happen if we could call $.event.fix instead of $.Event + // but we don't have a way to force an event to be fixed multiple times + if (event.originalEvent) { + for (var i = $.event.props.length, prop; i;) { + prop = $.event.props[--i]; + event[prop] = event.originalEvent[prop]; + } + } + + this.element.trigger(event, data); + + return !($.isFunction(callback) && callback.call(this.element[0], event, data) === false + || event.isDefaultPrevented()); + } +}; + +$.widget.defaults = { + disabled: false +}; + + +/** Mouse Interaction Plugin **/ + +$.ui.mouse = { + _mouseInit: function() { + var self = this; + + this.element + .bind('mousedown.'+this.widgetName, function(event) { + return self._mouseDown(event); + }) + .bind('click.'+this.widgetName, function(event) { + if(self._preventClickEvent) { + self._preventClickEvent = false; + event.stopImmediatePropagation(); + return false; + } + }); + + // Prevent text selection in IE + if ($.browser.msie) { + this._mouseUnselectable = this.element.attr('unselectable'); + this.element.attr('unselectable', 'on'); + } + + 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); + + // Restore text selection in IE + ($.browser.msie + && this.element.attr('unselectable', this._mouseUnselectable)); + }, + + _mouseDown: function(event) { + // don't let more than one widget handle mouseStart + // TODO: figure out why we have to use originalEvent + event.originalEvent = event.originalEvent || {}; + if (event.originalEvent.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), + elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(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; + } + } + + // 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); + + // preventDefault() is used to prevent the selection of text here - + // however, in Safari, this causes select boxes not to be selectable + // anymore, so this fix is needed + ($.browser.safari || event.preventDefault()); + + event.originalEvent.mouseHandled = true; + return true; + }, + + _mouseMove: function(event) { + // IE mouseup check - mouseup happened when mouse was out of window + if ($.browser.msie && !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; + this._preventClickEvent = (event.target == this._mouseDownEvent.target); + 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; } +}; + +$.ui.mouse.defaults = { + cancel: null, + distance: 1, + delay: 0 +}; + +})(jQuery); diff --git a/bug/bug/jquery-validation-1.8.1/demo/multipart/style.css b/bug/bug/jquery-validation-1.8.1/demo/multipart/style.css new file mode 100644 index 0000000..fbf08c2 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/multipart/style.css @@ -0,0 +1,705 @@ +/******************************************** + AUTHOR: Erwin Aligam + WEBSITE: http://www.styleshout.com/ + TEMPLATE NAME: Techmania 1.0 + TEMPLATE CODE: S-0003 + VERSION: 1.1 + *******************************************/ + /******************************************** + HTML ELEMENTS +********************************************/ /* Top elements */ + /** { margin:0; padding: 0; }*/ +body { + background-color: #000; + color: #555; + font: 78%/ 1.6 Verdana, 'Trebuchet MS', arial, sans-serif; + text-align: center; + margin: 15px 0; +} + +/* links */ +a { + color: #213540; + background: inherit; + text-decoration: none; +} + +a:hover { + color: #3e4255; + text-decoration: underline; + background: inherit; +} + +/* headers */ +h1,h2,h3 { + font-family: 'Trebuchet MS', Arial, sans-serif; + font-weight: bold; +} + +h1 { + font-size: 1.5em; + margin: 10px 15px; +} + +h2 { + font-size: 1.3em; + text-transform: uppercase; + color: #339900; + margin: 10px 15px; +} + +h3 { + font-size: 1.1em; + color: #333; + margin: 16px 0 0 18px; +} + +h1,h2,h3 { + padding: 0; +} + +p { + line-height: 1.4em; + padding: 0 15px; +} + +p.error { + color: #CC0033; +} + +ul,ol { + margin: 10px 6px; + padding: 0 15px; + color: #006699; +} + +ul span,ol span { + color: #666666; +} + +/* images */ +img { + border: 2px solid #CCC; +} + +img.float-right { + margin: 5px 0px 10px 10px; +} + +img.float-left { + margin: 5px 10px 10px 0px; +} + +code { + margin: 5px 0; + padding: 10px; + text-align: left; + display: block; + overflow: auto; + font: 500 1em/ 1.5em 'Lucida Console', 'courier new', monospace; + /* white-space: pre; */ + background: #FAFAFA; + border: 1px solid #EAEAEA; + border-left: 5px solid #72A545; +} + +acronym { + cursor: help; + border-bottom: 1px solid #777; +} + +blockquote { + margin: 15px; + padding: 0 0 0 32px; + background: #FAFAFA url(quote.gif) no-repeat 5px 10px !important; + background-position: 8px 10px; + border: 1px solid #EAEAEA; + border-left: 5px solid #72A545; + font-weight: bold; +} + +/* form elements */ +fieldset { + margin: 12px 12px 18px; + padding-left: 6px; + border: 1px solid #004080; + color: #006699; +} + +fieldset fieldset { + border: 1px solid #9ea190; + margin: 17px 14px; +} + +form { + margin: 10px 15px; + padding: 0; +} + +label { + font-weight: bold; + margin: 5px 3px 0 0; + width: 160px; + text-align: right; + float: left; +} + +legend { + font-size: 1.2em; + padding: 0 12px; + font-weight: 900; + background-color: #F9F9F9; +} + +fieldset fieldset legend { + font-size: 1em; + color: #1a2129; + padding: 0 18px; + margin-left: 75px; +} + +input { + padding: 3px; + margin: 4px 0; + border: 1px solid #CFCED3; + font: normal 1em Verdana, sans-serif; + color: #777; +} + +textarea { + width: 400px; + padding: 4px; + font: normal 1em Verdana, sans-serif; + border: 1px solid #eee; + height: 100px; + display: block; + color: #777; +} + +input.button { + margin: 0; + font: bold 12px Arial, Sans-serif; + border: 1px solid #EAEAEA; + padding: 3px 4px; + background: #CCC url(buttonbg.gif) repeat-x left bottom; + color: #333; /* color: #339900; */ + cursor: pointer; +} + +input.submitbutton { + background-color: #006699; + color: #FFF; + background-image: none; + font-weight: 900; + border: 1px solid #EAEAEA; + margin: 0 0 0 200px; +} + +/* search */ +#sidebar #search { + background: #f2f2f2; + margin: 0 15px; + padding: 5px 0; +} + +#sidebar #search img { + vertical-align: bottom; +} + +#sidebar #search .textbox { + background: #FFF url(input.png) no-repeat top left; + border: 1px solid #EAEAEA; + font-size: 11px; + padding: 3px; + width: 110px; +} + +#sidebar #search input.searchbutton { + margin: 0; + font: bold 100% Arial, Sans-serif; + border: 1px solid #CCC; + background: #CCC url(buttonbg.gif) repeat-x left bottom; + padding: 1px; + height: 25px; + color: #333; + width: 55px; +} + +/***************************** + LAYOUT +******************************/ +#wrap { + margin: 0 auto; + padding: 0; + text-align: left; + background-color: #FFF; + width: 790px; +} + +#content-wrap { + clear: both; + margin: 0; + padding: 0; + width: 790px; +} + +/* header */ +#header { + position: relative; + clear: left; + width: 790px; + height: 137px; + margin: 0; + padding: 0; + background: #000 url(headerbg.jpg) no-repeat left bottom; +} + +#header h1#logo-text { + float: right; + margin: 39px 58px 0 0; + padding: 0; + font: bolder 3.2em 'Trebuchet MS', Arial, Sans-serif; + letter-spacing: -2px; + color: #FFF; + text-transform: none; + /* change the values of top and right to adjust the position of the logo*/ + top: 35px; + right: 30px; +} + +#header h2#slogan { + float: right; + margin: 0 38px 0 0; + padding: 0; + font: bold 1.5em 'Trebuchet MS', Arial, Sans-serif; + text-transform: none; + letter-spacing: 1px; + color: #FFF; + clear: both; + text-align: right; +} + +#header h1#logo-text span { + color: #CFCED3; +} + +/* menu tabs */ +#header #header-tabs { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 25px; + background: #000; + font: bold 1.1em Verdana, Tahoma, 'Trebuchet MS', Sans-serif; +} + +#header-tabs ul { + margin: 0; + padding: 2px 0px 0px 0px; + list-style: none; +} + +#header-tabs li { + display: inline; + margin: 0; + padding: 0; +} + +#header-tabs a { + float: left; + background: url(tableft.gif) no-repeat left top; + margin: 0; + padding: 0 0 0 4px; + text-decoration: none; +} + +#header-tabs a span { + float: left; + display: block; + background: url(tabright.gif) no-repeat right top; + padding: 7px 15px 4px 8px; + color: #CCC; +} + +/* Commented Backslash Hack hides rule from IE5-Mac \*/ +#header-tabs a span { + float: none; +} + +/* End IE5-Mac hack */ +#header-tabs a:hover span { + color: #FFF; +} + +#header-tabs a:hover { + background-position: 0% -42px; +} + +#header-tabs a:hover span { + background-position: 100% -42px; +} + +#header-tabs #current a { + background-position: 0% -42px; +} + +#header-tabs #current a span { + background-position: 100% -42px; + color: #FFF; +} + +/* main content */ +#main { + width: 748px; + margin: 0; + padding: 8px 16px; + background-color: #F9F9F9; + border-left: 5px solid #000; + border-right: 5px solid #000; +} + +#main h1 { + padding: 8px 0 3px 25px; + text-transform: none; + border-bottom: 2px solid #f2f2f2; + color: #339900; +} + +/* sidebar */ +#sidebar { /* float: right; + width: 245px; + margin: 0 0 10px 0; padding: 0; + background-color: inherit; */ + display: none; +} + +#sidebar h1 { + padding: 8px 0px 3px 25px; + background: url(square_arrow.gif) no-repeat 0% .7em; + text-transform: none; + color: #339900; +} + +#sidebar ul.sidemenu { + list-style: none; + margin: 10px 15px; + padding: 0; +} + +#sidebar ul.sidemenu li { + margin-bottom: 1px; + border: 1px solid #f2f2f2; +} + +#sidebar ul.sidemenu a { + display: block; + font-weight: bold; + color: #333; + text-decoration: none; + padding: 2px 5px 2px 10px; + background: #f2f2f2; + border-left: 5px solid #CCC; + min-height: 18px; +} + +* html body #sidebar ul.sidemenu a { + height: 18px; +} + +#sidebar ul.sidemenu a:hover { + padding: 2px 5px 2px 10px; + background: #f2f2f2; + color: #339900; + border-left: 5px solid #72A545; +} + +/* footer */ +#footer { + clear: both; + height: 40px; + color: #CCC; + background: #000; + margin: 0; + font-size: 92%; +} + +#footer a { + text-decoration: none; + font-weight: bold; + color: #FFF; +} + +#footer #footer-left { + width: 68%; + float: left; + text-align: left; + margin: 0; + padding: 10px; +} + +#footer #footer-right { + width: 25%; + float: right; + text-align: right; + margin: 0; + padding: 10px; +} + +/* alignment classes */ +.float-left { + float: left; +} + +.float-right { + float: right; +} + +.align-left { + text-align: left; +} + +.align-right { + text-align: right; +} + +/* additional classes */ +.clear { + clear: both; +} + +.hide { + display: none; +} + +.gray { + color: #CCC; +} + +.comments { + color: #333; + background: #FFF; + text-align: right; + border-top: 1px dashed #EFF0F1; + border-bottom: 1px dashed #EFF0F1; + padding: 5px 0; + margin-top: 20px; +} + +html { + min-height: 100.1%; +} + +/* ------ one ------------*/ +body .mainText { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; +} + +#demoText h1,.mainText h1 { + font-size: 130%; + color: #0099FF; + text-decoration: none; + font-family: Arial, Helvetica, sans-serif; + margin: 5px 4px 5px 24px; + background: none; + padding: 0; + border: none; + text-transform: capitalize; +} + +.mainText h2 { + font-size: 110%; + color: #000033; + font-family: Arial, Helvetica, sans-serif; + text-decoration: none; + background: none; + margin: 4px 32px 6px 22px; + text-transform: capitalize; +} + +.mainText h3 { + font-size: 120%; + font-weight: 900; + margin: 14px 0 0 0; + text-align: center; + color: #000033; +} + +.mainText table { + width: 95%; + border: 1px solid #0099FF; + border-collapse: collapse; + margin: 18px 7px; +} + +.mainText table td { + background-color: #99CCFF; + color: #000033; + padding: 4px; +} + +.mainText table th { + background-color: #000033; + color: #99CCFF; + padding: 4px; +} + +.mainText .linkPar a { + color: #000033; + text-decoration: underline; +} + +.mainText .linkPar a:hover { + color: #660033; + text-decoration: none; + font-weight: 900; +} + +.pusher { + cursor: pointer; + padding: 3px 10px 3px 22px; + font-weight: 900; + font-size: 14px; +} + +/* ------------- form specific styles are here -------------- */ +fieldset { + margin: 0; + border: 1px solid #C3DE00; + padding: 10px; + /*border:none; +padding:0;*/ + color: #7563A5; +} + +legend { + background-color: #FFFFFF; + text-align: center; + color: #097981; + padding: 0 12px; +} + +label { + text-align: right; + width: 298px; + border-right: 1px dotted #099; + padding-right: 5px; + margin: 0 0 8px 0; + float: left; + clear: left; + display: block; + color: #7563A5; +} + +label.checkbox,label.textarea { + border: none; +} + +label.lgfield { + border: none; + text-align: center; + clear: both; + float: none; + width: 100%; +} + +fieldset input,fieldset select,fieldset textarea { + margin-left: 10px; + margin-bottom: 8px; +} + +select.longfield { + margin: 0 0 0 115px; +} + +input [type="radio"],input [type="checkbox"] { + margin: 2px 0 0 4px; +} + +textarea { + width: 250px; + float: left; +} + +/*Get Help Form Styles*/ +p.formDisclaimer { + text-align: center; + margin: 32px 24px 12px 0; + font-style: italic; +} + +div.buttonWrapper { + margin: 28px 0 14px 0; + clear: both; + text-align: center; +} + +.formspacer { + height: 1em; + clear: both; +} + +.hideField { + display: none; +} + +.pushOpen { + height: 18em; +} + +/* ----- error message for field validation ----- */ +#stepForm label.warning { + text-align: left; + width: auto; + padding: 0; + margin: 0 0 0 10px; + float: none; + clear: none; + display: inline; + color: #CC3366; + font-size: 10px; + border: none; + border-top: 1px dotted #CC3366; +} + +div.requiredNotice { + width: 140px; + float: right; + margin: 0 24px 0 0; + padding: 0; +} + +h3.stepHeader { + text-align: left; + font-size: 16px; + font-weight: bold; + margin: 0 0 24px 24px; + color: #676cac; +} + +ul#stepForm,ul#stepForm li { + margin: 0; + padding: 0; +} + +ul#stepForm li { + list-style: none; +} + +/* Form Buttons */ +input.submitbutton,.nextbutton,.prevbutton { + width: 100px; + height: 40px; + background-color: #663399; + padding: 4px; + border: 1px solid #339933; + cursor: pointer; + text-align: center; + color: #FFFFFF; + margin: 7px; +} + +input.submitbutton { + background-color: #006699; +} \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/radio-checkbox-select-demo.html b/bug/bug/jquery-validation-1.8.1/demo/radio-checkbox-select-demo.html new file mode 100644 index 0000000..12c417c --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/radio-checkbox-select-demo.html @@ -0,0 +1,155 @@ + + + + + +Test for jQuery validate() plugin + + + + + + + + + + + + + + +

jQuery Validation Plugin Demo

+
+ +
+
+ Validating a form with a radio and checkbox buttons +
+ Gender + + + +
+
+ Family + + + + +
+

+ + +
+ +

+
+ Spam + + + + +
+

+ +

+
+
+ +
+

Some tests with selects

+

+
+ +

+ +

+
+ +

+ +

+
+ +

+ +

+
+ +

+ +

+
+ +Back to main page + +
+ + + + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/tabs/index.html b/bug/bug/jquery-validation-1.8.1/demo/tabs/index.html new file mode 100644 index 0000000..8a9f69c --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/tabs/index.html @@ -0,0 +1,157 @@ + + + + +jQuery UI tabs integration demo + + + + + + + + + + + + + + +
+ +
+ +
+

+ + +

+

+ + +

+

+ + +

+

+ + +

+
+
+

+ + +

+

+ + +

+

+ + + + +

+
+
+

+ + +

+

+ + +

+

+ + +

+
+
+ + +
+ + + + + + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/themerollered.html b/bug/bug/jquery-validation-1.8.1/demo/themerollered.html new file mode 100644 index 0000000..445a22b --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/themerollered.html @@ -0,0 +1,227 @@ + + + + +jQuery validation plug-in - main demo + + + + + + + + + + + + + + + + + + + + +
+
+ Please provide your name, email address (won't be published) and a comment +

+ + +

+ + +

+

+ + +

+

+ + +

+

+ +

+
+
+ +
+
+ Validating a complete form +

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+
+ Topics (select at least two) - note: would be hidden when newsletter isn't selected, but is visible here for the demo + + + + +
+

+ +

+
+
+ + + + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/tinymce/index.html b/bug/bug/jquery-validation-1.8.1/demo/tinymce/index.html new file mode 100644 index 0000000..8bfd182 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/tinymce/index.html @@ -0,0 +1,75 @@ + + + +jQuery Validation plugin: integration with TinyMCE + + + + + + + + + + +
+

TinyMCE and Validation Plugin integration example

+ + + + +
+ + + + +
+ +
+ + + diff --git a/bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/editor_template.js b/bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/editor_template.js new file mode 100644 index 0000000..d19fb53 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/editor_template.js @@ -0,0 +1 @@ +(function(){var DOM=tinymce.DOM;tinymce.ThemeManager.requireLangPack('simple');tinymce.create('tinymce.themes.SimpleTheme',{init:function(ed,url){var t=this,states=['Bold','Italic','Underline','Strikethrough','InsertUnorderedList','InsertOrderedList'],s=ed.settings;t.editor=ed;ed.onInit.add(function(){ed.onNodeChange.add(function(ed,cm){tinymce.each(states,function(c){cm.get(c.toLowerCase()).setActive(ed.queryCommandState(c));});});ed.dom.loadCSS(url+"/skins/"+s.skin+"/content.css");});DOM.loadCSS((s.editor_css?ed.documentBaseURI.toAbsolute(s.editor_css):'')||url+"/skins/"+s.skin+"/ui.css");},renderUI:function(o){var t=this,n=o.targetNode,ic,tb,ed=t.editor,cf=ed.controlManager,sc;n=DOM.insertAfter(DOM.create('span',{id:ed.id+'_container','class':'mceEditor '+ed.settings.skin+'SimpleSkin'}),n);n=sc=DOM.add(n,'table',{cellPadding:0,cellSpacing:0,'class':'mceLayout'});n=tb=DOM.add(n,'tbody');n=DOM.add(tb,'tr');n=ic=DOM.add(DOM.add(n,'td'),'div',{'class':'mceIframeContainer'});n=DOM.add(DOM.add(tb,'tr',{'class':'last'}),'td',{'class':'mceToolbar mceLast',align:'center'});tb=t.toolbar=cf.createToolbar("tools1");tb.add(cf.createButton('bold',{title:'simple.bold_desc',cmd:'Bold'}));tb.add(cf.createButton('italic',{title:'simple.italic_desc',cmd:'Italic'}));tb.add(cf.createButton('underline',{title:'simple.underline_desc',cmd:'Underline'}));tb.add(cf.createButton('strikethrough',{title:'simple.striketrough_desc',cmd:'Strikethrough'}));tb.add(cf.createSeparator());tb.add(cf.createButton('undo',{title:'simple.undo_desc',cmd:'Undo'}));tb.add(cf.createButton('redo',{title:'simple.redo_desc',cmd:'Redo'}));tb.add(cf.createSeparator());tb.add(cf.createButton('cleanup',{title:'simple.cleanup_desc',cmd:'mceCleanup'}));tb.add(cf.createSeparator());tb.add(cf.createButton('insertunorderedlist',{title:'simple.bullist_desc',cmd:'InsertUnorderedList'}));tb.add(cf.createButton('insertorderedlist',{title:'simple.numlist_desc',cmd:'InsertOrderedList'}));tb.renderTo(n);return{iframeContainer:ic,editorContainer:ed.id+'_container',sizeContainer:sc,deltaHeight:-20};},getInfo:function(){return{longname:'Simple theme',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.ThemeManager.add('simple',tinymce.themes.SimpleTheme);})(); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/img/icons.gif b/bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/img/icons.gif new file mode 100644 index 0000000..16af141 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/img/icons.gif differ diff --git a/bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/langs/en.js b/bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/langs/en.js new file mode 100644 index 0000000..6f09531 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/langs/en.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('en.simple',{ +bold_desc:"Bold (Ctrl+B)", +italic_desc:"Italic (Ctrl+I)", +underline_desc:"Underline (Ctrl+U)", +striketrough_desc:"Strikethrough", +bullist_desc:"Unordered list", +numlist_desc:"Ordered list", +undo_desc:"Undo (Ctrl+Z)", +redo_desc:"Redo (Ctrl+Y)", +cleanup_desc:"Cleanup messy code" +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/skins/default/ui.css b/bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/skins/default/ui.css new file mode 100644 index 0000000..32feae6 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/tinymce/themes/simple/skins/default/ui.css @@ -0,0 +1,32 @@ +/* Reset */ +.defaultSimpleSkin table, .defaultSimpleSkin tbody, .defaultSimpleSkin a, .defaultSimpleSkin img, .defaultSimpleSkin tr, .defaultSimpleSkin div, .defaultSimpleSkin td, .defaultSimpleSkin iframe, .defaultSimpleSkin span, .defaultSimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000} + +/* Containers */ +.defaultSimpleSkin {position:relative} +.defaultSimpleSkin table.mceLayout {background:#F0F0EE; border:1px solid #CCC;} +.defaultSimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #CCC;} +.defaultSimpleSkin .mceToolbar {height:24px;} + +/* Layout */ +.defaultSimpleSkin span.mceIcon, .defaultSimpleSkin img.mceIcon {display:block; width:20px; height:20px} +.defaultSimpleSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} + +/* Button */ +.defaultSimpleSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px} +.defaultSimpleSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} +.defaultSimpleSkin a.mceButtonActive {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSimpleSkin .mceButtonDisabled span {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} + +/* Separator */ +.defaultSimpleSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:0 2px 0 4px} + +/* Theme */ +.defaultSimpleSkin span.mce_bold {background-position:0 0} +.defaultSimpleSkin span.mce_italic {background-position:-60px 0} +.defaultSimpleSkin span.mce_underline {background-position:-140px 0} +.defaultSimpleSkin span.mce_strikethrough {background-position:-120px 0} +.defaultSimpleSkin span.mce_undo {background-position:-160px 0} +.defaultSimpleSkin span.mce_redo {background-position:-100px 0} +.defaultSimpleSkin span.mce_cleanup {background-position:-40px 0} +.defaultSimpleSkin span.mce_insertunorderedlist {background-position:-20px 0} +.defaultSimpleSkin span.mce_insertorderedlist {background-position:-80px 0} diff --git a/bug/bug/jquery-validation-1.8.1/demo/tinymce/tiny_mce.js b/bug/bug/jquery-validation-1.8.1/demo/tinymce/tiny_mce.js new file mode 100644 index 0000000..55aba6e --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/demo/tinymce/tiny_mce.js @@ -0,0 +1 @@ +var tinymce={majorVersion:'3',minorVersion:'2.1.1',releaseDate:'2008-11-27',_init:function(){var t=this,d=document,w=window,na=navigator,ua=na.userAgent,i,nl,n,base,p,v;t.isOpera=w.opera&&opera.buildNumber;t.isWebKit=/WebKit/.test(ua);t.isOldWebKit=t.isWebKit&&!w.getSelection().getRangeAt;t.isIE=!t.isWebKit&&!t.isOpera&&(/MSIE/gi).test(ua)&&(/Explorer/gi).test(na.appName);t.isIE6=t.isIE&&/MSIE [56]/.test(ua);t.isGecko=!t.isWebKit&&/Gecko/.test(ua);t.isMac=ua.indexOf('Mac')!=-1;t.isAir=/adobeair/i.test(ua);if(w.tinyMCEPreInit){t.suffix=tinyMCEPreInit.suffix;t.baseURL=tinyMCEPreInit.base;t.query=tinyMCEPreInit.query;return;}t.suffix='';nl=d.getElementsByTagName('base');for(i=0;i=items.length){for(i=0,l=base.length;i=items.length||base[i]!=items[i]){bp=i+1;break;}}}if(base.length=base.length||base[i]!=items[i]){bp=i+1;break;}}}if(bp==1)return path;for(i=0,l=base.length-(bp-1);i=0;i--){if(path[i].length==0||path[i]==".")continue;if(path[i]=='..'){nb++;continue;}if(nb>0){nb--;continue;}o.push(path[i]);}i=base.length-nb;if(i<=0)return'/'+o.reverse().join('/');return'/'+base.slice(0,i).join('/')+'/'+o.reverse().join('/');},getURI:function(nh){var s,t=this;if(!t.source||nh){s='';if(!nh){if(t.protocol)s+=t.protocol+'://';if(t.userInfo)s+=t.userInfo+'@';if(t.host)s+=t.host;if(t.port)s+=':'+t.port;}if(t.path)s+=t.path;if(t.query)s+='?'+t.query;if(t.anchor)s+='#'+t.anchor;t.source=s;}return t.source;}});})();(function(){var each=tinymce.each;tinymce.create('static tinymce.util.Cookie',{getHash:function(n){var v=this.get(n),h;if(v){each(v.split('&'),function(v){v=v.split('=');h=h||{};h[unescape(v[0])]=unescape(v[1]);});}return h;},setHash:function(n,v,e,p,d,s){var o='';each(v,function(v,k){o+=(!o?'':'&')+escape(k)+'='+escape(v);});this.set(n,o,e,p,d,s);},get:function(n){var c=document.cookie,e,p=n+"=",b;if(!c)return;b=c.indexOf("; "+p);if(b==-1){b=c.indexOf(p);if(b!=0)return null;}else b+=2;e=c.indexOf(";",b);if(e==-1)e=c.length;return unescape(c.substring(b+p.length,e));},set:function(n,v,e,p,d,s){document.cookie=n+"="+escape(v)+((e)?"; expires="+e.toGMTString():"")+((p)?"; path="+escape(p):"")+((d)?"; domain="+d:"")+((s)?"; secure":"");},remove:function(n,p){var d=new Date();d.setTime(d.getTime()-1000);this.set(n,'',d,p,d);}});})();tinymce.create('static tinymce.util.JSON',{serialize:function(o){var i,v,s=tinymce.util.JSON.serialize,t;if(o==null)return'null';t=typeof o;if(t=='string'){v='\bb\tt\nn\ff\rr\""\'\'\\\\';return'"'+o.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(a,b){i=v.indexOf(b);if(i+1)return'\\'+v.charAt(i+1);a=b.charCodeAt().toString(16);return'\\u'+'0000'.substring(a.length)+a;})+'"';}if(t=='object'){if(o instanceof Array){for(i=0,v='[';i0?',':'')+s(o[i]);return v+']';}v='{';for(i in o)v+=typeof o[i]!='function'?(v.length>1?',"':'"')+i+'":'+s(o[i]):'';return v+'}';}return''+o;},parse:function(s){try{return eval('('+s+')');}catch(ex){}}});tinymce.create('static tinymce.util.XHR',{send:function(o){var x,t,w=window,c=0;o.scope=o.scope||this;o.success_scope=o.success_scope||o.scope;o.error_scope=o.error_scope||o.scope;o.async=o.async===false?false:true;o.data=o.data||'';function get(s){x=0;try{x=new ActiveXObject(s);}catch(ex){}return x;};x=w.XMLHttpRequest?new XMLHttpRequest():get('Microsoft.XMLHTTP')||get('Msxml2.XMLHTTP');if(x){if(x.overrideMimeType)x.overrideMimeType(o.content_type);x.open(o.type||(o.data?'POST':'GET'),o.url,o.async);if(o.content_type)x.setRequestHeader('Content-Type',o.content_type);x.send(o.data);function ready(){if(!o.async||x.readyState==4||c++>10000){if(o.success&&c<10000&&x.status==200)o.success.call(o.success_scope,''+x.responseText,x,o);else if(o.error)o.error.call(o.error_scope,c>10000?'TIMED_OUT':'GENERAL',x,o);x=null;}else w.setTimeout(ready,10);};if(!o.async)return ready();t=w.setTimeout(ready,10);}}});(function(){var extend=tinymce.extend,JSON=tinymce.util.JSON,XHR=tinymce.util.XHR;tinymce.create('tinymce.util.JSONRequest',{JSONRequest:function(s){this.settings=extend({},s);this.count=0;},send:function(o){var ecb=o.error,scb=o.success;o=extend(this.settings,o);o.success=function(c,x){c=JSON.parse(c);if(typeof(c)=='undefined'){c={error:'JSON Parse error.'};}if(c.error)ecb.call(o.error_scope||o.scope,c.error,x);else scb.call(o.success_scope||o.scope,c.result);};o.error=function(ty,x){ecb.call(o.error_scope||o.scope,ty,x);};o.data=JSON.serialize({id:o.id||'c'+(this.count++),method:o.method,params:o.params});o.content_type='application/json';XHR.send(o);},'static':{sendRPC:function(o){return new tinymce.util.JSONRequest().send(o);}}});}());(function(){var each=tinymce.each,is=tinymce.is;var isWebKit=tinymce.isWebKit,isIE=tinymce.isIE;tinymce.create('tinymce.dom.DOMUtils',{doc:null,root:null,files:null,listeners:{},pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,cache:{},idPattern:/^#[\w]+$/,elmPattern:/^[\w_*]+$/,elmClassPattern:/^([\w_]*)\.([\w_]+)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(d,s){var t=this;t.doc=d;t.win=window;t.files={};t.cssFlicker=false;t.counter=0;t.boxModel=!tinymce.isIE||d.compatMode=="CSS1Compat";t.stdMode=d.documentMode===8;this.settings=s=tinymce.extend({keep_values:false,hex_colors:1,process_html:1},s);if(tinymce.isIE6){try{d.execCommand('BackgroundImageCache',false,true);}catch(e){t.cssFlicker=true;}}tinymce.addUnload(t.destroy,t);},getRoot:function(){var t=this,s=t.settings;return(s&&t.get(s.root_element))||t.doc.body;},getViewPort:function(w){var d,b;w=!w?this.win:w;d=w.document;b=this.boxModel?d.documentElement:d.body;return{x:w.pageXOffset||b.scrollLeft,y:w.pageYOffset||b.scrollTop,w:w.innerWidth||b.clientWidth,h:w.innerHeight||b.clientHeight};},getRect:function(e){var p,t=this,sr;e=t.get(e);p=t.getPos(e);sr=t.getSize(e);return{x:p.x,y:p.y,w:sr.w,h:sr.h};},getSize:function(e){var t=this,w,h;e=t.get(e);w=t.getStyle(e,'width');h=t.getStyle(e,'height');if(w.indexOf('px')===-1)w=0;if(h.indexOf('px')===-1)h=0;return{w:parseInt(w)||e.offsetWidth||e.clientWidth,h:parseInt(h)||e.offsetHeight||e.clientHeight};},getParent:function(n,f,r){var na,se=this.settings;n=this.get(n);if(se.strict_root)r=r||this.getRoot();if(is(f,'string')){na=f.toUpperCase();f=function(n){var s=false;if(n.nodeType==1&&na==='*'){s=true;return false;}each(na.split(','),function(v){if(n.nodeType==1&&((se.strict&&n.nodeName.toUpperCase()==v)||n.nodeName.toUpperCase()==v)){s=true;return false;}});return s;};}while(n){if(n==r)return null;if(f(n))return n;n=n.parentNode;}return null;},get:function(e){var n;if(e&&this.doc&&typeof(e)=='string'){n=e;e=this.doc.getElementById(e);if(e&&e.id!==n)return this.doc.getElementsByName(n)[1];}return e;},select:function(pa,s){var t=this,cs,c,pl,o=[],x,i,l,n,xp;s=t.get(s)||t.doc;if(s.querySelectorAll){if(s!=t.doc){i=s.id;s.id='_mc_tmp';pa='#_mc_tmp '+pa;}l=tinymce.grep(s.querySelectorAll(pa));s.id=i;return l;}if(!t.selectorRe)t.selectorRe=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@([\w\\]+)([\^\$\*!]?=)([\w\\]+)\])?(?:\:([\w\\]+))?/i;;if(tinymce.isAir){each(tinymce.explode(pa),function(v){if(!(xp=t.cache[v])){xp='';each(v.split(' '),function(v){v=t.selectorRe.exec(v);xp+=v[1]?'//'+v[1]:'//*';if(v[2])xp+="[@id='"+v[2]+"']";if(v[3]){each(v[3].split('.'),function(n){xp+="[@class = '"+n+"' or contains(concat(' ', @class, ' '), ' "+n+" ')]";});}});t.cache[v]=xp;}xp=t.doc.evaluate(xp,s,null,4,null);while(n=xp.iterateNext())o.push(n);});return o;}if(t.settings.strict){function get(s,n){return s.getElementsByTagName(n.toLowerCase());};}else{function get(s,n){return s.getElementsByTagName(n);};}if(t.elmPattern.test(pa)){x=get(s,pa);for(i=0,l=x.length;i=0;i--)cs+='}, '+(i?'n':'s')+');';cs+='})';t.cache[pa]=cs=eval(cs);}cs(isIE?collectIE:collect,s);});each(o,function(n){if(isIE)n.removeAttribute('mce_save');else delete n.mce_save;});return o;},add:function(p,n,a,h,c){var t=this;return this.run(p,function(p){var e,k;e=is(n,'string')?t.doc.createElement(n):n;t.setAttribs(e,a);if(h){if(h.nodeType)e.appendChild(h);else t.setHTML(e,h);}return!c?p.appendChild(e):e;});},create:function(n,a,h){return this.add(this.doc.createElement(n),n,a,h,1);},createHTML:function(n,a,h){var o='',t=this,k;o+='<'+n;for(k in a){if(a.hasOwnProperty(k))o+=' '+k+'="'+t.encode(a[k])+'"';}if(tinymce.is(h))return o+'>'+h+'';return o+' />';},remove:function(n,k){return this.run(n,function(n){var p,g;p=n.parentNode;if(!p)return null;if(k){each(n.childNodes,function(c){p.insertBefore(c.cloneNode(true),n);});}return p.removeChild(n);});},setStyle:function(n,na,v){var t=this;return t.run(n,function(e){var s,i;s=e.style;na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();});if(t.pixelStyles.test(na)&&(tinymce.is(v,'number')||/^[\-0-9\.]+$/.test(v)))v+='px';switch(na){case'opacity':if(isIE){s.filter=v===''?'':"alpha(opacity="+(v*100)+")";if(!n.currentStyle||!n.currentStyle.hasLayout)s.display='inline-block';}s[na]=s['-moz-opacity']=s['-khtml-opacity']=v||'';break;case'float':isIE?s.styleFloat=v:s.cssFloat=v;break;default:s[na]=v||'';}if(t.settings.update_styles)t.setAttrib(e,'mce_style');});},getStyle:function(n,na,c){n=this.get(n);if(!n)return false;if(this.doc.defaultView&&c){na=na.replace(/[A-Z]/g,function(a){return'-'+a;});try{return this.doc.defaultView.getComputedStyle(n,null).getPropertyValue(na);}catch(ex){return null;}}na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();});if(na=='float')na=isIE?'styleFloat':'cssFloat';if(n.currentStyle&&c)return n.currentStyle[na];return n.style[na];},setStyles:function(e,o){var t=this,s=t.settings,ol;ol=s.update_styles;s.update_styles=0;each(o,function(v,n){t.setStyle(e,n,v);});s.update_styles=ol;if(s.update_styles)t.setAttrib(e,s.cssText);},setAttrib:function(e,n,v){var t=this;if(!e||!n)return;if(t.settings.strict)n=n.toLowerCase();return this.run(e,function(e){var s=t.settings;switch(n){case"style":if(!is(v,'string')){each(v,function(v,n){t.setStyle(e,n,v);});return;}if(s.keep_values){if(v&&!t._isRes(v))e.setAttribute('mce_style',v,2);else e.removeAttribute('mce_style',2);}e.style.cssText=v;break;case"class":e.className=v||'';break;case"src":case"href":if(s.keep_values){if(s.url_converter)v=s.url_converter.call(s.url_converter_scope||t,v,n,e);t.setAttrib(e,'mce_'+n,v,2);}break;case"shape":e.setAttribute('mce_style',v);break;}if(is(v)&&v!==null&&v.length!==0)e.setAttribute(n,''+v,2);else e.removeAttribute(n,2);});},setAttribs:function(e,o){var t=this;return this.run(e,function(e){each(o,function(v,n){t.setAttrib(e,n,v);});});},getAttrib:function(e,n,dv){var v,t=this;e=t.get(e);if(!e||e.nodeType!==1)return false;if(!is(dv))dv='';if(/^(src|href|style|coords|shape)$/.test(n)){v=e.getAttribute("mce_"+n);if(v)return v;}if(isIE&&t.props[n]){v=e[t.props[n]];v=v&&v.nodeValue?v.nodeValue:v;}if(!v)v=e.getAttribute(n,2);if(n==='style'){v=v||e.style.cssText;if(v){v=t.serializeStyle(t.parseStyle(v));if(t.settings.keep_values&&!t._isRes(v))e.setAttribute('mce_style',v);}}if(isWebKit&&n==="class"&&v)v=v.replace(/(apple|webkit)\-[a-z\-]+/gi,'');if(isIE){switch(n){case'rowspan':case'colspan':if(v===1)v='';break;case'size':if(v==='+0'||v===20)v='';break;case'width':case'height':case'vspace':case'checked':case'disabled':case'readonly':if(v===0)v='';break;case'hspace':if(v===-1)v='';break;case'maxlength':case'tabindex':if(v===32768||v===2147483647||v==='32768')v='';break;case'compact':case'noshade':case'nowrap':if(v===65535)return n;return dv;case'shape':v=v.toLowerCase();break;default:if(n.indexOf('on')===0&&v)v=(''+v).replace(/^function\s+anonymous\(\)\s+\{\s+(.*)\s+\}$/,'$1');}}return(v!==undefined&&v!==null&&v!=='')?''+v:dv;},getPos:function(n){var t=this,x=0,y=0,e,d=t.doc,r;n=t.get(n);if(n&&isIE){n=n.getBoundingClientRect();e=t.boxModel?d.documentElement:d.body;x=t.getStyle(t.select('html')[0],'borderWidth');x=(x=='medium'||t.boxModel&&!t.isIE6)&&2||x;n.top+=t.win.self!=t.win.top?2:0;return{x:n.left+e.scrollLeft-x,y:n.top+e.scrollTop-x};}r=n;while(r){x+=r.offsetLeft||0;y+=r.offsetTop||0;r=r.offsetParent;}r=n;while(r){if(!/^table-row|inline.*/i.test(t.getStyle(r,"display",1))){x-=r.scrollLeft||0;y-=r.scrollTop||0;}r=r.parentNode;if(r==d.body)break;}return{x:x,y:y};},parseStyle:function(st){var t=this,s=t.settings,o={};if(!st)return o;function compress(p,s,ot){var t,r,b,l;t=o[p+'-top'+s];if(!t)return;r=o[p+'-right'+s];if(t!=r)return;b=o[p+'-bottom'+s];if(r!=b)return;l=o[p+'-left'+s];if(b!=l)return;o[ot]=l;delete o[p+'-top'+s];delete o[p+'-right'+s];delete o[p+'-bottom'+s];delete o[p+'-left'+s];};function compress2(ta,a,b,c){var t;t=o[a];if(!t)return;t=o[b];if(!t)return;t=o[c];if(!t)return;o[ta]=o[a]+' '+o[b]+' '+o[c];delete o[a];delete o[b];delete o[c];};st=st.replace(/&(#?[a-z0-9]+);/g,'&$1_MCE_SEMI_');each(st.split(';'),function(v){var sv,ur=[];if(v){v=v.replace(/_MCE_SEMI_/g,';');v=v.replace(/url\([^\)]+\)/g,function(v){ur.push(v);return'url('+ur.length+')';});v=v.split(':');sv=tinymce.trim(v[1]);sv=sv.replace(/url\(([^\)]+)\)/g,function(a,b){return ur[parseInt(b)-1];});sv=sv.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);});if(s.url_converter){sv=sv.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(x,c){return'url('+s.url_converter.call(s.url_converter_scope||t,t.decode(c),'style',null)+')';});}o[tinymce.trim(v[0]).toLowerCase()]=sv;}});compress("border","","border");compress("border","-width","border-width");compress("border","-color","border-color");compress("border","-style","border-style");compress("padding","","padding");compress("margin","","margin");compress2('border','border-width','border-style','border-color');if(isIE){if(o.border=='medium none')o.border='';}return o;},serializeStyle:function(o){var s='';each(o,function(v,k){if(k&&v){if(tinymce.isGecko&&k.indexOf('-moz-')===0)return;switch(k){case'color':case'background-color':v=v.toLowerCase();break;}s+=(s?' ':'')+k+': '+v+';';}});return s;},loadCSS:function(u){var t=this,d=t.doc;if(!u)u='';each(u.split(','),function(u){if(t.files[u])return;t.files[u]=true;t.add(t.select('head')[0],'link',{rel:'stylesheet',href:tinymce._addVer(u)});});},addClass:function(e,c){return this.run(e,function(e){var o;if(!c)return 0;if(this.hasClass(e,c))return e.className;o=this.removeClass(e,c);return e.className=(o!=''?(o+' '):'')+c;});},removeClass:function(e,c){var t=this,re;return t.run(e,function(e){var v;if(t.hasClass(e,c)){if(!re)re=new RegExp("(^|\\s+)"+c+"(\\s+|$)","g");v=e.className.replace(re,' ');return e.className=tinymce.trim(v!=' '?v:'');}return e.className;});},hasClass:function(n,c){n=this.get(n);if(!n||!c)return false;return(' '+n.className+' ').indexOf(' '+c+' ')!==-1;},show:function(e){return this.setStyle(e,'display','block');},hide:function(e){return this.setStyle(e,'display','none');},isHidden:function(e){e=this.get(e);return!e||e.style.display=='none'||this.getStyle(e,'display')=='none';},uniqueId:function(p){return(!p?'mce_':p)+(this.counter++);},setHTML:function(e,h){var t=this;return this.run(e,function(e){var x,i,nl,n,p,x;h=t.processHTML(h);if(isIE){function set(){try{e.innerHTML='
'+h;e.removeChild(e.firstChild);}catch(ex){while(e.firstChild)e.firstChild.removeNode();x=t.create('div');x.innerHTML='
'+h;each(x.childNodes,function(n,i){if(i)e.appendChild(n);});}};if(t.settings.fix_ie_paragraphs)h=h.replace(/

<\/p>|]+)><\/p>|/gi,' 

');set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("p");for(i=nl.length-1,x=0;i>=0;i--){n=nl[i];if(!n.hasChildNodes()){if(!n.mce_keep){x=1;break;}n.removeAttribute('mce_keep');}}}if(x){h=h.replace(/

]+)>|

/g,'

');h=h.replace(/<\/p>/g,'
');set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("DIV");for(i=nl.length-1;i>=0;i--){n=nl[i];if(n.mce_tmp){p=t.doc.createElement('p');n.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(a,b){var v;if(b!=='mce_tmp'){v=n.getAttribute(b);if(!v&&b==='class')v=n.className;p.setAttribute(b,v);}});for(x=0;x|]+)>/gi,'<$1b$2>');h=h.replace(/<(\/?)em>|]+)>/gi,'<$1i$2>');}else if(isIE){h=h.replace(/'/g,''');h=h.replace(/\s+(disabled|checked|readonly|selected)\s*=\s*[\"\']?(false|0)[\"\']?/gi,'');}h=h.replace(/]+)\/>|/gi,'');if(s.keep_values){if(/)/g,'\n');s=s.replace(/^[\r\n]*|[\r\n]*$/g,'');s=s.replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g,'');return s;};h=h.replace(/]+|)>([\s\S]*?)<\/script>/g,function(v,a,b){b=trim(b);if(!a)a=' type="text/javascript"';if(b)b='';return''+b+'';});h=h.replace(/]+|)>([\s\S]*?)<\/style>/g,function(v,a,b){b=trim(b);return''+b+'';});}h=h.replace(//g,'');h=h.replace(/<([\w:]+) [^>]*(src|href|style|shape|coords)[^>]*>/gi,function(a,n){function handle(m,b,c){var u=c;if(a.indexOf('mce_'+b)!=-1)return m;if(b=='style'){if(t._isRes(c))return m;if(s.hex_colors){u=u.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);});}if(s.url_converter){u=u.replace(/url\([\'\"]?([^\)\'\"]+)\)/g,function(x,c){return'url('+t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n))+')';});}}else if(b!='coords'&&b!='shape'){if(s.url_converter)u=t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n));}return' '+b+'="'+c+'" mce_'+b+'="'+u+'"';};a=a.replace(/ (src|href|style|coords|shape)=[\"]([^\"]+)[\"]/gi,handle);a=a.replace(/ (src|href|style|coords|shape)=[\']([^\']+)[\']/gi,handle);return a.replace(/ (src|href|style|coords|shape)=([^\s\"\'>]+)/gi,handle);});}return h;},getOuterHTML:function(e){var d;e=this.get(e);if(!e)return null;if(isIE)return e.outerHTML;d=(e.ownerDocument||this.doc).createElement("body");d.appendChild(e.cloneNode(true));return d.innerHTML;},setOuterHTML:function(e,h,d){var t=this;return this.run(e,function(e){var n,tp;e=t.get(e);d=d||e.ownerDocument||t.doc;if(isIE&&e.nodeType==1)e.outerHTML=h;else{tp=d.createElement("body");tp.innerHTML=h;n=tp.lastChild;while(n){t.insertAfter(n.cloneNode(true),e);n=n.previousSibling;}t.remove(e);}});},decode:function(s){var e,n,v;if(/&[^;]+;/.test(s)){e=this.doc.createElement("div");e.innerHTML=s;n=e.firstChild;v='';if(n){do{v+=n.nodeValue;}while(n.nextSibling);}return v||s;}return s;},encode:function(s){return s?(''+s).replace(/[<>&\"]/g,function(c,b){switch(c){case'&':return'&';case'"':return'"';case'<':return'<';case'>':return'>';}return c;}):s;},insertAfter:function(n,r){var t=this;r=t.get(r);return this.run(n,function(n){var p,ns;p=r.parentNode;ns=r.nextSibling;if(ns)p.insertBefore(n,ns);else p.appendChild(n);return n;});},isBlock:function(n){if(n.nodeType&&n.nodeType!==1)return false;n=n.nodeName||n;return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n);},replace:function(n,o,k){if(is(o,'array'))n=n.cloneNode(true);return this.run(o,function(o){if(k){each(o.childNodes,function(c){n.appendChild(c.cloneNode(true));});}return o.parentNode.replaceChild(n,o);});},toHex:function(s){var c=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(s);function hex(s){s=parseInt(s).toString(16);return s.length>1?s:'0'+s;};if(c){s='#'+hex(c[1])+hex(c[2])+hex(c[3]);return s;}return s;},getClasses:function(){var t=this,cl=[],i,lo={},f=t.settings.class_filter,ov;if(t.classes)return t.classes;function addClasses(s){each(s.imports,function(r){addClasses(r);});each(s.cssRules||s.rules,function(r){switch(r.type||1){case 1:if(r.selectorText){each(r.selectorText.split(','),function(v){v=v.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(v)||!/\.[\w\-]+$/.test(v))return;ov=v;v=v.replace(/.*\.([a-z0-9_\-]+).*/i,'$1');if(f&&!(v=f(v,ov)))return;if(!lo[v]){cl.push({'class':v});lo[v]=1;}});}break;case 3:addClasses(r.styleSheet);break;}});};try{each(t.doc.styleSheets,addClasses);}catch(ex){}if(cl.length>0)t.classes=cl;return cl;},run:function(e,f,s){var t=this,o;if(t.doc&&typeof(e)==='string')e=t.get(e);if(!e)return false;s=s||this;if(!e.nodeType&&(e.length||e.length===0)){o=[];each(e,function(e,i){if(e){if(typeof(e)=='string')e=t.doc.getElementById(e);o.push(f.call(s,e,i));}});return o;}return f.call(s,e);},getAttribs:function(n){var o;n=this.get(n);if(!n)return[];if(isIE){o=[];if(n.nodeName=='OBJECT')return n.attributes;n.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(a,b){o.push({specified:1,nodeName:b});});return o;}return n.attributes;},destroy:function(s){var t=this;t.win=t.doc=t.root=null;if(!s)tinymce.removeUnload(t.destroy);},_isRes:function(c){return/^(top|left|bottom|right|width|height)/i.test(c)||/;\s*(top|left|bottom|right|width|height)/i.test(c);}});tinymce.DOM=new tinymce.dom.DOMUtils(document,{process_html:0});})();(function(){var each=tinymce.each,DOM=tinymce.DOM,isIE=tinymce.isIE,isWebKit=tinymce.isWebKit,Event;tinymce.create('static tinymce.dom.Event',{inits:[],events:[],add:function(o,n,f,s){var cb,t=this,el=t.events,r;if(o&&o instanceof Array){r=[];each(o,function(o){o=DOM.get(o);r.push(t.add(o,n,f,s));});return r;}o=DOM.get(o);if(!o)return;cb=function(e){e=e||window.event;if(e&&!e.target&&isIE)e.target=e.srcElement;if(!s)return f(e);return f.call(s,e);};if(n=='unload'){tinymce.unloads.unshift({func:cb});return cb;}if(n=='init'){if(t.domLoaded)cb();else t.inits.push(cb);return cb;}el.push({obj:o,name:n,func:f,cfunc:cb,scope:s});t._add(o,n,cb);return f;},remove:function(o,n,f){var t=this,a=t.events,s=false,r;if(o&&o instanceof Array){r=[];each(o,function(o){o=DOM.get(o);r.push(t.remove(o,n,f));});return r;}o=DOM.get(o);each(a,function(e,i){if(e.obj==o&&e.name==n&&(!f||(e.func==f||e.cfunc==f))){a.splice(i,1);t._remove(o,n,e.cfunc);s=true;return false;}});return s;},clear:function(o){var t=this,a=t.events,i,e;if(o){o=DOM.get(o);for(i=a.length-1;i>=0;i--){e=a[i];if(e.obj===o){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null;a.splice(i,1);}}}},cancel:function(e){if(!e)return false;this.stop(e);return this.prevent(e);},stop:function(e){if(e.stopPropagation)e.stopPropagation();else e.cancelBubble=true;return false;},prevent:function(e){if(e.preventDefault)e.preventDefault();else e.returnValue=false;return false;},_unload:function(){var t=Event;each(t.events,function(e,i){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null;});t.events=[];t=null;},_add:function(o,n,f){if(o.attachEvent)o.attachEvent('on'+n,f);else if(o.addEventListener)o.addEventListener(n,f,false);else o['on'+n]=f;},_remove:function(o,n,f){if(o){try{if(o.detachEvent)o.detachEvent('on'+n,f);else if(o.removeEventListener)o.removeEventListener(n,f,false);else o['on'+n]=null;}catch(ex){}}},_pageInit:function(){var e=Event;if(e.domLoaded)return;e._remove(window,'DOMContentLoaded',e._pageInit);e.domLoaded=true;each(e.inits,function(c){c();});e.inits=[];},_wait:function(){var t;if(window.tinyMCE_GZ&&tinyMCE_GZ.loaded){Event.domLoaded=1;return;}if(isIE&&document.location.protocol!='https:'){document.write('';bi=s.body_id||'tinymce';if(bi.indexOf('=')!=-1){bi=t.getParam('body_id','','hash');bi=bi[t.id]||bi;}bc=s.body_class||'';if(bc.indexOf('=')!=-1){bc=t.getParam('body_class','','hash');bc=bc[t.id]||'';}t.iframeHTML+='';if(tinymce.relaxedDomain){if(isIE||(tinymce.isOpera&&parseFloat(opera.version())>=9.5))u='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()';else if(tinymce.isOpera)u='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()';}n=DOM.add(o.iframeContainer,'iframe',{id:t.id+"_ifr",src:u||'javascript:""',frameBorder:'0',style:{width:'100%',height:h}});t.contentAreaContainer=o.iframeContainer;DOM.get(o.editorContainer).style.display=t.orgDisplay;DOM.get(t.id).style.display='none';if(tinymce.isOldWebKit){Event.add(n,'load',t.setupIframe,t);n.src=tinymce.baseURL+'/plugins/safari/blank.htm';}else{if(!isIE||!tinymce.relaxedDomain)t.setupIframe();e=n=o=null;}},setupIframe:function(){var t=this,s=t.settings,e=DOM.get(t.id),d=t.getDoc(),h,b;if(!isIE||!tinymce.relaxedDomain){d.open();d.write(t.iframeHTML);d.close();}if(!isIE){try{if(!s.readonly)d.designMode='On';}catch(ex){}}if(isIE){b=t.getBody();DOM.hide(b);if(!s.readonly)b.contentEditable=true;DOM.show(b);}t.dom=new tinymce.DOM.DOMUtils(t.getDoc(),{keep_values:true,url_converter:t.convertURL,url_converter_scope:t,hex_colors:s.force_hex_style_colors,class_filter:s.class_filter,update_styles:1,fix_ie_paragraphs:1});t.serializer=new tinymce.dom.Serializer({entity_encoding:s.entity_encoding,entities:s.entities,valid_elements:s.verify_html===false?'*[*]':s.valid_elements,extended_valid_elements:s.extended_valid_elements,valid_child_elements:s.valid_child_elements,invalid_elements:s.invalid_elements,fix_table_elements:s.fix_table_elements,fix_list_elements:s.fix_list_elements,fix_content_duplication:s.fix_content_duplication,convert_fonts_to_spans:s.convert_fonts_to_spans,font_size_classes:s.font_size_classes,font_size_style_values:s.font_size_style_values,apply_source_formatting:s.apply_source_formatting,remove_linebreaks:s.remove_linebreaks,element_format:s.element_format,dom:t.dom});t.selection=new tinymce.dom.Selection(t.dom,t.getWin(),t.serializer);t.forceBlocks=new tinymce.ForceBlocks(t,{forced_root_block:s.forced_root_block});t.editorCommands=new tinymce.EditorCommands(t);t.serializer.onPreProcess.add(function(se,o){return t.onPreProcess.dispatch(t,o,se);});t.serializer.onPostProcess.add(function(se,o){return t.onPostProcess.dispatch(t,o,se);});t.onPreInit.dispatch(t);if(!s.gecko_spellcheck)t.getBody().spellcheck=0;if(!s.readonly)t._addEvents();t.controlManager.onPostRender.dispatch(t,t.controlManager);t.onPostRender.dispatch(t);if(s.directionality)t.getBody().dir=s.directionality;if(s.nowrap)t.getBody().style.whiteSpace="nowrap";if(s.auto_resize)t.onNodeChange.add(t.resizeToContent,t);if(s.custom_elements){function handleCustom(ed,o){each(explode(s.custom_elements),function(v){var n;if(v.indexOf('~')===0){v=v.substring(1);n='span';}else n='div';o.content=o.content.replace(new RegExp('<('+v+')([^>]*)>','g'),'<'+n+' mce_name="$1"$2>');o.content=o.content.replace(new RegExp('','g'),'');});};t.onBeforeSetContent.add(handleCustom);t.onPostProcess.add(function(ed,o){if(o.set)handleCustom(ed,o)});}if(s.handle_node_change_callback){t.onNodeChange.add(function(ed,cm,n){t.execCallback('handle_node_change_callback',t.id,n,-1,-1,true,t.selection.isCollapsed());});}if(s.save_callback){t.onSaveContent.add(function(ed,o){var h=t.execCallback('save_callback',t.id,o.content,t.getBody());if(h)o.content=h;});}if(s.onchange_callback){t.onChange.add(function(ed,l){t.execCallback('onchange_callback',t,l);});}if(s.convert_newlines_to_brs){t.onBeforeSetContent.add(function(ed,o){if(o.initial)o.content=o.content.replace(/\r?\n/g,'
');});}if(s.fix_nesting&&isIE){t.onBeforeSetContent.add(function(ed,o){o.content=t._fixNesting(o.content);});}if(s.preformatted){t.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^\s*/,'');o.content=o.content.replace(/<\/pre>\s*$/,'');if(o.set)o.content='
'+o.content+'
';});}if(s.verify_css_classes){t.serializer.attribValueFilter=function(n,v){var s,cl;if(n=='class'){if(!t.classesRE){cl=t.dom.getClasses();if(cl.length>0){s='';each(cl,function(o){s+=(s?'|':'')+o['class'];});t.classesRE=new RegExp('('+s+')','gi');}}return!t.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(v)||t.classesRE.test(v)?v:'';}return v;};}if(s.convert_fonts_to_spans)t._convertFonts();if(s.inline_styles)t._convertInlineElements();if(s.cleanup_callback){t.onBeforeSetContent.add(function(ed,o){o.content=t.execCallback('cleanup_callback','insert_to_editor',o.content,o);});t.onPreProcess.add(function(ed,o){if(o.set)t.execCallback('cleanup_callback','insert_to_editor_dom',o.node,o);if(o.get)t.execCallback('cleanup_callback','get_from_editor_dom',o.node,o);});t.onPostProcess.add(function(ed,o){if(o.set)o.content=t.execCallback('cleanup_callback','insert_to_editor',o.content,o);if(o.get)o.content=t.execCallback('cleanup_callback','get_from_editor',o.content,o);});}if(s.save_callback){t.onGetContent.add(function(ed,o){if(o.save)o.content=t.execCallback('save_callback',t.id,o.content,t.getBody());});}if(s.handle_event_callback){t.onEvent.add(function(ed,e,o){if(t.execCallback('handle_event_callback',e,ed,o)===false)Event.cancel(e);});}t.onSetContent.add(function(){t.addVisual(t.getBody());});if(s.padd_empty_editor){t.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
[\r\n]*)$/,'');});}if(isGecko&&!s.readonly){try{d.designMode='Off';d.designMode='On';}catch(ex){}}setTimeout(function(){if(t.removed)return;t.load({initial:true,format:(s.cleanup_on_startup?'html':'raw')});t.startContent=t.getContent({format:'raw'});t.undoManager.add({initial:true});t.initialized=true;t.onInit.dispatch(t);t.execCallback('setupcontent_callback',t.id,t.getBody(),t.getDoc());t.execCallback('init_instance_callback',t);t.focus(true);t.nodeChanged({initial:1});if(s.content_css){tinymce.each(explode(s.content_css),function(u){t.dom.loadCSS(t.documentBaseURI.toAbsolute(u));});}if(s.auto_focus){setTimeout(function(){var ed=EditorManager.get(s.auto_focus);ed.selection.select(ed.getBody(),1);ed.selection.collapse(1);ed.getWin().focus();},100);}},1);e=null;},focus:function(sf){var oed,t=this,ce=t.settings.content_editable;if(!sf){if(!ce&&(!isIE||t.selection.getNode().ownerDocument!=t.getDoc()))t.getWin().focus();}if(EditorManager.activeEditor!=t){if((oed=EditorManager.activeEditor)!=null)oed.onDeactivate.dispatch(oed,t);t.onActivate.dispatch(t,oed);}EditorManager._setActive(t);},execCallback:function(n){var t=this,f=t.settings[n],s;if(!f)return;if(t.callbackLookup&&(s=t.callbackLookup[n])){f=s.func;s=s.scope;}if(is(f,'string')){s=f.replace(/\.\w+$/,'');s=s?tinymce.resolve(s):0;f=tinymce.resolve(f);t.callbackLookup=t.callbackLookup||{};t.callbackLookup[n]={func:f,scope:s};}return f.apply(s||t,Array.prototype.slice.call(arguments,1));},translate:function(s){var c=this.settings.language||'en',i18n=EditorManager.i18n;if(!s)return'';return i18n[c+'.'+s]||s.replace(/{\#([^}]+)\}/g,function(a,b){return i18n[c+'.'+b]||'{#'+b+'}';});},getLang:function(n,dv){return EditorManager.i18n[(this.settings.language||'en')+'.'+n]||(is(dv)?dv:'{#'+n+'}');},getParam:function(n,dv,ty){var tr=tinymce.trim,v=is(this.settings[n])?this.settings[n]:dv,o;if(ty==='hash'){o={};if(is(v,'string')){each(v.indexOf('=')>0?v.split(/[;,](?![^=;,]*(?:[;,]|$))/):v.split(','),function(v){v=v.split('=');if(v.length>1)o[tr(v[0])]=tr(v[1]);else o[tr(v[0])]=tr(v);});}else o=v;return o;}return v;},nodeChanged:function(o){var t=this,s=t.selection,n=s.getNode()||t.getBody();if(t.initialized){t.onNodeChange.dispatch(t,o?o.controlManager||t.controlManager:t.controlManager,isIE&&n.ownerDocument!=t.getDoc()?t.getBody():n,s.isCollapsed(),o);}},addButton:function(n,s){var t=this;t.buttons=t.buttons||{};t.buttons[n]=s;},addCommand:function(n,f,s){this.execCommands[n]={func:f,scope:s||this};},addQueryStateHandler:function(n,f,s){this.queryStateCommands[n]={func:f,scope:s||this};},addQueryValueHandler:function(n,f,s){this.queryValueCommands[n]={func:f,scope:s||this};},addShortcut:function(pa,desc,cmd_func,sc){var t=this,c;if(!t.settings.custom_shortcuts)return false;t.shortcuts=t.shortcuts||{};if(is(cmd_func,'string')){c=cmd_func;cmd_func=function(){t.execCommand(c,false,null);};}if(is(cmd_func,'object')){c=cmd_func;cmd_func=function(){t.execCommand(c[0],c[1],c[2]);};}each(explode(pa),function(pa){var o={func:cmd_func,scope:sc||this,desc:desc,alt:false,ctrl:false,shift:false};each(explode(pa,'+'),function(v){switch(v){case'alt':case'ctrl':case'shift':o[v]=true;break;default:o.charCode=v.charCodeAt(0);o.keyCode=v.toUpperCase().charCodeAt(0);}});t.shortcuts[(o.ctrl?'ctrl':'')+','+(o.alt?'alt':'')+','+(o.shift?'shift':'')+','+o.keyCode]=o;});return true;},execCommand:function(cmd,ui,val,a){var t=this,s=0,o,st;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd)&&(!a||!a.skip_focus))t.focus();o={};t.onBeforeExecCommand.dispatch(t,cmd,ui,val,o);if(o.terminate)return false;if(t.execCallback('execcommand_callback',t.id,t.selection.getNode(),cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}if(o=t.execCommands[cmd]){st=o.func.call(o.scope,ui,val);if(st!==true){t.onExecCommand.dispatch(t,cmd,ui,val,a);return st;}}each(t.plugins,function(p){if(p.execCommand&&p.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);s=1;return false;}});if(s)return true;if(t.theme.execCommand&&t.theme.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}if(t.editorCommands.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}t.getDoc().execCommand(cmd,ui,val);t.onExecCommand.dispatch(t,cmd,ui,val,a);},queryCommandState:function(c){var t=this,o,s;if(t._isHidden())return;if(o=t.queryStateCommands[c]){s=o.func.call(o.scope);if(s!==true)return s;}o=t.editorCommands.queryCommandState(c);if(o!==-1)return o;try{return this.getDoc().queryCommandState(c);}catch(ex){}},queryCommandValue:function(c){var t=this,o,s;if(t._isHidden())return;if(o=t.queryValueCommands[c]){s=o.func.call(o.scope);if(s!==true)return s;}o=t.editorCommands.queryCommandValue(c);if(is(o))return o;try{return this.getDoc().queryCommandValue(c);}catch(ex){}},show:function(){var t=this;DOM.show(t.getContainer());DOM.hide(t.id);t.load();},hide:function(){var t=this,d=t.getDoc();if(isIE&&d)d.execCommand('SelectAll');t.save();DOM.hide(t.getContainer());DOM.setStyle(t.id,'display',t.orgDisplay);},isHidden:function(){return!DOM.isHidden(this.id);},setProgressState:function(b,ti,o){this.onSetProgressState.dispatch(this,b,ti,o);return b;},resizeToContent:function(){var t=this;DOM.setStyle(t.id+"_ifr",'height',t.getBody().scrollHeight);},load:function(o){var t=this,e=t.getElement(),h;if(e){o=o||{};o.load=true;h=t.setContent(is(e.value)?e.value:e.innerHTML,o);o.element=e;if(!o.no_events)t.onLoadContent.dispatch(t,o);o.element=e=null;return h;}},save:function(o){var t=this,e=t.getElement(),h,f;if(!e||!t.initialized)return;o=o||{};o.save=true;if(!o.no_events){t.undoManager.typing=0;t.undoManager.add();}o.element=e;h=o.content=t.getContent(o);if(!o.no_events)t.onSaveContent.dispatch(t,o);h=o.content;if(!/TEXTAREA|INPUT/i.test(e.nodeName)){e.innerHTML=h;if(f=DOM.getParent(t.id,'form')){each(f.elements,function(e){if(e.name==t.id){e.value=h;return false;}});}}else e.value=h;o.element=e=null;return h;},setContent:function(h,o){var t=this;o=o||{};o.format=o.format||'html';o.set=true;o.content=h;if(!o.no_events)t.onBeforeSetContent.dispatch(t,o);if(!tinymce.isIE&&(h.length===0||/^\s+$/.test(h))){o.content=t.dom.setHTML(t.getBody(),'
');o.format='raw';}o.content=t.dom.setHTML(t.getBody(),tinymce.trim(o.content));if(o.format!='raw'&&t.settings.cleanup){o.getInner=true;o.content=t.dom.setHTML(t.getBody(),t.serializer.serialize(t.getBody(),o));}if(!o.no_events)t.onSetContent.dispatch(t,o);return o.content;},getContent:function(o){var t=this,h;o=o||{};o.format=o.format||'html';o.get=true;if(!o.no_events)t.onBeforeGetContent.dispatch(t,o);if(o.format!='raw'&&t.settings.cleanup){o.getInner=true;h=t.serializer.serialize(t.getBody(),o);}else h=t.getBody().innerHTML;h=h.replace(/^\s*|\s*$/g,'');o.content=h;if(!o.no_events)t.onGetContent.dispatch(t,o);return o.content;},isDirty:function(){var t=this;return tinymce.trim(t.startContent)!=tinymce.trim(t.getContent({format:'raw',no_events:1}))&&!t.isNotDirty;},getContainer:function(){var t=this;if(!t.container)t.container=DOM.get(t.editorContainer||t.id+'_parent');return t.container;},getContentAreaContainer:function(){return this.contentAreaContainer;},getElement:function(){return DOM.get(this.settings.content_element||this.id);},getWin:function(){var t=this,e;if(!t.contentWindow){e=DOM.get(t.id+"_ifr");if(e)t.contentWindow=e.contentWindow;}return t.contentWindow;},getDoc:function(){var t=this,w;if(!t.contentDocument){w=t.getWin();if(w)t.contentDocument=w.document;}return t.contentDocument;},getBody:function(){return this.bodyElement||this.getDoc().body;},convertURL:function(u,n,e){var t=this,s=t.settings;if(s.urlconverter_callback)return t.execCallback('urlconverter_callback',u,e,true,n);if(!s.convert_urls||(e&&e.nodeName=='LINK')||u.indexOf('file:')===0)return u;if(s.relative_urls)return t.documentBaseURI.toRelative(u);u=t.documentBaseURI.toAbsolute(u,s.remove_script_host);return u;},addVisual:function(e){var t=this,s=t.settings;e=e||t.getBody();if(!is(t.hasVisual))t.hasVisual=s.visual;each(t.dom.select('table,a',e),function(e){var v;switch(e.nodeName){case'TABLE':v=t.dom.getAttrib(e,'border');if(!v||v=='0'){if(t.hasVisual)t.dom.addClass(e,s.visual_table_class);else t.dom.removeClass(e,s.visual_table_class);}return;case'A':v=t.dom.getAttrib(e,'name');if(v){if(t.hasVisual)t.dom.addClass(e,'mceItemAnchor');else t.dom.removeClass(e,'mceItemAnchor');}return;}});t.onVisualAid.dispatch(t,e,t.hasVisual);},remove:function(){var t=this,e=t.getContainer();t.removed=1;t.hide();t.execCallback('remove_instance_callback',t);t.onRemove.dispatch(t);t.onExecCommand.listeners=[];EditorManager.remove(t);DOM.remove(e);},destroy:function(s){var t=this;if(t.destroyed)return;if(!s){tinymce.removeUnload(t.destroy);tinyMCE.onBeforeUnload.remove(t._beforeUnload);if(t.theme.destroy)t.theme.destroy();t.controlManager.destroy();t.selection.destroy();t.dom.destroy();if(!t.settings.content_editable){Event.clear(t.getWin());Event.clear(t.getDoc());}Event.clear(t.getBody());Event.clear(t.formElement);}if(t.formElement){t.formElement.submit=t.formElement._mceOldSubmit;t.formElement._mceOldSubmit=null;}t.contentAreaContainer=t.formElement=t.container=t.settings.content_element=t.bodyElement=t.contentDocument=t.contentWindow=null;if(t.selection)t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null;t.destroyed=1;},_addEvents:function(){var t=this,i,s=t.settings,lo={mouseup:'onMouseUp',mousedown:'onMouseDown',click:'onClick',keyup:'onKeyUp',keydown:'onKeyDown',keypress:'onKeyPress',submit:'onSubmit',reset:'onReset',contextmenu:'onContextMenu',dblclick:'onDblClick',paste:'onPaste'};function eventHandler(e,o){var ty=e.type;if(t.removed)return;if(t.onEvent.dispatch(t,e,o)!==false){t[lo[e.fakeType||e.type]].dispatch(t,e,o);}};each(lo,function(v,k){switch(k){case'contextmenu':if(tinymce.isOpera){Event.add(t.getBody(),'mousedown',function(e){if(e.ctrlKey){e.fakeType='contextmenu';eventHandler(e);}});}else Event.add(t.getBody(),k,eventHandler);break;case'paste':Event.add(t.getBody(),k,function(e){var tx,h,el,r;if(e.clipboardData)tx=e.clipboardData.getData('text/plain');else if(tinymce.isIE)tx=t.getWin().clipboardData.getData('Text');eventHandler(e,{text:tx,html:h});});break;case'submit':case'reset':Event.add(t.getElement().form||DOM.getParent(t.id,'form'),k,eventHandler);break;default:Event.add(s.content_editable?t.getBody():t.getDoc(),k,eventHandler);}});Event.add(s.content_editable?t.getBody():(isGecko?t.getDoc():t.getWin()),'focus',function(e){t.focus(true);});if(tinymce.isGecko){Event.add(t.getDoc(),'DOMNodeInserted',function(e){var v;e=e.target;if(e.nodeType===1&&e.nodeName==='IMG'&&(v=e.getAttribute('mce_src')))e.src=t.documentBaseURI.toAbsolute(v);});}if(isGecko){function setOpts(){var t=this,d=t.getDoc(),s=t.settings;if(isGecko&&!s.readonly){if(t._isHidden()){try{if(!s.content_editable)d.designMode='On';}catch(ex){}}try{d.execCommand("styleWithCSS",0,false);}catch(ex){if(!t._isHidden())try{d.execCommand("useCSS",0,true);}catch(ex){}}if(!s.table_inline_editing)try{d.execCommand('enableInlineTableEditing',false,false);}catch(ex){}if(!s.object_resizing)try{d.execCommand('enableObjectResizing',false,false);}catch(ex){}}};t.onBeforeExecCommand.add(setOpts);t.onMouseDown.add(setOpts);}t.onMouseUp.add(t.nodeChanged);t.onClick.add(t.nodeChanged);t.onKeyUp.add(function(ed,e){var c=e.keyCode;if((c>=33&&c<=36)||(c>=37&&c<=40)||c==13||c==45||c==46||c==8||(tinymce.isMac&&(c==91||c==93))||e.ctrlKey)t.nodeChanged();});t.onReset.add(function(){t.setContent(t.startContent,{format:'raw'});});if(t.getParam('tab_focus')){function tabCancel(ed,e){if(e.keyCode===9)return Event.cancel(e);};function tabHandler(ed,e){var x,i,f,el,v;function find(d){f=DOM.getParent(ed.id,'form');el=f.elements;if(f){each(el,function(e,i){if(e.id==ed.id){x=i;return false;}});if(d>0){for(i=x+1;i=0;i--){if(el[i].type!='hidden')return el[i];}}}return null;};if(e.keyCode===9){v=explode(ed.getParam('tab_focus'));if(v.length==1){v[1]=v[0];v[0]=':prev';}if(e.shiftKey){if(v[0]==':prev')el=find(-1);else el=DOM.get(v[0]);}else{if(v[1]==':next')el=find(1);else el=DOM.get(v[1]);}if(el){if(ed=EditorManager.get(el.id||el.name))ed.focus();else window.setTimeout(function(){window.focus();el.focus();},10);return Event.cancel(e);}}};t.onKeyUp.add(tabCancel);if(isGecko){t.onKeyPress.add(tabHandler);t.onKeyDown.add(tabCancel);}else t.onKeyDown.add(tabHandler);}if(s.custom_shortcuts){if(s.custom_undo_redo_keyboard_shortcuts){t.addShortcut('ctrl+z',t.getLang('undo_desc'),'Undo');t.addShortcut('ctrl+y',t.getLang('redo_desc'),'Redo');}if(isGecko){t.addShortcut('ctrl+b',t.getLang('bold_desc'),'Bold');t.addShortcut('ctrl+i',t.getLang('italic_desc'),'Italic');t.addShortcut('ctrl+u',t.getLang('underline_desc'),'Underline');}for(i=1;i<=6;i++)t.addShortcut('ctrl+'+i,'',['FormatBlock',false,'']);t.addShortcut('ctrl+7','',['FormatBlock',false,'

']);t.addShortcut('ctrl+8','',['FormatBlock',false,'

']);t.addShortcut('ctrl+9','',['FormatBlock',false,'
']);function find(e){var v=null;if(!e.altKey&&!e.ctrlKey&&!e.metaKey)return v;each(t.shortcuts,function(o){if(tinymce.isMac&&o.ctrl!=e.metaKey)return;else if(!tinymce.isMac&&o.ctrl!=e.ctrlKey)return;if(o.alt!=e.altKey)return;if(o.shift!=e.shiftKey)return;if(e.keyCode==o.keyCode||(e.charCode&&e.charCode==o.charCode)){v=o;return false;}});return v;};t.onKeyUp.add(function(ed,e){var o=find(e);if(o)return Event.cancel(e);});t.onKeyPress.add(function(ed,e){var o=find(e);if(o)return Event.cancel(e);});t.onKeyDown.add(function(ed,e){var o=find(e);if(o){o.func.call(o.scope);return Event.cancel(e);}});}if(tinymce.isIE){Event.add(t.getDoc(),'controlselect',function(e){var re=t.resizeInfo,cb;e=e.target;if(e.nodeName!=='IMG')return;if(re)Event.remove(re.node,re.ev,re.cb);if(!t.dom.hasClass(e,'mceItemNoResize')){ev='resizeend';cb=Event.add(e,ev,function(e){var v;e=e.target;if(v=t.dom.getStyle(e,'width')){t.dom.setAttrib(e,'width',v.replace(/[^0-9%]+/g,''));t.dom.setStyle(e,'width','');}if(v=t.dom.getStyle(e,'height')){t.dom.setAttrib(e,'height',v.replace(/[^0-9%]+/g,''));t.dom.setStyle(e,'height','');}});}else{ev='resizestart';cb=Event.add(e,'resizestart',Event.cancel,Event);}re=t.resizeInfo={node:e,ev:ev,cb:cb};});t.onKeyDown.add(function(ed,e){switch(e.keyCode){case 8:if(t.selection.getRng().item){t.selection.getRng().item(0).removeNode();return Event.cancel(e);}}});}if(tinymce.isOpera){t.onClick.add(function(ed,e){Event.prevent(e);});}if(s.custom_undo_redo){function addUndo(){t.undoManager.typing=0;t.undoManager.add();};if(tinymce.isIE){Event.add(t.getWin(),'blur',function(e){var n;if(t.selection){n=t.selection.getNode();if(!t.removed&&n.ownerDocument&&n.ownerDocument!=t.getDoc())addUndo();}});}else{Event.add(t.getDoc(),'blur',function(){if(t.selection&&!t.removed)addUndo();});}t.onMouseDown.add(addUndo);t.onKeyUp.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45||e.ctrlKey){t.undoManager.typing=0;t.undoManager.add();}});t.onKeyDown.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45){if(t.undoManager.typing){t.undoManager.add();t.undoManager.typing=0;}return;}if(!t.undoManager.typing){t.undoManager.add();t.undoManager.typing=1;}});}},_convertInlineElements:function(){var t=this,s=t.settings,dom=t.dom,v,e,na,st,sp;function convert(ed,o){if(!s.inline_styles)return;if(o.get){each(t.dom.select('table,u,strike',o.node),function(n){switch(n.nodeName){case'TABLE':if(v=dom.getAttrib(n,'height')){dom.setStyle(n,'height',v);dom.setAttrib(n,'height','');}break;case'U':case'STRIKE':n.style.textDecoration=n.nodeName=='U'?'underline':'line-through';dom.setAttrib(n,'mce_style','');dom.setAttrib(n,'mce_name','span');break;}});}else if(o.set){each(t.dom.select('table,span',o.node).reverse(),function(n){if(n.nodeName=='TABLE'){if(v=dom.getStyle(n,'height'))dom.setAttrib(n,'height',v.replace(/[^0-9%]+/g,''));}else{if(n.style.textDecoration=='underline')na='u';else if(n.style.textDecoration=='line-through')na='strike';else na='';if(na){n.style.textDecoration='';dom.setAttrib(n,'mce_style','');e=dom.create(na,{style:dom.getAttrib(n,'style')});dom.replace(e,n,1);}}});}};t.onPreProcess.add(convert);if(!s.cleanup_on_startup){t.onSetContent.add(function(ed,o){if(o.initial)convert(t,{node:t.getBody(),set:1});});}},_convertFonts:function(){var t=this,s=t.settings,dom=t.dom,fz,fzn,sl,cl;if(!s.inline_styles)return;fz=[8,10,12,14,18,24,36];fzn=['xx-small','x-small','small','medium','large','x-large','xx-large'];if(sl=s.font_size_style_values)sl=explode(sl);if(cl=s.font_size_classes)cl=explode(cl);function process(no){var n,sp,nl,x;if(!s.inline_styles)return;nl=t.dom.select('font',no);for(x=nl.length-1;x>=0;x--){n=nl[x];sp=dom.create('span',{style:dom.getAttrib(n,'style'),'class':dom.getAttrib(n,'class')});dom.setStyles(sp,{fontFamily:dom.getAttrib(n,'face'),color:dom.getAttrib(n,'color'),backgroundColor:n.style.backgroundColor});if(n.size){if(sl)dom.setStyle(sp,'fontSize',sl[parseInt(n.size)-1]);else dom.setAttrib(sp,'class',cl[parseInt(n.size)-1]);}dom.setAttrib(sp,'mce_style','');dom.replace(sp,n,1);}};t.onPreProcess.add(function(ed,o){if(o.get)process(o.node);});t.onSetContent.add(function(ed,o){if(o.initial)process(o.node);});},_isHidden:function(){var s;if(!isGecko)return 0;s=this.selection.getSel();return(!s||!s.rangeCount||s.rangeCount==0);},_fixNesting:function(s){var d=[],i;s=s.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(a,b,c){var e;if(b==='/'){if(!d.length)return'';if(c!==d[d.length-1].tag){for(i=d.length-1;i>=0;i--){if(d[i].tag===c){d[i].close=1;break;}}return'';}else{d.pop();if(d.length&&d[d.length-1].close){a=a+'';d.pop();}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(c))return a;if(/\/>$/.test(a))return a;d.push({tag:c});}return a;});for(i=d.length-1;i>=0;i--)s+='';return s;}});})();(function(){var each=tinymce.each,isIE=tinymce.isIE,isGecko=tinymce.isGecko,isOpera=tinymce.isOpera,isWebKit=tinymce.isWebKit;function isBlock(n){return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n.nodeName);};tinymce.create('tinymce.EditorCommands',{EditorCommands:function(ed){this.editor=ed;},execCommand:function(cmd,ui,val){var t=this,ed=t.editor,f;switch(cmd){case'Cut':case'Copy':case'Paste':try{ed.getDoc().execCommand(cmd,ui,val);}catch(ex){if(isGecko){ed.windowManager.confirm(ed.getLang('clipboard_msg'),function(s){if(s)window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html','mceExternal');});}else ed.windowManager.alert(ed.getLang('clipboard_no_support'));}return true;case'mceResetDesignMode':case'mceBeginUndoLevel':return true;case'unlink':t.UnLink();return true;case'JustifyLeft':case'JustifyCenter':case'JustifyRight':case'JustifyFull':t.mceJustify(cmd,cmd.substring(7).toLowerCase());return true;case'mceEndUndoLevel':case'mceAddUndoLevel':ed.undoManager.add();return true;default:f=this[cmd];if(f){f.call(this,ui,val);return true;}}return false;},Indent:function(){var ed=this.editor,d=ed.dom,s=ed.selection,e,iv,iu;iv=ed.settings.indentation;iu=/[a-z%]+$/i.exec(iv);iv=parseInt(iv);if(ed.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){each(this._getSelectedBlocks(),function(e){d.setStyle(e,'paddingLeft',(parseInt(e.style.paddingLeft||0)+iv)+iu);});return;}ed.getDoc().execCommand('Indent',false,null);if(isIE){d.getParent(s.getNode(),function(n){if(n.nodeName=='BLOCKQUOTE'){n.dir=n.style.cssText='';}});}},Outdent:function(){var ed=this.editor,d=ed.dom,s=ed.selection,e,v,iv,iu;iv=ed.settings.indentation;iu=/[a-z%]+$/i.exec(iv);iv=parseInt(iv);if(ed.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){each(this._getSelectedBlocks(),function(e){v=Math.max(0,parseInt(e.style.paddingLeft||0)-iv);d.setStyle(e,'paddingLeft',v?v+iu:'');});return;}ed.getDoc().execCommand('Outdent',false,null);},mceSetAttribute:function(u,v){var ed=this.editor,d=ed.dom,e;if(e=d.getParent(ed.selection.getNode(),d.isBlock))d.setAttrib(e,v.name,v.value);},mceSetContent:function(u,v){this.editor.setContent(v);},mceToggleVisualAid:function(){var ed=this.editor;ed.hasVisual=!ed.hasVisual;ed.addVisual();},mceReplaceContent:function(u,v){var s=this.editor.selection;s.setContent(v.replace(/\{\$selection\}/g,s.getContent({format:'text'})));},mceInsertLink:function(u,v){var ed=this.editor,s=ed.selection,e=ed.dom.getParent(s.getNode(),'A');if(tinymce.is(v,'string'))v={href:v};function set(e){each(v,function(v,k){ed.dom.setAttrib(e,k,v);});};if(!e){ed.execCommand('CreateLink',false,'javascript:mctmp(0);');each(ed.dom.select('a'),function(e){if(e.href=='javascript:mctmp(0);')set(e);});}else{if(v.href)set(e);else ed.dom.remove(e,1);}},UnLink:function(){var ed=this.editor,s=ed.selection;if(s.isCollapsed())s.select(s.getNode());ed.getDoc().execCommand('unlink',false,null);s.collapse(0);},FontName:function(u,v){var t=this,ed=t.editor,s=ed.selection,e;if(!v){if(s.isCollapsed())s.select(s.getNode());t.RemoveFormat();}else{if(ed.settings.convert_fonts_to_spans)t._applyInlineStyle('span',{style:{fontFamily:v}});else ed.getDoc().execCommand('FontName',false,v);}},FontSize:function(u,v){var ed=this.editor,s=ed.settings,fc,fs;if(s.convert_fonts_to_spans&&v>=1&&v<=7){fs=tinymce.explode(s.font_size_style_values);fc=tinymce.explode(s.font_size_classes);if(fc)v=fc[v-1]||v;else v=fs[v-1]||v;}if(v>=1&&v<=7)ed.getDoc().execCommand('FontSize',false,v);else this._applyInlineStyle('span',{style:{fontSize:v}});},queryCommandValue:function(c){var f=this['queryValue'+c];if(f)return f.call(this,c);return false;},queryCommandState:function(cmd){var f;switch(cmd){case'JustifyLeft':case'JustifyCenter':case'JustifyRight':case'JustifyFull':return this.queryStateJustify(cmd,cmd.substring(7).toLowerCase());default:if(f=this['queryState'+cmd])return f.call(this,cmd);}return-1;},_queryState:function(c){try{return this.editor.getDoc().queryCommandState(c);}catch(ex){}},_queryVal:function(c){try{return this.editor.getDoc().queryCommandValue(c);}catch(ex){}},queryValueFontSize:function(){var ed=this.editor,v=0,p;if(p=ed.dom.getParent(ed.selection.getNode(),'SPAN'))v=p.style.fontSize;if(!v&&(isOpera||isWebKit)){if(p=ed.dom.getParent(ed.selection.getNode(),'FONT'))v=p.size;return v;}return v||this._queryVal('FontSize');},queryValueFontName:function(){var ed=this.editor,v=0,p;if(p=ed.dom.getParent(ed.selection.getNode(),'FONT'))v=p.face;if(p=ed.dom.getParent(ed.selection.getNode(),'SPAN'))v=p.style.fontFamily.replace(/, /g,',').replace(/[\'\"]/g,'').toLowerCase();if(!v)v=this._queryVal('FontName');return v;},mceJustify:function(c,v){var ed=this.editor,se=ed.selection,n=se.getNode(),nn=n.nodeName,bl,nb,dom=ed.dom,rm;if(ed.settings.inline_styles&&this.queryStateJustify(c,v))rm=1;bl=dom.getParent(n,ed.dom.isBlock);if(nn=='IMG'){if(v=='full')return;if(rm){if(v=='center')dom.setStyle(bl||n.parentNode,'textAlign','');dom.setStyle(n,'float','');this.mceRepaint();return;}if(v=='center'){if(bl&&/^(TD|TH)$/.test(bl.nodeName))bl=0;if(!bl||bl.childNodes.length>1){nb=dom.create('p');nb.appendChild(n.cloneNode(false));if(bl)dom.insertAfter(nb,bl);else dom.insertAfter(nb,n);dom.remove(n);n=nb.firstChild;bl=nb;}dom.setStyle(bl,'textAlign',v);dom.setStyle(n,'float','');}else{dom.setStyle(n,'float',v);dom.setStyle(bl||n.parentNode,'textAlign','');}this.mceRepaint();return;}if(ed.settings.inline_styles&&ed.settings.forced_root_block){if(rm)v='';each(this._getSelectedBlocks(dom.getParent(se.getStart(),dom.isBlock),dom.getParent(se.getEnd(),dom.isBlock)),function(e){dom.setAttrib(e,'align','');dom.setStyle(e,'textAlign',v=='full'?'justify':v);});return;}else if(!rm)ed.getDoc().execCommand(c,false,null);if(ed.settings.inline_styles){if(rm){dom.getParent(ed.selection.getNode(),function(n){if(n.style&&n.style.textAlign)dom.setStyle(n,'textAlign','');});return;}each(dom.select('*'),function(n){var v=n.align;if(v){if(v=='full')v='justify';dom.setStyle(n,'textAlign',v);dom.setAttrib(n,'align','');}});}},mceSetCSSClass:function(u,v){this.mceSetStyleInfo(0,{command:'setattrib',name:'class',value:v});},getSelectedElement:function(){var t=this,ed=t.editor,dom=ed.dom,se=ed.selection,r=se.getRng(),r1,r2,sc,ec,so,eo,e,sp,ep,re;if(se.isCollapsed()||r.item)return se.getNode();re=ed.settings.merge_styles_invalid_parents;if(tinymce.is(re,'string'))re=new RegExp(re,'i');if(isIE){r1=r.duplicate();r1.collapse(true);sc=r1.parentElement();r2=r.duplicate();r2.collapse(false);ec=r2.parentElement();if(sc!=ec){r1.move('character',1);sc=r1.parentElement();}if(sc==ec){r1=r.duplicate();r1.moveToElementText(sc);if(r1.compareEndPoints('StartToStart',r)==0&&r1.compareEndPoints('EndToEnd',r)==0)return re&&re.test(sc.nodeName)?null:sc;}}else{function getParent(n){return dom.getParent(n,function(n){return n.nodeType==1;});};sc=r.startContainer;ec=r.endContainer;so=r.startOffset;eo=r.endOffset;if(!r.collapsed){if(sc==ec){if(so-eo<2){if(sc.hasChildNodes()){sp=sc.childNodes[so];return re&&re.test(sp.nodeName)?null:sp;}}}}if(sc.nodeType!=3||ec.nodeType!=3)return null;if(so==0){sp=getParent(sc);if(sp&&sp.firstChild!=sc)sp=null;}if(so==sc.nodeValue.length){e=sc.nextSibling;if(e&&e.nodeType==1)sp=sc.nextSibling;}if(eo==0){e=ec.previousSibling;if(e&&e.nodeType==1)ep=e;}if(eo==ec.nodeValue.length){ep=getParent(ec);if(ep&&ep.lastChild!=ec)ep=null;}if(sp==ep)return re&&sp&&re.test(sp.nodeName)?null:sp;}return null;},InsertHorizontalRule:function(){if(isGecko||isIE)this.editor.selection.setContent('
');else this.editor.getDoc().execCommand('InsertHorizontalRule',false,'');},RemoveFormat:function(){var t=this,ed=t.editor,s=ed.selection,b;if(isWebKit)s.setContent(s.getContent({format:'raw'}).replace(/(<(span|b|i|strong|em|strike) [^>]+>|<(span|b|i|strong|em|strike)>|<\/(span|b|i|strong|em|strike)>|)/g,''),{format:'raw'});else ed.getDoc().execCommand('RemoveFormat',false,null);t.mceSetStyleInfo(0,{command:'removeformat'});ed.addVisual();},mceSetStyleInfo:function(u,v){var t=this,ed=t.editor,d=ed.getDoc(),dom=ed.dom,e,b,s=ed.selection,nn=v.wrapper||'span',b=s.getBookmark(),re;function set(n,e){if(n.nodeType==1){switch(v.command){case'setattrib':return dom.setAttrib(n,v.name,v.value);case'setstyle':return dom.setStyle(n,v.name,v.value);case'removeformat':return dom.setAttrib(n,'class','');}}};re=ed.settings.merge_styles_invalid_parents;if(tinymce.is(re,'string'))re=new RegExp(re,'i');if((e=t.getSelectedElement())&&!ed.settings.force_span_wrappers)set(e,1);else{d.execCommand('FontName',false,'__');each(isWebKit?dom.select('span'):dom.select('font'),function(n){var sp,e;if(dom.getAttrib(n,'face')=='__'||n.style.fontFamily==='__'){sp=dom.create(nn,{mce_new:'1'});set(sp);each(n.childNodes,function(n){sp.appendChild(n.cloneNode(true));});dom.replace(sp,n);}});}each(dom.select(nn).reverse(),function(n){var p=n.parentNode;if(!dom.getAttrib(n,'mce_new')){p=dom.getParent(n,function(n){return n.nodeType==1&&dom.getAttrib(n,'mce_new');});if(p)dom.remove(n,1);}});each(dom.select(nn).reverse(),function(n){var p=n.parentNode;if(!p||!dom.getAttrib(n,'mce_new'))return;if(ed.settings.force_span_wrappers&&p.nodeName!='SPAN')return;if(p.nodeName==nn.toUpperCase()&&p.childNodes.length==1)return dom.remove(p,1);if(n.nodeType==1&&(!re||!re.test(p.nodeName))&&p.childNodes.length==1){set(p);dom.setAttrib(n,'class','');}});each(dom.select(nn).reverse(),function(n){if(dom.getAttrib(n,'mce_new')||(dom.getAttribs(n).length<=1&&n.className==='')){if(!dom.getAttrib(n,'class')&&!dom.getAttrib(n,'style'))return dom.remove(n,1);dom.setAttrib(n,'mce_new','');}});s.moveToBookmark(b);},queryStateJustify:function(c,v){var ed=this.editor,n=ed.selection.getNode(),dom=ed.dom;if(n&&n.nodeName=='IMG'){if(dom.getStyle(n,'float')==v)return 1;return n.parentNode.style.textAlign==v;}n=dom.getParent(ed.selection.getStart(),function(n){return n.nodeType==1&&n.style.textAlign;});if(v=='full')v='justify';if(ed.settings.inline_styles)return(n&&n.style.textAlign==v);return this._queryState(c);},ForeColor:function(ui,v){var ed=this.editor;if(ed.settings.convert_fonts_to_spans){this._applyInlineStyle('span',{style:{color:v}});return;}else ed.getDoc().execCommand('ForeColor',false,v);},HiliteColor:function(ui,val){var t=this,ed=t.editor,d=ed.getDoc();if(ed.settings.convert_fonts_to_spans){this._applyInlineStyle('span',{style:{backgroundColor:val}});return;}function set(s){if(!isGecko)return;try{d.execCommand("styleWithCSS",0,s);}catch(ex){d.execCommand("useCSS",0,!s);}};if(isGecko||isOpera){set(true);d.execCommand('hilitecolor',false,val);set(false);}else d.execCommand('BackColor',false,val);},Undo:function(){var ed=this.editor;if(ed.settings.custom_undo_redo){ed.undoManager.undo();ed.nodeChanged();}else ed.getDoc().execCommand('Undo',false,null);},Redo:function(){var ed=this.editor;if(ed.settings.custom_undo_redo){ed.undoManager.redo();ed.nodeChanged();}else ed.getDoc().execCommand('Redo',false,null);},FormatBlock:function(ui,val){var t=this,ed=t.editor,s=ed.selection,dom=ed.dom,bl,nb,b;function isBlock(n){return/^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test(n.nodeName);};bl=dom.getParent(s.getNode(),function(n){return isBlock(n);});if(bl){if((isIE&&isBlock(bl.parentNode))||bl.nodeName=='DIV'){nb=ed.dom.create(val);each(dom.getAttribs(bl),function(v){dom.setAttrib(nb,v.nodeName,dom.getAttrib(bl,v.nodeName));});b=s.getBookmark();dom.replace(nb,bl,1);s.moveToBookmark(b);ed.nodeChanged();return;}}val=ed.settings.forced_root_block?(val||'

'):val;if(val.indexOf('<')==-1)val='<'+val+'>';if(tinymce.isGecko)val=val.replace(/<(div|blockquote|code|dt|dd|dl|samp)>/gi,'$1');ed.getDoc().execCommand('FormatBlock',false,val);},mceCleanup:function(){var ed=this.editor,s=ed.selection,b=s.getBookmark();ed.setContent(ed.getContent());s.moveToBookmark(b);},mceRemoveNode:function(ui,val){var ed=this.editor,s=ed.selection,b,n=val||s.getNode();if(n==ed.getBody())return;b=s.getBookmark();ed.dom.remove(n,1);s.moveToBookmark(b);ed.nodeChanged();},mceSelectNodeDepth:function(ui,val){var ed=this.editor,s=ed.selection,c=0;ed.dom.getParent(s.getNode(),function(n){if(n.nodeType==1&&c++==val){s.select(n);ed.nodeChanged();return false;}},ed.getBody());},mceSelectNode:function(u,v){this.editor.selection.select(v);},mceInsertContent:function(ui,val){this.editor.selection.setContent(val);},mceInsertRawHTML:function(ui,val){var ed=this.editor;ed.selection.setContent('tiny_mce_marker');ed.setContent(ed.getContent().replace(/tiny_mce_marker/g,val));},mceRepaint:function(){var s,b,e=this.editor;if(tinymce.isGecko){try{s=e.selection;b=s.getBookmark(true);if(s.getSel())s.getSel().selectAllChildren(e.getBody());s.collapse(true);s.moveToBookmark(b);}catch(ex){}}},queryStateUnderline:function(){var ed=this.editor,n=ed.selection.getNode();if(n&&n.nodeName=='A')return false;return this._queryState('Underline');},queryStateOutdent:function(){var ed=this.editor,n;if(ed.settings.inline_styles){if((n=ed.dom.getParent(ed.selection.getStart(),ed.dom.isBlock))&&parseInt(n.style.paddingLeft)>0)return true;if((n=ed.dom.getParent(ed.selection.getEnd(),ed.dom.isBlock))&&parseInt(n.style.paddingLeft)>0)return true;}return this.queryStateInsertUnorderedList()||this.queryStateInsertOrderedList()||(!ed.settings.inline_styles&&!!ed.dom.getParent(ed.selection.getNode(),'BLOCKQUOTE'));},queryStateInsertUnorderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),'UL');},queryStateInsertOrderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),'OL');},queryStatemceBlockQuote:function(){return!!this.editor.dom.getParent(this.editor.selection.getStart(),function(n){return n.nodeName==='BLOCKQUOTE';});},mceBlockQuote:function(){var t=this,ed=t.editor,s=ed.selection,dom=ed.dom,sb,eb,n,bm,bq,r,bq2,i,nl;function getBQ(e){return dom.getParent(e,function(n){return n.nodeName==='BLOCKQUOTE';});};sb=dom.getParent(s.getStart(),isBlock);eb=dom.getParent(s.getEnd(),isBlock);if(bq=getBQ(sb)){if(sb!=eb||sb.childNodes.length>1||(sb.childNodes.length==1&&sb.firstChild.nodeName!='BR'))bm=s.getBookmark();if(getBQ(eb)){bq2=bq.cloneNode(false);while(n=eb.nextSibling)bq2.appendChild(n.parentNode.removeChild(n));}if(bq2)dom.insertAfter(bq2,bq);nl=t._getSelectedBlocks(sb,eb);for(i=nl.length-1;i>=0;i--){dom.insertAfter(nl[i],bq);}if(/^\s*$/.test(bq.innerHTML))dom.remove(bq,1);if(bq2&&/^\s*$/.test(bq2.innerHTML))dom.remove(bq2,1);if(!bm){if(!isIE){r=ed.getDoc().createRange();r.setStart(sb,0);r.setEnd(sb,0);s.setRng(r);}else{s.select(sb);s.collapse(0);if(dom.getParent(s.getStart(),isBlock)!=sb){r=s.getRng();r.move('character',-1);r.select();}}}else t.editor.selection.moveToBookmark(bm);return;}if(isIE&&!sb&&!eb){t.editor.getDoc().execCommand('Indent');n=getBQ(s.getNode());n.style.margin=n.dir='';return;}if(!sb||!eb)return;if(sb!=eb||sb.childNodes.length>1||(sb.childNodes.length==1&&sb.firstChild.nodeName!='BR'))bm=s.getBookmark();each(t._getSelectedBlocks(getBQ(s.getStart()),getBQ(s.getEnd())),function(e){if(e.nodeName=='BLOCKQUOTE'&&!bq){bq=e;return;}if(!bq){bq=dom.create('blockquote');e.parentNode.insertBefore(bq,e);}if(e.nodeName=='BLOCKQUOTE'&&bq){n=e.firstChild;while(n){bq.appendChild(n.cloneNode(true));n=n.nextSibling;}dom.remove(e);return;}bq.appendChild(dom.remove(e));});if(!bm){if(!isIE){r=ed.getDoc().createRange();r.setStart(sb,0);r.setEnd(sb,0);s.setRng(r);}else{s.select(sb);s.collapse(1);}}else s.moveToBookmark(bm);},_applyInlineStyle:function(na,at,op){var t=this,ed=t.editor,dom=ed.dom,bm,lo={},kh;na=na.toUpperCase();if(op&&op.check_classes&&at['class'])op.check_classes.push(at['class']);function replaceFonts(){var bm;each(dom.select(tinymce.isWebKit&&!tinymce.isAir?'span':'font'),function(n){if(n.style.fontFamily=='mceinline'||n.face=='mceinline'){if(!bm)bm=ed.selection.getBookmark();at._mce_new='1';dom.replace(dom.create(na,at),n,1);}});each(dom.select(na),function(n){if(n.getAttribute('_mce_new')){function removeStyle(n){if(n.nodeType==1){each(at.style,function(v,k){dom.setStyle(n,k,'');});if(at['class']&&n.className&&op){each(op.check_classes,function(c){if(dom.hasClass(n,c))dom.removeClass(n,c);});}}};each(dom.select(na,n),removeStyle);if(n.parentNode&&n.parentNode.nodeType==1&&n.parentNode.childNodes.length==1)removeStyle(n.parentNode);dom.getParent(n.parentNode,function(pn){if(pn.nodeType==1){if(at.style){each(at.style,function(v,k){var sv;if(!lo[k]&&(sv=dom.getStyle(pn,k))){if(sv===v)dom.setStyle(n,k,'');lo[k]=1;}});}if(at['class']&&pn.className&&op){each(op.check_classes,function(c){if(dom.hasClass(pn,c))dom.removeClass(n,c);});}}return false;});n.removeAttribute('_mce_new');}});each(dom.select(na).reverse(),function(n){var c=0;each(dom.getAttribs(n),function(an){if(an.nodeName.substring(0,1)!='_'&&dom.getAttrib(n,an.nodeName)!=''){c++;}});if(c==0)dom.remove(n,1);});ed.selection.moveToBookmark(bm);return!!bm;};ed.focus();ed.getDoc().execCommand('FontName',false,'mceinline');replaceFonts();if(kh=t._applyInlineStyle.keyhandler){ed.onKeyUp.remove(kh);ed.onKeyPress.remove(kh);ed.onKeyDown.remove(kh);ed.onSetContent.remove(t._applyInlineStyle.chandler);}if(ed.selection.isCollapsed()){t._pendingStyles=tinymce.extend(t._pendingStyles||{},at.style);t._applyInlineStyle.chandler=ed.onSetContent.add(function(){delete t._pendingStyles;});t._applyInlineStyle.keyhandler=kh=function(e){if(t._pendingStyles){at.style=t._pendingStyles;delete t._pendingStyles;}if(replaceFonts()){ed.onKeyDown.remove(t._applyInlineStyle.keyhandler);ed.onKeyPress.remove(t._applyInlineStyle.keyhandler);}if(e.type=='keyup')ed.onKeyUp.remove(t._applyInlineStyle.keyhandler);};ed.onKeyDown.add(kh);ed.onKeyPress.add(kh);ed.onKeyUp.add(kh);}else t._pendingStyles=0;},_getSelectedBlocks:function(st,en){var ed=this.editor,dom=ed.dom,s=ed.selection,sb,eb,n,bl=[];sb=dom.getParent(st||s.getStart(),isBlock);eb=dom.getParent(en||s.getEnd(),isBlock);if(sb)bl.push(sb);if(sb&&eb&&sb!=eb){n=sb;while((n=n.nextSibling)&&n!=eb){if(isBlock(n))bl.push(n);}}if(eb&&sb!=eb)bl.push(eb);return bl;}});})();tinymce.create('tinymce.UndoManager',{index:0,data:null,typing:0,UndoManager:function(ed){var t=this,Dispatcher=tinymce.util.Dispatcher;t.editor=ed;t.data=[];t.onAdd=new Dispatcher(this);t.onUndo=new Dispatcher(this);t.onRedo=new Dispatcher(this);},add:function(l){var t=this,i,ed=t.editor,b,s=ed.settings,la;l=l||{};l.content=l.content||ed.getContent({format:'raw',no_events:1});l.content=l.content.replace(/^\s*|\s*$/g,'');la=t.data[t.index>0&&(t.index==0||t.index==t.data.length)?t.index-1:t.index];if(!l.initial&&la&&l.content==la.content)return null;if(s.custom_undo_redo_levels){if(t.data.length>s.custom_undo_redo_levels){for(i=0;i0){if(t.index==t.data.length&&t.index>1){i=t.index;t.typing=0;if(!t.add())t.index=i;--t.index;}l=t.data[--t.index];ed.setContent(l.content,{format:'raw'});ed.selection.moveToBookmark(l.bookmark);t.onUndo.dispatch(t,l);}return l;},redo:function(){var t=this,ed=t.editor,l=null;if(t.index','gi');t.rePadd=new RegExp(']+)><\\\/p>|]+)\\\/>|]+)>\\s+<\\\/p>|

<\\\/p>||

\\s+<\\\/p>'.replace(/p/g,elm),'gi');t.reNbsp2BR1=new RegExp(']+)>[\\s\\u00a0]+<\\\/p>|

[\\s\\u00a0]+<\\\/p>'.replace(/p/g,elm),'gi');t.reNbsp2BR2=new RegExp(']+)>( | )<\\\/p>|

( | )<\\\/p>'.replace(/p/g,elm),'gi');t.reBR2Nbsp=new RegExp(']+)>\\s*
\\s*<\\\/p>|

\\s*
\\s*<\\\/p>'.replace(/p/g,elm),'gi');t.reTrailBr=new RegExp('\\s*
\\s*<\\\/p>'.replace(/p/g,elm),'gi');function padd(ed,o){if(isOpera)o.content=o.content.replace(t.reOpera,'');o.content=o.content.replace(t.rePadd,'<'+elm+'$1$2$3$4$5$6>\u00a0');if(!isIE&&!isOpera&&o.set){o.content=o.content.replace(t.reNbsp2BR1,'<'+elm+'$1$2>
');o.content=o.content.replace(t.reNbsp2BR2,'<'+elm+'$1$2>
');}else{o.content=o.content.replace(t.reBR2Nbsp,'<'+elm+'$1$2>\u00a0');o.content=o.content.replace(t.reTrailBr,'');}};ed.onBeforeSetContent.add(padd);ed.onPostProcess.add(padd);if(s.forced_root_block){ed.onInit.add(t.forceRoots,t);ed.onSetContent.add(t.forceRoots,t);ed.onBeforeGetContent.add(t.forceRoots,t);}},setup:function(){var t=this,ed=t.editor,s=ed.settings;if(s.forced_root_block){ed.onKeyUp.add(t.forceRoots,t);ed.onPreProcess.add(t.forceRoots,t);}if(s.force_br_newlines){if(isIE){ed.onKeyPress.add(function(ed,e){var n,s=ed.selection;if(e.keyCode==13&&s.getNode().nodeName!='LI'){s.setContent('
',{format:'raw'});n=ed.dom.get('__');n.removeAttribute('id');s.select(n);s.collapse();return Event.cancel(e);}});}return;}if(!isIE&&s.force_p_newlines){ed.onKeyPress.add(function(ed,e){if(e.keyCode==13&&!e.shiftKey){if(!t.insertPara(e))Event.cancel(e);}});if(isGecko){ed.onKeyDown.add(function(ed,e){if((e.keyCode==8||e.keyCode==46)&&!e.shiftKey)t.backspaceDelete(e,e.keyCode==8);});}}function ren(rn,na){var ne=ed.dom.create(na);each(rn.attributes,function(a){if(a.specified&&a.nodeValue)ne.setAttribute(a.nodeName.toLowerCase(),a.nodeValue);});each(rn.childNodes,function(n){ne.appendChild(n.cloneNode(true));});rn.parentNode.replaceChild(ne,rn);return ne;};if(isIE&&s.element!='P'){ed.onKeyPress.add(function(ed,e){t.lastElm=ed.selection.getNode().nodeName;});ed.onKeyUp.add(function(ed,e){var bl,sel=ed.selection,n=sel.getNode(),b=ed.getBody();if(b.childNodes.length===1&&n.nodeName=='P'){n=ren(n,s.element);sel.select(n);sel.collapse();ed.nodeChanged();}else if(e.keyCode==13&&!e.shiftKey&&t.lastElm!='P'){bl=ed.dom.getParent(n,'P');if(bl){ren(bl,s.element);ed.nodeChanged();}}});}},find:function(n,t,s){var ed=this.editor,w=ed.getDoc().createTreeWalker(n,4,null,false),c=-1;while(n=w.nextNode()){c++;if(t==0&&n==s)return c;if(t==1&&c==s)return n;}return-1;},forceRoots:function(ed,e){var t=this,ed=t.editor,b=ed.getBody(),d=ed.getDoc(),se=ed.selection,s=se.getSel(),r=se.getRng(),si=-2,ei,so,eo,tr,c=-0xFFFFFF;var nx,bl,bp,sp,le,nl=b.childNodes,i,n,eid;for(i=nl.length-1;i>=0;i--){nx=nl[i];if(nx.nodeType==3||(!t.dom.isBlock(nx)&&nx.nodeType!=8)){if(!bl){if(nx.nodeType!=3||/[^\s]/g.test(nx.nodeValue)){if(si==-2&&r){if(!isIE){if(r.startContainer.nodeType==1&&(n=r.startContainer.childNodes[r.startOffset])&&n.nodeType==1){eid=n.getAttribute("id");n.setAttribute("id","__mce");}else{if(ed.dom.getParent(r.startContainer,function(e){return e===b;})){so=r.startOffset;eo=r.endOffset;si=t.find(b,0,r.startContainer);ei=t.find(b,0,r.endContainer);}}}else{tr=d.body.createTextRange();tr.moveToElementText(b);tr.collapse(1);bp=tr.move('character',c)*-1;tr=r.duplicate();tr.collapse(1);sp=tr.move('character',c)*-1;tr=r.duplicate();tr.collapse(0);le=(tr.move('character',c)*-1)-sp;si=sp-bp;ei=le;}}bl=ed.dom.create(ed.settings.forced_root_block);bl.appendChild(nx.cloneNode(1));nx.parentNode.replaceChild(bl,nx);}}else{if(bl.hasChildNodes())bl.insertBefore(nx,bl.firstChild);else bl.appendChild(nx);}}else bl=null;}if(si!=-2){if(!isIE){bl=b.getElementsByTagName(ed.settings.element)[0];r=d.createRange();if(si!=-1)r.setStart(t.find(b,1,si),so);else r.setStart(bl,0);if(ei!=-1)r.setEnd(t.find(b,1,ei),eo);else r.setEnd(bl,0);if(s){s.removeAllRanges();s.addRange(r);}}else{try{r=s.createRange();r.moveToElementText(b);r.collapse(1);r.moveStart('character',si);r.moveEnd('character',ei);r.select();}catch(ex){}}}else if(!isIE&&(n=ed.dom.get('__mce'))){if(eid)n.setAttribute('id',eid);else n.removeAttribute('id');r=d.createRange();r.setStartBefore(n);r.setEndBefore(n);se.setRng(r);}},getParentBlock:function(n){var d=this.dom;return d.getParent(n,d.isBlock);},insertPara:function(e){var t=this,ed=t.editor,dom=ed.dom,d=ed.getDoc(),se=ed.settings,s=ed.selection.getSel(),r=s.getRangeAt(0),b=d.body;var rb,ra,dir,sn,so,en,eo,sb,eb,bn,bef,aft,sc,ec,n,vp=dom.getViewPort(ed.getWin()),y,ch,car;function isEmpty(n){n=n.innerHTML;n=n.replace(/<(img|hr|table)/gi,'-');n=n.replace(/<[^>]+>/g,'');return n.replace(/[ \t\r\n]+/g,'')=='';};rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(true);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(true);dir=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;sn=dir?s.anchorNode:s.focusNode;so=dir?s.anchorOffset:s.focusOffset;en=dir?s.focusNode:s.anchorNode;eo=dir?s.focusOffset:s.anchorOffset;if(sn===en&&/^(TD|TH)$/.test(sn.nodeName)){dom.remove(sn.firstChild);ed.dom.add(sn,se.element,null,'
');aft=ed.dom.add(sn,se.element,null,'
');r=d.createRange();r.selectNodeContents(aft);r.collapse(1);ed.selection.setRng(r);return false;}if(sn==b&&en==b&&b.firstChild&&ed.dom.isBlock(b.firstChild)){sn=en=sn.firstChild;so=eo=0;rb=d.createRange();rb.setStart(sn,0);ra=d.createRange();ra.setStart(en,0);}sn=sn.nodeName=="HTML"?d.body:sn;sn=sn.nodeName=="BODY"?sn.firstChild:sn;en=en.nodeName=="HTML"?d.body:en;en=en.nodeName=="BODY"?en.firstChild:en;sb=t.getParentBlock(sn);eb=t.getParentBlock(en);bn=sb?sb.nodeName:se.element;if(t.dom.getParent(sb,function(n){return/OL|UL|PRE/.test(n.nodeName);}))return true;if(sb&&(sb.nodeName=='CAPTION'||/absolute|relative|static/gi.test(sb.style.position))){bn=se.element;sb=null;}if(eb&&(eb.nodeName=='CAPTION'||/absolute|relative|static/gi.test(eb.style.position))){bn=se.element;eb=null;}if(/(TD|TABLE|TH|CAPTION)/.test(bn)||(sb&&bn=="DIV"&&/left|right/gi.test(sb.style.cssFloat))){bn=se.element;sb=eb=null;}bef=(sb&&sb.nodeName==bn)?sb.cloneNode(0):ed.dom.create(bn);aft=(eb&&eb.nodeName==bn)?eb.cloneNode(0):ed.dom.create(bn);aft.removeAttribute('id');if(/^(H[1-6])$/.test(bn)&&sn.nodeValue&&so==sn.nodeValue.length)aft=ed.dom.create(se.element);n=sc=sn;do{if(n==b||n.nodeType==9||t.dom.isBlock(n)||/(TD|TABLE|TH|CAPTION)/.test(n.nodeName))break;sc=n;}while((n=n.previousSibling?n.previousSibling:n.parentNode));n=ec=en;do{if(n==b||n.nodeType==9||t.dom.isBlock(n)||/(TD|TABLE|TH|CAPTION)/.test(n.nodeName))break;ec=n;}while((n=n.nextSibling?n.nextSibling:n.parentNode));if(sc.nodeName==bn)rb.setStart(sc,0);else rb.setStartBefore(sc);rb.setEnd(sn,so);bef.appendChild(rb.cloneContents()||d.createTextNode(''));try{ra.setEndAfter(ec);}catch(ex){}ra.setStart(en,eo);aft.appendChild(ra.cloneContents()||d.createTextNode(''));r=d.createRange();if(!sc.previousSibling&&sc.parentNode.nodeName==bn){r.setStartBefore(sc.parentNode);}else{if(rb.startContainer.nodeName==bn&&rb.startOffset==0)r.setStartBefore(rb.startContainer);else r.setStart(rb.startContainer,rb.startOffset);}if(!ec.nextSibling&&ec.parentNode.nodeName==bn)r.setEndAfter(ec.parentNode);else r.setEnd(ra.endContainer,ra.endOffset);r.deleteContents();if(isOpera)ed.getWin().scrollTo(0,vp.y);if(bef.firstChild&&bef.firstChild.nodeName==bn)bef.innerHTML=bef.firstChild.innerHTML;if(aft.firstChild&&aft.firstChild.nodeName==bn)aft.innerHTML=aft.firstChild.innerHTML;if(isEmpty(bef))bef.innerHTML='
';function appendStyles(e,en){var nl=[],nn,n,i;e.innerHTML='';if(se.keep_styles){n=en;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(n.nodeName)){nn=n.cloneNode(false);dom.setAttrib(nn,'id','');nl.push(nn);}}while(n=n.parentNode);}if(nl.length>0){for(i=nl.length-1,nn=e;i>=0;i--)nn=nn.appendChild(nl[i]);nl[0].innerHTML=isOpera?' ':'
';return nl[0];}else e.innerHTML=isOpera?' ':'
';};if(isEmpty(aft))car=appendStyles(aft,en);if(isOpera&&parseFloat(opera.version())<9.5){r.insertNode(bef);r.insertNode(aft);}else{r.insertNode(aft);r.insertNode(bef);}aft.normalize();bef.normalize();function first(n){return d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false).nextNode()||n;};r=d.createRange();r.selectNodeContents(isGecko?first(car||aft):car||aft);r.collapse(1);s.removeAllRanges();s.addRange(r);y=ed.dom.getPos(aft).y;ch=aft.clientHeight;if(yvp.y+vp.h){ed.getWin().scrollTo(0,y

+ * @before $.metadata.setType("elem", "script") + * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" + * @desc Reads metadata from a nested script element + * + * @param String type The encoding type + * @param String name The name of the attribute to be used to get metadata (optional) + * @cat Plugins/Metadata + * @descr Sets the type of encoding to be used when loading metadata for the first time + * @type undefined + * @see metadata() + */ + +(function($) { + +$.extend({ + metadata : { + defaults : { + type: 'class', + name: 'metadata', + cre: /({.*})/, + single: 'metadata' + }, + setType: function( type, name ){ + this.defaults.type = type; + this.defaults.name = name; + }, + get: function( elem, opts ){ + var settings = $.extend({},this.defaults,opts); + // check for empty string in single property + if ( !settings.single.length ) settings.single = 'metadata'; + + var data = $.data(elem, settings.single); + // returned cached data if it already exists + if ( data ) return data; + + data = "{}"; + + if ( settings.type == "class" ) { + var m = settings.cre.exec( elem.className ); + if ( m ) + data = m[1]; + } else if ( settings.type == "elem" ) { + if( !elem.getElementsByTagName ) + return undefined; + var e = elem.getElementsByTagName(settings.name); + if ( e.length ) + data = $.trim(e[0].innerHTML); + } else if ( elem.getAttribute != undefined ) { + var attr = elem.getAttribute( settings.name ); + if ( attr ) + data = attr; + } + + if ( data.indexOf( '{' ) <0 ) + data = "{" + data + "}"; + + data = eval("(" + data + ")"); + + $.data( elem, settings.single, data ); + return data; + } + } +}); + +/** + * Returns the metadata object for the first member of the jQuery object. + * + * @name metadata + * @descr Returns element's metadata object + * @param Object opts An object contianing settings to override the defaults + * @type jQuery + * @cat Plugins/Metadata + */ +$.fn.metadata = function( opts ){ + return $.metadata.get( this[0], opts ); +}; + +})(jQuery); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/lib/jquery.mockjax.js b/bug/bug/jquery-validation-1.8.1/lib/jquery.mockjax.js new file mode 100644 index 0000000..50ace60 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/lib/jquery.mockjax.js @@ -0,0 +1,382 @@ +/*! + * MockJax - jQuery Plugin to Mock Ajax requests + * + * Version: 1.4.0 + * Released: 2011-02-04 + * Source: http://github.com/appendto/jquery-mockjax + * Docs: http://enterprisejquery.com/2010/07/mock-your-ajax-requests-with-mockjax-for-rapid-development + * Plugin: mockjax + * Author: Jonathan Sharp (http://jdsharp.com) + * License: MIT,GPL + * + * Copyright (c) 2010 appendTo LLC. + * Dual licensed under the MIT or GPL licenses. + * http://appendto.com/open-source-licenses + */ +(function($) { + var _ajax = $.ajax, + mockHandlers = []; + + function parseXML(xml) { + if ( window['DOMParser'] == undefined && window.ActiveXObject ) { + DOMParser = function() { }; + DOMParser.prototype.parseFromString = function( xmlString ) { + var doc = new ActiveXObject('Microsoft.XMLDOM'); + doc.async = 'false'; + doc.loadXML( xmlString ); + return doc; + }; + } + + try { + var xmlDoc = ( new DOMParser() ).parseFromString( xml, 'text/xml' ); + if ( $.isXMLDoc( xmlDoc ) ) { + var err = $('parsererror', xmlDoc); + if ( err.length == 1 ) { + throw('Error: ' + $(xmlDoc).text() ); + } + } else { + throw('Unable to parse XML'); + } + } catch( e ) { + var msg = ( e.name == undefined ? e : e.name + ': ' + e.message ); + $(document).trigger('xmlParseError', [ msg ]); + return undefined; + } + return xmlDoc; + } + + $.extend({ + ajax: function(origSettings) { + var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings), + mock = false; + // Iterate over our mock handlers (in registration order) until we find + // one that is willing to intercept the request + $.each(mockHandlers, function(k, v) { + if ( !mockHandlers[k] ) { + return; + } + var m = null; + // If the mock was registered with a function, let the function decide if we + // want to mock this request + if ( $.isFunction(mockHandlers[k]) ) { + m = mockHandlers[k](s); + } else { + m = mockHandlers[k]; + // Inspect the URL of the request and check if the mock handler's url + // matches the url for this ajax request + if ( $.isFunction(m.url.test) ) { + // The user provided a regex for the url, test it + if ( !m.url.test( s.url ) ) { + m = null; + } + } else { + // Look for a simple wildcard '*' or a direct URL match + var star = m.url.indexOf('*'); + if ( ( m.url != '*' && m.url != s.url && star == -1 ) || + ( star > -1 && m.url.substr(0, star) != s.url.substr(0, star) ) ) { + // The url we tested did not match the wildcard * + m = null; + } + } + if ( m ) { + // Inspect the data submitted in the request (either POST body or GET query string) + if ( m.data && s.data ) { + var identical = false; + // Deep inspect the identity of the objects + (function ident(mock, live) { + // Test for situations where the data is a querystring (not an object) + if (typeof live === 'string') { + // Querystring may be a regex + identical = $.isFunction( mock.test ) ? mock.test(live) : mock == live; + return identical; + } + $.each(mock, function(k, v) { + if ( live[k] === undefined ) { + identical = false; + return false; + } else { + identical = true; + if ( typeof live[k] == 'object' ) { + return ident(mock[k], live[k]); + } else { + if ( $.isFunction( mock[k].test ) ) { + identical = mock[k].test(live[k]); + } else { + identical = ( mock[k] == live[k] ); + } + return identical; + } + } + }); + })(m.data, s.data); + // They're not identical, do not mock this request + if ( identical == false ) { + m = null; + } + } + // Inspect the request type + if ( m && m.type && m.type != s.type ) { + // The request type doesn't match (GET vs. POST) + m = null; + } + } + } + if ( m ) { + mock = true; + + // Handle console logging + var c = $.extend({}, $.mockjaxSettings, m); + if ( c.log && $.isFunction(c.log) ) { + c.log('MOCK ' + s.type.toUpperCase() + ': ' + s.url, $.extend({}, s)); + } + + var jsre = /=\?(&|$)/, jsc = (new Date()).getTime(); + + // Handle JSONP Parameter Callbacks, we need to replicate some of the jQuery core here + // because there isn't an easy hook for the cross domain script tag of jsonp + if ( s.dataType === "jsonp" ) { + if ( s.type.toUpperCase() === "GET" ) { + if ( !jsre.test( s.url ) ) { + s.url += (rquery.test( s.url ) ? "&" : "?") + (s.jsonp || "callback") + "=?"; + } + } else if ( !s.data || !jsre.test(s.data) ) { + s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?"; + } + s.dataType = "json"; + } + + // Build temporary JSONP function + if ( s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url)) ) { + jsonp = s.jsonpCallback || ("jsonp" + jsc++); + + // Replace the =? sequence both in the query string and the data + if ( s.data ) { + s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1"); + } + + s.url = s.url.replace(jsre, "=" + jsonp + "$1"); + + // We need to make sure + // that a JSONP style response is executed properly + s.dataType = "script"; + + // Handle JSONP-style loading + window[ jsonp ] = window[ jsonp ] || function( tmp ) { + data = tmp; + success(); + complete(); + // Garbage collect + window[ jsonp ] = undefined; + + try { + delete window[ jsonp ]; + } catch(e) {} + + if ( head ) { + head.removeChild( script ); + } + }; + } + + var rurl = /^(\w+:)?\/\/([^\/?#]+)/, + parts = rurl.exec( s.url ), + remote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host); + + // Test if we are going to create a script tag (if so, intercept & mock) + if ( s.dataType === "script" && s.type.toUpperCase() === "GET" && remote ) { + // Synthesize the mock request for adding a script tag + var callbackContext = origSettings && origSettings.context || s; + + function success() { + // If a local callback was specified, fire it and pass it the data + if ( s.success ) { + s.success.call( callbackContext, ( m.response ? m.response.toString() : m.responseText || ''), status, {} ); + } + + // Fire the global callback + if ( s.global ) { + trigger( "ajaxSuccess", [{}, s] ); + } + } + + function complete() { + // Process result + if ( s.complete ) { + s.complete.call( callbackContext, {} , status ); + } + + // The request was completed + if ( s.global ) { + trigger( "ajaxComplete", [{}, s] ); + } + + // Handle the global AJAX counter + if ( s.global && ! --jQuery.active ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + + function trigger(type, args) { + (s.context ? jQuery(s.context) : jQuery.event).trigger(type, args); + } + + if ( m.response && $.isFunction(m.response) ) { + m.response(origSettings); + } else { + $.globalEval(m.responseText); + } + success(); + complete(); + return false; + } + mock = _ajax.call($, $.extend(true, {}, origSettings, { + // Mock the XHR object + xhr: function() { + // Extend with our default mockjax settings + m = $.extend({}, $.mockjaxSettings, m); + + if ( m.contentType ) { + m.headers['content-type'] = m.contentType; + } + + // Return our mock xhr object + return { + status: m.status, + readyState: 1, + open: function() { }, + send: function() { + // This is a substitute for < 1.4 which lacks $.proxy + var process = (function(that) { + return function() { + return (function() { + // The request has returned + this.status = m.status; + this.readyState = 4; + + // We have an executable function, call it to give + // the mock handler a chance to update it's data + if ( $.isFunction(m.response) ) { + m.response(origSettings); + } + // Copy over our mock to our xhr object before passing control back to + // jQuery's onreadystatechange callback + if ( s.dataType == 'json' && ( typeof m.responseText == 'object' ) ) { + this.responseText = JSON.stringify(m.responseText); + } else if ( s.dataType == 'xml' ) { + if ( typeof m.responseXML == 'string' ) { + this.responseXML = parseXML(m.responseXML); + } else { + this.responseXML = m.responseXML; + } + } else { + this.responseText = m.responseText; + } + // jQuery < 1.4 doesn't have onreadystate change for xhr + if ( $.isFunction(this.onreadystatechange) ) { + this.onreadystatechange( m.isTimeout ? 'timeout' : undefined ); + } + }).apply(that); + }; + })(this); + + if ( m.proxy ) { + // We're proxying this request and loading in an external file instead + _ajax({ + global: false, + url: m.proxy, + type: m.proxyType, + data: m.data, + dataType: s.dataType, + complete: function(xhr, txt) { + m.responseXML = xhr.responseXML; + m.responseText = xhr.responseText; + this.responseTimer = setTimeout(process, m.responseTime || 0); + } + }); + } else { + // type == 'POST' || 'GET' || 'DELETE' + if ( s.async === false ) { + // TODO: Blocking delay + process(); + } else { + this.responseTimer = setTimeout(process, m.responseTime || 50); + } + } + }, + abort: function() { + clearTimeout(this.responseTimer); + }, + setRequestHeader: function() { }, + getResponseHeader: function(header) { + // 'Last-modified', 'Etag', 'content-type' are all checked by jQuery + if ( m.headers && m.headers[header] ) { + // Return arbitrary headers + return m.headers[header]; + } else if ( header.toLowerCase() == 'last-modified' ) { + return m.lastModified || (new Date()).toString(); + } else if ( header.toLowerCase() == 'etag' ) { + return m.etag || ''; + } else if ( header.toLowerCase() == 'content-type' ) { + return m.contentType || 'text/plain'; + } + }, + getAllResponseHeaders: function() { + var headers = ''; + $.each(m.headers, function(k, v) { + headers += k + ': ' + v + "\n"; + }); + return headers; + } + }; + } + })); + return false; + } + }); + // We don't have a mock request, trigger a normal request + if ( !mock ) { + return _ajax.apply($, arguments); + } else { + return mock; + } + } + }); + + $.mockjaxSettings = { + //url: null, + //type: 'GET', + log: function(msg) { + window['console'] && window.console.log && window.console.log(msg); + }, + status: 200, + responseTime: 500, + isTimeout: false, + contentType: 'text/plain', + response: '', + responseText: '', + responseXML: '', + proxy: '', + proxyType: 'GET', + + lastModified: null, + etag: '', + headers: { + etag: 'IJF@H#@923uf8023hFO@I#H#', + 'content-type' : 'text/plain' + } + }; + + $.mockjax = function(settings) { + var i = mockHandlers.length; + mockHandlers[i] = settings; + return i; + }; + $.mockjaxClear = function(i) { + if ( arguments.length == 1 ) { + mockHandlers[i] = null; + } else { + mockHandlers = []; + } + }; +})(jQuery); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_ar.js b/bug/bug/jquery-validation-1.8.1/localization/messages_ar.js new file mode 100644 index 0000000..71e97a8 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_ar.js @@ -0,0 +1,24 @@ +/* + * Translated default messages for the jQuery validation plugin into arabic. + * Locale: AR + */ +jQuery.extend(jQuery.validator.messages, { + required: "هذا الحقل إلزامي", + remote: "يرجى تصحيح هذا الحقل للمتابعة", + email: "رجاء إدخال عنوان بريد إلكتروني صحيح", + url: "رجاء إدخال عنوان موقع إلكتروني صحيح", + date: "رجاء إدخال تاريخ صحيح", + dateISO: "رجاء إدخال تاريخ صحيح (ISO)", + number: "رجاء إدخال عدد بطريقة صحيحة", + digits: "رجاء إدخال أرقام فقط", + creditcard: "رجاء إدخال رقم بطاقة ائتمان صحيح", + equalTo: "رجاء إدخال نفس القيمة", + accept: "رجاء إدخال ملف بامتداد موافق عليه", + maxlength: jQuery.validator.format("الحد الأقصى لعدد الحروف هو {0}"), + minlength: jQuery.validator.format("الحد الأدنى لعدد الحروف هو {0}"), + rangelength: jQuery.validator.format("عدد الحروف يجب أن يكون بين {0} و {1}"), + range: jQuery.validator.format("رجاء إدخال عدد قيمته بين {0} و {1}"), + max: jQuery.validator.format("رجاء إدخال عدد أقل من أو يساوي (0}"), + min: jQuery.validator.format("رجاء إدخال عدد أكبر من أو يساوي (0}") +}); + diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_bg.js b/bug/bug/jquery-validation-1.8.1/localization/messages_bg.js new file mode 100644 index 0000000..9232f72 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_bg.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: BG + */ +jQuery.extend(jQuery.validator.messages, { + required: "Полето е задължително.", + remote: "Моля, въведете правилната стойност.", + email: "Моля, въведете валиден email.", + url: "Моля, въведете валидно URL.", + date: "Моля, въведете валидна дата.", + dateISO: "Моля, въведете валидна дата (ISO).", + number: "Моля, въведете валиден номер.", + digits: "Моля, въведете само цифри", + creditcard: "Моля, въведете валиден номер на кредитна карта.", + equalTo: "Моля, въведете същата стойност отново.", + accept: "Моля, въведете стойност с валидно разширение.", + maxlength: $.validator.format("Моля, въведете повече от {0} символа."), + minlength: $.validator.format("Моля, въведете поне {0} символа."), + rangelength: $.validator.format("Моля, въведете стойност с дължина между {0} и {1} символа."), + range: $.validator.format("Моля, въведете стойност между {0} и {1}."), + max: $.validator.format("Моля, въведете стойност по-малка или равна на {0}."), + min: $.validator.format("Моля, въведете стойност по-голяма или равна на {0}.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_ca.js b/bug/bug/jquery-validation-1.8.1/localization/messages_ca.js new file mode 100644 index 0000000..f823534 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_ca.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: CA + */ +jQuery.extend(jQuery.validator.messages, { + required: "Aquest camp és obligatori.", + remote: "Si us plau, omple aquest camp.", + email: "Si us plau, escriu una adreça de correu-e vàlida", + url: "Si us plau, escriu una URL vàlida.", + date: "Si us plau, escriu una data vàlida.", + dateISO: "Si us plau, escriu una data (ISO) vàlida.", + number: "Si us plau, escriu un número enter vàlid.", + digits: "Si us plau, escriu només dígits.", + creditcard: "Si us plau, escriu un número de tarjeta vàlid.", + equalTo: "Si us plau, escriu el maateix valor de nou.", + accept: "Si us plau, escriu un valor amb una extensió acceptada.", + maxlength: jQuery.validator.format("Si us plau, no escriguis més de {0} caracters."), + minlength: jQuery.validator.format("Si us plau, no escriguis menys de {0} caracters."), + rangelength: jQuery.validator.format("Si us plau, escriu un valor entre {0} i {1} caracters."), + range: jQuery.validator.format("Si us plau, escriu un valor entre {0} i {1}."), + max: jQuery.validator.format("Si us plau, escriu un valor menor o igual a {0}."), + min: jQuery.validator.format("Si us plau, escriu un valor major o igual a {0}.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_cn.js b/bug/bug/jquery-validation-1.8.1/localization/messages_cn.js new file mode 100644 index 0000000..8415f4a --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_cn.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: CN + */ +jQuery.extend(jQuery.validator.messages, { + required: "必选字段", + remote: "请修正该字段", + email: "请输入正确格式的电子邮件", + url: "请输入合法的网址", + date: "请输入合法的日期", + dateISO: "请输入合法的日期 (ISO).", + number: "请输入合法的数字", + digits: "只能输入整数", + creditcard: "请输入合法的信用卡号", + equalTo: "请再次输入相同的值", + accept: "请输入拥有合法后缀名的字符串", + maxlength: jQuery.validator.format("请输入一个长度最多是 {0} 的字符串"), + minlength: jQuery.validator.format("请输入一个长度最少是 {0} 的字符串"), + rangelength: jQuery.validator.format("请输入一个长度介于 {0} 和 {1} 之间的字符串"), + range: jQuery.validator.format("请输入一个介于 {0} 和 {1} 之间的值"), + max: jQuery.validator.format("请输入一个最大为 {0} 的值"), + min: jQuery.validator.format("请输入一个最小为 {0} 的值") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_cs.js b/bug/bug/jquery-validation-1.8.1/localization/messages_cs.js new file mode 100644 index 0000000..ab99819 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_cs.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: CS + */ +jQuery.extend(jQuery.validator.messages, { + required: "Tento údaj je povinný.", + remote: "Prosím, opravte tento údaj.", + email: "Prosím, zadejte platný e-mail.", + url: "Prosím, zadejte platné URL.", + date: "Prosím, zadejte platné datum.", + dateISO: "Prosím, zadejte platné datum (ISO).", + number: "Prosím, zadejte číslo.", + digits: "Prosím, zadávejte pouze číslice.", + creditcard: "Prosím, zadejte číslo kreditní karty.", + equalTo: "Prosím, zadejte znovu stejnou hodnotu.", + accept: "Prosím, zadejte soubor se správnou příponou.", + maxlength: jQuery.validator.format("Prosím, zadejte nejvíce {0} znaků."), + minlength: jQuery.validator.format("Prosím, zadejte nejméně {0} znaků."), + rangelength: jQuery.validator.format("Prosím, zadejte od {0} do {1} znaků."), + range: jQuery.validator.format("Prosím, zadejte hodnotu od {0} do {1}."), + max: jQuery.validator.format("Prosím, zadejte hodnotu menší nebo rovnu {0}."), + min: jQuery.validator.format("Prosím, zadejte hodnotu větší nebo rovnu {0}.") +}); diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_da.js b/bug/bug/jquery-validation-1.8.1/localization/messages_da.js new file mode 100644 index 0000000..1f729e0 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_da.js @@ -0,0 +1,20 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: DA + */ +jQuery.extend(jQuery.validator.messages, { + required: "Dette felt er påkrævet.", + maxlength: jQuery.validator.format("Indtast højst {0} tegn."), + minlength: jQuery.validator.format("Indtast mindst {0} tegn."), + rangelength: jQuery.validator.format("Indtast mindst {0} og højst {1} tegn."), + email: "Indtast en gyldig email-adresse.", + url: "Indtast en gyldig URL.", + date: "Indtast en gyldig dato.", + number: "Indtast et tal.", + digits: "Indtast kun cifre.", + equalTo: "Indtast den samme værdi igen.", + range: jQuery.validator.format("Angiv en værdi mellem {0} og {1}."), + max: jQuery.validator.format("Angiv en værdi der højst er {0}."), + min: jQuery.validator.format("Angiv en værdi der mindst er {0}."), + creditcard: "Indtast et gyldigt kreditkortnummer." +}); diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_de.js b/bug/bug/jquery-validation-1.8.1/localization/messages_de.js new file mode 100644 index 0000000..0c03e30 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_de.js @@ -0,0 +1,20 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: DE + */ +jQuery.extend(jQuery.validator.messages, { + required: "Dieses Feld ist ein Pflichtfeld.", + maxlength: jQuery.validator.format("Geben Sie bitte maximal {0} Zeichen ein."), + minlength: jQuery.validator.format("Geben Sie bitte mindestens {0} Zeichen ein."), + rangelength: jQuery.validator.format("Geben Sie bitte mindestens {0} und maximal {1} Zeichen ein."), + email: "Geben Sie bitte eine gültige E-Mail Adresse ein.", + url: "Geben Sie bitte eine gültige URL ein.", + date: "Bitte geben Sie ein gültiges Datum ein.", + number: "Geben Sie bitte eine Nummer ein.", + digits: "Geben Sie bitte nur Ziffern ein.", + equalTo: "Bitte denselben Wert wiederholen.", + range: jQuery.validator.format("Geben Sie bitten einen Wert zwischen {0} und {1}."), + max: jQuery.validator.format("Geben Sie bitte einen Wert kleiner oder gleich {0} ein."), + min: jQuery.validator.format("Geben Sie bitte einen Wert größer oder gleich {0} ein."), + creditcard: "Geben Sie bitte ein gültige Kreditkarten-Nummer ein." +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_el.js b/bug/bug/jquery-validation-1.8.1/localization/messages_el.js new file mode 100644 index 0000000..52607a5 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_el.js @@ -0,0 +1,24 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: EL + */ +jQuery.extend(jQuery.validator.messages, { + required: "Αυτό το πεδίο είναι υποχρεωτικό.", + remote: "Παρακαλώ διορθώστε αυτό το πεδίο.", + email: "Παρακαλώ εισάγετε μια έγκυρη διεύθυνση email.", + url: "Παρακαλώ εισάγετε ένα έγκυρο URL.", + date: "Παρακαλώ εισάγετε μια έγκυρη ημερομηνία.", + dateISO: "Παρακαλώ εισάγετε μια έγκυρη ημερομηνία (ISO).", + number: "Παρακαλώ εισάγετε έναν έγκυρο αριθμό.", + digits: "Παρακαλώ εισάγετε μόνο αριθμητικά ψηφία.", + creditcard: "Παρακαλώ εισάγετε έναν έγκυρο αριθμό πιστωτικής κάρτας.", + equalTo: "Παρακαλώ εισάγετε την ίδια τιμή ξανά.", + accept: "Παρακαλώ εισάγετε μια τιμή με έγκυρη επέκταση αρχείου.", + maxlength: $.validator.format("Παρακαλώ εισάγετε μέχρι και {0} χαρακτήρες."), + minlength: $.validator.format("Παρακαλώ εισάγετε τουλάχιστον {0} χαρακτήρες."), + rangelength: $.validator.format("Παρακαλώ εισάγετε μια τιμή με μήκος μεταξύ {0} και {1} χαρακτήρων."), + range: $.validator.format("Παρακαλώ εισάγετε μια τιμή μεταξύ {0} και {1}."), + max: $.validator.format("Παρακαλώ εισάγετε μια τιμή μικρότερη ή ίση του {0}."), + min: $.validator.format("Παρακαλώ εισάγετε μια τιμή μεγαλύτερη ή ίση του {0}.") +}); + diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_es.js b/bug/bug/jquery-validation-1.8.1/localization/messages_es.js new file mode 100644 index 0000000..b9a2414 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_es.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: ES + */ +jQuery.extend(jQuery.validator.messages, { + required: "Este campo es obligatorio.", + remote: "Por favor, rellena este campo.", + email: "Por favor, escribe una dirección de correo válida", + url: "Por favor, escribe una URL válida.", + date: "Por favor, escribe una fecha válida.", + dateISO: "Por favor, escribe una fecha (ISO) válida.", + number: "Por favor, escribe un número entero válido.", + digits: "Por favor, escribe sólo dígitos.", + creditcard: "Por favor, escribe un número de tarjeta válido.", + equalTo: "Por favor, escribe el mismo valor de nuevo.", + accept: "Por favor, escribe un valor con una extensión aceptada.", + maxlength: jQuery.validator.format("Por favor, no escribas más de {0} caracteres."), + minlength: jQuery.validator.format("Por favor, no escribas menos de {0} caracteres."), + rangelength: jQuery.validator.format("Por favor, escribe un valor entre {0} y {1} caracteres."), + range: jQuery.validator.format("Por favor, escribe un valor entre {0} y {1}."), + max: jQuery.validator.format("Por favor, escribe un valor menor o igual a {0}."), + min: jQuery.validator.format("Por favor, escribe un valor mayor o igual a {0}.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_fa.js b/bug/bug/jquery-validation-1.8.1/localization/messages_fa.js new file mode 100644 index 0000000..1ea531e --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_fa.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: FA + */ +jQuery.extend(jQuery.validator.messages, { + required: "تکمیل این فیلد اجباری است.", + remote: "لطفا این فیلد را تصحیح کنید.", + email: ".لطفا یک ایمیل صحیح وارد کنید", + url: "لطفا آدرس صحیح وارد کنید.", + date: "لطفا یک تاریخ صحیح وارد کنید", + dateISO: "لطفا تاریخ صحیح وارد کنید (ISO).", + number: "لطفا عدد صحیح وارد کنید.", + digits: "لطفا تنها رقم وارد کنید", + creditcard: "لطفا کریدیت کارت صحیح وارد کنید.", + equalTo: "لطفا مقدار برابری وارد کنید", + accept: "لطفا مقداری وارد کنید که ", + maxlength: jQuery.validator.format("لطفا بیشتر از {0} حرف وارد نکنید."), + minlength: jQuery.validator.format("لطفا کمتر از {0} حرف وارد نکنید."), + rangelength: jQuery.validator.format("لطفا مقداری بین {0} تا {1} حرف وارد کنید."), + range: jQuery.validator.format("لطفا مقداری بین {0} تا {1} حرف وارد کنید."), + max: jQuery.validator.format("لطفا مقداری کمتر از {0} حرف وارد کنید."), + min: jQuery.validator.format("لطفا مقداری بیشتر از {0} حرف وارد کنید.") +}); diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_fi.js b/bug/bug/jquery-validation-1.8.1/localization/messages_fi.js new file mode 100644 index 0000000..eb47369 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_fi.js @@ -0,0 +1,21 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: FI + */ +jQuery.extend(jQuery.validator.messages, { + required: "Tämä kenttä on pakollinen.", + maxlength: jQuery.validator.format("Voit syöttää enintään {0} merkkiä."), + minlength: jQuery.validator.format("Vähintään {0} merkkiä."), + rangelength: jQuery.validator.format("Syötä vähintään {0} ja enintään {1} merkkiä."), + email: "Syö:tä oikea sähköpostiosoite.", + url: "Syötä oikea URL osoite.", + date: "Syötä oike päivämäärä.", + dateISO: "Syötä oike päivämäärä (VVVV-MM-DD).", + number: "Syötä numero.", + digits: "Syötä pelkästään numeroita.", + equalTo: "Syötä sama arvo uudestaan.", + range: jQuery.validator.format("Syötä arvo {0} ja {1} väliltä."), + max: jQuery.validator.format("Syötä arvo joka on yhtä suuri tai suurempi kuin {0}."), + min: jQuery.validator.format("Syötä arvo joka on pienempi tai yhtä suuri kuin {0}."), + creditcard: "Syötä voimassa oleva luottokorttinumero." +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_fr.js b/bug/bug/jquery-validation-1.8.1/localization/messages_fr.js new file mode 100644 index 0000000..f9e1340 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_fr.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: FR + */ +jQuery.extend(jQuery.validator.messages, { + required: "Ce champ est requis.", + remote: "Veuillez remplir ce champ pour continuer.", + email: "Veuillez entrer une adresse email valide.", + url: "Veuillez entrer une URL valide.", + date: "Veuillez entrer une date valide.", + dateISO: "Veuillez entrer une date valide (ISO).", + number: "Veuillez entrer un nombre valide.", + digits: "Veuillez entrer (seulement) une valeur numérique.", + creditcard: "Veuillez entrer un numéro de carte de crédit valide.", + equalTo: "Veuillez entrer une nouvelle fois la même valeur.", + accept: "Veuillez entrer une valeur avec une extension valide.", + maxlength: jQuery.validator.format("Veuillez ne pas entrer plus de {0} caractères."), + minlength: jQuery.validator.format("Veuillez entrer au moins {0} caractères."), + rangelength: jQuery.validator.format("Veuillez entrer entre {0} et {1} caractères."), + range: jQuery.validator.format("Veuillez entrer une valeur entre {0} et {1}."), + max: jQuery.validator.format("Veuillez entrer une valeur inférieure ou égale à {0}."), + min: jQuery.validator.format("Veuillez entrer une valeur supérieure ou égale à {0}.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_ge.js b/bug/bug/jquery-validation-1.8.1/localization/messages_ge.js new file mode 100644 index 0000000..5c3ee68 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_ge.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: GE + */ +jQuery.extend(jQuery.validator.messages, { + required: "ამ ველის შევსება აუცილებელია.", + remote: "გთხოვთ მიუთითოთ სწორი მნიშვნელობა.", + email: "გთხოვთ მიუთითოთ ელ-ფოსტის კორექტული მისამართი.", + url: "გთხოვთ მიუთითოთ კორექტული URL.", + date: "გთხოვთ მიუთითოთ კორექტული თარიღი.", + dateISO: "გთხოვთ მიუთითოთ კორექტული თარიღი ISO ფორმატში.", + number: "გთხოვთ მიუთითოთ ციფრი.", + digits: "გთხოვთ მიუთითოთ მხოლოდ ციფრები.", + creditcard: "გთხოვთ მიუთითოთ საკრედიტო ბარათის კორექტული ნომერი.", + equalTo: "გთხოვთ მიუთითოთ ასეთივე მნიშვნელობა კიდევ ერთხელ.", + accept: "გთხოვთ აირჩიოთ ფაილი კორექტული გაფართოებით.", + maxlength: jQuery.validator.format("დასაშვებია არაუმეტეს {0} სიმბოლო."), + minlength: jQuery.validator.format("აუცილებელია შეიყვანოთ მინიმუმ {0} სიმბოლო."), + rangelength: jQuery.validator.format("ტექსტში სიმბოლოების რაოდენობა უნდა იყოს {0}-დან {1}-მდე."), + range: jQuery.validator.format("გთხოვთ შეიყვანოთ ციფრი {0}-დან {1}-მდე."), + max: jQuery.validator.format("გთხოვთ შეიყვანოთ ციფრი რომელიც ნაკლებია ან უდრის {0}-ს."), + min: jQuery.validator.format("გთხოვთ შეიყვანოთ ციფრი რომელიც მეტია ან უდრის {0}-ს.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_he.js b/bug/bug/jquery-validation-1.8.1/localization/messages_he.js new file mode 100644 index 0000000..c89eafe --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_he.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: HE + */ +jQuery.extend(jQuery.validator.messages, { + required: ".השדה הזה הינו שדה חובה", + remote: "נא לתקן שדה זה.", + email: "נא למלא כתובת דוא\"ל חוקית", + url: "נא למלא כתובת אינטרנט חוקית.", + date: "נא למלא תאריך חוקי", + dateISO: "נא למלא תאריך חוקי (ISO).", + number: "נא למלא מספר.", + digits: ".נא למלא רק מספרים", + creditcard: "נא למלא מספר כרטיס אשראי חוקי.", + equalTo: "נא למלא את אותו ערך שוב.", + accept: "נא למלא ערך עם סיומת חוקית.", + maxlength: jQuery.validator.format(".נא לא למלא יותר מ- {0} תווים"), + minlength: jQuery.validator.format("נא למלא לפחות {0} תווים."), + rangelength: jQuery.validator.format("נא למלא ערך בין {0} ל- {1} תווים."), + range: jQuery.validator.format("נא למלא ערך בין {0} ל- {1}."), + max: jQuery.validator.format("נא למלא ערך קטן או שווה ל- {0}."), + min: jQuery.validator.format("נא למלא ערך גדול או שווה ל- {0}.") +}); diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_hu.js b/bug/bug/jquery-validation-1.8.1/localization/messages_hu.js new file mode 100644 index 0000000..086222a --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_hu.js @@ -0,0 +1,20 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: HU + */ +jQuery.extend(jQuery.validator.messages, { + required: "Kötelező megadni.", + maxlength: jQuery.validator.format("Legfeljebb {0} karakter hosszú legyen."), + minlength: jQuery.validator.format("Legalább {0} karakter hosszú legyen."), + rangelength: jQuery.validator.format("Legalább {0} és legfeljebb {1} karakter hosszú legyen."), + email: "Érvényes e-mail címnek kell lennie.", + url: "Érvényes URL-nek kell lennie.", + date: "Dátumnak kell lennie.", + number: "Számnak kell lennie.", + digits: "Csak számjegyek lehetnek.", + equalTo: "Meg kell egyeznie a két értéknek.", + range: jQuery.validator.format("{0} és {1} közé kell esnie."), + max: jQuery.validator.format("Nem lehet nagyobb, mint {0}."), + min: jQuery.validator.format("Nem lehet kisebb, mint {0}."), + creditcard: "Érvényes hitelkártyaszámnak kell lennie." +}); diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_it.js b/bug/bug/jquery-validation-1.8.1/localization/messages_it.js new file mode 100644 index 0000000..ec44bca --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_it.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: IT + */ +jQuery.extend(jQuery.validator.messages, { + required: "Campo obbligatorio.", + remote: "Controlla questo campo.", + email: "Inserisci un indirizzo email valido.", + url: "Inserisci un indirizzo web valido.", + date: "Inserisci una data valida.", + dateISO: "Inserisci una data valida (ISO).", + number: "Inserisci un numero valido.", + digits: "Inserisci solo numeri.", + creditcard: "Inserisci un numero di carta di credito valido.", + equalTo: "Il valore non corrisponde.", + accept: "Inserisci un valore con un'estensione valida.", + maxlength: jQuery.validator.format("Non inserire più di {0} caratteri."), + minlength: jQuery.validator.format("Inserisci almeno {0} caratteri."), + rangelength: jQuery.validator.format("Inserisci un valore compreso tra {0} e {1} caratteri."), + range: jQuery.validator.format("Inserisci un valore compreso tra {0} e {1}."), + max: jQuery.validator.format("Inserisci un valore minore o uguale a {0}."), + min: jQuery.validator.format("Inserisci un valore maggiore o uguale a {0}.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_ja.js b/bug/bug/jquery-validation-1.8.1/localization/messages_ja.js new file mode 100644 index 0000000..62fc567 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_ja.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: JA (Japanese) + */ +jQuery.extend(jQuery.validator.messages, { + required: "このフィールドは必須です。", + remote: "このフィールドを修正してください。", + email: "有効なEメールアドレスを入力してください。", + url: "有効なURLを入力してください。", + date: "有効な日付を入力してください。", + dateISO: "有効な日付(ISO)を入力してください。", + number: "有効な数字を入力してください。", + digits: "数字のみを入力してください。", + creditcard: "有効なクレジットカード番号を入力してください。", + equalTo: "同じ値をもう一度入力してください。", + accept: "有効な拡張子を含む値を入力してください。", + maxlength: jQuery.format("{0} 文字以内で入力してください。"), + minlength: jQuery.format("{0} 文字以上で入力してください。"), + rangelength: jQuery.format("{0} 文字から {1} 文字までの値を入力してください。"), + range: jQuery.format("{0} から {1} までの値を入力してください。"), + max: jQuery.format("{0} 以下の値を入力してください。"), + min: jQuery.format("{1} 以上の値を入力してください。") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_kk.js b/bug/bug/jquery-validation-1.8.1/localization/messages_kk.js new file mode 100644 index 0000000..b377894 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_kk.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: KK + */ +jQuery.extend(jQuery.validator.messages, { + required: "Бұл өрісті міндетті түрде толтырыңыз.", + remote: "Дұрыс мағына енгізуіңізді сұраймыз.", + email: "Нақты электронды поштаңызды енгізуіңізді сұраймыз.", + url: "Нақты URL-ды енгізуіңізді сұраймыз.", + date: "Нақты URL-ды енгізуіңізді сұраймыз.", + dateISO: "Нақты ISO форматымен сәйкес датасын енгізуіңізді сұраймыз.", + number: "Күнді енгізуіңізді сұраймыз.", + digits: "Тек қана сандарды енгізуіңізді сұраймыз.", + creditcard: "Несие картасының нөмірін дұрыс енгізуіңізді сұраймыз.", + equalTo: "Осы мәнді қайта енгізуіңізді сұраймыз.", + accept: "Файлдың кеңейтуін дұрыс таңдаңыз.", + maxlength: jQuery.format("Ұзындығы {0} символдан көр болмасын."), + minlength: jQuery.format("Ұзындығы {0} символдан аз болмасын."), + rangelength: jQuery.format("Ұзындығы {0}-{1} дейін мән енгізуіңізді сұраймыз."), + range: jQuery.format("Пожалуйста, введите число от {0} до {1}. - {0} - {1} санын енгізуіңізді сұраймыз."), + max: jQuery.format("{0} аз немесе тең санын енгізуіңіді сұраймыз."), + min: jQuery.format("{0} көп немесе тең санын енгізуіңізді сұраймыз.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_lt.js b/bug/bug/jquery-validation-1.8.1/localization/messages_lt.js new file mode 100644 index 0000000..a890dbe --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_lt.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin in lithuanian. + * Locale: LT + */ +jQuery.extend(jQuery.validator.messages, { + required: "Šis laukas yra privalomas.", + remote: "Prašau pataisyti šį lauką.", + email: "Prašau įvesti teisingą elektroninio pašto adresą.", + url: "Prašau įvesti teisingą URL.", + date: "Prašau įvesti teisingą datą.", + dateISO: "Prašau įvesti teisingą datą (ISO).", + number: "Prašau įvesti teisingą skaičių.", + digits: "Prašau naudoti tik skaitmenis.", + creditcard: "Prašau įvesti teisingą kreditinės kortelės numerį.", + equalTo: "Prašau įvestį tą pačią reikšmę dar kartą.", + accept: "Prašau įvesti reikšmę su teisingu plėtiniu.", + maxlength: $.format("Prašau įvesti ne daugiau kaip {0} simbolių."), + minlength: $.format("Prašau įvesti bent {0} simbolius."), + rangelength: $.format("Prašau įvesti reikšmes, kurių ilgis nuo {0} iki {1} simbolių."), + range: $.format("Prašau įvesti reikšmę intervale nuo {0} iki {1}."), + max: $.format("Prašau įvesti reikšmę mažesnę arba lygią {0}."), + min: $.format("Prašau įvesti reikšmę didesnę arba lygią {0}.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_lv.js b/bug/bug/jquery-validation-1.8.1/localization/messages_lv.js new file mode 100644 index 0000000..944e918 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_lv.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: LV + */ +jQuery.extend(jQuery.validator.messages, { + required: "Šis lauks ir obligāts.", + remote: "Lūdzu, pārbaudiet šo lauku.", + email: "Lūdzu, ievadiet derīgu e-pasta adresi.", + url: "Lūdzu, ievadiet derīgu URL adresi.", + date: "Lūdzu, ievadiet derīgu datumu.", + dateISO: "Lūdzu, ievadiet derīgu datumu (ISO).", + number: "Lūdzu, ievadiet derīgu numuru.", + digits: "Lūdzu, ievadiet tikai ciparus.", + creditcard: "Lūdzu, ievadiet derīgu kredītkartes numuru.", + equalTo: "Lūdzu, ievadiet to pašu vēlreiz.", + accept: "Lūdzu, ievadiet vērtību ar derīgu paplašinājumu.", + maxlength: jQuery.validator.format("Lūdzu, ievadiet ne vairāk kā {0} rakstzīmes."), + minlength: jQuery.validator.format("Lūdzu, ievadiet vismaz {0} rakstzīmes."), + rangelength: jQuery.validator.format("Lūdzu ievadiet {0} līdz {1} rakstzīmes."), + range: jQuery.validator.format("Lūdzu, ievadiet skaitli no {0} līdz {1}."), + max: jQuery.validator.format("Lūdzu, ievadiet skaitli, kurš ir mazāks vai vienāds ar {0}."), + min: jQuery.validator.format("Lūdzu, ievadiet skaitli, kurš ir lielāks vai vienāds ar {0}.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_nl.js b/bug/bug/jquery-validation-1.8.1/localization/messages_nl.js new file mode 100644 index 0000000..e266158 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_nl.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: NL + */ +jQuery.extend(jQuery.validator.messages, { + required: "Dit is een verplicht veld.", + remote: "Controleer dit veld.", + email: "Vul hier een geldig e-mailadres in.", + url: "Vul hier een geldige URL in.", + date: "Vul hier een geldige datum in.", + dateISO: "Vul hier een geldige datum in (ISO-formaat).", + number: "Vul hier een geldig getal in.", + digits: "Vul hier alleen getallen in.", + creditcard: "Vul hier een geldig creditcardnummer in.", + equalTo: "Vul hier dezelfde waarde in.", + accept: "Vul hier een waarde in met een geldige extensie.", + maxlength: jQuery.validator.format("Vul hier maximaal {0} tekens in."), + minlength: jQuery.validator.format("Vul hier minimaal {0} tekens in."), + rangelength: jQuery.validator.format("Vul hier een waarde in van minimaal {0} en maximaal {1} tekens."), + range: jQuery.validator.format("Vul hier een waarde in van minimaal {0} en maximaal {1}."), + max: jQuery.validator.format("Vul hier een waarde in kleiner dan of gelijk aan {0}."), + min: jQuery.validator.format("Vul hier een waarde in groter dan of gelijk aan {0}.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_no.js b/bug/bug/jquery-validation-1.8.1/localization/messages_no.js new file mode 100644 index 0000000..89706fc --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_no.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: NO (Norwegian) + */ +jQuery.extend(jQuery.validator.messages, { + required: "Dette feltet er obligatorisk.", + maxlength: jQuery.validator.format("Maksimalt {0} tegn."), + minlength: jQuery.validator.format("Minimum {0} tegn."), + rangelength: jQuery.validator.format("Angi minimum {0} og maksimum {1} tegn."), + email: "Oppgi en gyldig epostadresse.", + url: "Angi en gyldig URL.", + date: "Angi en gyldig dato.", + dateISO: "Angi en gyldig dato (&ARING;&ARING;&ARING;&ARING;-MM-DD).", + dateSE: "Angi en gyldig dato.", + number: "Angi et gyldig nummer.", + numberSE: "Angi et gyldig nummer.", + digits: "Skriv kun tall.", + equalTo: "Skriv samme verdi igjen.", + range: jQuery.validator.format("Angi en verdi mellom {0} og {1}."), + max: jQuery.validator.format("Angi en verdi som er større eller lik {0}."), + min: jQuery.validator.format("Angi en verdi som er mindre eller lik {0}."), + creditcard: "Angi et gyldig kredittkortnummer." +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_pl.js b/bug/bug/jquery-validation-1.8.1/localization/messages_pl.js new file mode 100644 index 0000000..27190d8 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_pl.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: PL + */ +jQuery.extend(jQuery.validator.messages, { + required: "To pole jest wymagane.", + remote: "Proszę o wypełnienie tego pola.", + email: "Proszę o podanie prawidłowego adresu email.", + url: "Proszę o podanie prawidłowego URL.", + date: "Proszę o podanie prawidłowej daty.", + dateISO: "Proszę o podanie prawidłowej daty (ISO).", + number: "Proszę o podanie prawidłowej liczby.", + digits: "Proszę o podanie samych cyfr.", + creditcard: "Proszę o podanie prawidłowej karty kredytowej.", + equalTo: "Proszę o podanie tej samej wartości ponownie.", + accept: "Proszę o podanie wartości z prawidłowym rozszerzeniem.", + maxlength: jQuery.validator.format("Proszę o podanie nie więcej niż {0} znaków."), + minlength: jQuery.validator.format("Proszę o podanie przynajmniej {0} znaków."), + rangelength: jQuery.validator.format("Proszę o podanie wartości o długości od {0} do {1} znaków."), + range: jQuery.validator.format("Proszę o podanie wartości z przedziału od {0} do {1}."), + max: jQuery.validator.format("Proszę o podanie wartości mniejszej bądź równej {0}."), + min: jQuery.validator.format("Proszę o podanie wartości większej bądź równej {0}.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_ptbr.js b/bug/bug/jquery-validation-1.8.1/localization/messages_ptbr.js new file mode 100644 index 0000000..0711857 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_ptbr.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: PT_BR + */ +jQuery.extend(jQuery.validator.messages, { + required: "Este campo é requerido.", + remote: "Por favor, corrija este campo.", + email: "Por favor, forneça um endereço eletrônico válido.", + url: "Por favor, forneça uma URL válida.", + date: "Por favor, forneça uma data válida.", + dateISO: "Por favor, forneça uma data válida (ISO).", + number: "Por favor, forneça um número válida.", + digits: "Por favor, forneça somente dígitos.", + creditcard: "Por favor, forneça um cartão de crédito válido.", + equalTo: "Por favor, forneça o mesmo valor novamente.", + accept: "Por favor, forneça um valor com uma extensão válida.", + maxlength: jQuery.validator.format("Por favor, forneça não mais que {0} caracteres."), + minlength: jQuery.validator.format("Por favor, forneça ao menos {0} caracteres."), + rangelength: jQuery.validator.format("Por favor, forneça um valor entre {0} e {1} caracteres de comprimento."), + range: jQuery.validator.format("Por favor, forneça um valor entre {0} e {1}."), + max: jQuery.validator.format("Por favor, forneça um valor menor ou igual a {0}."), + min: jQuery.validator.format("Por favor, forneça um valor maior ou igual a {0}.") +}); diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_ptpt.js b/bug/bug/jquery-validation-1.8.1/localization/messages_ptpt.js new file mode 100644 index 0000000..1e3fea2 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_ptpt.js @@ -0,0 +1,23 @@ +/** + * Translated default messages for the jQuery validation plugin. + * Locale: PT_PT + */ +jQuery.extend(jQuery.validator.messages, { + required: "Campo de preenchimento obrigatório.", + remote: "Por favor, corrija este campo.", + email: "Por favor, introduza um endereço eletrónico válido.", + url: "Por favor, introduza um URL válido.", + date: "Por favor, introduza uma data válida.", + dateISO: "Por favor, introduza uma data válida (ISO).", + number: "Por favor, introduza um número válido.", + digits: "Por favor, introduza apenas dígitos.", + creditcard: "Por favor, introduza um número de cartão de crédito válido.", + equalTo: "Por favor, introduza de novo o mesmo valor.", + accept: "Por favor, introduza um ficheiro com uma extensão válida.", + maxlength: jQuery.validator.format("Por favor, não introduza mais do que {0} caracteres."), + minlength: jQuery.validator.format("Por favor, introduza pelo menos {0} caracteres."), + rangelength: jQuery.validator.format("Por favor, introduza entre {0} e {1} caracteres."), + range: jQuery.validator.format("Por favor, introduza um valor entre {0} e {1}."), + max: jQuery.validator.format("Por favor, introduza um valor menor ou igual a {0}."), + min: jQuery.validator.format("Por favor, introduza um valor maior ou igual a {0}.") +}); diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_ro.js b/bug/bug/jquery-validation-1.8.1/localization/messages_ro.js new file mode 100644 index 0000000..ae9a67c --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_ro.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: RO + */ +jQuery.extend(jQuery.validator.messages, { + required: "Acest câmp este obligatoriu.", + remote: "Te rugăm să completezi acest câmp.", + email: "Te rugăm să introduci o adresă de email validă", + url: "Te rugăm sa introduci o adresă URL validă.", + date: "Te rugăm să introduci o dată corectă.", + dateISO: "Te rugăm să introduci o dată (ISO) corectă.", + number: "Te rugăm să introduci un număr întreg valid.", + digits: "Te rugăm să introduci doar cifre.", + creditcard: "Te rugăm să introduci un numar de carte de credit valid.", + equalTo: "Te rugăm să reintroduci valoarea.", + accept: "Te rugăm să introduci o valoare cu o extensie validă.", + maxlength: jQuery.validator.format("Te rugăm să nu introduci mai mult de {0} caractere."), + minlength: jQuery.validator.format("Te rugăm să introduci cel puțin {0} caractere."), + rangelength: jQuery.validator.format("Te rugăm să introduci o valoare între {0} și {1} caractere."), + range: jQuery.validator.format("Te rugăm să introduci o valoare între {0} și {1}."), + max: jQuery.validator.format("Te rugăm să introduci o valoare egal sau mai mică decât {0}."), + min: jQuery.validator.format("Te rugăm să introduci o valoare egal sau mai mare decât {0}.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_ru.js b/bug/bug/jquery-validation-1.8.1/localization/messages_ru.js new file mode 100644 index 0000000..419ac24 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_ru.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: RU + */ +jQuery.extend(jQuery.validator.messages, { + required: "Это поле необходимо заполнить.", + remote: "Пожалуйста, введите правильное значение.", + email: "Пожалуйста, введите корретный адрес электронной почты.", + url: "Пожалуйста, введите корректный URL.", + date: "Пожалуйста, введите корректную дату.", + dateISO: "Пожалуйста, введите корректную дату в формате ISO.", + number: "Пожалуйста, введите число.", + digits: "Пожалуйста, вводите только цифры.", + creditcard: "Пожалуйста, введите правильный номер кредитной карты.", + equalTo: "Пожалуйста, введите такое же значение ещё раз.", + accept: "Пожалуйста, выберите файл с правильным расширением.", + maxlength: jQuery.validator.format("Пожалуйста, введите не больше {0} символов."), + minlength: jQuery.validator.format("Пожалуйста, введите не меньше {0} символов."), + rangelength: jQuery.validator.format("Пожалуйста, введите значение длиной от {0} до {1} символов."), + range: jQuery.validator.format("Пожалуйста, введите число от {0} до {1}."), + max: jQuery.validator.format("Пожалуйста, введите число, меньшее или равное {0}."), + min: jQuery.validator.format("Пожалуйста, введите число, большее или равное {0}.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_se.js b/bug/bug/jquery-validation-1.8.1/localization/messages_se.js new file mode 100644 index 0000000..3dee369 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_se.js @@ -0,0 +1,21 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: SE + */ +jQuery.extend(jQuery.validator.messages, { + required: "Detta fält är obligatoriskt.", + maxlength: jQuery.validator.format("Du får ange högst {0} tecken."), + minlength: jQuery.validator.format("Du måste ange minst {0} tecken."), + rangelength: jQuery.validator.format("Ange minst {0} och max {1} tecken."), + email: "Ange en korrekt e-postadress.", + url: "Ange en korrekt URL.", + date: "Ange ett korrekt datum.", + dateISO: "Ange ett korrekt datum (&ARING;&ARING;&ARING;&ARING;-MM-DD).", + number: "Ange ett korrekt nummer.", + digits: "Ange endast siffror.", + equalTo: "Ange samma värde igen.", + range: jQuery.validator.format("Ange ett värde mellan {0} och {1}."), + max: jQuery.validator.format("Ange ett värde som är större eller lika med {0}."), + min: jQuery.validator.format("Ange ett värde som är mindre eller lika med {0}."), + creditcard: "Ange ett korrekt kreditkortsnummer." +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_si.js b/bug/bug/jquery-validation-1.8.1/localization/messages_si.js new file mode 100644 index 0000000..b8d8d7d --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_si.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: SI (Slovenian) + */ +jQuery.extend(jQuery.validator.messages, { + required: "To polje je obvezno.", + remote: "Vpis v tem polju ni v pravi obliki.", + email: "Prosimo, vnesite pravi email naslov.", + url: "Prosimo, vnesite pravi URL.", + date: "Prosimo, vnesite pravi datum.", + dateISO: "Prosimo, vnesite pravi datum (ISO).", + number: "Prosimo, vnesite pravo številko.", + digits: "Prosimo, vnesite samo številke.", + creditcard: "Prosimo, vnesite pravo številko kreditne kartice.", + equalTo: "Prosimo, ponovno vnesite enako vsebino.", + accept: "Prosimo, vnesite vsebino z pravo končnico.", + maxlength: $.validator.format("Prosimo, da ne vnašate več kot {0} znakov."), + minlength: $.validator.format("Prosimo, vnesite vsaj {0} znakov."), + rangelength: $.validator.format("Prosimo, vnesite od {0} do {1} znakov."), + range: $.validator.format("Prosimo, vnesite vrednost med {0} in {1}."), + max: $.validator.format("Prosimo, vnesite vrednost manjšo ali enako {0}."), + min: $.validator.format("Prosimo, vnesite vrednost večjo ali enako {0}.") +}); diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_sk.js b/bug/bug/jquery-validation-1.8.1/localization/messages_sk.js new file mode 100644 index 0000000..442d31d --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_sk.js @@ -0,0 +1,20 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: SK + */ +jQuery.extend(jQuery.validator.messages, { + required: "Povinné zadať.", + maxlength: jQuery.validator.format("Maximálne {0} znakov."), + minlength: jQuery.validator.format("Minimálne {0} znakov."), + rangelength: jQuery.validator.format("Minimálne {0} a Maximálne {0} znakov."), + email: "E-mailová adresa musí byť platná.", + url: "URL musí byť platný.", + date: "Musí byť dátum.", + number: "Musí byť číslo.", + digits: "Môže obsahovať iba číslice.", + equalTo: "Dva hodnoty sa musia rovnať.", + range: jQuery.validator.format("Musí byť medzi {0} a {1}."), + max: jQuery.validator.format("Nemôže byť viac ako{0}."), + min: jQuery.validator.format("Nemôže byť menej ako{0}."), + creditcard: "Číslo platobnej karty musí byť platné." +}); diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_sr.js b/bug/bug/jquery-validation-1.8.1/localization/messages_sr.js new file mode 100644 index 0000000..1a89174 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_sr.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: SR + */ +jQuery.extend(jQuery.validator.messages, { + required: "Поље је обавезно.", + remote: "Средите ово поље.", + email: "Унесите исправну и-мејл адресу", + url: "Унесите исправан URL.", + date: "Унесите исправан датум.", + dateISO: "Унесите исправан датум (ISO).", + number: "Унесите исправан број.", + digits: "Унесите само цифе.", + creditcard: "Унесите исправан број кредитне картице.", + equalTo: "Унесите исту вредност поново.", + accept: "Унесите вредност са одговарајућом екстензијом.", + maxlength: $.validator.format("Унесите мање од {0}карактера."), + minlength: $.validator.format("Унесите барем {0} карактера."), + rangelength: $.validator.format("Унесите вредност дугачку између {0} и {1} карактера."), + range: $.validator.format("Унесите вредност између {0} и {1}."), + max: $.validator.format("Унесите вредност мању или једнаку {0}."), + min: $.validator.format("Унесите вредност већу или једнаку {0}.") +}); diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_th.js b/bug/bug/jquery-validation-1.8.1/localization/messages_th.js new file mode 100644 index 0000000..e40fb67 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_th.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: TH (Thai) + */ +jQuery.extend(jQuery.validator.messages, { + required: "โปรดระบุ", + remote: "โปรดแก้ไขให้ถูกต้อง", + email: "โปรดระบุที่อยู่อีเมล์ที่ถูกต้อง", + url: "โปรดระบุ URL ที่ถูกต้อง", + date: "โปรดระบุวันที่ ที่ถูกต้อง", + dateISO: "โปรดระบุวันที่ ที่ถูกต้อง (ระบบ ISO).", + number: "โปรดระบุทศนิยมที่ถูกต้อง", + digits: "โปรดระบุจำนวนเต็มที่ถูกต้อง", + creditcard: "โปรดระบุรหัสบัตรเครดิตที่ถูกต้อง", + equalTo: "โปรดระบุค่าเดิมอีกครั้ง", + accept: "โปรดระบุค่าที่มีส่วนขยายที่ถูกต้อง", + maxlength: jQuery.validator.format("โปรดอย่าระบุค่าที่ยาวกว่า {0} อักขระ"), + minlength: jQuery.validator.format("โปรดอย่าระบุค่าที่สั้นกว่า {0} อักขระ"), + rangelength: jQuery.validator.format("โปรดอย่าระบุค่าความยาวระหว่าง {0} ถึง {1} อักขระ"), + range: jQuery.validator.format("โปรดระบุค่าระหว่าง {0} และ {1}"), + max: jQuery.validator.format("โปรดระบุค่าน้อยกว่าหรือเท่ากับ {0}"), + min: jQuery.validator.format("โปรดระบุค่ามากกว่าหรือเท่ากับ {0}") +}); diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_tr.js b/bug/bug/jquery-validation-1.8.1/localization/messages_tr.js new file mode 100644 index 0000000..9df81e4 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_tr.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: TR + */ +jQuery.extend(jQuery.validator.messages, { + required: "Bu alanın doldurulması zorunludur.", + remote: "Lütfen bu alanı düzeltin.", + email: "Lütfen geçerli bir e-posta adresi giriniz.", + url: "Lütfen geçerli bir web adresi (URL) giriniz.", + date: "Lütfen geçerli bir tarih giriniz.", + dateISO: "Lütfen geçerli bir tarih giriniz(ISO formatında)", + number: "Lütfen geçerli bir sayı giriniz.", + digits: "Lütfen sadece sayısal karakterler giriniz.", + creditcard: "Lütfen geçerli bir kredi kartı giriniz.", + equalTo: "Lütfen aynı değeri tekrar giriniz.", + accept: "Lütfen geçerli uzantıya sahip bir değer giriniz.", + maxlength: jQuery.validator.format("Lütfen en fazla {0} karakter uzunluğunda bir değer giriniz."), + minlength: jQuery.validator.format("Lütfen en az {0} karakter uzunluğunda bir değer giriniz."), + rangelength: jQuery.validator.format("Lütfen en az {0} ve en fazla {1} uzunluğunda bir değer giriniz."), + range: jQuery.validator.format("Lütfen {0} ile {1} arasında bir değer giriniz."), + max: jQuery.validator.format("Lütfen {0} değerine eşit ya da daha küçük bir değer giriniz."), + min: jQuery.validator.format("Lütfen {0} değerine eşit ya da daha büyük bir değer giriniz.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_tw.js b/bug/bug/jquery-validation-1.8.1/localization/messages_tw.js new file mode 100644 index 0000000..2481535 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_tw.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: TW (Taiwan - Traditional Chinese) + */ +jQuery.extend(jQuery.validator.messages, { + required: "必填", + remote: "請修正此欄位", + email: "請輸入正確的電子信箱", + url: "請輸入合法的URL", + date: "請輸入合法的日期", + dateISO: "請輸入合法的日期 (ISO).", + number: "請輸入數字", + digits: "請輸入整數", + creditcard: "請輸入合法的信用卡號碼", + equalTo: "請重複輸入一次", + accept: "請輸入有效的後缀字串", + maxlength: jQuery.validator.format("請輸入長度不大於{0} 的字串"), + minlength: jQuery.validator.format("請輸入長度不小於 {0} 的字串"), + rangelength: jQuery.validator.format("請輸入長度介於 {0} 和 {1} 之間的字串"), + range: jQuery.validator.format("請輸入介於 {0} 和 {1} 之間的數值"), + max: jQuery.validator.format("請輸入不大於 {0} 的數值"), + min: jQuery.validator.format("請輸入不小於 {0} 的數值") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_ua.js b/bug/bug/jquery-validation-1.8.1/localization/messages_ua.js new file mode 100644 index 0000000..25434a6 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_ua.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: UA (Ukrainian) + */ +jQuery.extend(jQuery.validator.messages, { + required: "Це поле необхідно заповнити.", + remote: "Будь ласка, введіть правильне значення.", + email: "Будь ласка, введіть коректну адресу електронної пошти.", + url: "Будь ласка, введіть коректний URL.", + date: "Будь ласка, введіть коректну дату.", + dateISO: "Будь ласка, введіть коректну дату у форматі ISO.", + number: "Будь ласка, введіть число.", + digits: "Вводите потрібно лише цифри.", + creditcard: "Будь ласка, введіть правильний номер кредитної карти.", + equalTo: "Будь ласка, введіть таке ж значення ще раз.", + accept: "Будь ласка, виберіть файл з правильним розширенням.", + maxlength: jQuery.validator.format("Будь ласка, введіть не більше {0} символів."), + minlength: jQuery.validator.format("Будь ласка, введіть не менше {0} символів."), + rangelength: jQuery.validator.format("Будь ласка, введіть значення довжиною від {0} до {1} символів."), + range: jQuery.validator.format("Будь ласка, введіть число від {0} до {1}."), + max: jQuery.validator.format("Будь ласка, введіть число, менше або рівно {0}."), + min: jQuery.validator.format("Будь ласка, введіть число, більше або рівно {0}.") +}); diff --git a/bug/bug/jquery-validation-1.8.1/localization/messages_vi.js b/bug/bug/jquery-validation-1.8.1/localization/messages_vi.js new file mode 100644 index 0000000..9170547 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/messages_vi.js @@ -0,0 +1,23 @@ +/* + * Translated default messages for the jQuery validation plugin. + * Locale: VI (Vietnamese) + */ +jQuery.extend(jQuery.validator.messages, { + required: "Hãy nhập.", + remote: "Hãy sửa cho đúng.", + email: "Hãy nhập email.", + url: "Hãy nhập URL.", + date: "Hãy nhập ngày.", + dateISO: "Hãy nhập ngày (ISO).", + number: "Hãy nhập số.", + digits: "Hãy nhập chữ số.", + creditcard: "Hãy nhập số thẻ tín dụng.", + equalTo: "Hãy nhập thêm lần nữa.", + accept: "Phần mở rộng không đúng.", + maxlength: jQuery.format("Hãy nhập từ {0} kí tự trở xuống."), + minlength: jQuery.format("Hãy nhập từ {0} kí tự trở lên."), + rangelength: jQuery.format("Hãy nhập từ {0} đến {1} kí tự."), + range: jQuery.format("Hãy nhập từ {0} đến {1}."), + max: jQuery.format("Hãy nhập từ {0} trở xuống."), + min: jQuery.format("Hãy nhập từ {1} trở lên.") +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/methods_de.js b/bug/bug/jquery-validation-1.8.1/localization/methods_de.js new file mode 100644 index 0000000..3e8ac84 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/methods_de.js @@ -0,0 +1,12 @@ +/* + * Localized default methods for the jQuery validation plugin. + * Locale: DE + */ +jQuery.extend(jQuery.validator.methods, { + date: function(value, element) { + return this.optional(element) || /^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value); + }, + number: function(value, element) { + return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value); + } +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/methods_nl.js b/bug/bug/jquery-validation-1.8.1/localization/methods_nl.js new file mode 100644 index 0000000..152e94d --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/methods_nl.js @@ -0,0 +1,9 @@ +/* + * Localized default methods for the jQuery validation plugin. + * Locale: NL + */ +jQuery.extend(jQuery.validator.methods, { + date: function(value, element) { + return this.optional(element) || /^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value); + } +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/localization/methods_pt.js b/bug/bug/jquery-validation-1.8.1/localization/methods_pt.js new file mode 100644 index 0000000..21879d3 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/localization/methods_pt.js @@ -0,0 +1,9 @@ +/* + * Localized default methods for the jQuery validation plugin. + * Locale: PT_BR + */ +jQuery.extend(jQuery.validator.methods, { + date: function(value, element) { + return this.optional(element) || /^\d\d?\/\d\d?\/\d\d\d?\d?$/.test(value); + } +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/test/events.html b/bug/bug/jquery-validation-1.8.1/test/events.html new file mode 100644 index 0000000..a651519 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/events.html @@ -0,0 +1,71 @@ + + + + +Test for jQuery validate() plugin + + + + + + + + + + + +
+
+ A simple comment form with submit validation and default messages +

+ + +

+ + +

+

+ + +

+

+ + +

+

+ +

+
+
+ + + + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/test/firebug/errorIcon.png b/bug/bug/jquery-validation-1.8.1/test/firebug/errorIcon.png new file mode 100644 index 0000000..2d75261 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/test/firebug/errorIcon.png differ diff --git a/bug/bug/jquery-validation-1.8.1/test/firebug/firebug.css b/bug/bug/jquery-validation-1.8.1/test/firebug/firebug.css new file mode 100644 index 0000000..1f041c4 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/firebug/firebug.css @@ -0,0 +1,209 @@ + +html, body { + margin: 0; + background: #FFFFFF; + font-family: Lucida Grande, Tahoma, sans-serif; + font-size: 11px; + overflow: hidden; +} + +a { + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +.toolbar { + height: 14px; + border-top: 1px solid ThreeDHighlight; + border-bottom: 1px solid ThreeDShadow; + padding: 2px 6px; + background: ThreeDFace; +} + +.toolbarRight { + position: absolute; + top: 4px; + right: 6px; +} + +#log { + overflow: auto; + position: absolute; + left: 0; + width: 100%; +} + +#commandLine { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 18px; + border: none; + border-top: 1px solid ThreeDShadow; +} + +/************************************************************************************************/ + +.logRow { + position: relative; + border-bottom: 1px solid #D7D7D7; + padding: 2px 4px 1px 6px; + background-color: #FFFFFF; +} + +.logRow-command { + font-family: Monaco, monospace; + color: blue; +} + +.objectBox-null { + padding: 0 2px; + border: 1px solid #666666; + background-color: #888888; + color: #FFFFFF; +} + +.objectBox-string { + font-family: Monaco, monospace; + color: red; + white-space: pre; +} + +.objectBox-number { + color: #000088; +} + +.objectBox-function { + font-family: Monaco, monospace; + color: DarkGreen; +} + +.objectBox-object { + color: DarkGreen; + font-weight: bold; +} + +/************************************************************************************************/ + +.logRow-info, +.logRow-error, +.logRow-warning { + background: #FFFFFF no-repeat 2px 2px; + padding-left: 20px; + padding-bottom: 3px; +} + +.logRow-info { + background-image: url(infoIcon.png); +} + +.logRow-warning { + background-color: cyan; + background-image: url(warningIcon.png); +} + +.logRow-error { + background-color: LightYellow; + background-image: url(errorIcon.png); +} + +.errorMessage { + vertical-align: top; + color: #FF0000; +} + +.objectBox-sourceLink { + position: absolute; + right: 4px; + top: 2px; + padding-left: 8px; + font-family: Lucida Grande, sans-serif; + font-weight: bold; + color: #0000FF; +} + +/************************************************************************************************/ + +.logRow-group { + background: #EEEEEE; + border-bottom: none; +} + +.logGroup { + background: #EEEEEE; +} + +.logGroupBox { + margin-left: 24px; + border-top: 1px solid #D7D7D7; + border-left: 1px solid #D7D7D7; +} + +/************************************************************************************************/ + +.selectorTag, +.selectorId, +.selectorClass { + font-family: Monaco, monospace; + font-weight: normal; +} + +.selectorTag { + color: #0000FF; +} + +.selectorId { + color: DarkBlue; +} + +.selectorClass { + color: red; +} + +/************************************************************************************************/ + +.objectBox-element { + font-family: Monaco, monospace; + color: #000088; +} + +.nodeChildren { + margin-left: 16px; +} + +.nodeTag { + color: blue; +} + +.nodeValue { + color: #FF0000; + font-weight: normal; +} + +.nodeText, +.nodeComment { + margin: 0 2px; + vertical-align: top; +} + +.nodeText { + color: #333333; +} + +.nodeComment { + color: DarkGreen; +} + +/************************************************************************************************/ + +.propertyNameCell { + vertical-align: top; +} + +.propertyName { + font-weight: bold; +} diff --git a/bug/bug/jquery-validation-1.8.1/test/firebug/firebug.html b/bug/bug/jquery-validation-1.8.1/test/firebug/firebug.html new file mode 100644 index 0000000..861e639 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/firebug/firebug.html @@ -0,0 +1,23 @@ + + + + + + Firebug + + + + +
+ Clear + + Close + +
+
+ + + + + diff --git a/bug/bug/jquery-validation-1.8.1/test/firebug/firebug.js b/bug/bug/jquery-validation-1.8.1/test/firebug/firebug.js new file mode 100644 index 0000000..eb853b8 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/firebug/firebug.js @@ -0,0 +1,672 @@ + +if (!("console" in window) || !("firebug" in console)) { +(function() +{ + window.console = + { + log: function() + { + logFormatted(arguments, ""); + }, + + debug: function() + { + logFormatted(arguments, "debug"); + }, + + info: function() + { + logFormatted(arguments, "info"); + }, + + warn: function() + { + logFormatted(arguments, "warning"); + }, + + error: function() + { + logFormatted(arguments, "error"); + }, + + assert: function(truth, message) + { + if (!truth) + { + var args = []; + for (var i = 1; i < arguments.length; ++i) + args.push(arguments[i]); + + logFormatted(args.length ? args : ["Assertion Failure"], "error"); + throw message ? message : "Assertion Failure"; + } + }, + + dir: function(object) + { + var html = []; + + var pairs = []; + for (var name in object) + { + try + { + pairs.push([name, object[name]]); + } + catch (exc) + { + } + } + + pairs.sort(function(a, b) { return a[0] < b[0] ? -1 : 1; }); + + html.push(''); + for (var i = 0; i < pairs.length; ++i) + { + var name = pairs[i][0], value = pairs[i][1]; + + html.push('', + '', ''); + } + html.push('
', + escapeHTML(name), ''); + appendObject(value, html); + html.push('
'); + + logRow(html, "dir"); + }, + + dirxml: function(node) + { + var html = []; + + appendNode(node, html); + logRow(html, "dirxml"); + }, + + group: function() + { + logRow(arguments, "group", pushGroup); + }, + + groupEnd: function() + { + logRow(arguments, "", popGroup); + }, + + time: function(name) + { + timeMap[name] = (new Date()).getTime(); + }, + + timeEnd: function(name) + { + if (name in timeMap) + { + var delta = (new Date()).getTime() - timeMap[name]; + logFormatted([name+ ":", delta+"ms"]); + delete timeMap[name]; + } + }, + + count: function() + { + this.warn(["count() not supported."]); + }, + + trace: function() + { + this.warn(["trace() not supported."]); + }, + + profile: function() + { + this.warn(["profile() not supported."]); + }, + + profileEnd: function() + { + }, + + clear: function() + { + consoleBody.innerHTML = ""; + }, + + open: function() + { + toggleConsole(true); + }, + + close: function() + { + if (frameVisible) + toggleConsole(); + } + }; + + // ******************************************************************************************** + + var consoleFrame = null; + var consoleBody = null; + var commandLine = null; + + var frameVisible = false; + var messageQueue = []; + var groupStack = []; + var timeMap = {}; + + var clPrefix = ">>> "; + + var isFirefox = navigator.userAgent.indexOf("Firefox") != -1; + var isIE = navigator.userAgent.indexOf("MSIE") != -1; + var isOpera = navigator.userAgent.indexOf("Opera") != -1; + var isSafari = navigator.userAgent.indexOf("AppleWebKit") != -1; + + // ******************************************************************************************** + + function toggleConsole(forceOpen) + { + frameVisible = forceOpen || !frameVisible; + if (consoleFrame) + consoleFrame.style.visibility = frameVisible ? "visible" : "hidden"; + else + waitForBody(); + } + + function focusCommandLine() + { + toggleConsole(true); + if (commandLine) + commandLine.focus(); + } + + function waitForBody() + { + if (document.body) + createFrame(); + else + setTimeout(waitForBody, 200); + } + + function createFrame() + { + if (consoleFrame) + return; + + window.onFirebugReady = function(doc) + { + window.onFirebugReady = null; + + var toolbar = doc.getElementById("toolbar"); + toolbar.onmousedown = onSplitterMouseDown; + + commandLine = doc.getElementById("commandLine"); + addEvent(commandLine, "keydown", onCommandLineKeyDown); + + addEvent(doc, isIE || isSafari ? "keydown" : "keypress", onKeyDown); + + consoleBody = doc.getElementById("log"); + layout(); + flush(); + } + + var baseURL = getFirebugURL(); + + consoleFrame = document.createElement("iframe"); + consoleFrame.setAttribute("src", baseURL+"/firebug.html"); + consoleFrame.setAttribute("frameBorder", "0"); + consoleFrame.style.visibility = (frameVisible ? "visible" : "hidden"); + consoleFrame.style.zIndex = "2147483647"; + consoleFrame.style.position = "fixed"; + consoleFrame.style.width = "100%"; + consoleFrame.style.left = "0"; + consoleFrame.style.bottom = "0"; + consoleFrame.style.height = "200px"; + document.body.appendChild(consoleFrame); + } + + function getFirebugURL() + { + var scripts = document.getElementsByTagName("script"); + for (var i = 0; i < scripts.length; ++i) + { + if (scripts[i].src.indexOf("firebug.js") != -1) + { + var lastSlash = scripts[i].src.lastIndexOf("/"); + return scripts[i].src.substr(0, lastSlash); + } + } + } + + function evalCommandLine() + { + var text = commandLine.value; + commandLine.value = ""; + + logRow([clPrefix, text], "command"); + + var value; + try + { + value = eval(text); + } + catch (exc) + { + } + + console.log(value); + } + + function layout() + { + var toolbar = consoleBody.ownerDocument.getElementById("toolbar"); + var height = consoleFrame.offsetHeight - (toolbar.offsetHeight + commandLine.offsetHeight); + consoleBody.style.top = toolbar.offsetHeight + "px"; + consoleBody.style.height = height + "px"; + + commandLine.style.top = (consoleFrame.offsetHeight - commandLine.offsetHeight) + "px"; + } + + function logRow(message, className, handler) + { + if (consoleBody) + writeMessage(message, className, handler); + else + { + messageQueue.push([message, className, handler]); + waitForBody(); + } + } + + function flush() + { + var queue = messageQueue; + messageQueue = []; + + for (var i = 0; i < queue.length; ++i) + writeMessage(queue[i][0], queue[i][1], queue[i][2]); + } + + function writeMessage(message, className, handler) + { + var isScrolledToBottom = + consoleBody.scrollTop + consoleBody.offsetHeight >= consoleBody.scrollHeight; + + if (!handler) + handler = writeRow; + + handler(message, className); + + if (isScrolledToBottom) + consoleBody.scrollTop = consoleBody.scrollHeight - consoleBody.offsetHeight; + } + + function appendRow(row) + { + var container = groupStack.length ? groupStack[groupStack.length-1] : consoleBody; + container.appendChild(row); + } + + function writeRow(message, className) + { + var row = consoleBody.ownerDocument.createElement("div"); + row.className = "logRow" + (className ? " logRow-"+className : ""); + row.innerHTML = message.join(""); + appendRow(row); + } + + function pushGroup(message, className) + { + logFormatted(message, className); + + var groupRow = consoleBody.ownerDocument.createElement("div"); + groupRow.className = "logGroup"; + var groupRowBox = consoleBody.ownerDocument.createElement("div"); + groupRowBox.className = "logGroupBox"; + groupRow.appendChild(groupRowBox); + appendRow(groupRowBox); + groupStack.push(groupRowBox); + } + + function popGroup() + { + groupStack.pop(); + } + + // ******************************************************************************************** + + function logFormatted(objects, className) + { + var html = []; + + var format = objects[0]; + var objIndex = 0; + + if (typeof(format) != "string") + { + format = ""; + objIndex = -1; + } + + var parts = parseFormat(format); + for (var i = 0; i < parts.length; ++i) + { + var part = parts[i]; + if (part && typeof(part) == "object") + { + var object = objects[++objIndex]; + part.appender(object, html); + } + else + appendText(part, html); + } + + for (var i = objIndex+1; i < objects.length; ++i) + { + appendText(" ", html); + + var object = objects[i]; + if (typeof(object) == "string") + appendText(object, html); + else + appendObject(object, html); + } + + logRow(html, className); + } + + function parseFormat(format) + { + var parts = []; + + var reg = /((^%|[^\\]%)(\d+)?(\.)([a-zA-Z]))|((^%|[^\\]%)([a-zA-Z]))/; + var appenderMap = {s: appendText, d: appendInteger, i: appendInteger, f: appendFloat}; + + for (var m = reg.exec(format); m; m = reg.exec(format)) + { + var type = m[8] ? m[8] : m[5]; + var appender = type in appenderMap ? appenderMap[type] : appendObject; + var precision = m[3] ? parseInt(m[3]) : (m[4] == "." ? -1 : 0); + + parts.push(format.substr(0, m[0][0] == "%" ? m.index : m.index+1)); + parts.push({appender: appender, precision: precision}); + + format = format.substr(m.index+m[0].length); + } + + parts.push(format); + + return parts; + } + + function escapeHTML(value) + { + function replaceChars(ch) + { + switch (ch) + { + case "<": + return "<"; + case ">": + return ">"; + case "&": + return "&"; + case "'": + return "'"; + case '"': + return """; + } + return "?"; + }; + return String(value).replace(/[<>&"']/g, replaceChars); + } + + function objectToString(object) + { + try + { + return object+""; + } + catch (exc) + { + return null; + } + } + + // ******************************************************************************************** + + function appendText(object, html) + { + html.push(escapeHTML(objectToString(object))); + } + + function appendNull(object, html) + { + html.push('', escapeHTML(objectToString(object)), ''); + } + + function appendString(object, html) + { + html.push('"', escapeHTML(objectToString(object)), + '"'); + } + + function appendInteger(object, html) + { + html.push('', escapeHTML(objectToString(object)), ''); + } + + function appendFloat(object, html) + { + html.push('', escapeHTML(objectToString(object)), ''); + } + + function appendFunction(object, html) + { + var reName = /function ?(.*?)\(/; + var m = reName.exec(objectToString(object)); + var name = m ? m[1] : "function"; + html.push('', escapeHTML(name), '()'); + } + + function appendObject(object, html) + { + try + { + if (object == undefined) + appendNull("undefined", html); + else if (object == null) + appendNull("null", html); + else if (typeof object == "string") + appendString(object, html); + else if (typeof object == "number") + appendInteger(object, html); + else if (typeof object == "function") + appendFunction(object, html); + else if (object.nodeType == 1) + appendSelector(object, html); + else if (typeof object == "object") + appendObjectFormatted(object, html); + else + appendText(object, html); + } + catch (exc) + { + } + } + + function appendObjectFormatted(object, html) + { + var text = objectToString(object); + var reObject = /\[object (.*?)\]/; + + var m = reObject.exec(text); + html.push('', m ? m[1] : text, '') + } + + function appendSelector(object, html) + { + html.push(''); + + html.push('', escapeHTML(object.nodeName.toLowerCase()), ''); + if (object.id) + html.push('#', escapeHTML(object.id), ''); + if (object.className) + html.push('.', escapeHTML(object.className), ''); + + html.push(''); + } + + function appendNode(node, html) + { + if (node.nodeType == 1) + { + html.push( + '
', + '<', node.nodeName.toLowerCase(), ''); + + for (var i = 0; i < node.attributes.length; ++i) + { + var attr = node.attributes[i]; + if (!attr.specified) + continue; + + html.push(' ', attr.nodeName.toLowerCase(), + '="', escapeHTML(attr.nodeValue), + '"') + } + + if (node.firstChild) + { + html.push('>
'); + + for (var child = node.firstChild; child; child = child.nextSibling) + appendNode(child, html); + + html.push('
</', + node.nodeName.toLowerCase(), '>
'); + } + else + html.push('/>
'); + } + else if (node.nodeType == 3) + { + html.push('
', escapeHTML(node.nodeValue), + '
'); + } + } + + // ******************************************************************************************** + + function addEvent(object, name, handler) + { + if (document.all) + object.attachEvent("on"+name, handler); + else + object.addEventListener(name, handler, false); + } + + function removeEvent(object, name, handler) + { + if (document.all) + object.detachEvent("on"+name, handler); + else + object.removeEventListener(name, handler, false); + } + + function cancelEvent(event) + { + if (document.all) + event.cancelBubble = true; + else + event.stopPropagation(); + } + + function onError(msg, href, lineNo) + { + var html = []; + + var lastSlash = href.lastIndexOf("/"); + var fileName = lastSlash == -1 ? href : href.substr(lastSlash+1); + + html.push( + '', msg, '', + '' + ); + + logRow(html, "error"); + }; + + function onKeyDown(event) + { + if (event.keyCode == 123) + toggleConsole(); + else if ((event.keyCode == 108 || event.keyCode == 76) && event.shiftKey + && (event.metaKey || event.ctrlKey)) + focusCommandLine(); + else + return; + + cancelEvent(event); + } + + function onSplitterMouseDown(event) + { + if (isSafari || isOpera) + return; + + addEvent(document, "mousemove", onSplitterMouseMove); + addEvent(document, "mouseup", onSplitterMouseUp); + + for (var i = 0; i < frames.length; ++i) + { + addEvent(frames[i].document, "mousemove", onSplitterMouseMove); + addEvent(frames[i].document, "mouseup", onSplitterMouseUp); + } + } + + function onSplitterMouseMove(event) + { + var win = document.all + ? event.srcElement.ownerDocument.parentWindow + : event.target.ownerDocument.defaultView; + + var clientY = event.clientY; + if (win != win.parent) + clientY += win.frameElement ? win.frameElement.offsetTop : 0; + + var height = consoleFrame.offsetTop + consoleFrame.clientHeight; + var y = height - clientY; + + consoleFrame.style.height = y + "px"; + layout(); + } + + function onSplitterMouseUp(event) + { + removeEvent(document, "mousemove", onSplitterMouseMove); + removeEvent(document, "mouseup", onSplitterMouseUp); + + for (var i = 0; i < frames.length; ++i) + { + removeEvent(frames[i].document, "mousemove", onSplitterMouseMove); + removeEvent(frames[i].document, "mouseup", onSplitterMouseUp); + } + } + + function onCommandLineKeyDown(event) + { + if (event.keyCode == 13) + evalCommandLine(); + else if (event.keyCode == 27) + commandLine.value = ""; + } + + window.onerror = onError; + addEvent(document, isIE || isSafari ? "keydown" : "keypress", onKeyDown); + + if (document.documentElement.getAttribute("debug") == "true") + toggleConsole(true); +})(); +} diff --git a/bug/bug/jquery-validation-1.8.1/test/firebug/firebugx.js b/bug/bug/jquery-validation-1.8.1/test/firebug/firebugx.js new file mode 100644 index 0000000..5a467fc --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/firebug/firebugx.js @@ -0,0 +1,10 @@ + +if (!("console" in window) || !("firebug" in console)) +{ + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", + "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; + + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {} +} \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/test/firebug/infoIcon.png b/bug/bug/jquery-validation-1.8.1/test/firebug/infoIcon.png new file mode 100644 index 0000000..da1e533 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/test/firebug/infoIcon.png differ diff --git a/bug/bug/jquery-validation-1.8.1/test/firebug/warningIcon.png b/bug/bug/jquery-validation-1.8.1/test/firebug/warningIcon.png new file mode 100644 index 0000000..de51084 Binary files /dev/null and b/bug/bug/jquery-validation-1.8.1/test/firebug/warningIcon.png differ diff --git a/bug/bug/jquery-validation-1.8.1/test/index.html b/bug/bug/jquery-validation-1.8.1/test/index.html new file mode 100644 index 0000000..0d82ae8 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/index.html @@ -0,0 +1,277 @@ + + + + jQuery - Validation Test Suite + + + + + + + + + + + + + + +

+ jQuery Validation Plugin Test Suite + jQuery 1.3.2 + jQuery 1.4.2 + jQuery 1.4.4 + jQuery 1.5.2 + jQuery 1.6.1 + jQuery Latest (git) +

+
+
+

+
+

+
    + + + +
    +

    See this blog entry for more information.

    +

    + Here are some links in a normal paragraph: Google, + Google Groups. + This link has class="blog": + diveintomark + +

    +
    +

    Everything inside the red border is inside a div with id="foo".

    +

    This is a normal link: Yahoo

    +

    This link has class="blog": Simon Willison's Weblog

    + +
    +

    Try them out:

    +
      +
        + +
        + + + + +
        + +
        + + + + +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        + +
        +
        +
          +
        • + +
        • +
        +
        + +
        + + +
        + +
        + + +
        + +
        + + +
        + +
        + +
        + +
        + + + +
        + +
        + + +
        + +
        + +
        + +
        + + +
        + +
        +

        +
        + +
        + +
          + +
          + + + + + + +
            +
          +
          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          + +
          + + + + + + + +
          + +
          + + + +
          + + +
          +
          + + +
          +
          + +
          + +
          + +
          + +
          + +
          + +
          +
          + + + diff --git a/bug/bug/jquery-validation-1.8.1/test/jquery.js b/bug/bug/jquery-validation-1.8.1/test/jquery.js new file mode 100644 index 0000000..100c446 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/jquery.js @@ -0,0 +1,25 @@ +(function() { + +var parts = document.location.search.slice( 1 ).split( "&" ), + length = parts.length, + i = 0, + current, + version = "1.3.2", + file = "http://code.jquery.com/jquery-git.js"; + +for ( ; i < length; i++ ) { + current = parts[ i ].split( "=" ); + if ( current[ 0 ] === "jquery" ) { + version = current[ 1 ]; + break; + } +} + +if (version != "git") { + file = "../lib/jquery-" + version + ".js"; +} + + +document.write( "" ); + +})(); diff --git a/bug/bug/jquery-validation-1.8.1/test/large.html b/bug/bug/jquery-validation-1.8.1/test/large.html new file mode 100644 index 0000000..82c47f1 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/large.html @@ -0,0 +1,188 @@ + + + + +Test for jQuery validate() plugin + + + + + + + + + + + + + +
          +
          + A simple comment form with submit validation and default messages +

          + + +

          + + +

          +

          + + +

          +

          + + +

          +

          + + +

          + + +

          +

          + + +

          +

          + + +

          +

          + + +

          + + +

          +

          + + +

          +

          + + +

          +

          + + +

          + + +

          +

          + + +

          +

          + + +

          +

          + + +

          + + +

          +

          + + +

          +

          + + +

          +

          + + +

          + + +

          +

          + + +

          +

          + + +

          +

          + + +

          + + +

          +

          + + +

          +

          + + +

          +

          + + +

          + + +

          +

          + + +

          +

          + + +

          +

          + + +

          + + +

          +

          + + +

          +

          + + +

          +

          + + +

          + + +

          +

          + + +

          +

          + + +

          +

          + +

          +
          +
          + + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/test/messages.js b/bug/bug/jquery-validation-1.8.1/test/messages.js new file mode 100644 index 0000000..0faf984 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/messages.js @@ -0,0 +1,62 @@ +module("messages"); + +test("predefined message not overwritten by addMethod(a, b, undefined)", function() { + var message = "my custom message"; + $.validator.messages.custom = message; + $.validator.addMethod("custom", function() {}); + same(message, $.validator.messages.custom); + delete $.validator.messages.custom; + delete $.validator.methods.custom; +}); + +test("group error messages", function() { + $.validator.addClassRules({ + requiredDateRange: {required:true, date:true, dateRange:true} + }); + $.validator.addMethod("dateRange", function() { + return new Date($("#fromDate").val()) < new Date($("#toDate").val()); + }, "Please specify a correct date range."); + var form = $("#dateRangeForm"); + form.validate({ + groups: { + dateRange: "fromDate toDate" + }, + errorPlacement: function(error) { + form.find(".errorContainer").append(error); + } + }); + ok( !form.valid() ); + equals( 1, form.find(".errorContainer *").length ); + equals( "Please enter a valid date.", form.find(".errorContainer label.error").text() ); + + $("#fromDate").val("12/03/2006"); + $("#toDate").val("12/01/2006"); + ok( !form.valid() ); + equals( "Please specify a correct date range.", form.find(".errorContainer label.error").text() ); + + $("#toDate").val("12/04/2006"); + ok( form.valid() ); + ok( form.find(".errorContainer label.error").is(":hidden") ); +}); + +test("read messages from metadata", function() { + var form = $("#testForm9") + form.validate(); + var e = $("#testEmail9") + e.valid(); + equals( form.find("label").text(), "required" ); + e.val("bla").valid(); + equals( form.find("label").text(), "email" ); +}); + + +test("read messages from metadata, with meta option specified, but no metadata in there", function() { + var form = $("#testForm1clean") + form.validate({ + meta: "validate", + rules: { + firstname: "required" + } + }); + ok(!form.valid(), "not valid"); +}); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/test/methods.js b/bug/bug/jquery-validation-1.8.1/test/methods.js new file mode 100644 index 0000000..0543b64 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/methods.js @@ -0,0 +1,584 @@ +(function($) { + +function methodTest( methodName ) { + var v = jQuery("#form").validate(); + var method = $.validator.methods[methodName]; + var element = $("#firstname")[0]; + return function(value, param) { + element.value = value; + return method.call( v, value, element, param ); + }; +} + +module("methods"); + +test("default messages", function() { + var m = $.validator.methods; + $.each(m, function(key) { + ok( jQuery.validator.messages[key], key + " has a default message." ); + }); +}); + +test("digit", function() { + var method = methodTest("digits"); + ok( method( "123" ), "Valid digits" ); + ok(!method( "123.000" ), "Invalid digits" ); + ok(!method( "123.000,00" ), "Invalid digits" ); + ok(!method( "123.0.0,0" ), "Invalid digits" ); + ok(!method( "x123" ), "Invalid digits" ); + ok(!method( "100.100,0,0" ), "Invalid digits" ); +}); + +test("url", function() { + var method = methodTest("url"); + ok( method( "http://bassistance.de/jquery/plugin.php?bla=blu" ), "Valid url" ); + ok( method( "https://bassistance.de/jquery/plugin.php?bla=blu" ), "Valid url" ); + ok( method( "ftp://bassistance.de/jquery/plugin.php?bla=blu" ), "Valid url" ); + ok( method( "http://www.føtex.dk/" ), "Valid url, danish unicode characters" ); + ok( method( "http://bösendorfer.de/" ), "Valid url, german unicode characters" ); + ok( method( "http://192.168.8.5" ), "Valid IP Address" ) + ok(!method( "http://192.168.8." ), "Invalid IP Address" ) + ok(!method( "http://bassistance" ), "Invalid url" ); // valid + ok(!method( "http://bassistance." ), "Invalid url" ); // valid + ok(!method( "http://bassistance,de" ), "Invalid url" ); + ok(!method( "http://bassistance;de" ), "Invalid url" ); + ok(!method( "http://.bassistancede" ), "Invalid url" ); + ok(!method( "bassistance.de" ), "Invalid url" ); +}); + +test("url2 (tld optional)", function() { + var method = methodTest("url2"); + ok( method( "http://bassistance.de/jquery/plugin.php?bla=blu" ), "Valid url" ); + ok( method( "https://bassistance.de/jquery/plugin.php?bla=blu" ), "Valid url" ); + ok( method( "ftp://bassistance.de/jquery/plugin.php?bla=blu" ), "Valid url" ); + ok( method( "http://www.føtex.dk/" ), "Valid url, danish unicode characters" ); + ok( method( "http://bösendorfer.de/" ), "Valid url, german unicode characters" ); + ok( method( "http://192.168.8.5" ), "Valid IP Address" ) + ok(!method( "http://192.168.8." ), "Invalid IP Address" ) + ok( method( "http://bassistance" ), "Invalid url" ); + ok( method( "http://bassistance." ), "Invalid url" ); + ok(!method( "http://bassistance,de" ), "Invalid url" ); + ok(!method( "http://bassistance;de" ), "Invalid url" ); + ok(!method( "http://.bassistancede" ), "Invalid url" ); + ok(!method( "bassistance.de" ), "Invalid url" ); +}); + +test("email", function() { + var method = methodTest("email"); + ok( method( "name@domain.tld" ), "Valid email" ); + ok( method( "name@domain.tl" ), "Valid email" ); + ok( method( "bart+bart@tokbox.com" ), "Valid email" ); + ok( method( "bart+bart@tokbox.travel" ), "Valid email" ); + ok( method( "n@d.tld" ), "Valid email" ); + ok( method( "ole@føtex.dk"), "Valid email" ); + ok( method( "jörn@bassistance.de"), "Valid email" ); + ok( method( "bla.blu@g.mail.com"), "Valid email" ); + ok( method( "\"Scott Gonzalez\"@example.com" ), "Valid email" ); + ok( method( "\"Scott González\"@example.com" ), "Valid email" ); + ok( method( "\"name.\"@domain.tld" ), "Valid email" ); // valid without top label + ok( method( "\"name,\"@domain.tld" ), "Valid email" ); // valid without top label + ok( method( "\"name;\"@domain.tld" ), "Valid email" ); // valid without top label + ok(!method( "name" ), "Invalid email" ); + ok(!method( "name@" ), "Invalid email" ); + ok(!method( "name@domain" ), "Invalid email" ); + ok(!method( "name.@domain.tld" ), "Invalid email" ); + ok(!method( "name,@domain.tld" ), "Invalid email" ); + ok(!method( "name;@domain.tld" ), "Invalid email" ); +}); + +test("email2 (tld optional)", function() { + var method = methodTest("email2"); + ok( method( "name@domain.tld" ), "Valid email" ); + ok( method( "name@domain.tl" ), "Valid email" ); + ok( method( "bart+bart@tokbox.com" ), "Valid email" ); + ok( method( "bart+bart@tokbox.travel" ), "Valid email" ); + ok( method( "n@d.tld" ), "Valid email" ); + ok( method( "ole@føtex.dk"), "Valid email" ); + ok( method( "jörn@bassistance.de"), "Valid email" ); + ok( method( "bla.blu@g.mail.com"), "Valid email" ); + ok( method( "\"Scott Gonzalez\"@example.com" ), "Valid email" ); + ok( method( "\"Scott González\"@example.com" ), "Valid email" ); + ok( method( "\"name.\"@domain.tld" ), "Valid email" ); // valid without top label + ok( method( "\"name,\"@domain.tld" ), "Valid email" ); // valid without top label + ok( method( "\"name;\"@domain.tld" ), "Valid email" ); // valid without top label + ok(!method( "name" ), "Invalid email" ); + ok(!method( "name@" ), "Invalid email" ); + ok( method( "name@domain" ), "Invalid email" ); + ok(!method( "name.@domain.tld" ), "Invalid email" ); + ok(!method( "name,@domain.tld" ), "Invalid email" ); + ok(!method( "name;@domain.tld" ), "Invalid email" ); +}); + +test("number", function() { + var method = methodTest("number"); + ok( method( "123" ), "Valid number" ); + ok( method( "-123" ), "Valid number" ); + ok( method( "123,000" ), "Valid number" ); + ok( method( "-123,000" ), "Valid number" ); + ok( method( "123,000.00" ), "Valid number" ); + ok( method( "-123,000.00" ), "Valid number" ); + ok(!method( "123.000,00" ), "Invalid number" ); + ok(!method( "123.0.0,0" ), "Invalid number" ); + ok(!method( "x123" ), "Invalid number" ); + ok(!method( "100.100,0,0" ), "Invalid number" ); + + ok( method( "" ), "Blank is valid" ); + ok( method( "123" ), "Valid decimal" ); + ok( method( "123000" ), "Valid decimal" ); + ok( method( "123000.12" ), "Valid decimal" ); + ok( method( "-123000.12" ), "Valid decimal" ); + ok( method( "123.000" ), "Valid decimal" ); + ok( method( "123,000.00" ), "Valid decimal" ); + ok( method( "-123,000.00" ), "Valid decimal" ); + ok(!method( "1230,000.00" ), "Invalid decimal" ); + ok(!method( "123.0.0,0" ), "Invalid decimal" ); + ok(!method( "x123" ), "Invalid decimal" ); + ok(!method( "100.100,0,0" ), "Invalid decimal" ); +}); + +/* disabled for now, need to figure out how to test localized methods +test("numberDE", function() { + var method = methodTest("numberDE"); + ok( method( "123" ), "Valid numberDE" ); + ok( method( "-123" ), "Valid numberDE" ); + ok( method( "123.000" ), "Valid numberDE" ); + ok( method( "-123.000" ), "Valid numberDE" ); + ok( method( "123.000,00" ), "Valid numberDE" ); + ok( method( "-123.000,00" ), "Valid numberDE" ); + ok(!method( "123,000.00" ), "Invalid numberDE" ); + ok(!method( "123,0,0.0" ), "Invalid numberDE" ); + ok(!method( "x123" ), "Invalid numberDE" ); + ok(!method( "100,100.0.0" ), "Invalid numberDE" ); + + ok( method( "" ), "Blank is valid" ); + ok( method( "123" ), "Valid decimalDE" ); + ok( method( "123000" ), "Valid decimalDE" ); + ok( method( "123000,12" ), "Valid decimalDE" ); + ok( method( "-123000,12" ), "Valid decimalDE" ); + ok( method( "123.000" ), "Valid decimalDE" ); + ok( method( "123.000,00" ), "Valid decimalDE" ); + ok( method( "-123.000,00" ), "Valid decimalDE" ) + ok(!method( "123.0.0,0" ), "Invalid decimalDE" ); + ok(!method( "x123" ), "Invalid decimalDE" ); + ok(!method( "100,100.0.0" ), "Invalid decimalDE" ); +}); +*/ + +test("date", function() { + var method = methodTest("date"); + ok( method( "06/06/1990" ), "Valid date" ); + ok( method( "6/6/06" ), "Valid date" ); + ok(!method( "1990x-06-06" ), "Invalid date" ); +}); + +test("dateISO", function() { + var method = methodTest("dateISO"); + ok( method( "1990-06-06" ), "Valid date" ); + ok( method( "1990/06/06" ), "Valid date" ); + ok( method( "1990-6-6" ), "Valid date" ); + ok( method( "1990/6/6" ), "Valid date" ); + ok(!method( "1990-106-06" ), "Invalid date" ); + ok(!method( "190-06-06" ), "Invalid date" ); +}); + +/* disabled for now, need to figure out how to test localized methods +test("dateDE", function() { + var method = methodTest("dateDE"); + ok( method( "03.06.1984" ), "Valid dateDE" ); + ok( method( "3.6.84" ), "Valid dateDE" ); + ok(!method( "6-6-06" ), "Invalid dateDE" ); + ok(!method( "1990-06-06" ), "Invalid dateDE" ); + ok(!method( "06/06/1990" ), "Invalid dateDE" ); + ok(!method( "6/6/06" ), "Invalid dateDE" ); +}); +*/ + +test("required", function() { + var v = jQuery("#form").validate(), + method = $.validator.methods.required, + e = $('#text1, #text1b, #hidden2, #select1, #select2'); + ok( method.call( v, e[0].value, e[0]), "Valid text input" ); + ok(!method.call( v, e[1].value, e[1]), "Invalid text input" ); + ok(!method.call( v, e[1].value, e[2]), "Invalid text input" ); + + ok(!method.call( v, e[2].value, e[3]), "Invalid select" ); + ok( method.call( v, e[3].value, e[4]), "Valid select" ); + + e = $('#area1, #area2, #pw1, #pw2'); + ok( method.call( v, e[0].value, e[0]), "Valid textarea" ); + ok(!method.call( v, e[1].value, e[1]), "Invalid textarea" ); + ok( method.call( v, e[2].value, e[2]), "Valid password input" ); + ok(!method.call( v, e[3].value, e[3]), "Invalid password input" ); + + e = $('#radio1, #radio2, #radio3'); + ok(!method.call( v, e[0].value, e[0]), "Invalid radio" ); + ok( method.call( v, e[1].value, e[1]), "Valid radio" ); + ok( method.call( v, e[2].value, e[2]), "Valid radio" ); + + e = $('#check1, #check2'); + ok( method.call( v, e[0].value, e[0]), "Valid checkbox" ); + ok(!method.call( v, e[1].value, e[1]), "Invalid checkbox" ); + + e = $('#select1, #select2, #select3, #select4'); + ok(!method.call( v, e[0].value, e[0]), "Invalid select" ); + ok( method.call( v, e[1].value, e[1]), "Valid select" ); + ok( method.call( v, e[2].value, e[2]), "Valid select" ); + ok( method.call( v, e[3].value, e[3]), "Valid select" ); +}); + +test("required with dependencies", function() { + var v = jQuery("#form").validate(), + method = $.validator.methods.required, + e = $('#hidden2, #select1, #area2, #radio1, #check2'); + ok( method.call( v, e[0].value, e[0], "asffsaa"), "Valid text input due to depencie not met" ); + ok(!method.call( v, e[0].value, e[0], "input"), "Invalid text input" ); + ok( method.call( v, e[0].value, e[0], function() { return false; }), "Valid text input due to depencie not met" ); + ok(!method.call( v, e[0].value, e[0], function() { return true; }), "Invalid text input" ); + ok( method.call( v, e[1].value, e[1], "asfsfa"), "Valid select due to dependency not met" ); + ok(!method.call( v, e[1].value, e[1], "input"), "Invalid select" ); + ok( method.call( v, e[2].value, e[2], "asfsafsfa"), "Valid textarea due to dependency not met" ); + ok(!method.call( v, e[2].value, e[2], "input"), "Invalid textarea" ); + ok( method.call( v, e[3].value, e[3], "asfsafsfa"), "Valid radio due to dependency not met" ); + ok(!method.call( v, e[3].value, e[3], "input"), "Invalid radio" ); + ok( method.call( v, e[4].value, e[4], "asfsafsfa"), "Valid checkbox due to dependency not met" ); + ok(!method.call( v, e[4].value, e[4], "input"), "Invalid checkbox" ); +}); + +test("minlength", function() { + var v = jQuery("#form").validate(), + method = $.validator.methods.minlength, + param = 2, + e = $('#text1, #text1c, #text2, #text3'); + ok( method.call( v, e[0].value, e[0], param), "Valid text input" ); + ok(!method.call( v, e[1].value, e[1], param), "Invalid text input" ); + ok(!method.call( v, e[2].value, e[2], param), "Invalid text input" ); + ok( method.call( v, e[3].value, e[3], param), "Valid text input" ); + + e = $('#check1, #check2, #check3'); + ok(!method.call( v, e[0].value, e[0], param), "Valid checkbox" ); + ok( method.call( v, e[1].value, e[1], param), "Valid checkbox" ); + ok( method.call( v, e[2].value, e[2], param), "Invalid checkbox" ); + + e = $('#select1, #select2, #select3, #select4, #select5'); + ok(method.call( v, e[0].value, e[0], param), "Valid select " + e[0].id ); + ok(!method.call( v, e[1].value, e[1], param), "Invalid select " + e[1].id ); + ok( method.call( v, e[2].value, e[2], param), "Valid select " + e[2].id ); + ok( method.call( v, e[3].value, e[3], param), "Valid select " + e[3].id ); + ok( method.call( v, e[4].value, e[4], param), "Valid select " + e[4].id ); +}); + +test("maxlength", function() { + var v = jQuery("#form").validate(); + var method = $.validator.methods.maxlength, + param = 4, + e = $('#text1, #text2, #text3'); + ok( method.call( v, e[0].value, e[0], param), "Valid text input" ); + ok( method.call( v, e[1].value, e[1], param), "Valid text input" ); + ok(!method.call( v, e[2].value, e[2], param), "Invalid text input" ); + + e = $('#check1, #check2, #check3'); + ok( method.call( v, e[0].value, e[0], param), "Valid checkbox" ); + ok( method.call( v, e[1].value, e[1], param), "Invalid checkbox" ); + ok(!method.call( v, e[2].value, e[2], param), "Invalid checkbox" ); + + e = $('#select1, #select2, #select3, #select4'); + ok( method.call( v, e[0].value, e[0], param), "Valid select" ); + ok( method.call( v, e[1].value, e[1], param), "Valid select" ); + ok( method.call( v, e[2].value, e[2], param), "Valid select" ); + ok(!method.call( v, e[3].value, e[3], param), "Invalid select" ); +}); + +test("rangelength", function() { + var v = jQuery("#form").validate(); + var method = $.validator.methods.rangelength, + param = [2, 4], + e = $('#text1, #text2, #text3'); + ok( method.call( v, e[0].value, e[0], param), "Valid text input" ); + ok(!method.call( v, e[1].value, e[1], param), "Invalid text input" ); + ok(!method.call( v, e[2].value, e[2], param), "Invalid text input" ); +}); + +test("min", function() { + var v = jQuery("#form").validate(); + var method = $.validator.methods.min, + param = 8, + e = $('#value1, #value2, #value3'); + ok(!method.call( v, e[0].value, e[0], param), "Invalid text input" ); + ok( method.call( v, e[1].value, e[1], param), "Valid text input" ); + ok( method.call( v, e[2].value, e[2], param), "Valid text input" ); +}); + +test("max", function() { + var v = jQuery("#form").validate(); + var method = $.validator.methods.max, + param = 12, + e = $('#value1, #value2, #value3'); + ok( method.call( v, e[0].value, e[0], param), "Valid text input" ); + ok( method.call( v, e[1].value, e[1], param), "Valid text input" ); + ok(!method.call( v, e[2].value, e[2], param), "Invalid text input" ); +}); + +test("range", function() { + var v = jQuery("#form").validate(); + var method = $.validator.methods.range, + param = [4,12], + e = $('#value1, #value2, #value3'); + ok(!method.call( v, e[0].value, e[0], param), "Invalid text input" ); + ok( method.call( v, e[1].value, e[1], param), "Valid text input" ); + ok(!method.call( v, e[2].value, e[2], param), "Invalid text input" ); +}); + +test("equalTo", function() { + var v = jQuery("#form").validate(); + var method = $.validator.methods.equalTo, + e = $('#text1, #text2'); + ok( method.call( v, "Test", e[0], "#text1"), "Text input" ); + ok( method.call( v, "T", e[1], "#text2"), "Another one" ); +}); + +test("creditcard", function() { + var method = methodTest("creditcard"); + ok( method( "446-667-651" ), "Valid creditcard number" ); + ok( !method( "asdf" ), "Invalid creditcard number" ); +}); + +test("accept", function() { + var method = methodTest("accept"); + ok( method( "picture.gif" ), "Valid default accept type" ); + ok( method( "picture.jpg" ), "Valid default accept type" ); + ok( method( "picture.jpeg" ), "Valid default accept type" ); + ok( method( "picture.png" ), "Valid default accept type" ); + ok( !method( "picture.pgn" ), "Invalid default accept type" ); + + var v = jQuery("#form").validate(), + method = function(value, param) { + return $.validator.methods.accept.call(v, value, $('#text1')[0], param) + }; + ok( method( "picture.doc", "doc"), "Valid custom accept type" ); + ok( method( "picture.pdf", "doc|pdf"), "Valid custom accept type" ); + ok( method( "picture.pdf", "pdf|doc"), "Valid custom accept type" ); + ok( !method( "picture.pdf", "doc"), "Invalid custom accept type" ); + ok( !method( "picture.doc", "pdf"), "Invalid custom accept type" ); + + ok( method( "picture.pdf", "doc,pdf"), "Valid custom accept type, comma seperated" ); + ok( method( "picture.pdf", "pdf,doc"), "Valid custom accept type, comma seperated" ); + ok( !method( "picture.pdf", "gop,top"), "Invalid custom accept type, comma seperated" ); +}); + +test("remote", function() { + expect(7); + stop(); + var e = $("#username"); + var v = $("#userForm").validate({ + rules: { + username: { + required: true, + remote: "users.php" + } + }, + messages: { + username: { + required: "Please", + remote: jQuery.validator.format("{0} in use") + } + }, + submitHandler: function() { + ok( false, "submitHandler may never be called when validating only elements"); + } + }); + $(document).ajaxStop(function() { + $(document).unbind("ajaxStop"); + equals( 1, v.size(), "There must be one error" ); + equals( "Peter in use", v.errorList[0].message ); + + $(document).ajaxStop(function() { + $(document).unbind("ajaxStop"); + equals( 1, v.size(), "There must be one error" ); + equals( "Peter2 in use", v.errorList[0].message ); + start(); + }); + e.val("Peter2"); + ok( !v.element(e), "new value, new request" ); + }); + ok( !v.element(e), "invalid element, nothing entered yet" ); + e.val("Peter"); + ok( !v.element(e), "still invalid, because remote validation must block until it returns" ); +}); + +test("remote, customized ajax options", function() { + expect(2); + stop(); + var v = $("#userForm").validate({ + rules: { + username: { + required: true, + remote: { + url: "users.php", + type: "POST", + beforeSend: function(request, settings) { + same(settings.type, "POST"); + same(settings.data, "username=asdf&email=email.com"); + }, + data: { + email: function() { + return "email.com"; + } + }, + complete: function() { + start(); + } + } + } + } + }); + $("#username").val("asdf"); + $("#userForm").valid(); +}); + + +test("remote extensions", function() { + expect(5); + stop(); + var e = $("#username"); + var v = $("#userForm").validate({ + rules: { + username: { + required: true, + remote: "users2.php" + } + }, + messages: { + username: { + required: "Please" + } + }, + submitHandler: function() { + ok( false, "submitHandler may never be called when validating only elements"); + } + }); + $(document).ajaxStop(function() { + $(document).unbind("ajaxStop"); + equals( 1, v.size(), "There must be one error" ); + equals( v.errorList[0].message, "asdf is already taken, please try something else" ); + v.element(e); + equals( v.errorList[0].message, "asdf is already taken, please try something else", "message doesn't change on revalidation" ); + start(); + }); + ok( !v.element(e), "invalid element, nothing entered yet" ); + e.val("asdf"); + ok( !v.element(e), "still invalid, because remote validation must block until it returns" ); +}); + +module("additional methods"); + +test("phone (us)", function() { + var method = methodTest("phoneUS"); + ok( method( "1(212)-999-2345" ), "Valid us phone number" ); + ok( method( "212 999 2344" ), "Valid us phone number" ); + ok( method( "212-999-0983" ), "Valid us phone number" ); + ok(!method( "111-123-5434" ), "Invalid us phone number" ); + ok(!method( "212 123 4567" ), "Invalid us phone number" ); +}); + +test("dateITA", function() { + var method = methodTest("dateITA"); + ok( method( "01/01/1900" ), "Valid date ITA" ); + ok(!method( "01/13/1990" ), "Invalid date ITA" ); + ok(!method( "01.01.1900" ), "Invalid date ITA" ); +}); + +test("time", function() { + var method = methodTest("time"); + ok( method("00:00"), "Valid time, lower bound" ); + ok( method("23:59"), "Valid time, upper bound" ); + ok( !method("24:60"), "Invalid time" ); + ok( !method("24:00"), "Invalid time" ); + ok( !method("29:59"), "Invalid time" ); + ok( !method("30:00"), "Invalid time" ); +}); + +test("minWords", function() { + var method = methodTest("minWords"); + ok( method("hello worlds", 2), "plain text, valid" ); + ok( method("hello world", 2), "html, valid" ); + ok( !method("hello", 2), "plain text, invalid" ); + ok( !method("world", 2), "html, invalid" ); + ok( !method("world
          ", 2), "html, invalid" ); +}); + +test("maxWords", function() { + var method = methodTest("maxWords"); + ok( method("hello", 2), "plain text, valid" ); + ok( method("world", 2), "html, valid" ); + ok( method("world
          ", 2), "html, valid" ); + ok( !method("hello worlds", 2), "plain text, invalid" ); + ok( !method("hello world", 2), "html, invalid" ); +}); + +function testCardTypeByNumber(number, cardname, expected) { + $("#cardnumber").val(number); + var actual = $("#ccform").valid(); + equals(actual, expected, $.format("Expect card number {0} to validate to {1}, actually validated to ", number, expected)); +} + +test('creditcardtypes, all', function() { + $("#ccform").validate({ + rules: { + cardnumber: { + creditcard: true, + creditcardtypes: { + all: true + } + } + } + }); + + testCardTypeByNumber("4111-1111-1111-1111", "VISA", true) + testCardTypeByNumber("5111-1111-1111-1118", "MasterCard", true) + testCardTypeByNumber("6111-1111-1111-1116", "Discover", true) + testCardTypeByNumber("3400-0000-0000-009", "AMEX", true); + + testCardTypeByNumber("4111-1111-1111-1110", "VISA", false) + testCardTypeByNumber("5432-1111-1111-1111", "MasterCard", false) + testCardTypeByNumber("6611-6611-6611-6611", "Discover", false) + testCardTypeByNumber("3777-7777-7777-7777", "AMEX", false) + +}); + +test('creditcardtypes, visa', function() { + $("#ccform").validate({ + rules: { + cardnumber: { + creditcard: true, + creditcardtypes: { + visa: true + } + } + } + }); + + testCardTypeByNumber("4111-1111-1111-1111", "VISA", true) + testCardTypeByNumber("5111-1111-1111-1118", "MasterCard", false) + testCardTypeByNumber("6111-1111-1111-1116", "Discover", false) + testCardTypeByNumber("3400-0000-0000-009", "AMEX", false); +}); + +test('creditcardtypes, mastercard', function() { + $("#ccform").validate({ + rules: { + cardnumber: { + creditcard: true, + creditcardtypes: { + mastercard: true + } + } + } + }); + + testCardTypeByNumber("5111-1111-1111-1118", "MasterCard", true) + testCardTypeByNumber("6111-1111-1111-1116", "Discover", false) + testCardTypeByNumber("3400-0000-0000-009", "AMEX", false); + testCardTypeByNumber("4111-1111-1111-1111", "VISA", false); +}); + +})(jQuery); \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/test/qunit/qunit.css b/bug/bug/jquery-validation-1.8.1/test/qunit/qunit.css new file mode 100644 index 0000000..af25494 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/qunit/qunit.css @@ -0,0 +1,225 @@ +/** + * QUnit - A JavaScript Unit Testing Framework + * + * http://docs.jquery.com/QUnit + * + * Copyright (c) 2011 John Resig, Jörn Zaefferer + * Dual licensed under the MIT (MIT-LICENSE.txt) + * or GPL (GPL-LICENSE.txt) licenses. + */ + +/** Font Family and Sizes */ + +#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { + font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; +} + +#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } +#qunit-tests { font-size: smaller; } + + +/** Resets */ + +#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { + margin: 0; + padding: 0; +} + + +/** Header */ + +#qunit-header { + padding: 0.5em 0 0.5em 1em; + + color: #8699a4; + background-color: #0d3349; + + font-size: 1.5em; + line-height: 1em; + font-weight: normal; + + border-radius: 15px 15px 0 0; + -moz-border-radius: 15px 15px 0 0; + -webkit-border-top-right-radius: 15px; + -webkit-border-top-left-radius: 15px; +} + +#qunit-header a { + text-decoration: none; + color: #c2ccd1; +} + +#qunit-header a:hover, +#qunit-header a:focus { + color: #fff; +} + +#qunit-banner { + height: 5px; +} + +#qunit-testrunner-toolbar { + padding: 0.5em 0 0.5em 2em; + color: #5E740B; + background-color: #eee; +} + +#qunit-userAgent { + padding: 0.5em 0 0.5em 2.5em; + background-color: #2b81af; + color: #fff; + text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; +} + + +/** Tests: Pass/Fail */ + +#qunit-tests { + list-style-position: inside; +} + +#qunit-tests li { + padding: 0.4em 0.5em 0.4em 2.5em; + border-bottom: 1px solid #fff; + list-style-position: inside; +} + +#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running { + display: none; +} + +#qunit-tests li strong { + cursor: pointer; +} + +#qunit-tests li a { + padding: 0.5em; + color: #c2ccd1; + text-decoration: none; +} +#qunit-tests li a:hover, +#qunit-tests li a:focus { + color: #000; +} + +#qunit-tests ol { + margin-top: 0.5em; + padding: 0.5em; + + background-color: #fff; + + border-radius: 15px; + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + + box-shadow: inset 0px 2px 13px #999; + -moz-box-shadow: inset 0px 2px 13px #999; + -webkit-box-shadow: inset 0px 2px 13px #999; +} + +#qunit-tests table { + border-collapse: collapse; + margin-top: .2em; +} + +#qunit-tests th { + text-align: right; + vertical-align: top; + padding: 0 .5em 0 0; +} + +#qunit-tests td { + vertical-align: top; +} + +#qunit-tests pre { + margin: 0; + white-space: pre-wrap; + word-wrap: break-word; +} + +#qunit-tests del { + background-color: #e0f2be; + color: #374e0c; + text-decoration: none; +} + +#qunit-tests ins { + background-color: #ffcaca; + color: #500; + text-decoration: none; +} + +/*** Test Counts */ + +#qunit-tests b.counts { color: black; } +#qunit-tests b.passed { color: #5E740B; } +#qunit-tests b.failed { color: #710909; } + +#qunit-tests li li { + margin: 0.5em; + padding: 0.4em 0.5em 0.4em 0.5em; + background-color: #fff; + border-bottom: none; + list-style-position: inside; +} + +/*** Passing Styles */ + +#qunit-tests li li.pass { + color: #5E740B; + background-color: #fff; + border-left: 26px solid #C6E746; +} + +#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } +#qunit-tests .pass .test-name { color: #366097; } + +#qunit-tests .pass .test-actual, +#qunit-tests .pass .test-expected { color: #999999; } + +#qunit-banner.qunit-pass { background-color: #C6E746; } + +/*** Failing Styles */ + +#qunit-tests li li.fail { + color: #710909; + background-color: #fff; + border-left: 26px solid #EE5757; +} + +#qunit-tests > li:last-child { + border-radius: 0 0 15px 15px; + -moz-border-radius: 0 0 15px 15px; + -webkit-border-bottom-right-radius: 15px; + -webkit-border-bottom-left-radius: 15px; +} + +#qunit-tests .fail { color: #000000; background-color: #EE5757; } +#qunit-tests .fail .test-name, +#qunit-tests .fail .module-name { color: #000000; } + +#qunit-tests .fail .test-actual { color: #EE5757; } +#qunit-tests .fail .test-expected { color: green; } + +#qunit-banner.qunit-fail { background-color: #EE5757; } + + +/** Result */ + +#qunit-testresult { + padding: 0.5em 0.5em 0.5em 2.5em; + + color: #2b81af; + background-color: #D2E0E6; + + border-bottom: 1px solid white; +} + +/** Fixture */ + +#qunit-fixture { + position: absolute; + top: -10000px; + left: -10000px; +} diff --git a/bug/bug/jquery-validation-1.8.1/test/qunit/qunit.js b/bug/bug/jquery-validation-1.8.1/test/qunit/qunit.js new file mode 100644 index 0000000..931366d --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/qunit/qunit.js @@ -0,0 +1,1442 @@ +/** + * QUnit - A JavaScript Unit Testing Framework + * + * http://docs.jquery.com/QUnit + * + * Copyright (c) 2011 John Resig, Jörn Zaefferer + * Dual licensed under the MIT (MIT-LICENSE.txt) + * or GPL (GPL-LICENSE.txt) licenses. + */ + +(function(window) { + +var defined = { + setTimeout: typeof window.setTimeout !== "undefined", + sessionStorage: (function() { + try { + return !!sessionStorage.getItem; + } catch(e){ + return false; + } + })() +}; + +var testId = 0; + +var Test = function(name, testName, expected, testEnvironmentArg, async, callback) { + this.name = name; + this.testName = testName; + this.expected = expected; + this.testEnvironmentArg = testEnvironmentArg; + this.async = async; + this.callback = callback; + this.assertions = []; +}; +Test.prototype = { + init: function() { + var tests = id("qunit-tests"); + if (tests) { + var b = document.createElement("strong"); + b.innerHTML = "Running " + this.name; + var li = document.createElement("li"); + li.appendChild( b ); + li.className = "running"; + li.id = this.id = "test-output" + testId++; + tests.appendChild( li ); + } + }, + setup: function() { + if (this.module != config.previousModule) { + if ( config.previousModule ) { + QUnit.moduleDone( { + name: config.previousModule, + failed: config.moduleStats.bad, + passed: config.moduleStats.all - config.moduleStats.bad, + total: config.moduleStats.all + } ); + } + config.previousModule = this.module; + config.moduleStats = { all: 0, bad: 0 }; + QUnit.moduleStart( { + name: this.module + } ); + } + + config.current = this; + this.testEnvironment = extend({ + setup: function() {}, + teardown: function() {} + }, this.moduleTestEnvironment); + if (this.testEnvironmentArg) { + extend(this.testEnvironment, this.testEnvironmentArg); + } + + QUnit.testStart( { + name: this.testName + } ); + + // allow utility functions to access the current test environment + // TODO why?? + QUnit.current_testEnvironment = this.testEnvironment; + + try { + if ( !config.pollution ) { + saveGlobal(); + } + + this.testEnvironment.setup.call(this.testEnvironment); + } catch(e) { + QUnit.ok( false, "Setup failed on " + this.testName + ": " + e.message ); + } + }, + run: function() { + if ( this.async ) { + QUnit.stop(); + } + + if ( config.notrycatch ) { + this.callback.call(this.testEnvironment); + return; + } + try { + this.callback.call(this.testEnvironment); + } catch(e) { + fail("Test " + this.testName + " died, exception and test follows", e, this.callback); + QUnit.ok( false, "Died on test #" + (this.assertions.length + 1) + ": " + e.message + " - " + QUnit.jsDump.parse(e) ); + // else next test will carry the responsibility + saveGlobal(); + + // Restart the tests if they're blocking + if ( config.blocking ) { + start(); + } + } + }, + teardown: function() { + try { + checkPollution(); + this.testEnvironment.teardown.call(this.testEnvironment); + } catch(e) { + QUnit.ok( false, "Teardown failed on " + this.testName + ": " + e.message ); + } + }, + finish: function() { + if ( this.expected && this.expected != this.assertions.length ) { + QUnit.ok( false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" ); + } + + var good = 0, bad = 0, + tests = id("qunit-tests"); + + config.stats.all += this.assertions.length; + config.moduleStats.all += this.assertions.length; + + if ( tests ) { + var ol = document.createElement("ol"); + + for ( var i = 0; i < this.assertions.length; i++ ) { + var assertion = this.assertions[i]; + + var li = document.createElement("li"); + li.className = assertion.result ? "pass" : "fail"; + li.innerHTML = assertion.message || (assertion.result ? "okay" : "failed"); + ol.appendChild( li ); + + if ( assertion.result ) { + good++; + } else { + bad++; + config.stats.bad++; + config.moduleStats.bad++; + } + } + + // store result when possible + if ( QUnit.config.reorder && defined.sessionStorage ) { + if (bad) { + sessionStorage.setItem("qunit-" + this.module + "-" + this.testName, bad); + } else { + sessionStorage.removeItem("qunit-" + this.module + "-" + this.testName); + } + } + + if (bad == 0) { + ol.style.display = "none"; + } + + var b = document.createElement("strong"); + b.innerHTML = this.name + " (" + bad + ", " + good + ", " + this.assertions.length + ")"; + + var a = document.createElement("a"); + a.innerHTML = "Rerun"; + a.href = QUnit.url({ filter: getText([b]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") }); + + addEvent(b, "click", function() { + var next = b.nextSibling.nextSibling, + display = next.style.display; + next.style.display = display === "none" ? "block" : "none"; + }); + + addEvent(b, "dblclick", function(e) { + var target = e && e.target ? e.target : window.event.srcElement; + if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) { + target = target.parentNode; + } + if ( window.location && target.nodeName.toLowerCase() === "strong" ) { + window.location = QUnit.url({ filter: getText([target]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") }); + } + }); + + var li = id(this.id); + li.className = bad ? "fail" : "pass"; + li.removeChild( li.firstChild ); + li.appendChild( b ); + li.appendChild( a ); + li.appendChild( ol ); + + } else { + for ( var i = 0; i < this.assertions.length; i++ ) { + if ( !this.assertions[i].result ) { + bad++; + config.stats.bad++; + config.moduleStats.bad++; + } + } + } + + try { + QUnit.reset(); + } catch(e) { + fail("reset() failed, following Test " + this.testName + ", exception and reset fn follows", e, QUnit.reset); + } + + QUnit.testDone( { + name: this.testName, + failed: bad, + passed: this.assertions.length - bad, + total: this.assertions.length + } ); + }, + + queue: function() { + var test = this; + synchronize(function() { + test.init(); + }); + function run() { + // each of these can by async + synchronize(function() { + test.setup(); + }); + synchronize(function() { + test.run(); + }); + synchronize(function() { + test.teardown(); + }); + synchronize(function() { + test.finish(); + }); + } + // defer when previous test run passed, if storage is available + var bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem("qunit-" + this.module + "-" + this.testName); + if (bad) { + run(); + } else { + synchronize(run); + }; + } + +}; + +var QUnit = { + + // call on start of module test to prepend name to all tests + module: function(name, testEnvironment) { + config.currentModule = name; + config.currentModuleTestEnviroment = testEnvironment; + }, + + asyncTest: function(testName, expected, callback) { + if ( arguments.length === 2 ) { + callback = expected; + expected = 0; + } + + QUnit.test(testName, expected, callback, true); + }, + + test: function(testName, expected, callback, async) { + var name = '' + testName + '', testEnvironmentArg; + + if ( arguments.length === 2 ) { + callback = expected; + expected = null; + } + // is 2nd argument a testEnvironment? + if ( expected && typeof expected === 'object') { + testEnvironmentArg = expected; + expected = null; + } + + if ( config.currentModule ) { + name = '' + config.currentModule + ": " + name; + } + + if ( !validTest(config.currentModule + ": " + testName) ) { + return; + } + + var test = new Test(name, testName, expected, testEnvironmentArg, async, callback); + test.module = config.currentModule; + test.moduleTestEnvironment = config.currentModuleTestEnviroment; + test.queue(); + }, + + /** + * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. + */ + expect: function(asserts) { + config.current.expected = asserts; + }, + + /** + * Asserts true. + * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" ); + */ + ok: function(a, msg) { + a = !!a; + var details = { + result: a, + message: msg + }; + msg = escapeHtml(msg); + QUnit.log(details); + config.current.assertions.push({ + result: a, + message: msg + }); + }, + + /** + * Checks that the first two arguments are equal, with an optional message. + * Prints out both actual and expected values. + * + * Prefered to ok( actual == expected, message ) + * + * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." ); + * + * @param Object actual + * @param Object expected + * @param String message (optional) + */ + equal: function(actual, expected, message) { + QUnit.push(expected == actual, actual, expected, message); + }, + + notEqual: function(actual, expected, message) { + QUnit.push(expected != actual, actual, expected, message); + }, + + deepEqual: function(actual, expected, message) { + QUnit.push(QUnit.equiv(actual, expected), actual, expected, message); + }, + + notDeepEqual: function(actual, expected, message) { + QUnit.push(!QUnit.equiv(actual, expected), actual, expected, message); + }, + + strictEqual: function(actual, expected, message) { + QUnit.push(expected === actual, actual, expected, message); + }, + + notStrictEqual: function(actual, expected, message) { + QUnit.push(expected !== actual, actual, expected, message); + }, + + raises: function(block, expected, message) { + var actual, ok = false; + + if (typeof expected === 'string') { + message = expected; + expected = null; + } + + try { + block(); + } catch (e) { + actual = e; + } + + if (actual) { + // we don't want to validate thrown error + if (!expected) { + ok = true; + // expected is a regexp + } else if (QUnit.objectType(expected) === "regexp") { + ok = expected.test(actual); + // expected is a constructor + } else if (actual instanceof expected) { + ok = true; + // expected is a validation function which returns true is validation passed + } else if (expected.call({}, actual) === true) { + ok = true; + } + } + + QUnit.ok(ok, message); + }, + + start: function() { + config.semaphore--; + if (config.semaphore > 0) { + // don't start until equal number of stop-calls + return; + } + if (config.semaphore < 0) { + // ignore if start is called more often then stop + config.semaphore = 0; + } + // A slight delay, to avoid any current callbacks + if ( defined.setTimeout ) { + window.setTimeout(function() { + if ( config.timeout ) { + clearTimeout(config.timeout); + } + + config.blocking = false; + process(); + }, 13); + } else { + config.blocking = false; + process(); + } + }, + + stop: function(timeout) { + config.semaphore++; + config.blocking = true; + + if ( timeout && defined.setTimeout ) { + clearTimeout(config.timeout); + config.timeout = window.setTimeout(function() { + QUnit.ok( false, "Test timed out" ); + QUnit.start(); + }, timeout); + } + } +}; + +// Backwards compatibility, deprecated +QUnit.equals = QUnit.equal; +QUnit.same = QUnit.deepEqual; + +// Maintain internal state +var config = { + // The queue of tests to run + queue: [], + + // block until document ready + blocking: true, + + // by default, run previously failed tests first + // very useful in combination with "Hide passed tests" checked + reorder: true, + + noglobals: false, + notrycatch: false +}; + +// Load paramaters +(function() { + var location = window.location || { search: "", protocol: "file:" }, + params = location.search.slice( 1 ).split( "&" ), + length = params.length, + urlParams = {}, + current; + + if ( params[ 0 ] ) { + for ( var i = 0; i < length; i++ ) { + current = params[ i ].split( "=" ); + current[ 0 ] = decodeURIComponent( current[ 0 ] ); + // allow just a key to turn on a flag, e.g., test.html?noglobals + current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true; + urlParams[ current[ 0 ] ] = current[ 1 ]; + if ( current[ 0 ] in config ) { + config[ current[ 0 ] ] = current[ 1 ]; + } + } + } + + QUnit.urlParams = urlParams; + config.filter = urlParams.filter; + + // Figure out if we're running the tests from a server or not + QUnit.isLocal = !!(location.protocol === 'file:'); +})(); + +// Expose the API as global variables, unless an 'exports' +// object exists, in that case we assume we're in CommonJS +if ( typeof exports === "undefined" || typeof require === "undefined" ) { + extend(window, QUnit); + window.QUnit = QUnit; +} else { + extend(exports, QUnit); + exports.QUnit = QUnit; +} + +// define these after exposing globals to keep them in these QUnit namespace only +extend(QUnit, { + config: config, + + // Initialize the configuration options + init: function() { + extend(config, { + stats: { all: 0, bad: 0 }, + moduleStats: { all: 0, bad: 0 }, + started: +new Date, + updateRate: 1000, + blocking: false, + autostart: true, + autorun: false, + filter: "", + queue: [], + semaphore: 0 + }); + + var tests = id( "qunit-tests" ), + banner = id( "qunit-banner" ), + result = id( "qunit-testresult" ); + + if ( tests ) { + tests.innerHTML = ""; + } + + if ( banner ) { + banner.className = ""; + } + + if ( result ) { + result.parentNode.removeChild( result ); + } + + if ( tests ) { + result = document.createElement( "p" ); + result.id = "qunit-testresult"; + result.className = "result"; + tests.parentNode.insertBefore( result, tests ); + result.innerHTML = 'Running...
           '; + } + }, + + /** + * Resets the test setup. Useful for tests that modify the DOM. + * + * If jQuery is available, uses jQuery's html(), otherwise just innerHTML. + */ + reset: function() { + if ( window.jQuery ) { + jQuery( "#qunit-fixture" ).html( config.fixture ); + } else { + var main = id( 'qunit-fixture' ); + if ( main ) { + main.innerHTML = config.fixture; + } + } + }, + + /** + * Trigger an event on an element. + * + * @example triggerEvent( document.body, "click" ); + * + * @param DOMElement elem + * @param String type + */ + triggerEvent: function( elem, type, event ) { + if ( document.createEvent ) { + event = document.createEvent("MouseEvents"); + event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView, + 0, 0, 0, 0, 0, false, false, false, false, 0, null); + elem.dispatchEvent( event ); + + } else if ( elem.fireEvent ) { + elem.fireEvent("on"+type); + } + }, + + // Safe object type checking + is: function( type, obj ) { + return QUnit.objectType( obj ) == type; + }, + + objectType: function( obj ) { + if (typeof obj === "undefined") { + return "undefined"; + + // consider: typeof null === object + } + if (obj === null) { + return "null"; + } + + var type = Object.prototype.toString.call( obj ) + .match(/^\[object\s(.*)\]$/)[1] || ''; + + switch (type) { + case 'Number': + if (isNaN(obj)) { + return "nan"; + } else { + return "number"; + } + case 'String': + case 'Boolean': + case 'Array': + case 'Date': + case 'RegExp': + case 'Function': + return type.toLowerCase(); + } + if (typeof obj === "object") { + return "object"; + } + return undefined; + }, + + push: function(result, actual, expected, message) { + var details = { + result: result, + message: message, + actual: actual, + expected: expected + }; + + message = escapeHtml(message) || (result ? "okay" : "failed"); + message = '' + message + ""; + expected = escapeHtml(QUnit.jsDump.parse(expected)); + actual = escapeHtml(QUnit.jsDump.parse(actual)); + var output = message + ''; + if (actual != expected) { + output += ''; + output += ''; + } + if (!result) { + var source = sourceFromStacktrace(); + if (source) { + details.source = source; + output += ''; + } + } + output += "
          Expected:
          ' + expected + '
          Result:
          ' + actual + '
          Diff:
          ' + QUnit.diff(expected, actual) +'
          Source:
          ' + source +'
          "; + + QUnit.log(details); + + config.current.assertions.push({ + result: !!result, + message: output + }); + }, + + url: function( params ) { + params = extend( extend( {}, QUnit.urlParams ), params ); + var querystring = "?", + key; + for ( key in params ) { + querystring += encodeURIComponent( key ) + "=" + + encodeURIComponent( params[ key ] ) + "&"; + } + return window.location.pathname + querystring.slice( 0, -1 ); + }, + + // Logging callbacks; all receive a single argument with the listed properties + // run test/logs.html for any related changes + begin: function() {}, + // done: { failed, passed, total, runtime } + done: function() {}, + // log: { result, actual, expected, message } + log: function() {}, + // testStart: { name } + testStart: function() {}, + // testDone: { name, failed, passed, total } + testDone: function() {}, + // moduleStart: { name } + moduleStart: function() {}, + // moduleDone: { name, failed, passed, total } + moduleDone: function() {} +}); + +if ( typeof document === "undefined" || document.readyState === "complete" ) { + config.autorun = true; +} + +addEvent(window, "load", function() { + QUnit.begin({}); + + // Initialize the config, saving the execution queue + var oldconfig = extend({}, config); + QUnit.init(); + extend(config, oldconfig); + + config.blocking = false; + + var userAgent = id("qunit-userAgent"); + if ( userAgent ) { + userAgent.innerHTML = navigator.userAgent; + } + var banner = id("qunit-header"); + if ( banner ) { + banner.innerHTML = ' ' + banner.innerHTML + ' ' + + '' + + ''; + addEvent( banner, "change", function( event ) { + var params = {}; + params[ event.target.name ] = event.target.checked ? true : undefined; + window.location = QUnit.url( params ); + }); + } + + var toolbar = id("qunit-testrunner-toolbar"); + if ( toolbar ) { + var filter = document.createElement("input"); + filter.type = "checkbox"; + filter.id = "qunit-filter-pass"; + addEvent( filter, "click", function() { + var ol = document.getElementById("qunit-tests"); + if ( filter.checked ) { + ol.className = ol.className + " hidepass"; + } else { + var tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " "; + ol.className = tmp.replace(/ hidepass /, " "); + } + if ( defined.sessionStorage ) { + if (filter.checked) { + sessionStorage.setItem("qunit-filter-passed-tests", "true"); + } else { + sessionStorage.removeItem("qunit-filter-passed-tests"); + } + } + }); + if ( defined.sessionStorage && sessionStorage.getItem("qunit-filter-passed-tests") ) { + filter.checked = true; + var ol = document.getElementById("qunit-tests"); + ol.className = ol.className + " hidepass"; + } + toolbar.appendChild( filter ); + + var label = document.createElement("label"); + label.setAttribute("for", "qunit-filter-pass"); + label.innerHTML = "Hide passed tests"; + toolbar.appendChild( label ); + } + + var main = id('qunit-fixture'); + if ( main ) { + config.fixture = main.innerHTML; + } + + if (config.autostart) { + QUnit.start(); + } +}); + +function done() { + config.autorun = true; + + // Log the last module results + if ( config.currentModule ) { + QUnit.moduleDone( { + name: config.currentModule, + failed: config.moduleStats.bad, + passed: config.moduleStats.all - config.moduleStats.bad, + total: config.moduleStats.all + } ); + } + + var banner = id("qunit-banner"), + tests = id("qunit-tests"), + runtime = +new Date - config.started, + passed = config.stats.all - config.stats.bad, + html = [ + 'Tests completed in ', + runtime, + ' milliseconds.
          ', + '', + passed, + ' tests of ', + config.stats.all, + ' passed, ', + config.stats.bad, + ' failed.' + ].join(''); + + if ( banner ) { + banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass"); + } + + if ( tests ) { + id( "qunit-testresult" ).innerHTML = html; + } + + QUnit.done( { + failed: config.stats.bad, + passed: passed, + total: config.stats.all, + runtime: runtime + } ); +} + +function validTest( name ) { + var filter = config.filter, + run = false; + + if ( !filter ) { + return true; + } + + not = filter.charAt( 0 ) === "!"; + if ( not ) { + filter = filter.slice( 1 ); + } + + if ( name.indexOf( filter ) !== -1 ) { + return !not; + } + + if ( not ) { + run = true; + } + + return run; +} + +// so far supports only Firefox, Chrome and Opera (buggy) +// could be extended in the future to use something like https://github.com/csnover/TraceKit +function sourceFromStacktrace() { + try { + throw new Error(); + } catch ( e ) { + if (e.stacktrace) { + // Opera + return e.stacktrace.split("\n")[6]; + } else if (e.stack) { + // Firefox, Chrome + return e.stack.split("\n")[4]; + } + } +} + +function escapeHtml(s) { + if (!s) { + return ""; + } + s = s + ""; + return s.replace(/[\&"<>\\]/g, function(s) { + switch(s) { + case "&": return "&"; + case "\\": return "\\\\"; + case '"': return '\"'; + case "<": return "<"; + case ">": return ">"; + default: return s; + } + }); +} + +function synchronize( callback ) { + config.queue.push( callback ); + + if ( config.autorun && !config.blocking ) { + process(); + } +} + +function process() { + var start = (new Date()).getTime(); + + while ( config.queue.length && !config.blocking ) { + if ( config.updateRate <= 0 || (((new Date()).getTime() - start) < config.updateRate) ) { + config.queue.shift()(); + } else { + window.setTimeout( process, 13 ); + break; + } + } + if (!config.blocking && !config.queue.length) { + done(); + } +} + +function saveGlobal() { + config.pollution = []; + + if ( config.noglobals ) { + for ( var key in window ) { + config.pollution.push( key ); + } + } +} + +function checkPollution( name ) { + var old = config.pollution; + saveGlobal(); + + var newGlobals = diff( config.pollution, old ); + if ( newGlobals.length > 0 ) { + ok( false, "Introduced global variable(s): " + newGlobals.join(", ") ); + } + + var deletedGlobals = diff( old, config.pollution ); + if ( deletedGlobals.length > 0 ) { + ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") ); + } +} + +// returns a new Array with the elements that are in a but not in b +function diff( a, b ) { + var result = a.slice(); + for ( var i = 0; i < result.length; i++ ) { + for ( var j = 0; j < b.length; j++ ) { + if ( result[i] === b[j] ) { + result.splice(i, 1); + i--; + break; + } + } + } + return result; +} + +function fail(message, exception, callback) { + if ( typeof console !== "undefined" && console.error && console.warn ) { + console.error(message); + console.error(exception); + console.warn(callback.toString()); + + } else if ( window.opera && opera.postError ) { + opera.postError(message, exception, callback.toString); + } +} + +function extend(a, b) { + for ( var prop in b ) { + if ( b[prop] === undefined ) { + delete a[prop]; + } else { + a[prop] = b[prop]; + } + } + + return a; +} + +function addEvent(elem, type, fn) { + if ( elem.addEventListener ) { + elem.addEventListener( type, fn, false ); + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, fn ); + } else { + fn(); + } +} + +function id(name) { + return !!(typeof document !== "undefined" && document && document.getElementById) && + document.getElementById( name ); +} + +// Test for equality any JavaScript type. +// Discussions and reference: http://philrathe.com/articles/equiv +// Test suites: http://philrathe.com/tests/equiv +// Author: Philippe Rathé +QUnit.equiv = function () { + + var innerEquiv; // the real equiv function + var callers = []; // stack to decide between skip/abort functions + var parents = []; // stack to avoiding loops from circular referencing + + // Call the o related callback with the given arguments. + function bindCallbacks(o, callbacks, args) { + var prop = QUnit.objectType(o); + if (prop) { + if (QUnit.objectType(callbacks[prop]) === "function") { + return callbacks[prop].apply(callbacks, args); + } else { + return callbacks[prop]; // or undefined + } + } + } + + var callbacks = function () { + + // for string, boolean, number and null + function useStrictEquality(b, a) { + if (b instanceof a.constructor || a instanceof b.constructor) { + // to catch short annotaion VS 'new' annotation of a declaration + // e.g. var i = 1; + // var j = new Number(1); + return a == b; + } else { + return a === b; + } + } + + return { + "string": useStrictEquality, + "boolean": useStrictEquality, + "number": useStrictEquality, + "null": useStrictEquality, + "undefined": useStrictEquality, + + "nan": function (b) { + return isNaN(b); + }, + + "date": function (b, a) { + return QUnit.objectType(b) === "date" && a.valueOf() === b.valueOf(); + }, + + "regexp": function (b, a) { + return QUnit.objectType(b) === "regexp" && + a.source === b.source && // the regex itself + a.global === b.global && // and its modifers (gmi) ... + a.ignoreCase === b.ignoreCase && + a.multiline === b.multiline; + }, + + // - skip when the property is a method of an instance (OOP) + // - abort otherwise, + // initial === would have catch identical references anyway + "function": function () { + var caller = callers[callers.length - 1]; + return caller !== Object && + typeof caller !== "undefined"; + }, + + "array": function (b, a) { + var i, j, loop; + var len; + + // b could be an object literal here + if ( ! (QUnit.objectType(b) === "array")) { + return false; + } + + len = a.length; + if (len !== b.length) { // safe and faster + return false; + } + + //track reference to avoid circular references + parents.push(a); + for (i = 0; i < len; i++) { + loop = false; + for(j=0;j= 0) { + type = "array"; + } else { + type = typeof obj; + } + return type; + }, + separator:function() { + return this.multiline ? this.HTML ? '
          ' : '\n' : this.HTML ? ' ' : ' '; + }, + indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing + if ( !this.multiline ) + return ''; + var chr = this.indentChar; + if ( this.HTML ) + chr = chr.replace(/\t/g,' ').replace(/ /g,' '); + return Array( this._depth_ + (extra||0) ).join(chr); + }, + up:function( a ) { + this._depth_ += a || 1; + }, + down:function( a ) { + this._depth_ -= a || 1; + }, + setParser:function( name, parser ) { + this.parsers[name] = parser; + }, + // The next 3 are exposed so you can use them + quote:quote, + literal:literal, + join:join, + // + _depth_: 1, + // This is the list of parsers, to modify them, use jsDump.setParser + parsers:{ + window: '[Window]', + document: '[Document]', + error:'[ERROR]', //when no parser is found, shouldn't happen + unknown: '[Unknown]', + 'null':'null', + 'undefined':'undefined', + 'function':function( fn ) { + var ret = 'function', + name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE + if ( name ) + ret += ' ' + name; + ret += '('; + + ret = [ ret, QUnit.jsDump.parse( fn, 'functionArgs' ), '){'].join(''); + return join( ret, QUnit.jsDump.parse(fn,'functionCode'), '}' ); + }, + array: array, + nodelist: array, + arguments: array, + object:function( map ) { + var ret = [ ]; + QUnit.jsDump.up(); + for ( var key in map ) + ret.push( QUnit.jsDump.parse(key,'key') + ': ' + QUnit.jsDump.parse(map[key]) ); + QUnit.jsDump.down(); + return join( '{', ret, '}' ); + }, + node:function( node ) { + var open = QUnit.jsDump.HTML ? '<' : '<', + close = QUnit.jsDump.HTML ? '>' : '>'; + + var tag = node.nodeName.toLowerCase(), + ret = open + tag; + + for ( var a in QUnit.jsDump.DOMAttrs ) { + var val = node[QUnit.jsDump.DOMAttrs[a]]; + if ( val ) + ret += ' ' + a + '=' + QUnit.jsDump.parse( val, 'attribute' ); + } + return ret + close + open + '/' + tag + close; + }, + functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function + var l = fn.length; + if ( !l ) return ''; + + var args = Array(l); + while ( l-- ) + args[l] = String.fromCharCode(97+l);//97 is 'a' + return ' ' + args.join(', ') + ' '; + }, + key:quote, //object calls it internally, the key part of an item in a map + functionCode:'[code]', //function calls it internally, it's the content of the function + attribute:quote, //node calls it internally, it's an html attribute value + string:quote, + date:quote, + regexp:literal, //regex + number:literal, + 'boolean':literal + }, + DOMAttrs:{//attributes to dump from nodes, name=>realName + id:'id', + name:'name', + 'class':'className' + }, + HTML:false,//if true, entities are escaped ( <, >, \t, space and \n ) + indentChar:' ',//indentation unit + multiline:true //if true, items in a collection, are separated by a \n, else just a space. + }; + + return jsDump; +})(); + +// from Sizzle.js +function getText( elems ) { + var ret = "", elem; + + for ( var i = 0; elems[i]; i++ ) { + elem = elems[i]; + + // Get the text from text nodes and CDATA nodes + if ( elem.nodeType === 3 || elem.nodeType === 4 ) { + ret += elem.nodeValue; + + // Traverse everything else, except comment nodes + } else if ( elem.nodeType !== 8 ) { + ret += getText( elem.childNodes ); + } + } + + return ret; +}; + +/* + * Javascript Diff Algorithm + * By John Resig (http://ejohn.org/) + * Modified by Chu Alan "sprite" + * + * Released under the MIT license. + * + * More Info: + * http://ejohn.org/projects/javascript-diff-algorithm/ + * + * Usage: QUnit.diff(expected, actual) + * + * QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick brown fox jumped jumps over" + */ +QUnit.diff = (function() { + function diff(o, n){ + var ns = new Object(); + var os = new Object(); + + for (var i = 0; i < n.length; i++) { + if (ns[n[i]] == null) + ns[n[i]] = { + rows: new Array(), + o: null + }; + ns[n[i]].rows.push(i); + } + + for (var i = 0; i < o.length; i++) { + if (os[o[i]] == null) + os[o[i]] = { + rows: new Array(), + n: null + }; + os[o[i]].rows.push(i); + } + + for (var i in ns) { + if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) { + n[ns[i].rows[0]] = { + text: n[ns[i].rows[0]], + row: os[i].rows[0] + }; + o[os[i].rows[0]] = { + text: o[os[i].rows[0]], + row: ns[i].rows[0] + }; + } + } + + for (var i = 0; i < n.length - 1; i++) { + if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null && + n[i + 1] == o[n[i].row + 1]) { + n[i + 1] = { + text: n[i + 1], + row: n[i].row + 1 + }; + o[n[i].row + 1] = { + text: o[n[i].row + 1], + row: i + 1 + }; + } + } + + for (var i = n.length - 1; i > 0; i--) { + if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null && + n[i - 1] == o[n[i].row - 1]) { + n[i - 1] = { + text: n[i - 1], + row: n[i].row - 1 + }; + o[n[i].row - 1] = { + text: o[n[i].row - 1], + row: i - 1 + }; + } + } + + return { + o: o, + n: n + }; + } + + return function(o, n){ + o = o.replace(/\s+$/, ''); + n = n.replace(/\s+$/, ''); + var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/)); + + var str = ""; + + var oSpace = o.match(/\s+/g); + if (oSpace == null) { + oSpace = [" "]; + } + else { + oSpace.push(" "); + } + var nSpace = n.match(/\s+/g); + if (nSpace == null) { + nSpace = [" "]; + } + else { + nSpace.push(" "); + } + + if (out.n.length == 0) { + for (var i = 0; i < out.o.length; i++) { + str += '' + out.o[i] + oSpace[i] + ""; + } + } + else { + if (out.n[0].text == null) { + for (n = 0; n < out.o.length && out.o[n].text == null; n++) { + str += '' + out.o[n] + oSpace[n] + ""; + } + } + + for (var i = 0; i < out.n.length; i++) { + if (out.n[i].text == null) { + str += '' + out.n[i] + nSpace[i] + ""; + } + else { + var pre = ""; + + for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) { + pre += '' + out.o[n] + oSpace[n] + ""; + } + str += " " + out.n[i].text + nSpace[i] + pre; + } + } + } + + return str; + }; +})(); + +})(this); diff --git a/bug/bug/jquery-validation-1.8.1/test/rules.js b/bug/bug/jquery-validation-1.8.1/test/rules.js new file mode 100644 index 0000000..3eaa377 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/rules.js @@ -0,0 +1,267 @@ +module("rules"); + +test("rules() - internal - input", function() { + var element = $('#firstname'); + var v = $('#testForm1').validate(); + same( element.rules(), { required: true, minlength: 2 } ); +}); + +test("rules(), ignore method:false", function() { + var element = $('#firstnamec'); + var v = $('#testForm1clean').validate({ + rules: { + firstname: { required: false, minlength: 2 } + } + }); + same( element.rules(), { minlength: 2 } ); +}); + +test("rules() - internal - select", function() { + var element = $('#meal'); + var v = $('#testForm3').validate(); + same( element.rules(), {required: true} ); +}); + +test("rules() - external", function() { + var element = $('#text1'); + var v = $('#form').validate({ + rules: { + action: {date: true, min: 5} + } + }); + same( element.rules(), {date: true, min: 5} ); +}); + +test("rules() - external - complete form", function() { + expect(1); + + var methods = $.extend({}, $.validator.methods); + var messages = $.extend({}, $.validator.messages); + + $.validator.addMethod("verifyTest", function() { + ok( true, "method executed" ); + return true; + }); + var v = $('#form').validate({ + rules: { + action: {verifyTest: true} + } + }); + v.form(); + + $.validator.methods = methods; + $.validator.messages = messages; +}); + +test("rules() - internal - input", function() { + var element = $('#form8input'); + var v = $('#testForm8').validate(); + same( element.rules(), {required: true, number: true, rangelength: [2, 8]}); +}); + +test("rules(), merge min/max to range, minlength/maxlength to rangelength", function() { + jQuery.validator.autoCreateRanges = true; + var v = $("#testForm1clean").validate({ + rules: { + firstname: { + min: 5, + max: 12 + }, + lastname: { + minlength: 2, + maxlength: 8 + } + } + }); + same( $("#firstnamec").rules(), {range: [5, 12]}); + + same( $("#lastnamec").rules(), {rangelength: [2, 8]} ); + jQuery.validator.autoCreateRanges = false; +}); + +test("rules(), gurantee that required is at front", function() { + $("#testForm1").validate(); + var v = $("#v2").validate(); + $("#subformRequired").validate(); + function flatRules(element) { + var result = []; + jQuery.each($(element).rules(), function(key, value) { result.push(key) }); + return result.join(" "); + } + equals( "required minlength", flatRules("#firstname") ); + equals( "required maxlength minlength", flatRules("#v2-i6") ); + equals( "required maxlength", flatRules("#co_name") ); + + QUnit.reset(); + jQuery.validator.autoCreateRanges = true; + v = $("#v2").validate(); + equals( "required rangelength", flatRules("#v2-i6") ); + + $("#subformRequired").validate({ + rules: { + co_name: "required" + } + }); + $("#co_name").removeClass(); + equals( "required maxlength", flatRules("#co_name") ); + jQuery.validator.autoCreateRanges = false; +}); + +test("rules(), evaluate dynamic parameters", function() { + expect(2); + var v = $("#testForm1clean").validate({ + rules: { + firstname: { + min: function(element) { + equals( $("#firstnamec")[0], element ); + return 12; + } + } + } + }); + same( $("#firstnamec").rules(), {min:12}); +}); + +test("rules(), class and attribute combinations", function() { + + $.validator.addMethod("customMethod1", function() { + return false; + }, ""); + $.validator.addMethod("customMethod2", function() { + return false; + }, ""); + var v = $("#v2").validate({ + rules: { + 'v2-i7': { + required: true, + minlength: 2, + customMethod: true + } + } + }); + same( $("#v2-i1").rules(), { required: true }); + same( $("#v2-i2").rules(), { required: true, email: true }); + same( $("#v2-i3").rules(), { url: true }); + same( $("#v2-i4").rules(), { required: true, minlength: 2 }); + same( $("#v2-i5").rules(), { required: true, minlength: 2, maxlength: 5, customMethod1: "123" }); + jQuery.validator.autoCreateRanges = true; + same( $("#v2-i5").rules(), { required: true, customMethod1: "123", rangelength: [2, 5] }); + same( $("#v2-i6").rules(), { required: true, customMethod2: true, rangelength: [2, 5] }); + jQuery.validator.autoCreateRanges = false; + same( $("#v2-i7").rules(), { required: true, minlength: 2, customMethod: true }); + + delete $.validator.methods.customMethod1; + delete $.validator.messages.customMethod1; + delete $.validator.methods.customMethod2; + delete $.validator.messages.customMethod2; +}); + +test("rules(), dependency checks", function() { + var v = $("#testForm1clean").validate({ + rules: { + firstname: { + min: { + param: 5, + depends: function(el) { + return /^a/.test($(el).val()); + } + } + }, + lastname: { + max: { + param: 12 + }, + email: { + depends: function() { return true; } + } + } + } + }); + + var rules = $("#firstnamec").rules(); + equals( 0, v.objectLength(rules) ); + + $("#firstnamec").val('ab'); + same( $("#firstnamec").rules(), {min:5}); + + same( $("#lastnamec").rules(), {max:12, email:true}); +}); + +test("rules(), add and remove", function() { + $.validator.addMethod("customMethod1", function() { + return false; + }, ""); + $("#v2").validate(); + var removedAttrs = $("#v2-i5").removeClass("required").removeAttrs("minlength maxlength"); + same( $("#v2-i5").rules(), { customMethod1: "123" }); + + $("#v2-i5").addClass("required").attr(removedAttrs); + same( $("#v2-i5").rules(), { required: true, minlength: 2, maxlength: 5, customMethod1: "123" }); + + $("#v2-i5").addClass("email").attr({min: 5}); + same( $("#v2-i5").rules(), { required: true, email: true, minlength: 2, maxlength: 5, min: 5, customMethod1: "123" }); + + $("#v2-i5").removeClass("required email").removeAttrs("minlength maxlength customMethod1 min"); + same( $("#v2-i5").rules(), {}); + + delete $.validator.methods.customMethod1; + delete $.validator.messages.customMethod1; +}); + +test("rules(), add and remove static rules", function() { + var v = $("#testForm1clean").validate({ + rules: { + firstname: "required date" + } + }); + same( $("#firstnamec").rules(), { required: true, date: true } ); + + $("#firstnamec").rules("remove", "date") + same( $("#firstnamec").rules(), { required: true } ); + $("#firstnamec").rules("add", "email"); + same( $("#firstnamec").rules(), { required: true, email: true } ); + + $("#firstnamec").rules("remove", "required"); + same( $("#firstnamec").rules(), { email: true } ); + + same( $("#firstnamec").rules("remove"), { email: true } ); + same( $("#firstnamec").rules(), { } ); + + $("#firstnamec").rules("add", "required email"); + same( $("#firstnamec").rules(), { required: true, email: true } ); + + + same( $("#lastnamec").rules(), {} ); + $("#lastnamec").rules("add", "required"); + $("#lastnamec").rules("add", { + minlength: 2 + }); + same( $("#lastnamec").rules(), { required: true, minlength: 2 } ); + + + var removedRules = $("#lastnamec").rules("remove", "required email"); + same( $("#lastnamec").rules(), { minlength: 2 } ); + $("#lastnamec").rules("add", removedRules); + same( $("#lastnamec").rules(), { required: true, minlength: 2 } ); +}); + +test("rules(), add messages", function() { + $("#firstnamec").attr("title", null); + var v = $("#testForm1clean").validate({ + rules: { + firstname: "required" + } + }); + $("#testForm1clean").valid(); + $("#firstnamec").valid(); + same( v.settings.messages.firstname, undefined ); + + $("#firstnamec").rules("add", { + messages: { + required: "required" + } + }); + + $("#firstnamec").valid(); + same( v.errorList[0] && v.errorList[0].message, "required" ); +}); diff --git a/bug/bug/jquery-validation-1.8.1/test/selects/index.html b/bug/bug/jquery-validation-1.8.1/test/selects/index.html new file mode 100644 index 0000000..8bc8f8f --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/selects/index.html @@ -0,0 +1,444 @@ + + + + + +Fun with jQuery + + + + + + + + + + + +Mission: + + +CODE + + + + + +
          + + + + + + + + + diff --git a/bug/bug/jquery-validation-1.8.1/test/tabs.html b/bug/bug/jquery-validation-1.8.1/test/tabs.html new file mode 100644 index 0000000..2fb8a00 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/tabs.html @@ -0,0 +1,78 @@ + + + + +Test for jQuery validate() plugin + + + + + + + + + + + + + + + + + +
          + +
          + +
          +
          + A simple comment form with submit validation and default messages +

          + + +

          + + +

          +

          + + +

          +

          + + +

          +
          + +
          +
          + Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. + Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. +
          +
          + Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. + Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. + Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. +
          +
          +

          + +

          + +
          + + + \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/test/test.js b/bug/bug/jquery-validation-1.8.1/test/test.js new file mode 100644 index 0000000..a12bb92 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/test/test.js @@ -0,0 +1,1139 @@ +window.sessionStorage && sessionStorage.clear(); +jQuery.validator.defaults.debug = true; +$.mockjaxSettings.log = $.noop; + +$.mockjax({ + url: "form.php?user=Peter&password=foobar", + responseText: 'Hi Peter, welcome back.', + responseStatus: 200, + responseTime: 1 +}); +$.mockjax({ + url: "users.php", + data: { username: /Peter2?|asdf/}, + responseText: 'false', + responseStatus: 200, + responseTime: 1 +}); +$.mockjax({ + url: "users2.php", + data: { username: "asdf"}, + responseText: '"asdf is already taken, please try something else"', + responseStatus: 200, + responseTime: 1 +}); + +module("validator"); + +test("Constructor", function() { + var v1 = $("#testForm1").validate(); + var v2 = $("#testForm1").validate(); + equals( v1, v2, "Calling validate() multiple times must return the same validator instance" ); + equals( v1.elements().length, 3, "validator elements" ); +}); + +test("validate() without elements, with non-form elements", function() { + $("#doesn'texist").validate(); +}); + +test("valid() plugin method", function() { + var form = $("#userForm"); + form.validate(); + ok ( !form.valid(), "Form isn't valid yet" ); + var input = $("#username"); + ok ( !input.valid(), "Input isn't valid either" ); + input.val("Hello world"); + ok ( form.valid(), "Form is now valid" ); + ok ( input.valid(), "Input is valid, too" ); +}); + +test("valid() plugin method", function() { + var form = $("#testForm1"); + form.validate(); + var inputs = form.find("input"); + ok( !inputs.valid(), "all invalid" ); + inputs.not(":first").val("ok"); + ok( !inputs.valid(), "just one invalid" ); + inputs.val("ok"); + ok( inputs.valid(), "all valid" ); +}); + +test("valid() plugin method, special handling for checkable groups", function() { + // rule is defined on first checkbox, must apply to others, too + var checkable = $("#checkable2"); + ok( !checkable.valid(), "must be invalid, not checked yet" ); + checkable.attr("checked", true); + ok( checkable.valid(), "valid, is now checked" ); + checkable.attr("checked", false); + ok( !checkable.valid(), "invalid again" ); + $("#checkable3").attr("checked", true); + ok( checkable.valid(), "valid, third box is checked" ); +}); + +test("addMethod", function() { + expect( 3 ); + $.validator.addMethod("hi", function(value) { + return value == "hi"; + }, "hi me too"); + var method = $.validator.methods.hi, + e = $('#text1')[0]; + ok( !method(e.value, e), "Invalid" ); + e.value = "hi"; + ok( method(e.value, e), "Invalid" ); + ok( jQuery.validator.messages.hi == "hi me too", "Check custom message" ); +}); + +test("addMethod2", function() { + expect( 4 ); + $.validator.addMethod("complicatedPassword", function(value, element, param) { + return this.optional(element) || /\D/.test(value) && /\d/.test(value) + }, "Your password must contain at least one number and one letter"); + var v = jQuery("#form").validate({ + rules: { + action: { complicatedPassword: true } + } + }); + var rule = $.validator.methods.complicatedPassword, + e = $('#text1')[0]; + e.value = ""; + ok( v.element(e) === undefined, "Rule is optional, valid" ); + equals( 0, v.size() ); + e.value = "ko"; + ok( !v.element(e), "Invalid, doesn't contain one of the required characters" ); + e.value = "ko1"; + ok( v.element(e) ); +}); + +test("form(): simple", function() { + expect( 2 ); + var form = $('#testForm1')[0]; + var v = $(form).validate(); + ok( !v.form(), 'Invalid form' ); + $('#firstname').val("hi"); + $('#lastname').val("hi"); + ok( v.form(), 'Valid form' ); +}); + +test("form(): checkboxes: min/required", function() { + expect( 3 ); + var form = $('#testForm6')[0]; + var v = $(form).validate(); + ok( !v.form(), 'Invalid form' ); + $('#form6check1').attr("checked", true); + ok( !v.form(), 'Invalid form' ); + $('#form6check2').attr("checked", true); + ok( v.form(), 'Valid form' ); +}); + +test("form(): radio buttons: required", function () { + expect( 6 ); + var form = $('#testForm10')[0]; + + var v = $(form).validate({ rules: { testForm10Radio: "required"} }); + ok(!v.form(), 'Invalid Form'); + equals($('#testForm10Radio1').attr('class'), 'error'); + equals($('#testForm10Radio2').attr('class'), 'error'); + + $('#testForm10Radio2').attr("checked", true); + ok(v.form(), 'Valid form'); + + equals($('#testForm10Radio1').attr('class'), 'valid'); + equals($('#testForm10Radio2').attr('class'), 'valid'); +}); + +test("form(): selects: min/required", function() { + expect( 3 ); + var form = $('#testForm7')[0]; + var v = $(form).validate(); + ok( !v.form(), 'Invalid form' ); + $("#optionxa").attr("selected", true); + ok( !v.form(), 'Invalid form' ); + $("#optionxb").attr("selected", true); + ok( v.form(), 'Valid form' ); +}); + +test("form(): with equalTo", function() { + expect( 2 ); + var form = $('#testForm5')[0]; + var v = $(form).validate(); + ok( !v.form(), 'Invalid form' ); + $('#x1, #x2').val("hi"); + ok( v.form(), 'Valid form' ); +}); + +test("check(): simple", function() { + expect( 3 ); + var element = $('#firstname')[0]; + var v = $('#testForm1').validate(); + ok( v.size() == 0, 'No errors yet' ); + v.check(element); + ok( v.size() == 1, 'error exists' ); + v.errorList = []; + $('#firstname').val("hi"); + v.check(element); + ok( !v.size() == 1, 'No more errors' ); +}); + +test("hide(): input", function() { + expect( 3 ); + var errorLabel = $('#errorFirstname'); + var element = $('#firstname')[0]; + element.value ="bla"; + var v = $('#testForm1').validate(); + errorLabel.show(); + ok( errorLabel.is(":visible"), "Error label visible before validation" ); + ok( v.element(element) ); + ok( errorLabel.is(":hidden"), "Error label not visible after validation" ); +}); + +test("hide(): radio", function() { + expect( 2 ); + var errorLabel = $('#agreeLabel'); + var element = $('#agb')[0]; + element.checked = true; + var v = $('#testForm2').validate({ errorClass: "xerror" }); + errorLabel.show(); + ok( errorLabel.is(":visible"), "Error label visible after validation" ); + v.element(element); + ok( errorLabel.is(":hidden"), "Error label not visible after hiding it" ); +}); + +test("hide(): errorWrapper", function() { + expect(2); + var errorLabel = $('#errorWrapper'); + var element = $('#meal')[0]; + element.selectedIndex = 1; + + errorLabel.show(); + ok( errorLabel.is(":visible"), "Error label visible after validation" ); + var v = $('#testForm3').validate({ wrapper: "li", errorLabelContainer: $("#errorContainer") }); + v.element(element); + ok( errorLabel.is(":hidden"), "Error label not visible after hiding it" ); +}); + +test("hide(): container", function() { + expect(4); + var errorLabel = $('#errorContainer'); + var element = $('#testForm3')[0]; + var v = $('#testForm3').validate({ errorWrapper: "li", errorContainer: $("#errorContainer") }); + v.form(); + ok( errorLabel.is(":visible"), "Error label visible after validation" ); + $('#meal')[0].selectedIndex = 1; + v.form(); + ok( errorLabel.is(":hidden"), "Error label not visible after hiding it" ); + $('#meal')[0].selectedIndex = -1; + v.element("#meal"); + ok( errorLabel.is(":visible"), "Error label visible after validation" ); + $('#meal')[0].selectedIndex = 1; + v.element("#meal"); + ok( errorLabel.is(":hidden"), "Error label not visible after hiding it" ); +}); + +test("valid()", function() { + expect(4); + var errorList = [{name:"meal",message:"foo", element:$("#meal")[0]}]; + var v = $('#testForm3').validate(); + ok( v.valid(), "No errors, must be valid" ); + v.errorList = errorList; + ok( !v.valid(), "One error, must be invalid" ); + QUnit.reset(); + v = $('#testForm3').validate({ submitHandler: function() { + ok( false, "Submit handler was called" ); + }}); + ok( v.valid(), "No errors, must be valid and returning true, even with the submit handler" ); + v.errorList = errorList; + ok( !v.valid(), "One error, must be invalid, no call to submit handler" ); +}); + +test("submitHandler keeps submitting button", function() { + $("#userForm").validate({ + debug: true, + submitHandler: function(form) { + // dunno how to test this better; this tests the implementation that uses a hidden input + var hidden = $(form).find("input:hidden")[0]; + same(hidden.value, button.value) + same(hidden.name, button.name) + } + }); + $("#username").val("bla"); + var button = $("#userForm :submit")[0] + $(button).triggerHandler("click"); + $("#userForm").submit(); +}); + +test("showErrors()", function() { + expect( 4 ); + var errorLabel = $('#errorFirstname').hide(); + var element = $('#firstname')[0]; + var v = $('#testForm1').validate(); + ok( errorLabel.is(":hidden") ); + equals( 0, $("label.error[for=lastname]").size() ); + v.showErrors({"firstname": "required", "lastname": "bla"}); + equals( true, errorLabel.is(":visible") ); + equals( true, $("label.error[for=lastname]").is(":visible") ); +}); + +test("showErrors(), allow empty string and null as default message", function() { + $("#userForm").validate({ + rules: { + username: { + required: true, + minlength: 3 + } + }, + messages: { + username: { + required: "", + minlength: "too short" + } + } + }); + ok( !$("#username").valid() ); + equals( "", $("label.error[for=username]").text() ); + + $("#username").val("ab"); + ok( !$("#username").valid() ); + equals( "too short", $("label.error[for=username]").text() ); + + $("#username").val("abc"); + ok( $("#username").valid() ); + ok( $("label.error[for=username]").is(":hidden") ); +}); + +test("showErrors() - external messages", function() { + expect( 4 ); + var methods = $.extend({}, $.validator.methods); + var messages = $.extend({}, $.validator.messages); + $.validator.addMethod("foo", function() { return false; }); + $.validator.addMethod("bar", function() { return false; }); + equals( 0, $("#testForm4 label.error[for=f1]").size() ); + equals( 0, $("#testForm4 label.error[for=f2]").size() ); + var form = $('#testForm4')[0]; + var v = $(form).validate({ + messages: { + f1: "Please!", + f2: "Wohoo!" + } + }); + v.form(); + equals( $("#testForm4 label.error[for=f1]").text(), "Please!" ); + equals( $("#testForm4 label.error[for=f2]").text(), "Wohoo!" ); + + $.validator.methods = methods; + $.validator.messages = messages; +}); + +test("showErrors() - custom handler", function() { + expect(5); + var v = $('#testForm1').validate({ + showErrors: function(errorMap, errorList) { + equals( v, this ); + equals( v.errorList, errorList ); + equals( v.errorMap, errorMap ); + equals( "buga", errorMap.firstname ); + equals( "buga", errorMap.lastname ); + } + }); + v.form(); +}); + +test("option: (un)highlight, default", function() { + $("#testForm1").validate(); + var e = $("#firstname") + ok( !e.hasClass("error") ); + ok( !e.hasClass("valid") ); + e.valid() + ok( e.hasClass("error") ); + ok( !e.hasClass("valid") ); + e.val("hithere").valid() + ok( !e.hasClass("error") ); + ok( e.hasClass("valid") ); +}); + +test("option: (un)highlight, nothing", function() { + expect(3); + $("#testForm1").validate({ + highlight: false, + unhighlight: false + }); + var e = $("#firstname") + ok( !e.hasClass("error") ); + e.valid() + ok( !e.hasClass("error") ); + e.valid() + ok( !e.hasClass("error") ); +}); + +test("option: (un)highlight, custom", function() { + expect(5); + $("#testForm1clean").validate({ + highlight: function(element, errorClass) { + equals( "invalid", errorClass ); + $(element).hide(); + }, + unhighlight: function(element, errorClass) { + equals( "invalid", errorClass ) + $(element).show(); + }, + errorClass: "invalid", + rules: { + firstname: "required" + } + }); + var e = $("#firstnamec") + ok( e.is(":visible") ); + e.valid() + ok( !e.is(":visible") ); + e.val("hithere").valid() + ok( e.is(":visible") ); +}); + +test("option: (un)highlight, custom2", function() { + expect(6); + $("#testForm1").validate({ + highlight: function(element, errorClass) { + $(element).addClass(errorClass); + $(element.form).find("label[for=" + element.id + "]").addClass(errorClass); + }, + unhighlight: function(element, errorClass) { + $(element).removeClass(errorClass); + $(element.form).find("label[for=" + element.id + "]").removeClass(errorClass); + }, + errorClass: "invalid" + }); + var e = $("#firstname") + var l = $("#errorFirstname") + ok( !e.is(".invalid") ); + ok( !l.is(".invalid") ); + e.valid() + ok( e.is(".invalid") ); + ok( l.is(".invalid") ); + e.val("hithere").valid() + ok( !e.is(".invalid") ); + ok( !l.is(".invalid") ); +}); + +test("option: focusCleanup default false", function() { + var form = $("#userForm") + form.validate(); + form.valid(); + ok( form.is(":has(label.error[for=username]:visible)")); + $("#username").focus(); + ok( form.is(":has(label.error[for=username]:visible)")); +}); + +test("option: focusCleanup true", function() { + var form = $("#userForm") + form.validate({ + focusCleanup: true + }); + form.valid(); + ok( form.is(":has(label.error[for=username]:visible)") ); + $("#username").focus().trigger("focusin"); + ok( !form.is(":has(label.error[for=username]:visible)") ); +}); + +test("option: focusCleanup with wrapper", function() { + var form = $("#userForm") + form.validate({ + focusCleanup: true, + wrapper: "span" + }); + form.valid(); + ok( form.is(":has(span:visible:has(label.error[for=username]))") ); + $("#username").focus().trigger("focusin"); + ok( !form.is(":has(span:visible:has(label.error[for=username]))") ); +}); + +test("elements() order", function() { + var container = $("#orderContainer"); + var v = $("#elementsOrder").validate({ + errorLabelContainer: container, + wrap: "li" + }); + deepEqual( v.elements().map(function() { + return $(this).attr("id"); + }).get(), ["order1", "order2", "order3", "order4", "order5", "order6"], "elements must be in document order" ); + v.form(); + deepEqual( container.children().map(function() { + return $(this).attr("for"); + }).get(), ["order1", "order2", "order3", "order4", "order5", "order6"], "labels in error container must be in document order" ); +}); + +test("defaultMessage(), empty title is ignored", function() { + var v = $("#userForm").validate(); + equals( "This field is required.", v.defaultMessage($("#username")[0], "required") ); +}); + +test("formatAndAdd", function() { + expect(4); + var v = $("#form").validate(); + var fakeElement = { form: $("#form")[0], name: "bar" }; + v.formatAndAdd(fakeElement, {method: "maxlength", parameters: 2}) + equals( "Please enter no more than 2 characters.", v.errorList[0].message ); + equals( "bar", v.errorList[0].element.name ); + + v.formatAndAdd(fakeElement, {method: "range", parameters:[2,4]}) + equals( "Please enter a value between 2 and 4.", v.errorList[1].message ); + + v.formatAndAdd(fakeElement, {method: "range", parameters:[0,4]}) + equals( "Please enter a value between 0 and 4.", v.errorList[2].message ); +}); + +test("formatAndAdd2", function() { + expect(3); + var v = $("#form").validate(); + var fakeElement = { form: $("#form")[0], name: "bar" }; + jQuery.validator.messages.test1 = function(param, element) { + equals( v, this ); + equals( 0, param ); + return "element " + element.name + " is not valid"; + }; + v.formatAndAdd(fakeElement, {method: "test1", parameters: 0}) + equals( "element bar is not valid", v.errorList[0].message ); +}); + +test("formatAndAdd, auto detect substitution string", function() { + var v = $("#testForm1clean").validate({ + rules: { + firstname: { + required: true, + rangelength: [5, 10] + } + }, + messages: { + firstname: { + rangelength: "at least ${0}, up to {1}" + } + } + }); + $("#firstnamec").val("abc"); + v.form(); + equals( "at least 5, up to 10", v.errorList[0].message ); +}) + +test("error containers, simple", function() { + expect(14); + var container = $("#simplecontainer"); + var v = $("#form").validate({ + errorLabelContainer: container, + showErrors: function() { + container.find("h3").html( jQuery.validator.format("There are {0} errors in your form.", this.size()) ); + this.defaultShowErrors(); + } + }); + + v.prepareForm(); + ok( v.valid(), "form is valid" ); + equals( 0, container.find("label").length, "There should be no error labels" ); + equals( "", container.find("h3").html() ); + + v.prepareForm(); + v.errorList = [{message:"bar", element: {name:"foo"}}, {message: "necessary", element: {name:"required"}}]; + ok( !v.valid(), "form is not valid after adding errors manually" ); + v.showErrors(); + equals( container.find("label").length, 2, "There should be two error labels" ); + ok( container.is(":visible"), "Check that the container is visible" ); + container.find("label").each(function() { + ok( $(this).is(":visible"), "Check that each label is visible" ); + }); + equals( "There are 2 errors in your form.", container.find("h3").html() ); + + v.prepareForm(); + ok( v.valid(), "form is valid after a reset" ); + v.showErrors(); + equals( container.find("label").length, 2, "There should still be two error labels" ); + ok( container.is(":hidden"), "Check that the container is hidden" ); + container.find("label").each(function() { + ok( $(this).is(":hidden"), "Check that each label is hidden" ); + }); +}); + +test("error containers, with labelcontainer I", function() { + expect(16); + var container = $("#container"), + labelcontainer = $("#labelcontainer"); + var v = $("#form").validate({ + errorContainer: container, + errorLabelContainer: labelcontainer, + wrapper: "li" + }); + + ok( v.valid(), "form is valid" ); + equals( 0, container.find("label").length, "There should be no error labels in the container" ); + equals( 0, labelcontainer.find("label").length, "There should be no error labels in the labelcontainer" ); + equals( 0, labelcontainer.find("li").length, "There should be no lis labels in the labelcontainer" ); + + v.errorList = [{message:"bar", element: {name:"foo"}}, {name: "required", message: "necessary", element: {name:"required"}}]; + ok( !v.valid(), "form is not valid after adding errors manually" ); + v.showErrors(); + equals( 0, container.find("label").length, "There should be no error label in the container" ); + equals( 2, labelcontainer.find("label").length, "There should be two error labels in the labelcontainer" ); + equals( 2, labelcontainer.find("li").length, "There should be two error lis in the labelcontainer" ); + ok( container.is(":visible"), "Check that the container is visible" ); + ok( labelcontainer.is(":visible"), "Check that the labelcontainer is visible" ); + var labels = labelcontainer.find("label").each(function() { + ok( $(this).is(":visible"), "Check that each label is visible1" ); + equals( "li", $(this).parent()[0].tagName.toLowerCase(), "Check that each label is wrapped in an li" ); + ok( $(this).parent("li").is(":visible"), "Check that each parent li is visible" ); + }); +}); + +test("errorcontainer, show/hide only on submit", function() { + expect(14); + var container = $("#container"); + var labelContainer = $("#labelcontainer"); + var v = $("#testForm1").bind("invalid-form.validate", function() { + ok( true, "invalid-form event triggered called" ); + }).validate({ + errorContainer: container, + errorLabelContainer: labelContainer, + showErrors: function() { + container.html( jQuery.validator.format("There are {0} errors in your form.", this.numberOfInvalids()) ); + ok( true, "showErrors called" ); + this.defaultShowErrors(); + } + }); + equals( "", container.html(), "must be empty" ); + equals( "", labelContainer.html(), "must be empty" ); + // validate whole form, both showErrors and invalidHandler must be called once + // preferably invalidHandler first, showErrors second + ok( !v.form(), "invalid form" ); + equals( 2, labelContainer.find("label").length ); + equals( "There are 2 errors in your form.", container.html() ); + ok( labelContainer.is(":visible"), "must be visible" ); + ok( container.is(":visible"), "must be visible" ); + + $("#firstname").val("hix").keyup(); + $("#testForm1").triggerHandler("keyup", [jQuery.event.fix({ type: "keyup", target: $("#firstname")[0] })]); + equals( 1, labelContainer.find("label:visible").length ); + equals( "There are 1 errors in your form.", container.html() ); + + $("#lastname").val("abc"); + ok( v.form(), "Form now valid, trigger showErrors but not invalid-form" ); +}); + +test("option invalidHandler", function() { + expect(1); + var v = $("#testForm1clean").validate({ + invalidHandler: function() { + ok( true, "invalid-form event triggered called" ); + start(); + } + }); + $("#usernamec").val("asdf").rules("add", { required: true, minlength: 5 }); + stop(); + $("#testForm1clean").submit(); +}); + +test("findByName()", function() { + deepEqual( new $.validator({}, document.getElementById("form")).findByName(document.getElementById("radio1").name).get(), $("#form").find("[name=radio1]").get() ); +}); + +test("focusInvalid()", function() { + // TODO when using custom focusin, this is triggered just once + // TODO when using 1.4 focusin, triggered twice; fix once not testing against 1.3 anymore + // expect(1); + var inputs = $("#testForm1 input").focus(function() { + equals( inputs[0], this, "focused first element" ); + }); + var v = $("#testForm1").validate(); + v.form(); + v.focusInvalid(); +}); + +test("findLastActive()", function() { + expect(3); + var v = $("#testForm1").validate(); + ok( !v.findLastActive() ); + v.form(); + v.focusInvalid(); + equals( v.findLastActive(), $("#firstname")[0] ); + var lastActive = $("#lastname").trigger("focus").trigger("focusin")[0]; + equals( v.lastActive, lastActive ); +}); + +test("validating multiple checkboxes with 'required'", function() { + expect(3); + var checkboxes = $("#form input[name=check3]").attr("checked", false); + equal(checkboxes.size(), 5); + var v = $("#form").validate({ + rules: { + check3: "required" + } + }); + v.form(); + equal(v.size(), 1); + checkboxes.filter(":last").attr("checked", true); + v.form(); + equal(v.size(), 0); +}); + +test("dynamic form", function() { + var counter = 0; + function add() { + $("").appendTo("#testForm2"); + } + function errors(expected, message) { + equals(expected, v.size(), message ); + } + var v = $("#testForm2").validate(); + v.form(); + errors(1); + add(); + v.form(); + errors(2); + add(); + v.form(); + errors(3); + $("#testForm2 input[name=list1]").remove(); + v.form(); + errors(2); + add(); + v.form(); + errors(3); + $("#testForm2 input[name^=list]").remove(); + v.form(); + errors(1); + $("#agb").attr("disabled", true); + v.form(); + errors(0); + $("#agb").attr("disabled", false); + v.form(); + errors(1); +}); + +test("idOrName()", function() { + expect(4); + var v = $("#testForm1").validate(); + equals( "form8input", v.idOrName( $("#form8input")[0] ) ); + equals( "check", v.idOrName( $("#form6check1")[0] ) ); + equals( "agree", v.idOrName( $("#agb")[0] ) ); + equals( "button", v.idOrName( $("#form :button")[0] ) ); +}); + +test("resetForm()", function() { + function errors(expected, message) { + equals(expected, v.size(), message ); + } + var v = $("#testForm1").validate(); + v.form(); + errors(2); + $("#firstname").val("hiy"); + v.resetForm(); + errors(0); + equals("", $("#firstname").val(), "form plugin is included, therefor resetForm must also reset inputs, not only errors"); +}); + +test("message from title", function() { + var v = $("#withTitle").validate(); + v.checkForm(); + equals(v.errorList[0].message, "fromtitle", "title not used"); +}); + +test("ignoreTitle", function() { + var v = $("#withTitle").validate({ignoreTitle:true}); + v.checkForm(); + equals(v.errorList[0].message, $.validator.messages["required"], "title used when it should have been ignored"); +}); + +test("ajaxSubmit", function() { + expect(1); + stop(); + $("#user").val("Peter"); + $("#password").val("foobar"); + jQuery("#signupForm").validate({ + submitHandler: function(form) { + jQuery(form).ajaxSubmit({ + success: function(response) { + equals("Hi Peter, welcome back.", response); + start(); + } + }); + } + }); + jQuery("#signupForm").triggerHandler("submit"); +}); + + +module("misc"); + +test("success option", function() { + expect(7); + equals( "", $("#firstname").val() ); + var v = $("#testForm1").validate({ + success: "valid" + }); + var label = $("#testForm1 label"); + ok( label.is(".error") ); + ok( !label.is(".valid") ); + v.form(); + ok( label.is(".error") ); + ok( !label.is(".valid") ); + $("#firstname").val("hi"); + v.form(); + ok( label.is(".error") ); + ok( label.is(".valid") ); +}); + +test("success option2", function() { + expect(5); + equals( "", $("#firstname").val() ); + var v = $("#testForm1").validate({ + success: "valid" + }); + var label = $("#testForm1 label"); + ok( label.is(".error") ); + ok( !label.is(".valid") ); + $("#firstname").val("hi"); + v.form(); + ok( label.is(".error") ); + ok( label.is(".valid") ); +}); + +test("success option3", function() { + expect(5); + equals( "", $("#firstname").val() ); + $("#errorFirstname").remove(); + var v = $("#testForm1").validate({ + success: "valid" + }); + equals( 0, $("#testForm1 label").size() ); + $("#firstname").val("hi"); + v.form(); + var labels = $("#testForm1 label"); + equals( 3, labels.size() ); + ok( labels.eq(0).is(".valid") ); + ok( !labels.eq(1).is(".valid") ); +}); + +test("successlist", function() { + var v = $("#form").validate({ success: "xyz" }); + v.form(); + equals(0, v.successList.length); +}); + +test("success isn't called for optional elements", function() { + expect(4); + equals( "", $("#firstname").removeClass().val() ); + $("#something").remove(); + $("#lastname").remove(); + $("#errorFirstname").remove(); + var v = $("#testForm1").validate({ + success: function() { + ok( false, "don't call success for optional elements!" ); + }, + rules: { + firstname: "email" + } + }); + equals( 0, $("#testForm1 label").size() ); + v.form(); + equals( 0, $("#testForm1 label").size() ); + $("#firstname").valid(); + equals( 0, $("#testForm1 label").size() ); +}); + +test("all rules are evaluated even if one returns a dependency-mistmatch", function() { + expect(6); + equals( "", $("#firstname").removeClass().val() ); + $("#lastname").remove(); + $("#errorFirstname").remove(); + $.validator.addMethod("custom1", function() { + ok( true, "custom method must be evaluated" ); + return true; + }, ""); + var v = $("#testForm1").validate({ + rules: { + firstname: {email:true, custom1: true} + } + }); + equals( 0, $("#testForm1 label").size() ); + v.form(); + equals( 0, $("#testForm1 label").size() ); + $("#firstname").valid(); + equals( 0, $("#testForm1 label").size() ); + + delete $.validator.methods.custom1; + delete $.validator.messages.custom1; +}); + +test("messages", function() { + var m = jQuery.validator.messages; + equals( "Please enter no more than 0 characters.", m.maxlength(0) ); + equals( "Please enter at least 1 characters.", m.minlength(1) ); + equals( "Please enter a value between 1 and 2 characters long.", m.rangelength([1, 2]) ); + equals( "Please enter a value less than or equal to 1.", m.max(1) ); + equals( "Please enter a value greater than or equal to 0.", m.min(0) ); + equals( "Please enter a value between 1 and 2.", m.range([1, 2]) ); +}); + +test("jQuery.validator.format", function() { + equals( "Please enter a value between 0 and 1.", jQuery.validator.format("Please enter a value between {0} and {1}.", 0, 1) ); + equals( "0 is too fast! Enter a value smaller then 0 and at least -15", jQuery.validator.format("{0} is too fast! Enter a value smaller then {0} and at least {1}", 0, -15) ); + var template = jQuery.validator.format("{0} is too fast! Enter a value smaller then {0} and at least {1}"); + equals( "0 is too fast! Enter a value smaller then 0 and at least -15", template(0, -15) ); + template = jQuery.validator.format("Please enter a value between {0} and {1}."); + equals( "Please enter a value between 1 and 2.", template([1, 2]) ); +}); + +test("option: ignore", function() { + var v = $("#testForm1").validate({ + ignore: "[name=lastname]" + }); + v.form(); + equals( 1, v.size() ); +}); + +test("option: subformRequired", function() { + jQuery.validator.addMethod("billingRequired", function(value, element) { + if ($("#bill_to_co").is(":checked")) + return $(element).parents("#subform").length; + return !this.optional(element); + }, ""); + var v = $("#subformRequired").validate(); + v.form(); + equals( 1, v.size() ); + $("#bill_to_co").attr("checked", false); + v.form(); + equals( 2, v.size() ); + + delete $.validator.methods.billingRequired; + delete $.validator.messages.billingRequired; +}); + +module("expressions"); + +test("expression: :blank", function() { + var e = $("#lastname")[0]; + equals( 1, $(e).filter(":blank").length ); + e.value = " "; + equals( 1, $(e).filter(":blank").length ); + e.value = " " + equals( 1, $(e).filter(":blank").length ); + e.value= " a "; + equals( 0, $(e).filter(":blank").length ); +}); + +test("expression: :filled", function() { + var e = $("#lastname")[0]; + equals( 0, $(e).filter(":filled").length ); + e.value = " "; + equals( 0, $(e).filter(":filled").length ); + e.value = " " + equals( 0, $(e).filter(":filled").length ); + e.value= " a "; + equals( 1, $(e).filter(":filled").length ); +}); + +test("expression: :unchecked", function() { + var e = $("#check2")[0]; + equals( 1, $(e).filter(":unchecked").length ); + e.checked = true; + equals( 0, $(e).filter(":unchecked").length ); + e.checked = false; + equals( 1, $(e).filter(":unchecked").length ); +}); + +module("events"); + +test("validate on blur", function() { + function errors(expected, message) { + equals(v.size(), expected, message ); + } + function labels(expected) { + equals(v.errors().filter(":visible").size(), expected); + } + function blur(target) { + target.trigger("blur").trigger("focusout"); + } + $("#errorFirstname").hide(); + var e = $("#firstname"); + var v = $("#testForm1").validate(); + $("#something").val(""); + blur(e); + errors(0, "No value yet, required is skipped on blur"); + labels(0); + e.val("h"); + blur(e); + errors(1, "Required was ignored, but as something was entered, check other rules, minlength isn't met"); + labels(1); + e.val("hh"); + blur(e); + errors(0, "All is fine"); + labels(0); + e.val(""); + v.form(); + errors(3, "Submit checks all rules, both fields invalid"); + labels(3); + blur(e); + errors(1, "Blurring the field results in emptying the error list first, then checking the invalid field: its still invalid, don't remove the error" ); + labels(3); + e.val("h"); + blur(e); + errors(1, "Entering a single character fulfills required, but not minlength: 2, still invalid"); + labels(3); + e.val("hh"); + blur(e); + errors(0, "Both required and minlength are met, no errors left"); + labels(2); +}); + +test("validate on keyup", function() { + function errors(expected, message) { + equals(expected, v.size(), message ); + } + function keyup(target) { + target.trigger("keyup"); + } + var e = $("#firstname"); + var v = $("#testForm1").validate(); + keyup(e); + errors(0, "No value, no errors"); + e.val("a"); + keyup(e); + errors(0, "Value, but not invalid"); + e.val(""); + v.form(); + errors(2, "Both invalid"); + keyup(e); + errors(1, "Only one field validated, still invalid"); + e.val("hh"); + keyup(e); + errors(0, "Not invalid anymore"); + e.val("h"); + keyup(e); + errors(1, "Field didn't loose focus, so validate again, invalid"); + e.val("hh"); + keyup(e); + errors(0, "Valid"); +}); + +test("validate on not keyup, only blur", function() { + function errors(expected, message) { + equals(expected, v.size(), message ); + } + var e = $("#firstname"); + var v = $("#testForm1").validate({ + onkeyup: false + }); + errors(0); + e.val("a"); + e.trigger("keyup"); + e.keyup(); + errors(0); + e.trigger("blur").trigger("focusout"); + errors(1); +}); + +test("validate on keyup and blur", function() { + function errors(expected, message) { + equals(expected, v.size(), message ); + } + var e = $("#firstname"); + var v = $("#testForm1").validate(); + errors(0); + e.val("a"); + e.trigger("keyup"); + errors(0); + e.trigger("blur").trigger("focusout"); + errors(1); +}); + +test("validate email on keyup and blur", function() { + function errors(expected, message) { + equals(expected, v.size(), message ); + } + var e = $("#firstname"); + var v = $("#testForm1").validate(); + v.form(); + errors(2); + e.val("a"); + e.trigger("keyup"); + errors(1); + e.val("aa"); + e.trigger("keyup"); + errors(0); +}); + +test("validate checkbox on click", function() { + function errors(expected, message) { + equals(expected, v.size(), message ); + } + function trigger(element) { + element.click(); + // triggered click event screws up checked-state in 1.4 + element.valid(); + } + var e = $("#check2"); + var v = $("#form").validate({ + rules: { + check2: "required" + } + }); + trigger(e); + errors(0); + trigger(e); + equals( false, v.form() ); + errors(1); + trigger(e); + errors(0); + trigger(e); + errors(1); +}); + +test("validate multiple checkbox on click", function() { + function errors(expected, message) { + equals(expected, v.size(), message ); + } + function trigger(element) { + element.click(); + // triggered click event screws up checked-state in 1.4 + element.valid(); + } + var e1 = $("#check1").attr("checked", false); + var e2 = $("#check1b"); + var v = $("#form").validate({ + rules: { + check: { + required: true, + minlength: 2 + } + } + }); + trigger(e1); + trigger(e2); + errors(0); + trigger(e2); + equals( false, v.form() ); + errors(1); + trigger(e2); + errors(0); + trigger(e2); + errors(1); +}); + +test("validate radio on click", function() { + function errors(expected, message) { + equals(expected, v.size(), message ); + } + function trigger(element) { + element.click(); + // triggered click event screws up checked-state in 1.4 + element.valid(); + } + var e1 = $("#radio1"); + var e2 = $("#radio1a"); + var v = $("#form").validate({ + rules: { + radio1: "required" + } + }); + errors(0); + equals( false, v.form() ); + errors(1); + trigger(e2); + errors(0); + trigger(e1); + errors(0); +}); diff --git a/bug/bug/jquery-validation-1.8.1/todo b/bug/bug/jquery-validation-1.8.1/todo new file mode 100644 index 0000000..702a496 --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/todo @@ -0,0 +1,172 @@ +1.3 +--- + +- checkout datejs.com for a proper date implementation -> complete but very heavy parser, currently overkill + +- rewrite required-method to use jQuery's extended val() on selects[/radios/checkboxes] +- consider a field-validator object that encapsulates a single element and all methods working on it +- export API browser +- add example/support for other URL schemes like svn://.... +- document min/max/range methods for checkboxes/selects + +/** + * Return false, if the element is + * + * - some kind of text input and its value is too short + * + * - a set of checkboxes has not enough boxes checked + * + * - a select and has not enough options selected + * + * Works with all kind of text inputs, checkboxes and select. + * + * @example + * @desc Declares an optional input element with at least 5 characters (or none at all). + * + * @example + * @desc Declares an input element that must have at least 5 characters. + * + * @example
          + * Spam + * + * + * + * + *
          + * @desc Specifies a group of checkboxes. To validate, at least two checkboxes must be selected. + * + * @param Number min + * @name jQuery.validator.methods.minLength + * @type Boolean + * @cat Plugins/Validate/Methods + */ + + /** + * Return false, if the element is + * + * - some kind of text input and its value is too short or too long + * + * - a set of checkboxes has not enough or too many boxes checked + * + * - a select and has not enough or too many options selected + * + * Works with all kind of text inputs, checkboxes and selects. + * + * @example + * @desc Declares an optional input element with at least 3 and at most 5 characters (or none at all). + * + * @example + * @desc Declares an input element that must have at least 3 and at most 5 characters. + * + * @example + * @desc Specifies a select that must have at least two but no more than three options selected. + * + * @param Array min/max + * @name jQuery.validator.methods.rangeLength + * @type Boolean + * @cat Plugins/Validate/Methods + */ + +- document numberOfInvalids and hideErrors + +/** + * Returns the number of invalid elements in the form. + * + * @example $("#myform").validate({ + * showErrors: function() { + * $("#summary").html("Your form contains " + this.numberOfInvalids() + " errors, see details below."); + * this.defaultShowErrors(); + * } + * }); + * @desc Specifies a custom showErrors callback that updates the number of invalid elements each + * time the form or a single element is validated. + * + * @name jQuery.validator.prototype.numberOfInvalids + * @type Number + */ + + /** + * Hides all error messages in this form. + * + * @example var validator = $("#myform").validate(); + * $(".cancel").click(function() { + * validator.hideErrors(); + * }); + * @desc Specifies a custom showErrors callback that updates the number of invalid elements each + * time the form or a single element is validated. + * + * @name jQuery.validator.prototype.hideErrors + */ + +- remove deprecated methods + +- css references + - http://test5.caribmedia.com/CSS/Secrets/members/michiel/floating-forms.html + - http://paularmstrongdesigns.com/projects/awesomeform/ + - http://dnevnikeklektika.com/uni-form/ + +- consider validation on page load, disabling required-checks +- completely rework showErrors: manually settings errors is currently extremely flawed and utterly useless, eg. errors disappear if some other validation is triggered +- add custom event to remote validation for adding more parameters + +- document focusInvalid() +- document validation lifecycle: setup (add event handlers), run validation (prepare form, validate elements, display errors/submit form) + -> show where the user can hook in via callbacks + +- AND depedency: specify multiple expressions as an array + +- add custom events for form and elements instead of more callbacks (additional options/callbacks) + - beforeValidation: Callback, called before doing any validation + - beforeSubmit: Callback, called before submitting the form (default submit or calling submitHandler, if specified) + +- animations!! +- ajax validation: + - in combination with autocomplete (mustmatch company name, fill out address details, validate required) + - validate zip code in comparison to address, if match and state is missing, fill out state +- strong password check/integration: http://phiras.wordpress.com/2007/04/08/password-strength-meter-a-jquery-plugin/ + +- stop firefox password manager to popup before validation - check mozilla bug tracker? + +- overload addMethod with a Option-variant: +$.validator.addMethod({ + name: "custom", + message: "blablabla", + parameteres: false, + handler: function() { ... } +}); + + Examples: + - wordpress comment form, make it a drop-in method + - ajaxForm() integration + - ajaxSubmit with rules-option, more/less options to ajaxSubmit + - watermark integration http://digitalbush.com/projects/watermark-input-plugin + - datepicker integration + - timepicker integration ( http://labs.perifer.se/timedatepicker/ ) + - integration with CakePHP ( https://trac.cakephp.org/ticket/2359 ) + - integration with tabs: http://www.netix.sk/forms/test.html + - intergration with rich-text-editors (FCKEditor, Codepress) + http://www.fyneworks.com/jquery/FCKEditor/ + +2.0 +--- +- attachValidation, removeValidation, validate (with UI), valid (without UI) +- (re)move current addMethod implementation +- move rules plugin option +- move metadata support +- make validate method chainable + -> provide an accessor for the validator if necessary at all +- move a few default methods to additionals, eg. dateXXX, creditcard, definitely accept \ No newline at end of file diff --git a/bug/bug/jquery-validation-1.8.1/version.txt b/bug/bug/jquery-validation-1.8.1/version.txt new file mode 100644 index 0000000..a8fdfda --- /dev/null +++ b/bug/bug/jquery-validation-1.8.1/version.txt @@ -0,0 +1 @@ +1.8.1 diff --git a/bug/bug/jquery.iframe-post-form.js b/bug/bug/jquery.iframe-post-form.js new file mode 100644 index 0000000..3ce755c --- /dev/null +++ b/bug/bug/jquery.iframe-post-form.js @@ -0,0 +1,92 @@ +/** + * jQuery plugin for posting form including file inputs. + * + * Copyright (c) 2010 - 2011 Ewen Elder + * + * Licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * @author: Ewen Elder + * @version: 1.1.1 (2011-07-29) +**/ +(function ($) +{ + $.fn.iframePostForm = function (options) + { + var response, + returnReponse, + element, + status = true, + iframe; + + options = $.extend({}, $.fn.iframePostForm.defaults, options); + + + // Add the iframe. + if (!$('#' + options.iframeID).length) + { + $('body').append('