summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--_test/cases/inc/auth_password.test.php3
-rw-r--r--_test/cases/inc/pageutils_clean_id.test.php10
-rw-r--r--_test/cases/inc/search/data/ns1/ns3/page3.txt0
-rw-r--r--_test/cases/inc/search/data/ns1/page1.txt0
-rw-r--r--_test/cases/inc/search/data/ns1/page2.txt0
-rw-r--r--_test/cases/inc/search/data/ns2/nopage.ext0
-rw-r--r--_test/cases/inc/search/data/ns2/page1.txt0
-rw-r--r--_test/cases/inc/search/search.test.php102
-rw-r--r--_test/cases/inc/utf8_stripspecials.test.php1
-rw-r--r--_test/cases/lib/exe/js_js_compress.test.php6
-rw-r--r--_test/jslint.js89
-rwxr-xr-xbin/indexer.php7
-rw-r--r--bin/striplangs.php2
-rw-r--r--conf/dokuwiki.php2
-rw-r--r--conf/mediameta.php44
-rw-r--r--conf/plugins.required.php11
-rw-r--r--data/deleted.files12
-rw-r--r--data/media_attic/_dummy0
-rw-r--r--data/media_meta/_dummy0
-rw-r--r--doku.php2
-rw-r--r--feed.php151
-rw-r--r--inc/FeedParser.php4
-rw-r--r--inc/HTTPClient.php1
-rw-r--r--inc/JpegMeta.php2
-rw-r--r--inc/PassHash.class.php17
-rw-r--r--inc/SimplePie.php570
-rw-r--r--inc/actions.php6
-rw-r--r--inc/auth.php10
-rw-r--r--inc/auth/ad.class.php12
-rw-r--r--inc/changelog.php96
-rw-r--r--inc/common.php39
-rw-r--r--inc/config_cascade.php8
-rw-r--r--inc/fulltext.php2
-rw-r--r--inc/html.php417
-rw-r--r--inc/httputils.php52
-rw-r--r--inc/infoutils.php12
-rw-r--r--inc/init.php7
-rw-r--r--inc/lang/ar/lang.php3
-rw-r--r--inc/lang/az/lang.php5
-rw-r--r--inc/lang/bg/diff.txt1
-rw-r--r--inc/lang/bg/install.html8
-rw-r--r--inc/lang/bg/lang.php53
-rw-r--r--inc/lang/bg/login.txt2
-rw-r--r--inc/lang/ca-valencia/lang.php5
-rw-r--r--inc/lang/ca/lang.php5
-rw-r--r--inc/lang/cs/lang.php3
-rw-r--r--inc/lang/da/lang.php3
-rw-r--r--inc/lang/de-informal/lang.php52
-rw-r--r--inc/lang/de-informal/uploadmail.txt17
-rw-r--r--inc/lang/de/lang.php53
-rw-r--r--inc/lang/de/uploadmail.txt17
-rw-r--r--inc/lang/el/lang.php46
-rw-r--r--inc/lang/en/lang.php650
-rw-r--r--inc/lang/en/uploadmail.txt1
-rw-r--r--inc/lang/eo/lang.php44
-rw-r--r--inc/lang/es/lang.php49
-rw-r--r--inc/lang/et/lang.php28
-rw-r--r--inc/lang/eu/lang.php3
-rw-r--r--inc/lang/fa/lang.php11
-rw-r--r--inc/lang/fi/lang.php44
-rw-r--r--inc/lang/fo/lang.php2
-rw-r--r--inc/lang/fr/lang.php62
-rw-r--r--inc/lang/gl/lang.php3
-rw-r--r--inc/lang/he/lang.php3
-rw-r--r--inc/lang/hr/lang.php115
-rw-r--r--inc/lang/hr/read.txt2
-rw-r--r--inc/lang/hr/resendpwd.txt2
-rw-r--r--inc/lang/hu/lang.php4
-rw-r--r--inc/lang/ia/lang.php3
-rw-r--r--inc/lang/id/lang.php2
-rw-r--r--inc/lang/is/lang.php2
-rw-r--r--inc/lang/it/lang.php3
-rw-r--r--inc/lang/ja/lang.php3
-rw-r--r--inc/lang/kk/lang.php116
-rw-r--r--inc/lang/km/lang.php2
-rw-r--r--inc/lang/ko/lang.php3
-rw-r--r--inc/lang/ku/lang.php2
-rw-r--r--inc/lang/la/lang.php3
-rw-r--r--inc/lang/lb/lang.php2
-rw-r--r--inc/lang/lt/lang.php5
-rw-r--r--inc/lang/lv/lang.php46
-rw-r--r--inc/lang/mg/lang.php2
-rw-r--r--inc/lang/mk/lang.php3
-rw-r--r--inc/lang/mr/lang.php5
-rw-r--r--inc/lang/ne/lang.php5
-rw-r--r--inc/lang/nl/lang.php39
-rw-r--r--inc/lang/no/adminplugins.txt2
-rw-r--r--inc/lang/no/conflict.txt2
-rw-r--r--inc/lang/no/lang.php125
-rw-r--r--inc/lang/no/newpage.txt2
-rw-r--r--inc/lang/no/norev.txt4
-rw-r--r--inc/lang/no/registermail.txt2
-rw-r--r--inc/lang/no/stopwords.txt182
-rw-r--r--inc/lang/no/subscr_digest.txt20
-rw-r--r--inc/lang/no/subscr_form.txt3
-rw-r--r--inc/lang/no/subscr_list.txt17
-rw-r--r--inc/lang/no/subscr_single.txt23
-rw-r--r--inc/lang/no/updateprofile.txt2
-rw-r--r--inc/lang/no/uploadmail.txt1
-rw-r--r--inc/lang/pl/lang.php5
-rw-r--r--inc/lang/pt-br/lang.php4
-rw-r--r--inc/lang/pt/lang.php70
-rw-r--r--inc/lang/pt/uploadmail.txt22
-rw-r--r--inc/lang/ro/lang.php50
-rw-r--r--inc/lang/ru/lang.php112
-rw-r--r--inc/lang/ru/uploadmail.txt17
-rw-r--r--inc/lang/sk/lang.php49
-rw-r--r--inc/lang/sl/lang.php3
-rw-r--r--inc/lang/sq/lang.php3
-rw-r--r--inc/lang/sr/lang.php3
-rw-r--r--inc/lang/sv/lang.php8
-rw-r--r--inc/lang/th/lang.php5
-rw-r--r--inc/lang/tr/lang.php3
-rw-r--r--inc/lang/uk/lang.php3
-rw-r--r--inc/lang/vi/lang.php2
-rw-r--r--inc/lang/zh-tw/lang.php3
-rw-r--r--inc/lang/zh/lang.php44
-rw-r--r--inc/load.php13
-rw-r--r--inc/mail.php3
-rw-r--r--inc/media.php1199
-rw-r--r--inc/pageutils.php27
-rw-r--r--inc/parser/handler.php24
-rw-r--r--inc/parser/xhtml.php6
-rw-r--r--inc/parserutils.php7
-rw-r--r--inc/plugincontroller.class.php186
-rw-r--r--inc/pluginutils.php6
-rw-r--r--inc/search.php59
-rw-r--r--inc/template.php214
-rw-r--r--inc/toolbar.php2
-rw-r--r--inc/utf8.php8
-rw-r--r--install.php1
-rw-r--r--lib/_fla/.htaccess4
-rw-r--r--lib/_fla/MultipleUpload.as330
-rw-r--r--lib/_fla/README4
-rw-r--r--lib/_fla/index.html12
-rw-r--r--lib/_fla/multipleUpload.flabin1812480 -> 0 bytes
-rw-r--r--lib/exe/ajax.php114
-rw-r--r--lib/exe/css.php110
-rw-r--r--lib/exe/fetch.php10
-rw-r--r--lib/exe/js.php100
-rw-r--r--lib/exe/mediamanager.php24
-rw-r--r--lib/exe/multipleUpload.swfbin64561 -> 0 bytes
-rw-r--r--lib/exe/xmlrpc.php51
-rw-r--r--lib/images/admin/plugin.pngbin1128 -> 1127 bytes
-rw-r--r--lib/images/admin/popularity.pngbin1192 -> 1189 bytes
-rw-r--r--lib/images/admin/revert.pngbin1306 -> 1295 bytes
-rw-r--r--lib/images/admin/usermanager.pngbin1476 -> 1467 bytes
-rw-r--r--lib/images/fileicons/deb.pngbin652 -> 646 bytes
-rw-r--r--lib/images/fileicons/doc.pngbin584 -> 583 bytes
-rw-r--r--lib/images/fileicons/docx.pngbin584 -> 583 bytes
-rw-r--r--lib/images/fileicons/file.pngbin583 -> 581 bytes
-rw-r--r--lib/images/fileicons/lua.pngbin449 -> 440 bytes
-rw-r--r--lib/images/fileicons/mp3.pngbin832 -> 831 bytes
-rw-r--r--lib/images/fileicons/odf.pngbin751 -> 746 bytes
-rw-r--r--lib/images/fileicons/odp.pngbin691 -> 687 bytes
-rw-r--r--lib/images/fileicons/odt.pngbin524 -> 522 bytes
-rw-r--r--lib/images/fileicons/pdf.pngbin595 -> 592 bytes
-rw-r--r--lib/images/fileicons/ps.pngbin473 -> 470 bytes
-rw-r--r--lib/images/fileicons/rtf.pngbin403 -> 402 bytes
-rw-r--r--lib/images/fileicons/sql.pngbin818 -> 813 bytes
-rw-r--r--lib/images/fileicons/sxi.pngbin691 -> 687 bytes
-rw-r--r--lib/images/fileicons/sxw.pngbin524 -> 522 bytes
-rw-r--r--lib/images/fileicons/wav.pngbin822 -> 820 bytes
-rw-r--r--lib/images/fileicons/zip.pngbin802 -> 800 bytes
-rw-r--r--lib/images/icon-file.pngbin0 -> 3363 bytes
-rw-r--r--lib/images/icon-list.pngbin0 -> 3342 bytes
-rw-r--r--lib/images/icon-sort.pngbin0 -> 316 bytes
-rw-r--r--lib/images/icon-thumb.pngbin0 -> 969 bytes
-rw-r--r--lib/images/interwiki.pngbin1016 -> 443 bytes
-rw-r--r--lib/images/interwiki/amazon.de.gifbin882 -> 110 bytes
-rw-r--r--lib/images/interwiki/amazon.gifbin882 -> 110 bytes
-rw-r--r--lib/images/interwiki/amazon.uk.gifbin882 -> 110 bytes
-rw-r--r--lib/images/interwiki/callto.gifbin586 -> 178 bytes
-rw-r--r--lib/images/interwiki/doku.gifbin257 -> 188 bytes
-rw-r--r--lib/images/interwiki/google.gifbin980 -> 170 bytes
-rw-r--r--lib/images/interwiki/meatball.gifbin1100 -> 339 bytes
-rw-r--r--lib/images/interwiki/paypal.gifbin942 -> 171 bytes
-rw-r--r--lib/images/interwiki/phpfn.gifbin330 -> 164 bytes
-rw-r--r--lib/images/interwiki/sb.gifbin1000 -> 195 bytes
-rw-r--r--lib/images/interwiki/wiki.gifbin909 -> 131 bytes
-rw-r--r--lib/images/interwiki/wp.gifbin680 -> 171 bytes
-rw-r--r--lib/images/interwiki/wpde.gifbin680 -> 171 bytes
-rw-r--r--lib/images/interwiki/wpes.gifbin680 -> 171 bytes
-rw-r--r--lib/images/interwiki/wpfr.gifbin680 -> 171 bytes
-rw-r--r--lib/images/interwiki/wpjp.gifbin680 -> 171 bytes
-rw-r--r--lib/images/interwiki/wpmeta.gifbin680 -> 171 bytes
-rw-r--r--lib/images/interwiki/wppl.gifbin680 -> 171 bytes
-rw-r--r--lib/images/license/badge/cc-by-nc-nd.pngbin1704 -> 1475 bytes
-rw-r--r--lib/images/license/badge/cc-by-nc-sa.pngbin1815 -> 1587 bytes
-rw-r--r--lib/images/license/badge/cc-by-nc.pngbin1639 -> 1421 bytes
-rw-r--r--lib/images/license/badge/cc-by-nd.pngbin1492 -> 1283 bytes
-rw-r--r--lib/images/license/badge/cc-by-sa.pngbin1626 -> 1421 bytes
-rw-r--r--lib/images/license/badge/cc-by.pngbin1397 -> 1204 bytes
-rw-r--r--lib/images/license/badge/publicdomain.pngbin1550 -> 1345 bytes
-rw-r--r--lib/images/license/button/cc-by-nc-nd.pngbin418 -> 396 bytes
-rw-r--r--lib/images/license/button/cc-by-nc-sa.pngbin432 -> 403 bytes
-rw-r--r--lib/images/license/button/cc-by-nc.pngbin407 -> 388 bytes
-rw-r--r--lib/images/license/button/cc-by-nd.pngbin406 -> 386 bytes
-rw-r--r--lib/images/license/button/cc-by-sa.pngbin408 -> 386 bytes
-rw-r--r--lib/images/license/button/cc-by.pngbin382 -> 369 bytes
-rw-r--r--lib/images/license/button/cc-zero.pngbin432 -> 386 bytes
-rw-r--r--lib/images/license/button/cc.pngbin450 -> 399 bytes
-rw-r--r--lib/images/license/button/gnufdl.pngbin535 -> 509 bytes
-rw-r--r--lib/images/license/button/publicdomain.pngbin381 -> 368 bytes
-rw-r--r--lib/images/loading.gifbin1876 -> 337 bytes
-rw-r--r--lib/images/mediamanager.pngbin0 -> 507 bytes
-rw-r--r--lib/images/minus.gifbin858 -> 85 bytes
-rw-r--r--lib/images/multiupload.pngbin581 -> 0 bytes
-rw-r--r--lib/images/pencil.pngbin397 -> 391 bytes
-rw-r--r--lib/images/plus.gifbin860 -> 88 bytes
-rw-r--r--lib/images/smileys/delete.gifbin1421 -> 448 bytes
-rw-r--r--lib/images/smileys/facepalm.gifbin185 -> 185 bytes
-rw-r--r--lib/images/smileys/fixme.gifbin1435 -> 450 bytes
-rw-r--r--lib/images/smileys/icon_arrow.gifbin170 -> 170 bytes
-rw-r--r--lib/images/smileys/icon_biggrin.gifbin172 -> 172 bytes
-rw-r--r--lib/images/smileys/icon_confused.gifbin171 -> 171 bytes
-rw-r--r--lib/images/smileys/icon_cool.gifbin172 -> 172 bytes
-rw-r--r--lib/images/smileys/icon_cry.gifbin498 -> 424 bytes
-rw-r--r--lib/images/smileys/icon_doubt.gifbin990 -> 178 bytes
-rw-r--r--lib/images/smileys/icon_doubt2.gifbin992 -> 180 bytes
-rw-r--r--lib/images/smileys/icon_eek.gifbin170 -> 170 bytes
-rw-r--r--lib/images/smileys/icon_evil.gifbin236 -> 188 bytes
-rw-r--r--lib/images/smileys/icon_exclaim.gifbin236 -> 171 bytes
-rw-r--r--lib/images/smileys/icon_frown.gifbin171 -> 171 bytes
-rw-r--r--lib/images/smileys/icon_fun.gifbin590 -> 179 bytes
-rw-r--r--lib/images/smileys/icon_idea.gifbin176 -> 176 bytes
-rw-r--r--lib/images/smileys/icon_kaddi.gifbin991 -> 179 bytes
-rw-r--r--lib/images/smileys/icon_lol.gifbin336 -> 344 bytes
-rw-r--r--lib/images/smileys/icon_mrgreen.gifbin349 -> 168 bytes
-rw-r--r--lib/images/smileys/icon_neutral.gifbin171 -> 171 bytes
-rw-r--r--lib/images/smileys/icon_question.gifbin248 -> 182 bytes
-rw-r--r--lib/images/smileys/icon_razz.gifbin176 -> 176 bytes
-rw-r--r--lib/images/smileys/icon_redface.gifbin650 -> 669 bytes
-rw-r--r--lib/images/smileys/icon_rolleyes.gifbin485 -> 471 bytes
-rw-r--r--lib/images/smileys/icon_sad.gifbin171 -> 171 bytes
-rw-r--r--lib/images/smileys/icon_silenced.gifbin231 -> 177 bytes
-rw-r--r--lib/images/smileys/icon_smile.gifbin174 -> 174 bytes
-rw-r--r--lib/images/smileys/icon_smile2.gifbin174 -> 174 bytes
-rw-r--r--lib/images/smileys/icon_surprised.gifbin174 -> 174 bytes
-rw-r--r--lib/images/smileys/icon_twisted.gifbin238 -> 180 bytes
-rw-r--r--lib/images/smileys/icon_wink.gifbin170 -> 170 bytes
-rw-r--r--lib/images/throbber.gifbin875 -> 746 bytes
-rw-r--r--lib/images/toolbar/bold.pngbin372 -> 251 bytes
-rw-r--r--lib/images/trash.pngbin431 -> 423 bytes
-rw-r--r--lib/images/up.pngbin260 -> 248 bytes
-rw-r--r--lib/plugins/acl/admin.php28
-rw-r--r--lib/plugins/acl/ajax.php11
-rw-r--r--lib/plugins/acl/lang/bg/lang.php2
-rw-r--r--lib/plugins/acl/lang/de-informal/lang.php1
-rw-r--r--lib/plugins/acl/lang/de/lang.php2
-rw-r--r--lib/plugins/acl/lang/el/lang.php1
-rw-r--r--lib/plugins/acl/lang/eo/lang.php1
-rw-r--r--lib/plugins/acl/lang/es/lang.php2
-rw-r--r--lib/plugins/acl/lang/et/lang.php7
-rw-r--r--lib/plugins/acl/lang/fi/lang.php1
-rw-r--r--lib/plugins/acl/lang/fr/lang.php4
-rw-r--r--lib/plugins/acl/lang/hr/help.txt11
-rw-r--r--lib/plugins/acl/lang/hr/lang.php29
-rw-r--r--lib/plugins/acl/lang/hu/lang.php1
-rw-r--r--lib/plugins/acl/lang/kk/lang.php6
-rw-r--r--lib/plugins/acl/lang/nl/lang.php1
-rw-r--r--lib/plugins/acl/lang/no/lang.php4
-rw-r--r--lib/plugins/acl/lang/pl/lang.php1
-rw-r--r--lib/plugins/acl/lang/pt-br/lang.php1
-rw-r--r--lib/plugins/acl/lang/ro/lang.php1
-rw-r--r--lib/plugins/acl/lang/sv/lang.php1
-rw-r--r--lib/plugins/acl/lang/zh/lang.php1
-rw-r--r--lib/plugins/acl/plugin.info.txt6
-rw-r--r--lib/plugins/acl/script.js204
-rw-r--r--lib/plugins/acl/style.css1
-rw-r--r--lib/plugins/config/admin.php15
-rw-r--r--lib/plugins/config/lang/bg/lang.php50
-rw-r--r--lib/plugins/config/lang/de-informal/lang.php5
-rw-r--r--lib/plugins/config/lang/de/lang.php10
-rw-r--r--lib/plugins/config/lang/el/lang.php3
-rw-r--r--lib/plugins/config/lang/en/lang.php2
-rw-r--r--lib/plugins/config/lang/eo/lang.php4
-rw-r--r--lib/plugins/config/lang/es/lang.php4
-rw-r--r--lib/plugins/config/lang/et/lang.php26
-rw-r--r--lib/plugins/config/lang/fa/lang.php3
-rw-r--r--lib/plugins/config/lang/fi/lang.php3
-rw-r--r--lib/plugins/config/lang/fr/lang.php6
-rw-r--r--lib/plugins/config/lang/hr/lang.php1
-rw-r--r--lib/plugins/config/lang/hu/lang.php2
-rw-r--r--lib/plugins/config/lang/kk/lang.php6
-rw-r--r--lib/plugins/config/lang/nl/lang.php2
-rw-r--r--lib/plugins/config/lang/no/lang.php9
-rw-r--r--lib/plugins/config/lang/pl/lang.php1
-rw-r--r--lib/plugins/config/lang/pt-br/lang.php3
-rw-r--r--lib/plugins/config/lang/pt/lang.php1
-rw-r--r--lib/plugins/config/lang/ro/lang.php3
-rw-r--r--lib/plugins/config/lang/sk/lang.php6
-rw-r--r--lib/plugins/config/lang/sv/lang.php1
-rw-r--r--lib/plugins/config/lang/zh/lang.php3
-rw-r--r--lib/plugins/config/plugin.info.txt6
-rw-r--r--lib/plugins/config/settings/config.class.php10
-rw-r--r--lib/plugins/config/settings/config.metadata.php2
-rw-r--r--lib/plugins/info/plugin.info.txt6
-rw-r--r--lib/plugins/plugin/classes/ap_download.class.php2
-rw-r--r--lib/plugins/plugin/lang/de-informal/lang.php1
-rw-r--r--lib/plugins/plugin/lang/de/lang.php2
-rw-r--r--lib/plugins/plugin/lang/el/lang.php2
-rw-r--r--lib/plugins/plugin/lang/en/lang.php2
-rw-r--r--lib/plugins/plugin/lang/eo/lang.php2
-rw-r--r--lib/plugins/plugin/lang/es/lang.php2
-rw-r--r--lib/plugins/plugin/lang/et/lang.php26
-rw-r--r--lib/plugins/plugin/lang/fa/lang.php2
-rw-r--r--lib/plugins/plugin/lang/fi/lang.php2
-rw-r--r--lib/plugins/plugin/lang/fr/lang.php6
-rw-r--r--lib/plugins/plugin/lang/hr/lang.php1
-rw-r--r--lib/plugins/plugin/lang/hu/lang.php1
-rw-r--r--lib/plugins/plugin/lang/kk/lang.php6
-rw-r--r--lib/plugins/plugin/lang/nl/lang.php1
-rw-r--r--lib/plugins/plugin/lang/no/lang.php3
-rw-r--r--lib/plugins/plugin/lang/pl/lang.php1
-rw-r--r--lib/plugins/plugin/lang/pt-br/lang.php1
-rw-r--r--lib/plugins/plugin/lang/ro/lang.php2
-rw-r--r--lib/plugins/plugin/lang/sv/lang.php1
-rw-r--r--lib/plugins/plugin/lang/zh/lang.php1
-rw-r--r--lib/plugins/popularity/admin.php2
-rw-r--r--lib/plugins/popularity/helper.php1
-rw-r--r--lib/plugins/popularity/lang/de-informal/lang.php1
-rw-r--r--lib/plugins/popularity/lang/de/intro.txt2
-rw-r--r--lib/plugins/popularity/lang/de/lang.php2
-rw-r--r--lib/plugins/popularity/lang/el/lang.php1
-rw-r--r--lib/plugins/popularity/lang/en/intro.txt2
-rw-r--r--lib/plugins/popularity/lang/en/lang.php2
-rw-r--r--lib/plugins/popularity/lang/eo/lang.php1
-rw-r--r--lib/plugins/popularity/lang/eo/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/es/lang.php2
-rw-r--r--lib/plugins/popularity/lang/et/lang.php1
-rw-r--r--lib/plugins/popularity/lang/fa/lang.php10
-rw-r--r--lib/plugins/popularity/lang/fa/submitted.txt2
-rw-r--r--lib/plugins/popularity/lang/fi/lang.php1
-rw-r--r--lib/plugins/popularity/lang/fr/intro.txt2
-rw-r--r--lib/plugins/popularity/lang/fr/lang.php4
-rw-r--r--lib/plugins/popularity/lang/hr/lang.php1
-rw-r--r--lib/plugins/popularity/lang/hu/lang.php1
-rw-r--r--lib/plugins/popularity/lang/kk/lang.php6
-rw-r--r--lib/plugins/popularity/lang/nl/lang.php1
-rw-r--r--lib/plugins/popularity/lang/no/lang.php8
-rw-r--r--lib/plugins/popularity/lang/no/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/pl/lang.php6
-rw-r--r--lib/plugins/popularity/lang/pl/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/pt-br/lang.php1
-rw-r--r--lib/plugins/popularity/lang/ro/lang.php1
-rw-r--r--lib/plugins/popularity/lang/sk/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/sv/lang.php1
-rw-r--r--lib/plugins/popularity/lang/uk/submitted.txt2
-rw-r--r--lib/plugins/popularity/lang/zh/lang.php1
-rw-r--r--lib/plugins/popularity/plugin.info.txt2
-rw-r--r--lib/plugins/revert/admin.php14
-rw-r--r--lib/plugins/revert/lang/de-informal/lang.php1
-rw-r--r--lib/plugins/revert/lang/de/lang.php2
-rw-r--r--lib/plugins/revert/lang/el/lang.php1
-rw-r--r--lib/plugins/revert/lang/eo/lang.php1
-rw-r--r--lib/plugins/revert/lang/es/lang.php2
-rw-r--r--lib/plugins/revert/lang/et/lang.php1
-rw-r--r--lib/plugins/revert/lang/fi/lang.php1
-rw-r--r--lib/plugins/revert/lang/fr/lang.php4
-rw-r--r--lib/plugins/revert/lang/hr/lang.php1
-rw-r--r--lib/plugins/revert/lang/hu/lang.php1
-rw-r--r--lib/plugins/revert/lang/kk/lang.php6
-rw-r--r--lib/plugins/revert/lang/nl/lang.php1
-rw-r--r--lib/plugins/revert/lang/no/lang.php2
-rw-r--r--lib/plugins/revert/lang/pl/lang.php1
-rw-r--r--lib/plugins/revert/lang/pt-br/lang.php1
-rw-r--r--lib/plugins/revert/lang/ro/lang.php1
-rw-r--r--lib/plugins/revert/lang/sv/lang.php1
-rw-r--r--lib/plugins/revert/lang/zh/lang.php1
-rw-r--r--lib/plugins/revert/plugin.info.txt6
-rw-r--r--lib/plugins/usermanager/admin.php14
-rw-r--r--lib/plugins/usermanager/lang/de-informal/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/de/lang.php2
-rw-r--r--lib/plugins/usermanager/lang/el/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/eo/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/es/lang.php2
-rw-r--r--lib/plugins/usermanager/lang/et/lang.php24
-rw-r--r--lib/plugins/usermanager/lang/fi/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/fr/lang.php4
-rw-r--r--lib/plugins/usermanager/lang/hr/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/hu/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/kk/lang.php6
-rw-r--r--lib/plugins/usermanager/lang/nl/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/no/lang.php2
-rw-r--r--lib/plugins/usermanager/lang/pl/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/pt-br/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/ro/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/sv/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/zh/lang.php1
-rw-r--r--lib/plugins/usermanager/plugin.info.txt6
-rw-r--r--lib/plugins/usermanager/script.js11
-rw-r--r--lib/scripts/ajax.js118
-rw-r--r--lib/scripts/behaviour.js180
-rw-r--r--lib/scripts/compatibility.js414
-rw-r--r--lib/scripts/cookie.js112
-rw-r--r--lib/scripts/delay.js1
-rw-r--r--lib/scripts/drag.js2
-rw-r--r--lib/scripts/edit.js337
-rw-r--r--lib/scripts/editor.js204
-rw-r--r--lib/scripts/events.js181
-rw-r--r--lib/scripts/fileuploader.js1247
-rw-r--r--lib/scripts/fileuploaderextended.js342
-rw-r--r--lib/scripts/helpers.js184
-rw-r--r--lib/scripts/index.js123
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.pngbin0 -> 180 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_75_ffffff_40x100.pngbin0 -> 178 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.pngbin0 -> 120 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_65_ffffff_1x400.pngbin0 -> 105 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_dadada_1x400.pngbin0 -> 111 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.pngbin0 -> 110 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.pngbin0 -> 119 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.pngbin0 -> 101 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-icons_222222_256x240.pngbin0 -> 4369 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-icons_2e83ff_256x240.pngbin0 -> 4369 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-icons_454545_256x240.pngbin0 -> 4369 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-icons_888888_256x240.pngbin0 -> 4369 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-icons_cd0a0a_256x240.pngbin0 -> 4369 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/smoothness.css568
-rw-r--r--lib/scripts/jquery/jquery-ui.js11767
-rw-r--r--lib/scripts/jquery/jquery-ui.min.js414
-rw-r--r--lib/scripts/jquery/jquery.cookie.js41
-rw-r--r--lib/scripts/jquery/jquery.js9046
-rw-r--r--lib/scripts/jquery/jquery.min.js4
-rwxr-xr-xlib/scripts/jquery/update.sh28
-rw-r--r--lib/scripts/linkwiz.js292
-rw-r--r--lib/scripts/locktimer.js128
-rw-r--r--lib/scripts/media.js1379
-rw-r--r--lib/scripts/page.js141
-rw-r--r--lib/scripts/qsearch.js146
-rw-r--r--lib/scripts/script.js539
-rw-r--r--lib/scripts/subscriptions.js46
-rw-r--r--lib/scripts/textselection.js7
-rw-r--r--lib/scripts/toolbar.js164
-rw-r--r--lib/scripts/tree.js93
-rw-r--r--lib/scripts/tw-sack.js2
-rw-r--r--lib/styles/all.css17
-rw-r--r--lib/styles/print.css3
-rw-r--r--lib/styles/screen.css29
-rw-r--r--lib/tpl/default/_fileuploader.css111
-rw-r--r--lib/tpl/default/_linkwiz.css1
-rw-r--r--lib/tpl/default/_mediamanager.css429
-rw-r--r--lib/tpl/default/_mediaoptions.css94
-rw-r--r--lib/tpl/default/_tabs.css37
-rw-r--r--lib/tpl/default/design.css6
-rw-r--r--lib/tpl/default/detail.php48
-rw-r--r--lib/tpl/default/images/UWEB.pngbin1065 -> 462 bytes
-rw-r--r--lib/tpl/default/images/apple-touch-icon.pngbin0 -> 17728 bytes
-rw-r--r--lib/tpl/default/images/button-cc.gifbin1231 -> 359 bytes
-rw-r--r--lib/tpl/default/images/button-rss.pngbin196 -> 191 bytes
-rw-r--r--lib/tpl/default/images/link_icon.gifbin942 -> 168 bytes
-rw-r--r--lib/tpl/default/images/mail_icon.gifbin918 -> 151 bytes
-rw-r--r--lib/tpl/default/images/resizecol.pngbin0 -> 225 bytes
-rw-r--r--lib/tpl/default/images/tocdot2.gifbin810 -> 50 bytes
-rw-r--r--lib/tpl/default/images/windows.gifbin223 -> 170 bytes
-rw-r--r--lib/tpl/default/main.php4
-rw-r--r--lib/tpl/default/media.css12
-rw-r--r--lib/tpl/default/style.ini3
-rw-r--r--lib/tpl/index.php2
460 files changed, 31841 insertions, 4552 deletions
diff --git a/.gitignore b/.gitignore
index b96a0554b..f9155eaed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,16 +8,20 @@
/conf/words.aspell
/conf/lang/*
/conf/plugin_lang/*
+/conf/plugins.local.*
.htaccess
*.swp
*.bak
*.old
*~
+*.DS_Store
/data/attic/*
/data/cache/*
/data/index/*
/data/locks/*
/data/media/*
+/data/media_meta/*
+/data/media_attic/*
/data/meta/*
/data/pages/*
/data/tmp/*
diff --git a/_test/cases/inc/auth_password.test.php b/_test/cases/inc/auth_password.test.php
index 8646e3226..928552a14 100644
--- a/_test/cases/inc/auth_password.test.php
+++ b/_test/cases/inc/auth_password.test.php
@@ -43,8 +43,7 @@ class auth_password_test extends UnitTestCase {
foreach($this->passes as $method => $hash){
$info = "testing method $method";
$this->signal('failinfo',$info);
-
- $hash = auth_cryptPassword('foo'.$method);
+ $hash = auth_cryptPassword('foo'.$method,$method);
$this->assertTrue(auth_verifyPassword('foo'.$method,$hash));
}
}
diff --git a/_test/cases/inc/pageutils_clean_id.test.php b/_test/cases/inc/pageutils_clean_id.test.php
index 01fa7dc1c..167229c7f 100644
--- a/_test/cases/inc/pageutils_clean_id.test.php
+++ b/_test/cases/inc/pageutils_clean_id.test.php
@@ -35,6 +35,16 @@ class init_clean_id_test extends UnitTestCase {
$tests[] = array('ښ侧化并곦 β',false,'ښ侧化并곦_β');
$tests[] = array('page:page',false,'page:page');
$tests[] = array('page;page',false,'page:page');
+ $tests[] = array('page:page 1.2',false,'page:page_1.2');
+
+ $tests[] = array('page._#!','false','page');
+ $tests[] = array('._#!page','false','page');
+ $tests[] = array('page._#!page','false','page._page');
+ $tests[] = array('ns._#!:page','false','ns:page');
+ $tests[] = array('ns:._#!page','false','ns:page');
+ $tests[] = array('ns._#!ns:page','false','ns._ns:page');
+ $tests[] = array('ns_:page',false,'ns:page');
+ $tests[] = array('page...page','false','page...page');
$conf['useslash'] = 0;
$tests[] = array('page/page',false,'page_page');
diff --git a/_test/cases/inc/search/data/ns1/ns3/page3.txt b/_test/cases/inc/search/data/ns1/ns3/page3.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/_test/cases/inc/search/data/ns1/ns3/page3.txt
diff --git a/_test/cases/inc/search/data/ns1/page1.txt b/_test/cases/inc/search/data/ns1/page1.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/_test/cases/inc/search/data/ns1/page1.txt
diff --git a/_test/cases/inc/search/data/ns1/page2.txt b/_test/cases/inc/search/data/ns1/page2.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/_test/cases/inc/search/data/ns1/page2.txt
diff --git a/_test/cases/inc/search/data/ns2/nopage.ext b/_test/cases/inc/search/data/ns2/nopage.ext
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/_test/cases/inc/search/data/ns2/nopage.ext
diff --git a/_test/cases/inc/search/data/ns2/page1.txt b/_test/cases/inc/search/data/ns2/page1.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/_test/cases/inc/search/data/ns2/page1.txt
diff --git a/_test/cases/inc/search/search.test.php b/_test/cases/inc/search/search.test.php
new file mode 100644
index 000000000..a6f15e9b6
--- /dev/null
+++ b/_test/cases/inc/search/search.test.php
@@ -0,0 +1,102 @@
+<?php
+require_once DOKU_INC.'inc/search.php';
+
+class search_test extends UnitTestCase {
+ function strip_index_data($entry) {
+ $n_entry = array();
+ foreach(array('id', 'type', 'level', 'open') as $k) {
+ $n_entry[$k] = $entry[$k];
+ }
+ return $n_entry;
+ }
+
+ function test_search_index(){
+ $data = array();
+ search($data, dirname(__FILE__) . '/data', 'search_index',
+ array('ns' => 'ns2'));
+ $this->assertEqual(array_map(array($this, 'strip_index_data'), $data),
+ array(
+ array(
+ 'id' => 'ns1',
+ 'type' => 'd',
+ 'level' => 1,
+ 'open' => false
+ ), array(
+ 'id' => 'ns2',
+ 'type' => 'd',
+ 'level' => 1,
+ 'open' => true
+ ), array(
+ 'id' => 'ns2:page1',
+ 'type' => 'f',
+ 'level' => 2,
+ 'open' => true,
+ ), ));
+ $data = array();
+ search($data, dirname(__FILE__) . '/data', 'search_index',
+ array('ns' => 'ns1/ns3'));
+ $this->assertEqual(array_map(array($this, 'strip_index_data'), $data),
+ array(
+ array(
+ 'id' => 'ns1',
+ 'type' => 'd',
+ 'level' => 1,
+ 'open' => true,
+ ),
+ array(
+ 'id' => 'ns1:ns3',
+ 'type' => 'd',
+ 'level' => 2,
+ 'open' => true,
+ ),
+ array(
+ 'id' => 'ns1:ns3:page3',
+ 'type' => 'f',
+ 'level' => 3,
+ 'open' => true,
+ ),
+ array(
+ 'id' => 'ns1:page1',
+ 'type' => 'f',
+ 'level' => 2,
+ 'open' => true,
+ ),
+ array(
+ 'id' => 'ns1:page2',
+ 'type' => 'f',
+ 'level' => 2,
+ 'open' => true,
+ ),
+ array(
+ 'id' => 'ns2',
+ 'type' => 'd',
+ 'level' => 1,
+ 'open' => false,
+ ), ));
+ $data = array();
+ search($data, dirname(__FILE__) . '/data', 'search_index',
+ array('ns' => 'ns1/ns3', 'nofiles' => true));
+ $this->assertEqual(array_map(array($this, 'strip_index_data'), $data),
+ array(
+ array(
+ 'id' => 'ns1',
+ 'type' => 'd',
+ 'level' => 1,
+ 'open' => true,
+ ),
+ array(
+ 'id' => 'ns1:ns3',
+ 'type' => 'd',
+ 'level' => 2,
+ 'open' => true,
+ ),
+ array(
+ 'id' => 'ns2',
+ 'type' => 'd',
+ 'level' => 1,
+ 'open' => false,
+ ), ));
+
+ }
+}
+//Setup VIM: ex: et ts=4 :
diff --git a/_test/cases/inc/utf8_stripspecials.test.php b/_test/cases/inc/utf8_stripspecials.test.php
index 85df75fa1..481f47650 100644
--- a/_test/cases/inc/utf8_stripspecials.test.php
+++ b/_test/cases/inc/utf8_stripspecials.test.php
@@ -17,6 +17,7 @@ class utf8_stripspecials extends UnitTestCase {
$tests[] = array('ascii.string','','\._\-:\*','asciistring');
$tests[] = array('ascii.string',' ','\._\-:\*','ascii string');
$tests[] = array('2.1.14',' ','\._\-:\*','2 1 14');
+ $tests[] = array('string with nbsps','_','\*','string_with_nbsps');
foreach($tests as $test){
$this->assertEqual(utf8_stripspecials($test[0],$test[1],$test[2]),$test[3]);
diff --git a/_test/cases/lib/exe/js_js_compress.test.php b/_test/cases/lib/exe/js_js_compress.test.php
index 76b51e5ab..4702d35d3 100644
--- a/_test/cases/lib/exe/js_js_compress.test.php
+++ b/_test/cases/lib/exe/js_js_compress.test.php
@@ -105,6 +105,12 @@ class js_js_compress_test extends UnitTestCase {
}
+ function test_complexminified(){
+ $text = 'if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class=\'test e\'></div><div class=\'test\'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;foo="text/*";bla="*/"';
+
+ $this->assertEqual(js_compress($text),$text);
+ }
+
/**
* Test the files provided with the original JsStrip
*/
diff --git a/_test/jslint.js b/_test/jslint.js
new file mode 100644
index 000000000..730f8d8a8
--- /dev/null
+++ b/_test/jslint.js
@@ -0,0 +1,89 @@
+/**
+ * Copy to a JavaScript console on your DokuWiki instance and execute
+ * Runs JSLint on all our JavaScript files with our settings
+ */
+
+(function () {
+var globals = ['jQuery', 'SIG', 'NS', 'JSINFO', 'LANG', 'DOKU_BASE',
+ 'DOKU_UHC' // FIXME: Should be moved to JSINFO
+ ], files = {
+ 'scripts/behaviour.js': null,
+ //"scripts/compatibility.js": null,
+ "scripts/cookie.js": null,
+ //"scripts/delay.js": null,
+ //"scripts/drag.js": null,
+ "scripts/edit.js": null,
+ "scripts/editor.js": null,
+ "scripts/helpers.js": null,
+ "scripts/hotkeys.js": null,
+ "scripts/index.js": null,
+ "scripts/linkwiz.js": null,
+ "scripts/locktimer.js": null,
+ "scripts/media.js": null,
+ "scripts/page.js": null,
+ "scripts/qsearch.js": null,
+ "scripts/script.js": null,
+ "scripts/textselection.js": null,
+ "scripts/toolbar.js": null,
+ "scripts/tree.js": null //,
+ //"scripts/tw-sack.js": null
+ }, overwrites = {
+ "scripts/script.js": {evil: true},
+ "scripts/media.js": {devel: true, windows: true},
+ "scripts/locktimer.js": {devel: true},
+ "scripts/behaviour.js": {devel: true},
+ "scripts/helpers.js": {windows: true}
+ };
+
+jQuery.ajax({
+ dataType: 'script',
+ type: "GET",
+// url: 'http://jshint.com/jshint.js'
+ url: 'https://raw.github.com/douglascrockford/JSLint/master/jslint.js',
+ success: function () {
+ for (var file in files) {
+ jQuery.ajax({
+ cache: false,
+ async: false,
+ type: "GET",
+ url: DOKU_BASE + 'lib/' + file,
+ dataType: 'text',
+ success: function (res) {
+ files[file] = res;
+ var data = lint(files[file]);
+ jQuery.merge(globals, data.globals);
+ }});
+ }
+
+ for (var file in files) {
+ if (!files[file]) {
+ continue;
+ }
+ // FIXME more fine-grained write access
+ var data = lint('/*global ' + globals.join(':true, ') +
+ ':true*/\n' + files[file], overwrites[file]);
+ console.log(file);
+ jQuery.each(data.errors || [], function (_, val) {
+ if (val === null) {
+ return;
+ }
+ console.error(val.reason + ' (Line ' + (val.line - 1) +
+ ', character ' + val.character + '):\n' +
+ val.evidence);
+ });
+ };
+ }
+});
+
+function lint(txt, overwrite) {
+ JSLINT(txt, jQuery.extend({
+ // These settings are necessary
+ browser: true,
+
+ // Things we probably should learn someday
+ sloppy: true, white: true, eqeq: true, nomen: true,
+ plusplus: true, regexp: true
+ }, overwrite));
+ return JSLINT.data();
+}
+})();
diff --git a/bin/indexer.php b/bin/indexer.php
index 4bfd1682e..f6aeb4f0e 100755
--- a/bin/indexer.php
+++ b/bin/indexer.php
@@ -133,12 +133,15 @@ function _clearindex(){
_lock();
_quietecho("Clearing index... ");
io_saveFile($conf['indexdir'].'/page.idx','');
- //io_saveFile($conf['indexdir'].'/title.idx','');
+ io_saveFile($conf['indexdir'].'/title.idx','');
+ io_saveFile($conf['indexdir'].'/pageword.idx','');
+ io_saveFile($conf['indexdir'].'/metadata.idx','');
$dir = @opendir($conf['indexdir']);
if($dir!==false){
while(($f = readdir($dir)) !== false){
if(substr($f,-4)=='.idx' &&
- (substr($f,0,1)=='i' || substr($f,0,1)=='w'))
+ (substr($f,0,1)=='i' || substr($f,0,1)=='w'
+ || substr($f,-6)=='_w.idx' || substr($f,-6)=='_i.idx' || substr($f,-6)=='_p.idx'))
@unlink($conf['indexdir']."/$f");
}
}
diff --git a/bin/striplangs.php b/bin/striplangs.php
index 288859c6a..40cef5063 100644
--- a/bin/striplangs.php
+++ b/bin/striplangs.php
@@ -22,7 +22,7 @@ function usage($show_examples = false) {
-h, --help get this help
-x, --examples get also usage examples
-k, --keep comma separated list of languages, -e is always implied
- -e, --english keeps english, dummy to use without -k";
+ -e, --english keeps english, dummy to use without -k\n";
if ( $show_examples ) {
print "\n
EXAMPLES
diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php
index e90e4fc23..298c8e572 100644
--- a/conf/dokuwiki.php
+++ b/conf/dokuwiki.php
@@ -20,6 +20,7 @@ $conf['basedir'] = ''; //absolute dir from serveroot - blank
$conf['baseurl'] = ''; //URL to server including protocol - blank for autodetect
$conf['savedir'] = './data'; //where to store all the files
$conf['allowdebug'] = 0; //allow debug output, enable if needed 0|1
+$conf['mediarevisions'] = 1; //enable/disable media revisions
/* Display Options */
@@ -108,6 +109,7 @@ $conf['subscribers'] = 0; //enable change notice subscription sup
$conf['subscribe_time'] = 24*60*60; //Time after which digests / lists are sent (in sec, default 1 day)
//Should be smaller than the time specified in recent_days
$conf['compress'] = 1; //Strip whitespaces and comments from Styles and JavaScript? 1|0
+$conf['cssdatauri'] = 0; //Maximum byte size of small images to embed into CSS, won't work on IE<8
$conf['hidepages'] = ''; //Regexp for pages to be skipped from RSS, Search and Recent Changes
$conf['send404'] = 0; //Send a HTTP 404 status for non existing pages?
$conf['sitemap'] = 0; //Create a google sitemap? How often? In days.
diff --git a/conf/mediameta.php b/conf/mediameta.php
index ba7117643..0428a4b88 100644
--- a/conf/mediameta.php
+++ b/conf/mediameta.php
@@ -29,29 +29,63 @@ $fields = array(
'img_title',
'text'),
- 20 => array('Iptc.Caption',
+ 20 => array('',
+ 'img_date',
+ 'date',
+ array('Date.EarliestTime')),
+
+ 30 => array('',
+ 'img_fname',
+ 'text',
+ array('File.Name')),
+
+ 40 => array('Iptc.Caption',
'img_caption',
'textarea',
array('Exif.UserComment',
'Exif.TIFFImageDescription',
'Exif.TIFFUserComment')),
- 30 => array('Iptc.Byline',
+ 50 => array('Iptc.Byline',
'img_artist',
'text',
array('Exif.TIFFArtist',
'Exif.Artist',
'Iptc.Credit')),
- 40 => array('Iptc.CopyrightNotice',
+ 60 => array('Iptc.CopyrightNotice',
'img_copyr',
'text',
array('Exif.TIFFCopyright',
'Exif.Copyright')),
- 50 => array('Iptc.Keywords',
+ 70 => array('',
+ 'img_format',
+ 'text',
+ array('File.Format')),
+
+ 80 => array('',
+ 'img_fsize',
+ 'text',
+ array('File.NiceSize')),
+
+ 90 => array('',
+ 'img_width',
+ 'text',
+ array('File.Width')),
+
+ 100 => array('',
+ 'img_height',
+ 'text',
+ array('File.Height')),
+
+ 110 => array('',
+ 'img_camera',
+ 'text',
+ array('Simple.Camera')),
+
+ 120 => array('Iptc.Keywords',
'img_keywords',
'text',
array('Exif.Category')),
);
-
diff --git a/conf/plugins.required.php b/conf/plugins.required.php
new file mode 100644
index 000000000..26eb8888b
--- /dev/null
+++ b/conf/plugins.required.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * This file configures the enabled/disabled status of plugins, which are also protected
+ * from changes by the extention manager. These settings will override any local settings.
+ * It is not recommended to change this file, as it is overwritten on DokuWiki upgrades.
+ */
+$plugins['acl'] = 1;
+$plugins['plugin'] = 1;
+$plugins['config'] = 1;
+$plugins['usermanager'] = 1;
+$plugins['revert'] = 1;
diff --git a/data/deleted.files b/data/deleted.files
index ec5d3b65d..d034e1d5b 100644
--- a/data/deleted.files
+++ b/data/deleted.files
@@ -4,6 +4,18 @@
# A copy of this list is maintained at
# http://www.dokuwiki.org/install:upgrade#files_to_remove
+# removed in 2011-11-10
+lib/_fla/.htaccess
+lib/_fla/MultipleUpload.as
+lib/_fla/README
+lib/_fla/index.html
+lib/_fla/multipleUpload.fla
+lib/exe/multipleUpload.swf
+lib/images/multiupload.png
+lib/scripts/ajax.js
+lib/scripts/events.js
+lib/scripts/subscriptions.js
+
# removed in 2011-05-25
conf/words.aspell.dist
lib/styles/style.css
diff --git a/data/media_attic/_dummy b/data/media_attic/_dummy
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/data/media_attic/_dummy
diff --git a/data/media_meta/_dummy b/data/media_meta/_dummy
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/data/media_meta/_dummy
diff --git a/doku.php b/doku.php
index 4901750a8..e23757298 100644
--- a/doku.php
+++ b/doku.php
@@ -7,7 +7,7 @@
*/
// update message version
-$updateVersion = 34;
+$updateVersion = 35;
// xdebug_start_profiling();
diff --git a/feed.php b/feed.php
index cca8661f4..298777eb9 100644
--- a/feed.php
+++ b/feed.php
@@ -117,6 +117,8 @@ function rss_parseOptions(){
'show_minor' => array('minor', false),
// String, only used in search mode
'search_query' => array('q', null),
+ // One of: pages, media, both
+ 'content_type' => array('view', 'both')
) as $name => $val) {
$opt[$name] = (isset($_REQUEST[$val[0]]) && !empty($_REQUEST[$val[0]]))
@@ -188,7 +190,9 @@ function rss_buildItems(&$rss,&$data,$opt){
$item = new FeedItem();
$id = $ditem['id'];
- $meta = p_get_metadata($id);
+ if(!$ditem['media']) {
+ $meta = p_get_metadata($id);
+ }
// add date
if($ditem['date']){
@@ -213,62 +217,134 @@ function rss_buildItems(&$rss,&$data,$opt){
// add item link
switch ($opt['link_to']){
case 'page':
- $item->link = wl($id,'rev='.$date,true,'&');
+ if ($ditem['media']) {
+ $item->link = media_managerURL(array('image' => $id,
+ 'ns' => getNS($id),
+ 'rev' => $date), '&', true);
+ } else {
+ $item->link = wl($id,'rev='.$date,true,'&', true);
+ }
break;
case 'rev':
- $item->link = wl($id,'do=revisions&rev='.$date,true,'&');
+ if ($ditem['media']) {
+ $item->link = media_managerURL(array('image' => $id,
+ 'ns' => getNS($id),
+ 'rev' => $date,
+ 'tab_details' => 'history'), '&', true);
+ } else {
+ $item->link = wl($id,'do=revisions&rev='.$date,true,'&');
+ }
break;
case 'current':
- $item->link = wl($id, '', true,'&');
+ if ($ditem['media']) {
+ $item->link = media_managerURL(array('image' => $id,
+ 'ns' => getNS($id)), '&', true);
+ } else {
+ $item->link = wl($id, '', true,'&');
+ }
break;
case 'diff':
default:
- $item->link = wl($id,'rev='.$date.'&do=diff',true,'&');
+ if ($ditem['media']) {
+ $item->link = media_managerURL(array('image' => $id,
+ 'ns' => getNS($id),
+ 'rev' => $date,
+ 'tab_details' => 'history',
+ 'mediado' => 'diff'), '&', true);
+ } else {
+ $item->link = wl($id,'rev='.$date.'&do=diff',true,'&');
+ }
}
// add item content
switch ($opt['item_content']){
case 'diff':
case 'htmldiff':
- require_once(DOKU_INC.'inc/DifferenceEngine.php');
- $revs = getRevisions($id, 0, 1);
- $rev = $revs[0];
-
- if($rev){
- $df = new Diff(explode("\n",htmlspecialchars(rawWiki($id,$rev))),
- explode("\n",htmlspecialchars(rawWiki($id,''))));
- }else{
- $df = new Diff(array(''),
- explode("\n",htmlspecialchars(rawWiki($id,''))));
- }
-
- if($opt['item_content'] == 'htmldiff'){
- $tdf = new TableDiffFormatter();
- $content = '<table>';
- $content .= '<tr><th colspan="2" width="50%">'.$rev.'</th>';
- $content .= '<th colspan="2" width="50%">'.$lang['current'].'</th></tr>';
- $content .= $tdf->format($df);
- $content .= '</table>';
- }else{
- $udf = new UnifiedDiffFormatter();
- $content = "<pre>\n".$udf->format($df)."\n</pre>";
+ if ($ditem['media']) {
+ $revs = getRevisions($id, 0, 1, 8192, true);
+ $rev = $revs[0];
+ $src_r = '';
+ $src_l = '';
+
+ if ($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)), 300)) {
+ $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id));
+ $src_r = ml($id, $more);
+ }
+ if ($rev && $size = media_image_preview_size($id, $rev, new JpegMeta(mediaFN($id, $rev)), 300)){
+ $more = 'rev='.$rev.'&w='.$size[0].'&h='.$size[1];
+ $src_l = ml($id, $more);
+ }
+ $content = '';
+ if ($src_r) {
+ $content = '<table>';
+ $content .= '<tr><th width="50%">'.$rev.'</th>';
+ $content .= '<th width="50%">'.$lang['current'].'</th></tr>';
+ $content .= '<tr align="center"><td><img src="'.$src_l.'" alt="" /></td><td>';
+ $content .= '<img src="'.$src_r.'" alt="'.$id.'" /></td></tr>';
+ $content .= '</table>';
+ }
+
+ } else {
+ require_once(DOKU_INC.'inc/DifferenceEngine.php');
+ $revs = getRevisions($id, 0, 1);
+ $rev = $revs[0];
+
+ if($rev){
+ $df = new Diff(explode("\n",htmlspecialchars(rawWiki($id,$rev))),
+ explode("\n",htmlspecialchars(rawWiki($id,''))));
+ }else{
+ $df = new Diff(array(''),
+ explode("\n",htmlspecialchars(rawWiki($id,''))));
+ }
+
+ if($opt['item_content'] == 'htmldiff'){
+ $tdf = new TableDiffFormatter();
+ $content = '<table>';
+ $content .= '<tr><th colspan="2" width="50%">'.$rev.'</th>';
+ $content .= '<th colspan="2" width="50%">'.$lang['current'].'</th></tr>';
+ $content .= $tdf->format($df);
+ $content .= '</table>';
+ }else{
+ $udf = new UnifiedDiffFormatter();
+ $content = "<pre>\n".$udf->format($df)."\n</pre>";
+ }
}
break;
case 'html':
- $content = p_wiki_xhtml($id,$date,false);
- // no TOC in feeds
- $content = preg_replace('/(<!-- TOC START -->).*(<!-- TOC END -->)/s','',$content);
-
- // make URLs work when canonical is not set, regexp instead of rerendering!
- if(!$conf['canonical']){
- $base = preg_quote(DOKU_REL,'/');
- $content = preg_replace('/(<a href|<img src)="('.$base.')/s','$1="'.DOKU_URL,$content);
+ if ($ditem['media']) {
+ if ($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) {
+ $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id));
+ $src = ml($id, $more);
+ $content = '<img src="'.$src.'" alt="'.$id.'" />';
+ } else {
+ $content = '';
+ }
+ } else {
+ $content = p_wiki_xhtml($id,$date,false);
+ // no TOC in feeds
+ $content = preg_replace('/(<!-- TOC START -->).*(<!-- TOC END -->)/s','',$content);
+
+ // make URLs work when canonical is not set, regexp instead of rerendering!
+ if(!$conf['canonical']){
+ $base = preg_quote(DOKU_REL,'/');
+ $content = preg_replace('/(<a href|<img src)="('.$base.')/s','$1="'.DOKU_URL,$content);
+ }
}
break;
case 'abstract':
default:
- $content = $meta['description']['abstract'];
+ if ($ditem['media']) {
+ if ($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) {
+ $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id));
+ $src = ml($id, $more);
+ $content = '<img src="'.$src.'" alt="'.$id.'" />';
+ } else {
+ $content = '';
+ }
+ } else {
+ $content = $meta['description']['abstract'];
+ }
}
$item->description = $content; //FIXME a plugin hook here could be senseful
@@ -334,8 +410,11 @@ function rss_buildItems(&$rss,&$data,$opt){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function rssRecentChanges($opt){
+ global $conf;
$flags = RECENTS_SKIP_DELETED;
if(!$opt['show_minor']) $flags += RECENTS_SKIP_MINORS;
+ if($opt['content_type'] == 'media' && $conf['mediarevisions']) $flags += RECENTS_MEDIA_CHANGES;
+ if($opt['content_type'] == 'both' && $conf['mediarevisions']) $flags += RECENTS_MEDIA_PAGES_MIXED;
$recents = getRecents(0,$opt['items'],$opt['namespace'],$flags);
return $recents;
diff --git a/inc/FeedParser.php b/inc/FeedParser.php
index b98350da7..e5f1fb636 100644
--- a/inc/FeedParser.php
+++ b/inc/FeedParser.php
@@ -49,13 +49,15 @@ class FeedParser_File extends SimplePie_File {
*/
function FeedParser_File($url, $timeout=10, $redirects=5,
$headers=null, $useragent=null, $force_fsockopen=false) {
- parent::__construct();
$this->http = new DokuHTTPClient();
$this->success = $this->http->sendRequest($url);
$this->headers = $this->http->resp_headers;
$this->body = $this->http->resp_body;
$this->error = $this->http->error;
+
+ $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE | SIMPLEPIE_FILE_SOURCE_FSOCKOPEN;
+
return $this->success;
}
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index 372769b71..fdf95d113 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -368,6 +368,7 @@ class HTTPClient {
unset($this->connections[$connectionId]);
return false;
}
+ usleep(1000);
$r_headers .= fgets($socket,1024);
}while(!preg_match('/\r?\n\r?\n$/',$r_headers));
diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php
index afa70168c..5c043fb6b 100644
--- a/inc/JpegMeta.php
+++ b/inc/JpegMeta.php
@@ -1207,7 +1207,7 @@ class JpegMeta {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function _parseFileInfo() {
- if (file_exists($this->_fileName)) {
+ if (file_exists($this->_fileName) && is_file($this->_fileName)) {
$this->_info['file'] = array();
$this->_info['file']['Name'] = basename($this->_fileName);
$this->_info['file']['Path'] = fullpath($this->_fileName);
diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php
index 541de6752..31493c022 100644
--- a/inc/PassHash.class.php
+++ b/inc/PassHash.class.php
@@ -82,7 +82,7 @@ class PassHash {
public function gen_salt($len=32){
$salt = '';
$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
- for($i=0;$i<$len,$i++;) $salt .= $chars[mt_rand(0,61)];
+ for($i=0;$i<$len;$i++) $salt .= $chars[mt_rand(0,61)];
return $salt;
}
@@ -292,17 +292,20 @@ class PassHash {
* Password hashing method 'pmd5'
*
* Uses salted MD5 hashs. Salt is 1+8 bytes long, 1st byte is the
- * iteration count.
+ * iteration count when given, for null salts $compute is used.
*
* @param string $clear - the clear text to hash
* @param string $salt - the salt to use, null for random
* @param string $magic - the hash identifier (P or H)
+ * @param int $compute - the iteration count for new passwords
* @returns string - hashed password
*/
- public function hash_pmd5($clear, $salt=null, $magic='P'){
- $this->init_salt($salt);
-
+ public function hash_pmd5($clear, $salt=null, $magic='P',$compute=8){
$itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
+ if(is_null($salt)){
+ $this->init_salt($salt);
+ $salt = $itoa64[$compute].$salt; // prefix iteration count
+ }
$iterc = $salt[0]; // pos 0 of salt is iteration count
$iter = strpos($itoa64,$iterc);
$iter = 1 << $iter;
@@ -340,8 +343,8 @@ class PassHash {
/**
* Alias for hash_pmd5
*/
- public function hash_hmd5($clear, $salt=null, $magic='H'){
- return $this->hash_pmd5($clear, $salt, $magic);
+ public function hash_hmd5($clear, $salt=null, $magic='H', $compute=8){
+ return $this->hash_pmd5($clear, $salt, $magic, $compute);
}
/**
diff --git a/inc/SimplePie.php b/inc/SimplePie.php
index d35443165..10d8141bd 100644
--- a/inc/SimplePie.php
+++ b/inc/SimplePie.php
@@ -5,7 +5,7 @@
* A PHP-Based RSS and Atom Feed Framework.
* Takes the hard work out of managing a complete RSS/Atom solution.
*
- * Copyright (c) 2004-2009, Ryan Parman and Geoffrey Sneddon
+ * Copyright (c) 2004-2011, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
@@ -33,10 +33,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.2.1-dev
- * @copyright 2004-2009 Ryan Parman, Geoffrey Sneddon
+ * @version 1.2.1
+ * @copyright 2004-2011 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
+ * @author Ryan McCue
* @link http://simplepie.org/ SimplePie
* @link http://simplepie.org/support/ Please submit all bug reports and feature requests to the SimplePie forums
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
@@ -55,9 +56,8 @@ define('SIMPLEPIE_VERSION', '1.2.1-dev');
/**
* SimplePie Build
- * @todo Hardcode for release (there's no need to have to call SimplePie_Misc::parse_date() only every load of simplepie.inc)
*/
-define('SIMPLEPIE_BUILD', gmdate('YmdHis', SimplePie_Misc::parse_date(substr('$Date$', 7, 25)) ? SimplePie_Misc::parse_date(substr('$Date$', 7, 25)) : filemtime(__FILE__)));
+define('SIMPLEPIE_BUILD', '20111015034325');
/**
* SimplePie Website URL
@@ -3279,6 +3279,11 @@ class SimplePie_Item
{
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
+ elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description'))
+ {
+ return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML);
+ }
+
elseif (!$description_only)
{
return $this->get_content(true);
@@ -3643,7 +3648,7 @@ class SimplePie_Item
{
return $this->sanitize($this->get_date(''), SIMPLEPIE_CONSTRUCT_TEXT);
}
- elseif (($date = $this->get_date('U')) !== null)
+ elseif (($date = $this->get_date('U')) !== null && $date !== false)
{
return strftime($date_format, $date);
}
@@ -4068,16 +4073,16 @@ class SimplePie_Item
$temp = explode(':', $this->sanitize($duration_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
if (sizeof($temp) > 0)
{
- (int) $seconds = array_pop($temp);
+ $seconds = (int) array_pop($temp);
}
if (sizeof($temp) > 0)
{
- (int) $minutes = array_pop($temp);
+ $minutes = (int) array_pop($temp);
$seconds += $minutes * 60;
}
if (sizeof($temp) > 0)
{
- (int) $hours = array_pop($temp);
+ $hours = (int) array_pop($temp);
$seconds += $hours * 3600;
}
unset($temp);
@@ -5056,7 +5061,7 @@ class SimplePie_Item
{
foreach ((array) $this->data['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content'] as $content)
{
- if (isset($content['attribs']['']['url']))
+ if (isset($content['attribs']['']['url']) || isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player']))
{
// Attributes
$bitrate = null;
@@ -5141,8 +5146,10 @@ class SimplePie_Item
{
$width = $this->sanitize($content['attribs']['']['width'], SIMPLEPIE_CONSTRUCT_TEXT);
}
- $url = $this->sanitize($content['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
-
+ if (isset($content['attribs']['']['url']))
+ {
+ $url = $this->sanitize($content['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
+ }
// Checking the other optional media: elements. Priority: media:content, media:group, item, channel
// CAPTIONS
@@ -7731,16 +7738,17 @@ class SimplePie_File
{
$this->method = SIMPLEPIE_FILE_SOURCE_REMOTE | SIMPLEPIE_FILE_SOURCE_FSOCKOPEN;
$url_parts = parse_url($url);
+ $socket_host = $url_parts['host'];
if (isset($url_parts['scheme']) && strtolower($url_parts['scheme']) === 'https')
{
- $url_parts['host'] = "ssl://$url_parts[host]";
+ $socket_host = "ssl://$url_parts[host]";
$url_parts['port'] = 443;
}
if (!isset($url_parts['port']))
{
$url_parts['port'] = 80;
}
- $fp = @fsockopen($url_parts['host'], $url_parts['port'], $errno, $errstr, $timeout);
+ $fp = @fsockopen($socket_host, $url_parts['port'], $errno, $errstr, $timeout);
if (!$fp)
{
$this->error = 'fsockopen error: ' . $errstr;
@@ -8486,7 +8494,7 @@ class SimplePie_gzdecode
// Get the length of the extra field
$len = current(unpack('v', substr($this->compressed_data, $this->position, 2)));
- $position += 2;
+ $this->position += 2;
// Check the length of the string is still valid
$this->min_compressed_size += $len + 4;
@@ -9448,12 +9456,12 @@ class SimplePie_Misc
}
// This is first, as behaviour of this is completely predictable
- if ($input === 'Windows-1252' && $output === 'UTF-8')
+ if ($input === 'windows-1252' && $output === 'UTF-8')
{
return SimplePie_Misc::windows_1252_to_utf8($data);
}
// This is second, as behaviour of this varies only with PHP version (the middle part of this expression checks the encoding is supported).
- elseif (function_exists('mb_convert_encoding') && @mb_convert_encoding("\x80", 'UTF-16BE', $input) !== "\x00\x80" && ($return = @mb_convert_encoding($data, $output, $input)))
+ elseif (function_exists('mb_convert_encoding') && @mb_convert_encoding("\x80", 'UTF-16BE', $input) !== "\x00\x80" && in_array($input, mb_list_encodings()) && ($return = @mb_convert_encoding($data, $output, $input)))
{
return $return;
}
@@ -9469,6 +9477,17 @@ class SimplePie_Misc
}
}
+ /**
+ * Normalize an encoding name
+ *
+ * This is automatically generated by create.php
+ *
+ * To generate it, run `php create.php` on the command line, and copy the
+ * output to replace this function.
+ *
+ * @param string $charset Character set to standardise
+ * @return string Standardised name
+ */
function encoding($charset)
{
// Normalization from UTS #22
@@ -9502,7 +9521,6 @@ class SimplePie_Misc
case 'big5':
case 'csbig5':
- case 'xxbig5':
return 'Big5';
case 'big5hkscs':
@@ -9658,14 +9676,14 @@ class SimplePie_Misc
case 'isoir85':
return 'ES2';
- case 'cseucfixwidjapanese':
- case 'extendedunixcodefixedwidthforjapanese':
- return 'Extended_UNIX_Code_Fixed_Width_for_Japanese';
-
case 'cseucpkdfmtjapanese':
case 'eucjp':
case 'extendedunixcodepackedformatforjapanese':
- return 'Extended_UNIX_Code_Packed_Format_for_Japanese';
+ return 'EUC-JP';
+
+ case 'cseucfixwidjapanese':
+ case 'extendedunixcodefixedwidthforjapanese':
+ return 'Extended_UNIX_Code_Fixed_Width_for_Japanese';
case 'gb18030':
return 'GB18030';
@@ -9744,80 +9762,6 @@ class SimplePie_Misc
case 'ibmthai':
return 'IBM-Thai';
- case 'ccsid858':
- case 'cp858':
- case 'ibm858':
- case 'pcmultilingual850euro':
- return 'IBM00858';
-
- case 'ccsid924':
- case 'cp924':
- case 'ebcdiclatin9euro':
- case 'ibm924':
- return 'IBM00924';
-
- case 'ccsid1140':
- case 'cp1140':
- case 'ebcdicus37euro':
- case 'ibm1140':
- return 'IBM01140';
-
- case 'ccsid1141':
- case 'cp1141':
- case 'ebcdicde273euro':
- case 'ibm1141':
- return 'IBM01141';
-
- case 'ccsid1142':
- case 'cp1142':
- case 'ebcdicdk277euro':
- case 'ebcdicno277euro':
- case 'ibm1142':
- return 'IBM01142';
-
- case 'ccsid1143':
- case 'cp1143':
- case 'ebcdicfi278euro':
- case 'ebcdicse278euro':
- case 'ibm1143':
- return 'IBM01143';
-
- case 'ccsid1144':
- case 'cp1144':
- case 'ebcdicit280euro':
- case 'ibm1144':
- return 'IBM01144';
-
- case 'ccsid1145':
- case 'cp1145':
- case 'ebcdices284euro':
- case 'ibm1145':
- return 'IBM01145';
-
- case 'ccsid1146':
- case 'cp1146':
- case 'ebcdicgb285euro':
- case 'ibm1146':
- return 'IBM01146';
-
- case 'ccsid1147':
- case 'cp1147':
- case 'ebcdicfr297euro':
- case 'ibm1147':
- return 'IBM01147';
-
- case 'ccsid1148':
- case 'cp1148':
- case 'ebcdicinternational500euro':
- case 'ibm1148':
- return 'IBM01148';
-
- case 'ccsid1149':
- case 'cp1149':
- case 'ebcdicis871euro':
- case 'ibm1149':
- return 'IBM01149';
-
case 'cp37':
case 'csibm37':
case 'ebcdiccpca':
@@ -9965,6 +9909,12 @@ class SimplePie_Misc
case 'ibm857':
return 'IBM857';
+ case 'ccsid858':
+ case 'cp858':
+ case 'ibm858':
+ case 'pcmultilingual850euro':
+ return 'IBM00858';
+
case '860':
case 'cp860':
case 'csibm860':
@@ -10067,6 +10017,12 @@ class SimplePie_Misc
case 'ibm918':
return 'IBM918';
+ case 'ccsid924':
+ case 'cp924':
+ case 'ebcdiclatin9euro':
+ case 'ibm924':
+ return 'IBM00924';
+
case 'cp1026':
case 'csibm1026':
case 'ibm1026':
@@ -10075,6 +10031,68 @@ class SimplePie_Misc
case 'ibm1047':
return 'IBM1047';
+ case 'ccsid1140':
+ case 'cp1140':
+ case 'ebcdicus37euro':
+ case 'ibm1140':
+ return 'IBM01140';
+
+ case 'ccsid1141':
+ case 'cp1141':
+ case 'ebcdicde273euro':
+ case 'ibm1141':
+ return 'IBM01141';
+
+ case 'ccsid1142':
+ case 'cp1142':
+ case 'ebcdicdk277euro':
+ case 'ebcdicno277euro':
+ case 'ibm1142':
+ return 'IBM01142';
+
+ case 'ccsid1143':
+ case 'cp1143':
+ case 'ebcdicfi278euro':
+ case 'ebcdicse278euro':
+ case 'ibm1143':
+ return 'IBM01143';
+
+ case 'ccsid1144':
+ case 'cp1144':
+ case 'ebcdicit280euro':
+ case 'ibm1144':
+ return 'IBM01144';
+
+ case 'ccsid1145':
+ case 'cp1145':
+ case 'ebcdices284euro':
+ case 'ibm1145':
+ return 'IBM01145';
+
+ case 'ccsid1146':
+ case 'cp1146':
+ case 'ebcdicgb285euro':
+ case 'ibm1146':
+ return 'IBM01146';
+
+ case 'ccsid1147':
+ case 'cp1147':
+ case 'ebcdicfr297euro':
+ case 'ibm1147':
+ return 'IBM01147';
+
+ case 'ccsid1148':
+ case 'cp1148':
+ case 'ebcdicinternational500euro':
+ case 'ibm1148':
+ return 'IBM01148';
+
+ case 'ccsid1149':
+ case 'cp1149':
+ case 'ebcdicis871euro':
+ case 'ibm1149':
+ return 'IBM01149';
+
case 'csiso143iecp271':
case 'iecp271':
case 'isoir143':
@@ -10617,11 +10635,6 @@ class SimplePie_Misc
case 'sen850200c':
return 'SEN_850200_C';
- case 'csshiftjis':
- case 'mskanji':
- case 'shiftjis':
- return 'Shift_JIS';
-
case 'csiso102t617bit':
case 'isoir102':
case 't617bit':
@@ -10720,7 +10733,10 @@ class SimplePie_Misc
case 'viscii':
return 'VISCII';
+ case 'csshiftjis':
case 'cswindows31j':
+ case 'mskanji':
+ case 'shiftjis':
case 'windows31j':
return 'Windows-31J';
@@ -11381,6 +11397,58 @@ function embed_wmedia(width, height, link) {
}
<?php
}
+
+
+
+ /**
+ * Format debugging information
+ */
+ function debug($sp)
+ {
+ $info = 'SimplePie ' . SIMPLEPIE_VERSION . ' Build ' . SIMPLEPIE_BUILD . "\n";
+ $info .= 'PHP ' . PHP_VERSION . "\n";
+ if ($sp->error() !== null)
+ {
+ $info .= 'Error occurred: ' . $sp->error() . "\n";
+ }
+ else
+ {
+ $info .= "No error found.\n";
+ }
+ $info .= "Extensions:\n";
+ $extensions = array('pcre', 'curl', 'zlib', 'mbstring', 'iconv', 'xmlreader', 'xml');
+ foreach ($extensions as $ext)
+ {
+ if (extension_loaded($ext))
+ {
+ $info .= " $ext loaded\n";
+ switch ($ext)
+ {
+ case 'pcre':
+ $info .= ' Version ' . PCRE_VERSION . "\n";
+ break;
+ case 'curl':
+ $version = curl_version();
+ $info .= ' Version ' . $version['version'] . "\n";
+ break;
+ case 'mbstring':
+ $info .= ' Overloading: ' . mb_get_info('func_overload') . "\n";
+ break;
+ case 'iconv':
+ $info .= ' Version ' . ICONV_VERSION . "\n";
+ break;
+ case 'xml':
+ $info .= ' Version ' . LIBXML_DOTTED_VERSION . "\n";
+ break;
+ }
+ }
+ else
+ {
+ $info .= " $ext not loaded\n";
+ }
+ }
+ return $info;
+ }
}
/**
@@ -11852,14 +11920,135 @@ class SimplePie_IRI
/**
* Replace invalid character with percent encoding
*
- * @access private
* @param string $string Input string
* @param string $valid_chars Valid characters
* @param int $case Normalise case
* @return string
*/
- function replace_invalid_with_pct_encoding($string, $valid_chars, $case = SIMPLEPIE_SAME_CASE)
+ function replace_invalid_with_pct_encoding($string, $valid_chars, $case = SIMPLEPIE_SAME_CASE, $iprivate = false)
{
+ // Normalize as many pct-encoded sections as possible
+ $string = preg_replace_callback('/(?:%[A-Fa-f0-9]{2})+/', array(&$this, 'remove_iunreserved_percent_encoded'), $string);
+
+ // Replace invalid percent characters
+ $string = preg_replace('/%(?![A-Fa-f0-9]{2})/', '%25', $string);
+
+ // Add unreserved and % to $valid_chars (the latter is safe because all
+ // pct-encoded sections are now valid).
+ $valid_chars .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~%';
+
+ // Now replace any bytes that aren't allowed with their pct-encoded versions
+ $position = 0;
+ $strlen = strlen($string);
+ while (($position += strspn($string, $valid_chars, $position)) < $strlen)
+ {
+ $value = ord($string[$position]);
+
+ // Start position
+ $start = $position;
+
+ // By default we are valid
+ $valid = true;
+
+ // No one byte sequences are valid due to the while.
+ // Two byte sequence:
+ if (($value & 0xE0) === 0xC0)
+ {
+ $character = ($value & 0x1F) << 6;
+ $length = 2;
+ $remaining = 1;
+ }
+ // Three byte sequence:
+ elseif (($value & 0xF0) === 0xE0)
+ {
+ $character = ($value & 0x0F) << 12;
+ $length = 3;
+ $remaining = 2;
+ }
+ // Four byte sequence:
+ elseif (($value & 0xF8) === 0xF0)
+ {
+ $character = ($value & 0x07) << 18;
+ $length = 4;
+ $remaining = 3;
+ }
+ // Invalid byte:
+ else
+ {
+ $valid = false;
+ $length = 1;
+ $remaining = 0;
+ }
+
+ if ($remaining)
+ {
+ if ($position + $length <= $strlen)
+ {
+ for ($position++; $remaining; $position++)
+ {
+ $value = ord($string[$position]);
+
+ // Check that the byte is valid, then add it to the character:
+ if (($value & 0xC0) === 0x80)
+ {
+ $character |= ($value & 0x3F) << (--$remaining * 6);
+ }
+ // If it is invalid, count the sequence as invalid and reprocess the current byte:
+ else
+ {
+ $valid = false;
+ $position--;
+ break;
+ }
+ }
+ }
+ else
+ {
+ $position = $strlen - 1;
+ $valid = false;
+ }
+ }
+
+ // Percent encode anything invalid or not in ucschar
+ if (
+ // Invalid sequences
+ !$valid
+ // Non-shortest form sequences are invalid
+ || $length > 1 && $character <= 0x7F
+ || $length > 2 && $character <= 0x7FF
+ || $length > 3 && $character <= 0xFFFF
+ // Outside of range of ucschar codepoints
+ // Noncharacters
+ || ($character & 0xFFFE) === 0xFFFE
+ || $character >= 0xFDD0 && $character <= 0xFDEF
+ || (
+ // Everything else not in ucschar
+ $character > 0xD7FF && $character < 0xF900
+ || $character < 0xA0
+ || $character > 0xEFFFD
+ )
+ && (
+ // Everything not in iprivate, if it applies
+ !$iprivate
+ || $character < 0xE000
+ || $character > 0x10FFFD
+ )
+ )
+ {
+ // If we were a character, pretend we weren't, but rather an error.
+ if ($valid)
+ $position--;
+
+ for ($j = $start; $j <= $position; $j++)
+ {
+ $string = substr_replace($string, sprintf('%%%02X', ord($string[$j])), $j, 1);
+ $j += 2;
+ $position += 2;
+ $strlen += 2;
+ }
+ }
+ }
+
// Normalise case
if ($case & SIMPLEPIE_LOWERCASE)
{
@@ -11870,61 +12059,148 @@ class SimplePie_IRI
$string = strtoupper($string);
}
- // Store position and string length (to avoid constantly recalculating this)
- $position = 0;
- $strlen = strlen($string);
+ return $string;
+ }
- // Loop as long as we have invalid characters, advancing the position to the next invalid character
- while (($position += strspn($string, $valid_chars, $position)) < $strlen)
+ /**
+ * Callback function for preg_replace_callback.
+ *
+ * Removes sequences of percent encoded bytes that represent UTF-8
+ * encoded characters in iunreserved
+ *
+ * @access private
+ * @param array $match PCRE match
+ * @return string Replacement
+ */
+ function remove_iunreserved_percent_encoded($match)
+ {
+ // As we just have valid percent encoded sequences we can just explode
+ // and ignore the first member of the returned array (an empty string).
+ $bytes = explode('%', $match[0]);
+
+ // Initialize the new string (this is what will be returned) and that
+ // there are no bytes remaining in the current sequence (unsurprising
+ // at the first byte!).
+ $string = '';
+ $remaining = 0;
+
+ // Loop over each and every byte, and set $value to its value
+ for ($i = 1, $len = count($bytes); $i < $len; $i++)
{
- // If we have a % character
- if ($string[$position] === '%')
+ $value = hexdec($bytes[$i]);
+
+ // If we're the first byte of sequence:
+ if (!$remaining)
{
- // If we have a pct-encoded section
- if ($position + 2 < $strlen && strspn($string, '0123456789ABCDEFabcdef', $position + 1, 2) === 2)
- {
- // Get the the represented character
- $chr = chr(hexdec(substr($string, $position + 1, 2)));
+ // Start position
+ $start = $i;
- // If the character is valid, replace the pct-encoded with the actual character while normalising case
- if (strpos($valid_chars, $chr) !== false)
- {
- if ($case & SIMPLEPIE_LOWERCASE)
- {
- $chr = strtolower($chr);
- }
- elseif ($case & SIMPLEPIE_UPPERCASE)
- {
- $chr = strtoupper($chr);
- }
- $string = substr_replace($string, $chr, $position, 3);
- $strlen -= 2;
- $position++;
- }
+ // By default we are valid
+ $valid = true;
- // Otherwise just normalise the pct-encoded to uppercase
- else
+ // One byte sequence:
+ if ($value <= 0x7F)
+ {
+ $character = $value;
+ $length = 1;
+ }
+ // Two byte sequence:
+ elseif (($value & 0xE0) === 0xC0)
+ {
+ $character = ($value & 0x1F) << 6;
+ $length = 2;
+ $remaining = 1;
+ }
+ // Three byte sequence:
+ elseif (($value & 0xF0) === 0xE0)
+ {
+ $character = ($value & 0x0F) << 12;
+ $length = 3;
+ $remaining = 2;
+ }
+ // Four byte sequence:
+ elseif (($value & 0xF8) === 0xF0)
+ {
+ $character = ($value & 0x07) << 18;
+ $length = 4;
+ $remaining = 3;
+ }
+ // Invalid byte:
+ else
+ {
+ $valid = false;
+ $remaining = 0;
+ }
+ }
+ // Continuation byte:
+ else
+ {
+ // Check that the byte is valid, then add it to the character:
+ if (($value & 0xC0) === 0x80)
+ {
+ $remaining--;
+ $character |= ($value & 0x3F) << ($remaining * 6);
+ }
+ // If it is invalid, count the sequence as invalid and reprocess the current byte as the start of a sequence:
+ else
+ {
+ $valid = false;
+ $remaining = 0;
+ $i--;
+ }
+ }
+
+ // If we've reached the end of the current byte sequence, append it to Unicode::$data
+ if (!$remaining)
+ {
+ // Percent encode anything invalid or not in iunreserved
+ if (
+ // Invalid sequences
+ !$valid
+ // Non-shortest form sequences are invalid
+ || $length > 1 && $character <= 0x7F
+ || $length > 2 && $character <= 0x7FF
+ || $length > 3 && $character <= 0xFFFF
+ // Outside of range of iunreserved codepoints
+ || $character < 0x2D
+ || $character > 0xEFFFD
+ // Noncharacters
+ || ($character & 0xFFFE) === 0xFFFE
+ || $character >= 0xFDD0 && $character <= 0xFDEF
+ // Everything else not in iunreserved (this is all BMP)
+ || $character === 0x2F
+ || $character > 0x39 && $character < 0x41
+ || $character > 0x5A && $character < 0x61
+ || $character > 0x7A && $character < 0x7E
+ || $character > 0x7E && $character < 0xA0
+ || $character > 0xD7FF && $character < 0xF900
+ )
+ {
+ for ($j = $start; $j <= $i; $j++)
{
- $string = substr_replace($string, strtoupper(substr($string, $position + 1, 2)), $position + 1, 2);
- $position += 3;
+ $string .= '%' . strtoupper($bytes[$j]);
}
}
- // If we don't have a pct-encoded section, just replace the % with its own esccaped form
else
{
- $string = substr_replace($string, '%25', $position, 1);
- $strlen += 2;
- $position += 3;
+ for ($j = $start; $j <= $i; $j++)
+ {
+ $string .= chr(hexdec($bytes[$j]));
+ }
}
}
- // If we have an invalid character, change into its pct-encoded form
- else
+ }
+
+ // If we have any bytes left over they are invalid (i.e., we are
+ // mid-way through a multi-byte sequence)
+ if ($remaining)
+ {
+ for ($j = $start; $j < $len; $j++)
{
- $replacement = sprintf("%%%02X", ord($string[$position]));
- $string = str_replace($string[$position], $replacement, $string);
- $strlen = strlen($string);
+ $string .= '%' . strtoupper($bytes[$j]);
}
}
+
return $string;
}
@@ -14446,7 +14722,7 @@ class SimplePie_Parser
case constant('XMLReader::END_ELEMENT'):
if ($xml->namespaceURI !== '')
{
- $tagName = "{$xml->namespaceURI}{$this->separator}{$xml->localName}";
+ $tagName = $xml->namespaceURI . $this->separator . $xml->localName;
}
else
{
@@ -14458,7 +14734,7 @@ class SimplePie_Parser
$empty = $xml->isEmptyElement;
if ($xml->namespaceURI !== '')
{
- $tagName = "{$xml->namespaceURI}{$this->separator}{$xml->localName}";
+ $tagName = $xml->namespaceURI . $this->separator . $xml->localName;
}
else
{
@@ -14469,7 +14745,7 @@ class SimplePie_Parser
{
if ($xml->namespaceURI !== '')
{
- $attrName = "{$xml->namespaceURI}{$this->separator}{$xml->localName}";
+ $attrName = $xml->namespaceURI . $this->separator . $xml->localName;
}
else
{
diff --git a/inc/actions.php b/inc/actions.php
index ecf09036f..4a2e200ae 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -101,7 +101,7 @@ function act_dispatch(){
if(checkSecurityToken()){
$ACT = act_save($ACT);
}else{
- $ACT = 'show';
+ $ACT = 'preview';
}
}
@@ -215,7 +215,7 @@ function act_clean($act){
//disable all acl related commands if ACL is disabled
if(!$conf['useacl'] && in_array($act,array('login','logout','register','admin',
'subscribe','unsubscribe','profile','revert',
- 'resendpwd','subscribens','unsubscribens',))){
+ 'resendpwd'))){
msg('Command unavailable: '.htmlspecialchars($act),-1);
return 'show';
}
@@ -227,7 +227,7 @@ function act_clean($act){
'preview','search','show','check','index','revisions',
'diff','recent','backlink','admin','subscribe','revert',
'unsubscribe','profile','resendpwd','recover',
- 'draftdel','subscribens','unsubscribens','sitemap')) && substr($act,0,7) != 'export_' ) {
+ 'draftdel','sitemap','media')) && substr($act,0,7) != 'export_' ) {
msg('Command unknown: '.htmlspecialchars($act),-1);
return 'show';
}
diff --git a/inc/auth.php b/inc/auth.php
index a480a4a8a..eff984b36 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -348,10 +348,11 @@ function auth_logoff($keepbc=false){
unset($_SERVER['REMOTE_USER']);
$USERINFO=null; //FIXME
+ $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir'];
if (version_compare(PHP_VERSION, '5.2.0', '>')) {
- setcookie(DOKU_COOKIE,'',time()-600000,DOKU_REL,'',($conf['securecookie'] && is_ssl()),true);
+ setcookie(DOKU_COOKIE,'',time()-600000,$cookieDir,'',($conf['securecookie'] && is_ssl()),true);
}else{
- setcookie(DOKU_COOKIE,'',time()-600000,DOKU_REL,'',($conf['securecookie'] && is_ssl()));
+ setcookie(DOKU_COOKIE,'',time()-600000,$cookieDir,'',($conf['securecookie'] && is_ssl()));
}
if($auth) $auth->logOff();
@@ -977,11 +978,12 @@ function auth_setCookie($user,$pass,$sticky) {
// set cookie
$cookie = base64_encode($user).'|'.((int) $sticky).'|'.base64_encode($pass);
+ $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir'];
$time = $sticky ? (time()+60*60*24*365) : 0; //one year
if (version_compare(PHP_VERSION, '5.2.0', '>')) {
- setcookie(DOKU_COOKIE,$cookie,$time,DOKU_REL,'',($conf['securecookie'] && is_ssl()),true);
+ setcookie(DOKU_COOKIE,$cookie,$time,$cookieDir,'',($conf['securecookie'] && is_ssl()),true);
}else{
- setcookie(DOKU_COOKIE,$cookie,$time,DOKU_REL,'',($conf['securecookie'] && is_ssl()));
+ setcookie(DOKU_COOKIE,$cookie,$time,$cookieDir,'',($conf['securecookie'] && is_ssl()));
}
// set session
$_SESSION[DOKU_COOKIE]['auth']['user'] = $user;
diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php
index 9ffd3e18b..1fddad243 100644
--- a/inc/auth/ad.class.php
+++ b/inc/auth/ad.class.php
@@ -286,11 +286,13 @@ class auth_ad extends auth_basic {
if(isset($changes['mail'])){
$adchanges['email'] = $changes['mail'];
}
- try {
- $return = $return & $this->adldap->user_modify($user,$adchanges);
- } catch (adLDAPException $e) {
- if ($this->cnf['debug']) msg('AD Auth: '.$e->getMessage(), -1);
- $return = false;
+ if(count($adchanges)){
+ try {
+ $return = $return & $this->adldap->user_modify($user,$adchanges);
+ } catch (adLDAPException $e) {
+ if ($this->cnf['debug']) msg('AD Auth: '.$e->getMessage(), -1);
+ $return = false;
+ }
}
return $return;
diff --git a/inc/changelog.php b/inc/changelog.php
index 15cd46d77..60f9b8657 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -74,7 +74,7 @@ function addLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extr
'type' => str_replace($strip, '', $type),
'id' => $id,
'user' => $user,
- 'sum' => str_replace($strip, '', $summary),
+ 'sum' => utf8_substr(str_replace($strip, '', $summary),0,255),
'extra' => str_replace($strip, '', $extra)
);
@@ -131,13 +131,14 @@ function addMediaLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='',
'type' => str_replace($strip, '', $type),
'id' => $id,
'user' => $user,
- 'sum' => str_replace($strip, '', $summary),
+ 'sum' => utf8_substr(str_replace($strip, '', $summary),0,255),
'extra' => str_replace($strip, '', $extra)
);
// add changelog lines
$logline = implode("\t", $logline)."\n";
io_saveFile($conf['media_changelog'],$logline,true); //global media changelog cache
+ io_saveFile(mediaMetaFN($id,'.changes'),$logline,true); //media file's changelog
}
/**
@@ -151,6 +152,7 @@ function addMediaLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='',
* RECENTS_SKIP_MINORS - don't include minor changes
* RECENTS_SKIP_SUBSPACES - don't include subspaces
* RECENTS_MEDIA_CHANGES - return media changes instead of page changes
+ * RECENTS_MEDIA_PAGES_MIXED - return both media changes and page changes
*
* @param int $first number of first entry returned (for paginating
* @param int $num return $num entries
@@ -158,6 +160,7 @@ function addMediaLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='',
* @param bool $flags see above
*
* @author Ben Coburn <btcoburn@silicodon.net>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
function getRecents($first,$num,$ns='',$flags=0){
global $conf;
@@ -173,20 +176,48 @@ function getRecents($first,$num,$ns='',$flags=0){
} else {
$lines = @file($conf['changelog']);
}
+ $lines_position = count($lines)-1;
+
+ if ($flags & RECENTS_MEDIA_PAGES_MIXED) {
+ $media_lines = @file($conf['media_changelog']);
+ $media_lines_position = count($media_lines)-1;
+ }
- // handle lines
$seen = array(); // caches seen lines, _handleRecent() skips them
- for($i = count($lines)-1; $i >= 0; $i--){
- $rec = _handleRecent($lines[$i], $ns, $flags, $seen);
- if($rec !== false) {
- if(--$first >= 0) continue; // skip first entries
- $recent[] = $rec;
- $count++;
- // break when we have enough entries
- if($count >= $num){ break; }
+
+ // handle lines
+ while ($lines_position >= 0 || (($flags & RECENTS_MEDIA_PAGES_MIXED) && $media_lines_position >=0)) {
+ if (empty($rec) && $lines_position >= 0) {
+ $rec = _handleRecent(@$lines[$lines_position], $ns, $flags & ~RECENTS_MEDIA_CHANGES, $seen);
+ if (!$rec) {
+ $lines_position --;
+ continue;
+ }
+ }
+ if (($flags & RECENTS_MEDIA_PAGES_MIXED) && empty($media_rec) && $media_lines_position >= 0) {
+ $media_rec = _handleRecent(@$media_lines[$media_lines_position], $ns, $flags | RECENTS_MEDIA_CHANGES, $seen);
+ if (!$media_rec) {
+ $media_lines_position --;
+ continue;
+ }
+ }
+ if (($flags & RECENTS_MEDIA_PAGES_MIXED) && @$media_rec['date'] >= @$rec['date']) {
+ $media_lines_position--;
+ $x = $media_rec;
+ $x['media'] = true;
+ $media_rec = false;
+ } else {
+ $lines_position--;
+ $x = $rec;
+ if ($flags & RECENTS_MEDIA_CHANGES) $x['media'] = true;
+ $rec = false;
}
+ if(--$first >= 0) continue; // skip first entries
+ $recent[] = $x;
+ $count++;
+ // break when we have enough entries
+ if($count >= $num){ break; }
}
-
return $recent;
}
@@ -281,7 +312,11 @@ function _handleRecent($line,$ns,$flags,&$seen){
if (($flags & RECENTS_SKIP_SUBSPACES) && (getNS($recent['id']) != $ns)) return false;
// check ACL
- $recent['perms'] = auth_quickaclcheck($recent['id']);
+ if ($flags & RECENTS_MEDIA_CHANGES) {
+ $recent['perms'] = auth_quickaclcheck(getNS($recent['id']).':*');
+ } else {
+ $recent['perms'] = auth_quickaclcheck($recent['id']);
+ }
if ($recent['perms'] < AUTH_READ) return false;
// check existance
@@ -300,8 +335,9 @@ function _handleRecent($line,$ns,$flags,&$seen){
* requested changelog line is read.
*
* @author Ben Coburn <btcoburn@silicodon.net>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
-function getRevisionInfo($id, $rev, $chunk_size=8192) {
+function getRevisionInfo($id, $rev, $chunk_size=8192, $media=false) {
global $cache_revinfo;
$cache =& $cache_revinfo;
if (!isset($cache[$id])) { $cache[$id] = array(); }
@@ -312,7 +348,11 @@ function getRevisionInfo($id, $rev, $chunk_size=8192) {
return $cache[$id][$rev];
}
- $file = metaFN($id, '.changes');
+ if ($media) {
+ $file = mediaMetaFN($id, '.changes');
+ } else {
+ $file = metaFN($id, '.changes');
+ }
if (!@file_exists($file)) { return false; }
if (filesize($file)<$chunk_size || $chunk_size==0) {
// read whole file
@@ -397,8 +437,9 @@ function getRevisionInfo($id, $rev, $chunk_size=8192) {
* lines are recieved.
*
* @author Ben Coburn <btcoburn@silicodon.net>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
-function getRevisions($id, $first, $num, $chunk_size=8192) {
+function getRevisions($id, $first, $num, $chunk_size=8192, $media=false) {
global $cache_revinfo;
$cache =& $cache_revinfo;
if (!isset($cache[$id])) { $cache[$id] = array(); }
@@ -406,11 +447,16 @@ function getRevisions($id, $first, $num, $chunk_size=8192) {
$revs = array();
$lines = array();
$count = 0;
- $file = metaFN($id, '.changes');
+ if ($media) {
+ $file = mediaMetaFN($id, '.changes');
+ } else {
+ $file = metaFN($id, '.changes');
+ }
$num = max($num, 0);
$chunk_size = max($chunk_size, 0);
- if ($first<0) { $first = 0; }
- else if (@file_exists(wikiFN($id))) {
+ if ($first<0) {
+ $first = 0;
+ } else if (!$media && @file_exists(wikiFN($id)) || $media && @file_exists(mediaFN($id))) {
// skip current revision if the page exists
$first = max($first+1, 0);
}
@@ -431,13 +477,21 @@ function getRevisions($id, $first, $num, $chunk_size=8192) {
$finger = max($tail-$chunk_size, 0);
while ($count<$num+$first) {
fseek($fp, $finger);
+ $nl = $finger;
if ($finger>0) {
fgets($fp); // slip the finger forward to a new line
- $finger = ftell($fp);
+ $nl = ftell($fp);
+ }
+
+ // was the chunk big enough? if not, take another bite
+ if($nl > 0 && $tail <= $nl){
+ $finger = max($finger-$chunk_size, 0);
+ continue;
+ }else{
+ $finger = $nl;
}
// read chunk
- if ($tail<=$finger) { break; }
$chunk = '';
$read_size = max($tail-$finger, 0); // found chunk size
$got = 0;
diff --git a/inc/common.php b/inc/common.php
index 7522095ab..0c769c50d 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -15,6 +15,7 @@ define('RECENTS_SKIP_DELETED',2);
define('RECENTS_SKIP_MINORS',4);
define('RECENTS_SKIP_SUBSPACES',8);
define('RECENTS_MEDIA_CHANGES',16);
+define('RECENTS_MEDIA_PAGES_MIXED',32);
/**
* Wrapper around htmlspecialchars()
@@ -55,7 +56,7 @@ function stripctl($string){
* @return string
*/
function getSecurityToken(){
- return md5(auth_cookiesalt().session_id());
+ return md5(auth_cookiesalt().session_id().$_SERVER['REMOTE_USER']);
}
/**
@@ -713,8 +714,8 @@ function checklock($id){
}
//my own lock
- $ip = io_readFile($lock);
- if( ($ip == clientIP()) || ($ip == $_SERVER['REMOTE_USER']) ){
+ list($ip,$session) = explode("\n",io_readFile($lock));
+ if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()){
return false;
}
@@ -737,7 +738,7 @@ function lock($id){
if($_SERVER['REMOTE_USER']){
io_saveFile($lock,$_SERVER['REMOTE_USER']);
}else{
- io_saveFile($lock,clientIP());
+ io_saveFile($lock,clientIP()."\n".session_id());
}
}
@@ -750,8 +751,8 @@ function lock($id){
function unlock($id){
$lock = wikiLockFN($id);
if(@file_exists($lock)){
- $ip = io_readFile($lock);
- if( ($ip == clientIP()) || ($ip == $_SERVER['REMOTE_USER']) ){
+ list($ip,$session) = explode("\n",io_readFile($lock));
+ if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()){
@unlink($lock);
return true;
}
@@ -979,7 +980,7 @@ function saveWikiText($id,$text,$summary,$minor=false){
$file = wikiFN($id);
$old = @filemtime($file); // from page
- $wasRemoved = empty($text);
+ $wasRemoved = (trim($text) == ''); // check for empty or whitespace only
$wasCreated = !@file_exists($file);
$wasReverted = ($REV==true);
$newRev = false;
@@ -1007,16 +1008,8 @@ function saveWikiText($id,$text,$summary,$minor=false){
$newRev = saveOldRevision($id);
// remove empty file
@unlink($file);
- // remove old meta info...
- $mfiles = metaFiles($id);
- $changelog = metaFN($id, '.changes');
- $metadata = metaFN($id, '.meta');
- $subscribers = metaFN($id, '.mlist');
- foreach ($mfiles as $mfile) {
- // but keep per-page changelog to preserve page history, keep subscriber list and keep meta data
- if (@file_exists($mfile) && $mfile!==$changelog && $mfile!==$metadata && $mfile!==$subscribers) { @unlink($mfile); }
- }
- // purge meta data
+ // don't remove old meta info as it should be saved, plugins can use IO_WIKIPAGE_WRITE for removing their metadata...
+ // purge non-persistant meta data
p_purge_metadata($id);
$del = true;
// autoset summary on deletion
@@ -1565,4 +1558,16 @@ function valid_input_set($param, $valid_values, $array, $exc = '') {
}
}
+function get_doku_pref($pref, $default) {
+ if (strpos($_COOKIE['DOKU_PREFS'], $pref) !== false) {
+ $parts = explode('#', $_COOKIE['DOKU_PREFS']);
+ for ($i = 0; $i < count($parts); $i+=2){
+ if ($parts[$i] == $pref) {
+ return $parts[$i+1];
+ }
+ }
+ }
+ return $default;
+}
+
//Setup VIM: ex: et ts=2 :
diff --git a/inc/config_cascade.php b/inc/config_cascade.php
index 48ed5a000..443114f52 100644
--- a/inc/config_cascade.php
+++ b/inc/config_cascade.php
@@ -64,6 +64,14 @@ $config_cascade = array_merge(
'plainauth.users' => array(
'default' => DOKU_CONF.'users.auth.php',
),
+
+ 'plugins' => array(
+ 'local' => array(DOKU_CONF.'plugins.local.php'),
+ 'protected' => array(
+ DOKU_CONF.'plugins.required.php',
+ DOKU_CONF.'plugins.protected.php',
+ ),
+ ),
),
$config_cascade
);
diff --git a/inc/fulltext.php b/inc/fulltext.php
index 6ab710d54..620237296 100644
--- a/inc/fulltext.php
+++ b/inc/fulltext.php
@@ -135,7 +135,7 @@ function ft_backlinks($id){
// check ACL permissions
foreach(array_keys($result) as $idx){
- if(auth_quickaclcheck($result[$idx]) < AUTH_READ){
+ if(isHiddenPage($result[$idx]) || auth_quickaclcheck($result[$idx]) < AUTH_READ || !page_exists($result[$idx], '', false)){
unset($result[$idx]);
}
}
diff --git a/inc/html.php b/inc/html.php
index 6e187ebe1..1a2d7daef 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -415,20 +415,28 @@ function html_locked(){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Ben Coburn <btcoburn@silicodon.net>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
-function html_revisions($first=0){
+function html_revisions($first=0, $media_id = false){
global $ID;
global $INFO;
global $conf;
global $lang;
+ $id = $ID;
/* we need to get one additionally log entry to be able to
* decide if this is the last page or is there another one.
* see html_recent()
*/
- $revisions = getRevisions($ID, $first, $conf['recent']+1);
+ if (!$media_id) $revisions = getRevisions($ID, $first, $conf['recent']+1);
+ else {
+ $revisions = getRevisions($media_id, $first, $conf['recent']+1, 8192, true);
+ $id = $media_id;
+ }
+
if(count($revisions)==0 && $first!=0){
$first=0;
- $revisions = getRevisions($ID, $first, $conf['recent']+1);;
+ if (!$media_id) $revisions = getRevisions($ID, $first, $conf['recent']+1);
+ else $revisions = getRevisions($media_id, $first, $conf['recent']+1, 8192, true);
}
$hasNext = false;
if (count($revisions)>$conf['recent']) {
@@ -436,14 +444,22 @@ function html_revisions($first=0){
array_pop($revisions); // remove extra log entry
}
- $date = dformat($INFO['lastmod']);
+ if (!$media_id) $date = dformat($INFO['lastmod']);
+ else $date = dformat(@filemtime(mediaFN($id)));
+
+ if (!$media_id) print p_locale_xhtml('revisions');
- print p_locale_xhtml('revisions');
+ $params = array('id' => 'page__revisions');
+ if ($media_id) $params['action'] = media_managerURL(array('image' => $media_id), '&');
- $form = new Doku_Form(array('id' => 'page__revisions'));
+ $form = new Doku_Form($params);
$form->addElement(form_makeOpenTag('ul'));
- if($INFO['exists'] && $first==0){
- if (isset($INFO['meta']) && isset($INFO['meta']['last_change']) && $INFO['meta']['last_change']['type']===DOKU_CHANGE_TYPE_MINOR_EDIT)
+
+ if (!$media_id) $exists = $INFO['exists'];
+ else $exists = @file_exists(mediaFN($id));
+
+ if($exists && $first==0){
+ if (!$media_id && isset($INFO['meta']) && isset($INFO['meta']['last_change']) && $INFO['meta']['last_change']['type']===DOKU_CHANGE_TYPE_MINOR_EDIT)
$form->addElement(form_makeOpenTag('li', array('class' => 'minor')));
else
$form->addElement(form_makeOpenTag('li'));
@@ -459,30 +475,53 @@ function html_revisions($first=0){
$form->addElement('<img src="'.DOKU_BASE.'lib/images/blank.gif" width="15" height="11" alt="" />');
+ if (!$media_id) $href = wl($id);
+ else $href = media_managerURL(array('image' => $id, 'tab_details' => 'view'), '&');
$form->addElement(form_makeOpenTag('a', array(
'class' => 'wikilink1',
- 'href' => wl($ID))));
- $form->addElement($ID);
+ 'href' => $href)));
+ $form->addElement($id);
$form->addElement(form_makeCloseTag('a'));
- $form->addElement(form_makeOpenTag('span', array('class' => 'sum')));
- $form->addElement(' &ndash; ');
- $form->addElement(htmlspecialchars($INFO['sum']));
- $form->addElement(form_makeCloseTag('span'));
+ if ($media_id) $form->addElement(form_makeOpenTag('div'));
+
+ if (!$media_id) {
+ $form->addElement(form_makeOpenTag('span', array('class' => 'sum')));
+ $form->addElement(' &ndash; ');
+ $form->addElement(htmlspecialchars($INFO['sum']));
+ $form->addElement(form_makeCloseTag('span'));
+ }
$form->addElement(form_makeOpenTag('span', array('class' => 'user')));
- $form->addElement((empty($INFO['editor']))?('('.$lang['external_edit'].')'):editorinfo($INFO['editor']));
+ if (!$media_id) $editor = $INFO['editor'];
+ else {
+ $revinfo = getRevisionInfo($id, @filemtime(fullpath(mediaFN($id))), 1024, true);
+ if($revinfo['user']){
+ $editor = $revinfo['user'];
+ }else{
+ $editor = $revinfo['ip'];
+ }
+ }
+ $form->addElement((empty($editor))?('('.$lang['external_edit'].')'):editorinfo($editor));
$form->addElement(form_makeCloseTag('span'));
$form->addElement('('.$lang['current'].')');
+
+ if ($media_id) $form->addElement(form_makeCloseTag('div'));
+
$form->addElement(form_makeCloseTag('div'));
$form->addElement(form_makeCloseTag('li'));
}
foreach($revisions as $rev){
- $date = dformat($rev);
- $info = getRevisionInfo($ID,$rev,true);
- $exists = page_exists($ID,$rev);
+ $date = dformat($rev);
+ if (!$media_id) {
+ $info = getRevisionInfo($id,$rev,true);
+ $exists = page_exists($id,$rev);
+ } else {
+ $info = getRevisionInfo($id,$rev,true,true);
+ $exists = @file_exists(mediaFN($id,$rev));
+ }
if ($info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT)
$form->addElement(form_makeOpenTag('li', array('class' => 'minor')));
@@ -503,7 +542,9 @@ function html_revisions($first=0){
$form->addElement(form_makeCloseTag('span'));
if($exists){
- $form->addElement(form_makeOpenTag('a', array('href' => wl($ID,"rev=$rev,do=diff", false, '&'), 'class' => 'diff_link')));
+ if (!$media_id) $href = wl($id,"rev=$rev,do=diff", false, '&');
+ else $href = media_managerURL(array('image' => $id, 'rev' => $rev, 'mediado' => 'diff'), '&');
+ $form->addElement(form_makeOpenTag('a', array('href' => $href, 'class' => 'diff_link')));
$form->addElement(form_makeTag('img', array(
'src' => DOKU_BASE.'lib/images/diff.png',
'width' => 15,
@@ -511,19 +552,24 @@ function html_revisions($first=0){
'title' => $lang['diff'],
'alt' => $lang['diff'])));
$form->addElement(form_makeCloseTag('a'));
-
- $form->addElement(form_makeOpenTag('a', array('href' => wl($ID,"rev=$rev",false,'&'), 'class' => 'wikilink1')));
- $form->addElement($ID);
+ if (!$media_id) $href = wl($id,"rev=$rev",false,'&');
+ else $href = media_managerURL(array('image' => $id, 'tab_details' => 'view', 'rev' => $rev), '&');
+ $form->addElement(form_makeOpenTag('a', array('href' => $href, 'class' => 'wikilink1')));
+ $form->addElement($id);
$form->addElement(form_makeCloseTag('a'));
}else{
$form->addElement('<img src="'.DOKU_BASE.'lib/images/blank.gif" width="15" height="11" alt="" />');
- $form->addElement($ID);
+ $form->addElement($id);
}
- $form->addElement(form_makeOpenTag('span', array('class' => 'sum')));
- $form->addElement(' &ndash; ');
- $form->addElement(htmlspecialchars($info['sum']));
- $form->addElement(form_makeCloseTag('span'));
+ if ($media_id) $form->addElement(form_makeOpenTag('div'));
+
+ if ($info['sum']) {
+ $form->addElement(form_makeOpenTag('span', array('class' => 'sum')));
+ if (!$media_id) $form->addElement(' &ndash; ');
+ $form->addElement(htmlspecialchars($info['sum']));
+ $form->addElement(form_makeCloseTag('span'));
+ }
$form->addElement(form_makeOpenTag('span', array('class' => 'user')));
if($info['user']){
@@ -536,11 +582,18 @@ function html_revisions($first=0){
}
$form->addElement(form_makeCloseTag('span'));
+ if ($media_id) $form->addElement(form_makeCloseTag('div'));
+
$form->addElement(form_makeCloseTag('div'));
$form->addElement(form_makeCloseTag('li'));
}
$form->addElement(form_makeCloseTag('ul'));
- $form->addElement(form_makeButton('submit', 'diff', $lang['diff2']));
+ if (!$media_id) {
+ $form->addElement(form_makeButton('submit', 'diff', $lang['diff2']));
+ } else {
+ $form->addHidden('mediado', 'diff');
+ $form->addElement(form_makeButton('submit', '', $lang['diff2']));
+ }
html_form('revisions', $form);
print '<div class="pagenav">';
@@ -549,12 +602,20 @@ function html_revisions($first=0){
$first -= $conf['recent'];
if ($first < 0) $first = 0;
print '<div class="pagenav-prev">';
- print html_btn('newer',$ID,"p",array('do' => 'revisions', 'first' => $first));
+ if ($media_id) {
+ print html_btn('newer',$media_id,"p",media_managerURL(array('first' => $first), '&amp;', false, true));
+ } else {
+ print html_btn('newer',$id,"p",array('do' => 'revisions', 'first' => $first));
+ }
print '</div>';
}
if ($hasNext) {
print '<div class="pagenav-next">';
- print html_btn('older',$ID,"n",array('do' => 'revisions', 'first' => $last));
+ if ($media_id) {
+ print html_btn('older',$media_id,"n",media_managerURL(array('first' => $last), '&amp;', false, true));
+ } else {
+ print html_btn('older',$id,"n",array('do' => 'revisions', 'first' => $last));
+ }
print '</div>';
}
print '</div>';
@@ -567,8 +628,9 @@ function html_revisions($first=0){
* @author Andreas Gohr <andi@splitbrain.org>
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
* @author Ben Coburn <btcoburn@silicodon.net>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
-function html_recent($first=0){
+function html_recent($first=0, $show_changes='both'){
global $conf;
global $lang;
global $ID;
@@ -576,10 +638,20 @@ function html_recent($first=0){
* decide if this is the last page or is there another one.
* This is the cheapest solution to get this information.
*/
- $recents = getRecents($first,$conf['recent'] + 1,getNS($ID));
+ $flags = 0;
+ if ($show_changes == 'mediafiles' && $conf['mediarevisions']) {
+ $flags = RECENTS_MEDIA_CHANGES;
+ } elseif ($show_changes == 'pages') {
+ $flags = 0;
+ } elseif ($conf['mediarevisions']) {
+ $show_changes = 'both';
+ $flags = RECENTS_MEDIA_PAGES_MIXED;
+ }
+
+ $recents = getRecents($first,$conf['recent'] + 1,getNS($ID),$flags);
if(count($recents) == 0 && $first != 0){
$first=0;
- $recents = getRecents($first,$conf['recent'] + 1,getNS($ID));
+ $recents = getRecents($first,$conf['recent'] + 1,getNS($ID),$flags);
}
$hasNext = false;
if (count($recents)>$conf['recent']) {
@@ -596,6 +668,22 @@ function html_recent($first=0){
$form->addHidden('sectok', null);
$form->addHidden('do', 'recent');
$form->addHidden('id', $ID);
+
+ if ($conf['mediarevisions']) {
+ $form->addElement(form_makeListboxField(
+ 'show_changes',
+ array(
+ 'pages' => $lang['pages_changes'],
+ 'mediafiles' => $lang['media_changes'],
+ 'both' => $lang['both_changes']),
+ $show_changes,
+ $lang['changes_type'],
+ '','',
+ array('class'=>'quickselect')));
+
+ $form->addElement(form_makeButton('submit', 'recent', $lang['btn_apply']));
+ }
+
$form->addElement(form_makeOpenTag('ul'));
foreach($recents as $recent){
@@ -607,21 +695,48 @@ function html_recent($first=0){
$form->addElement(form_makeOpenTag('div', array('class' => 'li')));
+ if ($recent['media']) {
+ $form->addElement(media_printicon($recent['id']));
+ } else {
+ $icon = DOKU_BASE.'lib/images/fileicons/file.png';
+ $form->addElement('<img src="'.$icon.'" alt="'.$filename.'" class="icon" />');
+ }
+
$form->addElement(form_makeOpenTag('span', array('class' => 'date')));
$form->addElement($date);
$form->addElement(form_makeCloseTag('span'));
- $form->addElement(form_makeOpenTag('a', array('class' => 'diff_link', 'href' => wl($recent['id'],"do=diff", false, '&'))));
- $form->addElement(form_makeTag('img', array(
- 'src' => DOKU_BASE.'lib/images/diff.png',
- 'width' => 15,
- 'height'=> 11,
- 'title' => $lang['diff'],
- 'alt' => $lang['diff']
- )));
- $form->addElement(form_makeCloseTag('a'));
+ if ($recent['media']) {
+ $diff = (count(getRevisions($recent['id'], 0, 1, 8192, true)) && @file_exists(mediaFN($recent['id'])));
+ if ($diff) {
+ $href = media_managerURL(array('tab_details' => 'history',
+ 'mediado' => 'diff', 'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&');
+ }
+ } else {
+ $href = wl($recent['id'],"do=diff", false, '&');
+ }
- $form->addElement(form_makeOpenTag('a', array('class' => 'revisions_link', 'href' => wl($recent['id'],"do=revisions",false,'&'))));
+ if ($recent['media'] && !$diff) {
+ $form->addElement('<img src="'.DOKU_BASE.'lib/images/blank.gif" width="15" height="11" alt="" />');
+ } else {
+ $form->addElement(form_makeOpenTag('a', array('class' => 'diff_link', 'href' => $href)));
+ $form->addElement(form_makeTag('img', array(
+ 'src' => DOKU_BASE.'lib/images/diff.png',
+ 'width' => 15,
+ 'height'=> 11,
+ 'title' => $lang['diff'],
+ 'alt' => $lang['diff']
+ )));
+ $form->addElement(form_makeCloseTag('a'));
+ }
+
+ if ($recent['media']) {
+ $href = media_managerURL(array('tab_details' => 'history',
+ 'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&');
+ } else {
+ $href = wl($recent['id'],"do=revisions",false,'&');
+ }
+ $form->addElement(form_makeOpenTag('a', array('class' => 'revisions_link', 'href' => $href)));
$form->addElement(form_makeTag('img', array(
'src' => DOKU_BASE.'lib/images/history.png',
'width' => 12,
@@ -631,8 +746,15 @@ function html_recent($first=0){
)));
$form->addElement(form_makeCloseTag('a'));
- $form->addElement(html_wikilink(':'.$recent['id'],useHeading('navigation')?null:$recent['id']));
-
+ if ($recent['media']) {
+ $href = media_managerURL(array('tab_details' => 'view', 'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&');
+ $class = (file_exists(mediaFN($recent['id']))) ? 'wikilink1' : $class = 'wikilink2';
+ $form->addElement(form_makeOpenTag('a', array('class' => $class, 'href' => $href)));
+ $form->addElement($recent['id']);
+ $form->addElement(form_makeCloseTag('a'));
+ } else {
+ $form->addElement(html_wikilink(':'.$recent['id'],useHeading('navigation')?null:$recent['id']));
+ }
$form->addElement(form_makeOpenTag('span', array('class' => 'sum')));
$form->addElement(' &ndash; '.htmlspecialchars($recent['sum']));
$form->addElement(form_makeCloseTag('span'));
@@ -665,7 +787,7 @@ function html_recent($first=0){
'value' => $lang['btn_newer'],
'accesskey' => 'n',
'title' => $lang['btn_newer'].' [N]',
- 'class' => 'button'
+ 'class' => 'button show'
)));
$form->addElement(form_makeCloseTag('div'));
}
@@ -677,7 +799,7 @@ function html_recent($first=0){
'value' => $lang['btn_older'],
'accesskey' => 'p',
'title' => $lang['btn_older'].' [P]',
- 'class' => 'button'
+ 'class' => 'button show'
)));
$form->addElement(form_makeCloseTag('div'));
}
@@ -737,7 +859,7 @@ function html_list_index($item){
/**
* Index List item
*
- * This user function is used in html_build_lidt to build the
+ * This user function is used in html_buildlist to build the
* <li> tags for namespaces when displaying the page index
* it gives different classes to opened or closed "folders"
*
@@ -777,34 +899,41 @@ function html_li_default($item){
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
-function html_buildlist($data,$class,$func,$lifunc='html_li_default'){
- $level = 0;
- $opens = 0;
+function html_buildlist($data,$class,$func,$lifunc='html_li_default',$forcewrapper=false){
+ if (count($data) === 0) {
+ return '';
+ }
+
+ $start_level = $data[0]['level'];
+ $level = $start_level;
$ret = '';
+ $open = 0;
foreach ($data as $item){
if( $item['level'] > $level ){
//open new list
for($i=0; $i<($item['level'] - $level); $i++){
- if ($i) $ret .= "<li class=\"clear\">\n";
+ if ($i) $ret .= "<li class=\"clear\">";
$ret .= "\n<ul class=\"$class\">\n";
+ $open++;
}
+ $level = $item['level'];
+
}elseif( $item['level'] < $level ){
//close last item
$ret .= "</li>\n";
- for ($i=0; $i<($level - $item['level']); $i++){
+ while( $level > $item['level'] && $open > 0 ){
//close higher lists
$ret .= "</ul>\n</li>\n";
+ $level--;
+ $open--;
}
- }else{
- //close last item
+ } elseif ($ret !== '') {
+ //close previous item
$ret .= "</li>\n";
}
- //remember current level
- $level = $item['level'];
-
//print item
$ret .= call_user_func($lifunc,$item);
$ret .= '<div class="li">';
@@ -814,8 +943,15 @@ function html_buildlist($data,$class,$func,$lifunc='html_li_default'){
}
//close remaining items and lists
- for ($i=0; $i < $level; $i++){
- $ret .= "</li></ul>\n";
+ $ret .= "</li>\n";
+ while($open-- > 0) {
+ $ret .= "</ul></li>\n";
+ }
+
+ if ($forcewrapper || $start_level < 2) {
+ // Trigger building a wrapper ul if the first level is
+ // 0 (we have a root object) or 1 (just the root content)
+ $ret = "\n<ul class=\"$class\">\n".$ret."</ul>\n";
}
return $ret;
@@ -849,6 +985,76 @@ function html_backlinks(){
}
}
+function html_diff_head($l_rev, $r_rev, $id = null, $media = false) {
+ global $lang;
+ if ($id === null) {
+ global $ID;
+ $id = $ID;
+ }
+ $media_or_wikiFN = $media ? 'mediaFN' : 'wikiFN';
+ $ml_or_wl = $media ? 'ml' : 'wl';
+ $l_minor = $r_minor = '';
+
+ if(!$l_rev){
+ $l_head = '&mdash;';
+ }else{
+ $l_info = getRevisionInfo($id,$l_rev,true, $media);
+ if($l_info['user']){
+ $l_user = editorinfo($l_info['user']);
+ if(auth_ismanager()) $l_user .= ' ('.$l_info['ip'].')';
+ } else {
+ $l_user = $l_info['ip'];
+ }
+ $l_user = '<span class="user">'.$l_user.'</span>';
+ $l_sum = ($l_info['sum']) ? '<span class="sum">'.hsc($l_info['sum']).'</span>' : '';
+ if ($l_info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) $l_minor = 'class="minor"';
+
+ $l_head_title = ($media) ? dformat($l_rev) : $id.' ['.dformat($l_rev).']';
+ $l_head = '<a class="wikilink1" href="'.$ml_or_wl($id,"rev=$l_rev").'">'.
+ $l_head_title.'</a>'.
+ '<br />'.$l_user.' '.$l_sum;
+ }
+
+ if($r_rev){
+ $r_info = getRevisionInfo($id,$r_rev,true, $media);
+ if($r_info['user']){
+ $r_user = editorinfo($r_info['user']);
+ if(auth_ismanager()) $r_user .= ' ('.$r_info['ip'].')';
+ } else {
+ $r_user = $r_info['ip'];
+ }
+ $r_user = '<span class="user">'.$r_user.'</span>';
+ $r_sum = ($r_info['sum']) ? '<span class="sum">'.hsc($r_info['sum']).'</span>' : '';
+ if ($r_info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) $r_minor = 'class="minor"';
+
+ $r_head_title = ($media) ? dformat($r_rev) : $id.' ['.dformat($r_rev).']';
+ $r_head = '<a class="wikilink1" href="'.$ml_or_wl($id,"rev=$r_rev").'">'.
+ $r_head_title.'</a>'.
+ '<br />'.$r_user.' '.$r_sum;
+ }elseif($_rev = @filemtime($media_or_wikiFN($id))){
+ $_info = getRevisionInfo($id,$_rev,true, $media);
+ if($_info['user']){
+ $_user = editorinfo($_info['user']);
+ if(auth_ismanager()) $_user .= ' ('.$_info['ip'].')';
+ } else {
+ $_user = $_info['ip'];
+ }
+ $_user = '<span class="user">'.$_user.'</span>';
+ $_sum = ($_info['sum']) ? '<span class="sum">'.hsc($_info['sum']).'</span>' : '';
+ if ($_info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) $r_minor = 'class="minor"';
+
+ $r_head_title = ($media) ? dformat($_rev) : $id.' ['.dformat($_rev).']';
+ $r_head = '<a class="wikilink1" href="'.$ml_or_wl($id).'">'.
+ $r_head_title.'</a> '.
+ '('.$lang['current'].')'.
+ '<br />'.$_user.' '.$_sum;
+ }else{
+ $r_head = '&mdash; ('.$lang['current'].')';
+ }
+
+ return array($l_head, $r_head, $l_minor, $r_minor);
+}
+
/**
* show diff
*
@@ -923,59 +1129,7 @@ function html_diff($text='',$intro=true,$type=null){
}
$r_text = rawWiki($ID,$r_rev);
- if(!$l_rev){
- $l_head = '&mdash;';
- }else{
- $l_info = getRevisionInfo($ID,$l_rev,true);
- if($l_info['user']){
- $l_user = editorinfo($l_info['user']);
- if(auth_ismanager()) $l_user .= ' ('.$l_info['ip'].')';
- } else {
- $l_user = $l_info['ip'];
- }
- $l_user = '<span class="user">'.$l_user.'</span>';
- $l_sum = ($l_info['sum']) ? '<span class="sum">'.hsc($l_info['sum']).'</span>' : '';
- if ($l_info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) $l_minor = 'class="minor"';
-
- $l_head = '<a class="wikilink1" href="'.wl($ID,"rev=$l_rev").'">'.
- $ID.' ['.dformat($l_rev).']</a>'.
- '<br />'.$l_user.' '.$l_sum;
- }
-
- if($r_rev){
- $r_info = getRevisionInfo($ID,$r_rev,true);
- if($r_info['user']){
- $r_user = editorinfo($r_info['user']);
- if(auth_ismanager()) $r_user .= ' ('.$r_info['ip'].')';
- } else {
- $r_user = $r_info['ip'];
- }
- $r_user = '<span class="user">'.$r_user.'</span>';
- $r_sum = ($r_info['sum']) ? '<span class="sum">'.hsc($r_info['sum']).'</span>' : '';
- if ($r_info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) $r_minor = 'class="minor"';
-
- $r_head = '<a class="wikilink1" href="'.wl($ID,"rev=$r_rev").'">'.
- $ID.' ['.dformat($r_rev).']</a>'.
- '<br />'.$r_user.' '.$r_sum;
- }elseif($_rev = @filemtime(wikiFN($ID))){
- $_info = getRevisionInfo($ID,$_rev,true);
- if($_info['user']){
- $_user = editorinfo($_info['user']);
- if(auth_ismanager()) $_user .= ' ('.$_info['ip'].')';
- } else {
- $_user = $_info['ip'];
- }
- $_user = '<span class="user">'.$_user.'</span>';
- $_sum = ($_info['sum']) ? '<span class="sum">'.hsc($_info['sum']).'</span>' : '';
- if ($_info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) $r_minor = 'class="minor"';
-
- $r_head = '<a class="wikilink1" href="'.wl($ID).'">'.
- $ID.' ['.dformat($_rev).']</a> '.
- '('.$lang['current'].')'.
- '<br />'.$_user.' '.$_sum;
- }else{
- $r_head = '&mdash; ('.$lang['current'].')';
- }
+ list($l_head, $r_head, $l_minor, $r_minor) = html_diff_head($l_rev, $r_rev);
}
$df = new Diff(explode("\n",htmlspecialchars($l_text)),
@@ -1248,7 +1402,7 @@ function html_edit(){
$form->addElement(form_makeOpenTag('div', array('class'=>'license')));
$out = $lang['licenseok'];
$out .= ' <a href="'.$license[$conf['license']]['url'].'" rel="license" class="urlextern"';
- if(isset($conf['target']['extern'])) $out .= ' target="'.$conf['target']['extern'].'"';
+ if($conf['target']['extern']) $out .= ' target="'.$conf['target']['extern'].'"';
$out .= '>'.$license[$conf['license']]['name'].'</a>';
$form->addElement($out);
$form->addElement(form_makeCloseTag('div'));
@@ -1543,7 +1697,7 @@ function html_TOC($toc){
$out .= $lang['toc'];
$out .= '</div>'.DOKU_LF;
$out .= '<div id="toc__inside">'.DOKU_LF;
- $out .= html_buildlist($toc,'toc','html_list_toc');
+ $out .= html_buildlist($toc,'toc','html_list_toc','html_li_default',true);
$out .= '</div>'.DOKU_LF.'</div>'.DOKU_LF;
$out .= '<!-- TOC END -->'.DOKU_LF;
return $out;
@@ -1678,3 +1832,36 @@ function html_flashobject($swf,$width,$height,$params=null,$flashvars=null,$atts
return $out;
}
+function html_tabs($tabs, $current_tab = null) {
+ echo '<ul class="tabs">'.NL;
+
+ foreach($tabs as $id => $tab) {
+ html_tab($tab['href'], $tab['caption'], $id === $current_tab);
+ }
+
+ echo '</ul>'.NL;
+}
+/**
+ * Prints a single tab
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ * @author Adrian Lang <mail@adrianlang.de>
+ *
+ * @param string $href - tab href
+ * @param string $caption - tab caption
+ * @param boolean $selected - is tab selected
+ */
+
+function html_tab($href, $caption, $selected=false) {
+ $tab = '<li>';
+ if ($selected) {
+ $tab .= '<strong>';
+ } else {
+ $tab .= '<a href="' . hsc($href) . '">';
+ }
+ $tab .= hsc($caption)
+ . '</' . ($selected ? 'strong' : 'a') . '>'
+ . '</li>'.NL;
+ echo $tab;
+}
+
diff --git a/inc/httputils.php b/inc/httputils.php
index 8da42e3b7..0ad97a9a1 100644
--- a/inc/httputils.php
+++ b/inc/httputils.php
@@ -197,3 +197,55 @@ function http_gzip_valid($uncompressed_file) {
return true;
}
+
+/**
+ * Set HTTP headers and echo cachefile, if useable
+ *
+ * This function handles output of cacheable resource files. It ses the needed
+ * HTTP headers. If a useable cache is present, it is passed to the web server
+ * and the scrpt is terminated.
+ */
+function http_cached($cache, $cache_ok) {
+ global $conf;
+
+ // check cache age & handle conditional request
+ // since the resource files are timestamped, we can use a long max age: 1 year
+ header('Cache-Control: public, max-age=31536000');
+ header('Pragma: public');
+ if($cache_ok){
+ http_conditionalRequest(filemtime($cache));
+ if($conf['allowdebug']) header("X-CacheUsed: $cache");
+
+ // finally send output
+ if ($conf['gzip_output'] && http_gzip_valid($cache)) {
+ header('Vary: Accept-Encoding');
+ header('Content-Encoding: gzip');
+ readfile($cache.".gz");
+ } else {
+ if (!http_sendfile($cache)) readfile($cache);
+ }
+ exit;
+ }
+
+ http_conditionalRequest(time());
+}
+
+/**
+ * Cache content and print it
+ */
+function http_cached_finish($file, $content) {
+ global $conf;
+
+ // save cache file
+ io_saveFile($file, $content);
+ if(function_exists('gzopen')) io_saveFile("$file.gz",$content);
+
+ // finally send output
+ if ($conf['gzip_output']) {
+ header('Vary: Accept-Encoding');
+ header('Content-Encoding: gzip');
+ print gzencode($content,9,FORCE_GZIP);
+ } else {
+ print $content;
+ }
+}
diff --git a/inc/infoutils.php b/inc/infoutils.php
index 786661d01..2b8486906 100644
--- a/inc/infoutils.php
+++ b/inc/infoutils.php
@@ -24,7 +24,7 @@ function checkUpdateMessages(){
$lm = @filemtime($cf);
// check if new messages needs to be fetched
- if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.'doku.php')){
+ if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.DOKU_SCRIPT)){
$http = new DokuHTTPClient();
$http->timeout = 8;
$data = $http->get(DOKU_MESSAGEURL.$updateVersion);
@@ -66,8 +66,8 @@ function getVersionData(){
$chunk = fread($fh,2000);
fclose($fh);
$chunk = trim($chunk);
- $chunk = array_pop(explode("\n",$chunk)); //last log line
- $chunk = array_shift(explode("\t",$chunk)); //strip commit msg
+ $chunk = @array_pop(explode("\n",$chunk)); //last log line
+ $chunk = @array_shift(explode("\t",$chunk)); //strip commit msg
$chunk = explode(" ",$chunk);
array_pop($chunk); //strip timezone
$date = date('Y-m-d',array_pop($chunk));
@@ -175,6 +175,12 @@ function check(){
msg('Lockdir is not writable',-1);
}
+ if(is_writable(DOKU_CONF)){
+ msg('conf directory is writable',1);
+ }else{
+ msg('conf directory is not writable',-1);
+ }
+
if($conf['authtype'] == 'plain'){
global $config_cascade;
if(is_writable($config_cascade['plainauth.users']['default'])){
diff --git a/inc/init.php b/inc/init.php
index 819d92bdc..b3acf2e33 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -146,10 +146,11 @@ if ($conf['gzip_output'] &&
// init session
if (!headers_sent() && !defined('NOSESSION')){
session_name("DokuWiki");
+ $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir'];
if (version_compare(PHP_VERSION, '5.2.0', '>')) {
- session_set_cookie_params(0,DOKU_REL,'',($conf['securecookie'] && is_ssl()),true);
+ session_set_cookie_params(0,$cookieDir,'',($conf['securecookie'] && is_ssl()),true);
}else{
- session_set_cookie_params(0,DOKU_REL,'',($conf['securecookie'] && is_ssl()));
+ session_set_cookie_params(0,$cookieDir,'',($conf['securecookie'] && is_ssl()));
}
session_start();
@@ -230,7 +231,9 @@ function init_paths(){
$paths = array('datadir' => 'pages',
'olddir' => 'attic',
'mediadir' => 'media',
+ 'mediaolddir' => 'media_attic',
'metadir' => 'meta',
+ 'mediametadir' => 'media_meta',
'cachedir' => 'cache',
'indexdir' => 'index',
'lockdir' => 'locks',
diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php
index e5606c456..02a62fe94 100644
--- a/inc/lang/ar/lang.php
+++ b/inc/lang/ar/lang.php
@@ -92,7 +92,7 @@ $lang['txt_filename'] = 'رفع كـ (اختياري)';
$lang['txt_overwrt'] = 'اكتب على ملف موجود';
$lang['lockedby'] = 'مقفلة حاليا لـ';
$lang['lockexpire'] = 'ينتهي القفل في';
-$lang['willexpire'] = 'سينتهي قفل تحرير هذه الصفحه خلال دقيقة.\nلتجنب التعارض استخدم زر المعاينة لتصفير مؤقت القفل.';
+$lang['js']['willexpire'] = 'سينتهي قفل تحرير هذه الصفحه خلال دقيقة.\nلتجنب التعارض استخدم زر المعاينة لتصفير مؤقت القفل.';
$lang['js']['notsavedyet'] = 'التعديلات غير المحفوظة ستفقد.';
$lang['js']['searchmedia'] = 'ابحث عن ملفات';
$lang['js']['keepopen'] = 'أبقي النافذة مفتوحة أثناء الاختيار';
@@ -123,7 +123,6 @@ $lang['js']['nosmblinks'] = 'الروابط لمجلدات مشاركة و
$lang['js']['linkwiz'] = 'مرشد الروابط';
$lang['js']['linkto'] = 'الرابط إلى :';
$lang['js']['del_confirm'] = 'هل حقاً تريد حذف البنود المختارة؟';
-$lang['js']['mu_btn'] = 'رفع عدة ملفات في وقت واحد';
$lang['rssfailed'] = 'خطأ ما حدث أثناء جلب ملف التغذية:';
$lang['nothingfound'] = 'لا يوجد شيء';
$lang['mediaselect'] = 'ملفات الوسائط';
diff --git a/inc/lang/az/lang.php b/inc/lang/az/lang.php
index 35b18d3a7..13ba7b3c3 100644
--- a/inc/lang/az/lang.php
+++ b/inc/lang/az/lang.php
@@ -38,8 +38,6 @@ $lang['btn_backlink'] = 'Bura olan link-lər';
$lang['btn_backtomedia'] = 'media-fayl seçiminə qayıt';
$lang['btn_subscribe'] = 'Abunə ol (bütün dəyişiklər)';
$lang['btn_unsubscribe'] = 'Abunəlikdən çıx (bütün dəyişiklər)';
-$lang['btn_subscribens'] = 'Abunə ol (bu bölümün dəyişikləri)';
-$lang['btn_unsubscribens'] = 'Abunəlikdən çıx (bu bölümün dəyişikləri)';
$lang['btn_profile'] = 'Profil';
$lang['btn_reset'] = 'Boşalt';
$lang['btn_resendpwd'] = 'Yeni şifrəni göndər';
@@ -92,7 +90,7 @@ $lang['txt_filename'] = 'Faylın wiki-də olan adını daxil edin (müt
$lang['txt_overwrt'] = 'Mövcud olan faylın üstündən yaz';
$lang['lockedby'] = 'В данный момент заблокирован Bu an blokdadır';
$lang['lockexpire'] = 'Blok bitir:';
-$lang['willexpire'] = 'Sizin bu səhifədə dəyişik etmək üçün blokunuz bir dəqiqə ərzində bitəcək.\nMünaqişələrdən yayınmaq və blokun taymerini sıfırlamaq üçün, baxış düyməsini sıxın.';
+$lang['js']['willexpire'] = 'Sizin bu səhifədə dəyişik etmək üçün blokunuz bir dəqiqə ərzində bitəcək.\nMünaqişələrdən yayınmaq və blokun taymerini sıfırlamaq üçün, baxış düyməsini sıxın.';
$lang['notsavedyet'] = 'Yaddaşa yazılmamış dəyişiklər itəcəklər.\nSiz davam etmək istəyirsiz?';
$lang['rssfailed'] = 'Aşağıda göstərilmiş xəbər lentini əldə edən zaman xəta baş verdi: ';
$lang['nothingfound'] = 'Heçnə tapılmadı.';
@@ -118,7 +116,6 @@ $lang['js']['nosmblinks'] = 'Windows-un şəbəkə qovluqlarına link ancaq
$lang['js']['linkwiz'] = 'Linklər köməkçisi';
$lang['js']['linkto'] = 'Link göstərir:';
$lang['js']['del_confirm'] = 'Siz əminsiz ki, seçilmişləri silmək istəyirsiniz?';
-$lang['js']['mu_btn'] = 'Bir neçə faylı birdən yükləmək';
$lang['mediausage'] = 'Bu fayla link yaratmaq üçün aşağıdakı sintaksisdən istifadə edin:';
$lang['mediaview'] = 'Bu faylın ilkinə bax';
$lang['mediaroot'] = 'kök';
diff --git a/inc/lang/bg/diff.txt b/inc/lang/bg/diff.txt
index b1d49de92..a22031e93 100644
--- a/inc/lang/bg/diff.txt
+++ b/inc/lang/bg/diff.txt
@@ -1,4 +1,3 @@
====== Разлики ======
Тук са показани разликите между избраната и текущата версия на страницата.
-
diff --git a/inc/lang/bg/install.html b/inc/lang/bg/install.html
index 9d275d82a..44f02f4c2 100644
--- a/inc/lang/bg/install.html
+++ b/inc/lang/bg/install.html
@@ -1,17 +1,15 @@
-<p>Страницата помага при първа инсталация и настройване на
+<p>Страницата помага при инсталиране за първи път и настройване на
<a href="http://dokuwiki.org">Dokuwiki</a>. Повече информация
за инсталатора ще намерите в <a href="http://dokuwiki.org/installer">документацията му</a>.</p>
-<p>Dokuwiki ползва обикновени файлове за хранилище на страниците и друга
-информация свързана с тях (примерно картинки, търсене, стари версии, и др.).
+<p>Dokuwiki ползва обикновени файлове за съхраняване на страниците и информацията свързана с тях (примерно картинки, търсения, стари версии, и др.).
За да функционира нормално DokuWiki
<strong>трябва</strong> да има право за писане в директориите, които съдържат тези
файлове. Инсталаторът не може да настройва правата на директориите.
Вие трябва да направите това директно от командният ред или ако ползвате хостинг през FTP или контролния панела на хоста (примерно cPanel).</p>
<p>Инсталаторът ще настрои вашата DokuWiki конфигурация на
-<acronym title="списъка за достъп">ACL</acronym>, което ще позволи на администратора да се впише и ползва администраторското меню в DokuWiki за инсталиране на приставки, контрол
-на потребители, управление на достъпа до страниците и промяна на останалите настройки. Това не е необходимо за функционирането на DokuWiki, но направи администрирането по-лесно.</p>
+<acronym title="списъка за достъп">ACL</acronym>, което ще позволи на администратора да се впише и ползва администраторското меню в DokuWiki за инсталиране на приставки, контрол на потребителите, управление на достъпа до страниците и промяна на останалите настройки. Това не е необходимо за функционирането на DokuWiki, но прави администрирането по-лесно.</p>
<p>Опитните потребители и потребителите със специални изисквания към настройките имат на разположение допълнителна информация относно <a href="http://dokuwiki.org/install">инсталирането</a>
и <a href="http://dokuwiki.org/config">настройването</a>.</p>
diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php
index 3f8460286..8985e20e5 100644
--- a/inc/lang/bg/lang.php
+++ b/inc/lang/bg/lang.php
@@ -37,7 +37,7 @@ $lang['btn_update'] = 'Актуализиране';
$lang['btn_delete'] = 'Изтриване';
$lang['btn_back'] = 'Назад';
$lang['btn_backlink'] = 'Обратни препратки';
-$lang['btn_backtomedia'] = 'Назад към избора на медиен файл';
+$lang['btn_backtomedia'] = 'Назад към избора на файл';
$lang['btn_subscribe'] = 'Абонаменти';
$lang['btn_profile'] = 'Профил';
$lang['btn_reset'] = 'Изчистване';
@@ -47,6 +47,8 @@ $lang['btn_recover'] = 'Възстановяване на чернов
$lang['btn_draftdel'] = 'Изтриване на чернова';
$lang['btn_revert'] = 'Възстановяване';
$lang['btn_register'] = 'Регистриране';
+$lang['btn_apply'] = 'Прилагане';
+$lang['btn_media'] = 'Диспечер на файлове';
$lang['loggedinas'] = 'Вписани сте като';
$lang['user'] = 'Потребител';
$lang['pass'] = 'Парола';
@@ -91,7 +93,7 @@ $lang['txt_filename'] = 'Качи като (незадължителн
$lang['txt_overwrt'] = 'Презапиши съществуващите файлове';
$lang['lockedby'] = 'В момента е заключена от';
$lang['lockexpire'] = 'Ще бъде отключена на';
-$lang['willexpire'] = 'Страницата ще бъде отключена за редактиране след минута.\nЗа предотвратяване на конфликти, ползвайте бутона "Преглед", за рестартиране на брояча за заключване.';
+$lang['js']['willexpire'] = 'Страницата ще бъде отключена за редактиране след минута.\nЗа предотвратяване на конфликти, ползвайте бутона "Преглед", за рестартиране на брояча за заключване.';
$lang['js']['notsavedyet'] = 'Незаписаните промени ще бъдат загубени. Желаете ли да продължите?';
$lang['js']['searchmedia'] = 'Търсене на файлове';
$lang['js']['keepopen'] = 'Без затваряне на прозореца след избор';
@@ -122,11 +124,21 @@ $lang['js']['nosmblinks'] = 'Връзките към Windows shares раб
$lang['js']['linkwiz'] = 'Помощник за препратки';
$lang['js']['linkto'] = 'Препратка към: ';
$lang['js']['del_confirm'] = 'Да бъдат ли изтрити избраните елементи?';
-$lang['js']['mu_btn'] = 'Качване на няколко файла наведнъж';
+$lang['js']['restore_confirm'] = 'Наистина ли желаете да бъде възстановена тази версия?';
+$lang['js']['media_diff'] = 'Преглед на разликите:';
+$lang['js']['media_diff_both'] = 'Един до друг';
+$lang['js']['media_diff_opacity'] = 'Наслагване (и прозиране)';
+$lang['js']['media_diff_portions'] = 'По половинка';
+$lang['js']['media_select'] = 'Изберете файлове...';
+$lang['js']['media_upload_btn'] = 'Качване';
+$lang['js']['media_done_btn'] = 'Готово';
+$lang['js']['media_drop'] = 'Влачете и пуснете файливе тук, за да бъдат качени';
+$lang['js']['media_cancel'] = 'премахване';
+$lang['js']['media_overwrt'] = 'Презапиши съществуващите файлове';
$lang['rssfailed'] = 'Възникна грешка при получаването на емисията: ';
$lang['nothingfound'] = 'Нищо не е открито.';
-$lang['mediaselect'] = 'Медийни файлове';
-$lang['fileupload'] = 'Качване на медийни файлове';
+$lang['mediaselect'] = 'Файлове';
+$lang['fileupload'] = 'Качване на файлове';
$lang['uploadsucc'] = 'Качването е успешно';
$lang['uploadfail'] = 'Качването се провали. Може би поради грешни права?';
$lang['uploadwrong'] = 'Качването е отказано. Файлово разширение е забранено!';
@@ -177,6 +189,10 @@ $lang['mail_changed'] = 'променена страница: ';
$lang['mail_subscribe_list'] = 'променени страници в именно пространство: ';
$lang['mail_new_user'] = 'нов потребител: ';
$lang['mail_upload'] = 'качен файл: ';
+$lang['changes_type'] = 'Преглед на променените';
+$lang['pages_changes'] = 'Страници';
+$lang['media_changes'] = 'Файлове';
+$lang['both_changes'] = 'Страници и файлове';
$lang['qb_bold'] = 'Удебелен текст';
$lang['qb_italic'] = 'Курсив текст';
$lang['qb_underl'] = 'Подчертан текст';
@@ -217,6 +233,9 @@ $lang['img_copyr'] = 'Авторско право';
$lang['img_format'] = 'Формат';
$lang['img_camera'] = 'Фотоапарат';
$lang['img_keywords'] = 'Ключови думи';
+$lang['img_width'] = 'Ширина';
+$lang['img_height'] = 'Височина';
+$lang['img_manager'] = 'Преглед в диспечера на файлове';
$lang['subscr_subscribe_success'] = '%s е добавен към списъка с абониралите се за %s';
$lang['subscr_subscribe_error'] = 'Грешка при добавянето на %s към списъка с абониралите се за %s';
$lang['subscr_subscribe_noaddress'] = 'Добавянето ви към списъка с абонати не е възможно поради липсата на свързан адрес (на ел. поща) с профила ви.';
@@ -282,3 +301,27 @@ $lang['hours'] = 'преди %d часа';
$lang['minutes'] = 'преди %d минути';
$lang['seconds'] = 'преди %d секунди';
$lang['wordblock'] = 'Направените от вас промени не са съхранени, защото съдържат забранен текст (SPAM).';
+$lang['media_uploadtab'] = 'Качване';
+$lang['media_searchtab'] = 'Търсене';
+$lang['media_file'] = 'Файл';
+$lang['media_viewtab'] = 'Преглед';
+$lang['media_edittab'] = 'Редактиране';
+$lang['media_historytab'] = 'История';
+$lang['media_list_thumbs'] = 'Миниатюри';
+$lang['media_list_rows'] = 'Редове';
+$lang['media_sort_name'] = 'Име';
+$lang['media_sort_date'] = 'Дата';
+$lang['media_namespaces'] = 'Изберете именно пространство';
+$lang['media_files'] = 'Файлове в %s';
+$lang['media_upload'] = 'Качване в %s';
+$lang['media_search'] = 'Търсене в %s';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s в %s';
+$lang['media_edit'] = 'Редактиране на %s';
+$lang['media_history'] = 'История на %s';
+$lang['media_meta_edited'] = 'редактиране на метаданните';
+$lang['media_perm_read'] = 'За съжаление нямате достатъчно права, за да можете да прочетете файла.';
+$lang['media_perm_upload'] = 'За съжаление нямате достатъчно права, за да можете да качите файла.';
+$lang['media_update'] = 'Качване на нова версия';
+$lang['media_restore'] = 'Възстановяване на тази версия';
+$lang['plugin_install_err'] = 'Неправилно инсталирана приставка. Моля, преименувайте директорията \'%s\' на \'%s\'.';
diff --git a/inc/lang/bg/login.txt b/inc/lang/bg/login.txt
index a6f53e95d..e5061c3d3 100644
--- a/inc/lang/bg/login.txt
+++ b/inc/lang/bg/login.txt
@@ -1,3 +1,3 @@
====== Вписване ======
-Не сте се вписали! Въведете данните си удостоверяване отдолу, за да го направите. Бисквитките (cookies) трябва да са включени.
+Не сте се вписали! Въведете данните си за удостоверяване отдолу, за да го направите. Бисквитките (cookies) трябва да са включени.
diff --git a/inc/lang/ca-valencia/lang.php b/inc/lang/ca-valencia/lang.php
index c6a7dc27e..eac9fc8d1 100644
--- a/inc/lang/ca-valencia/lang.php
+++ b/inc/lang/ca-valencia/lang.php
@@ -39,8 +39,6 @@ $lang['btn_backlink'] = 'Vínculs remitents';
$lang['btn_backtomedia'] = 'Tornar a la selecció d\'archius de mijos';
$lang['btn_subscribe'] = 'Subscriure\'s a la pàgina';
$lang['btn_unsubscribe'] = 'Desubscriure\'s de la pàgina';
-$lang['btn_subscribens'] = 'Subscriure\'s a l\'espai de noms';
-$lang['btn_unsubscribens'] = 'Desubscriure\'s de l\'espai de noms';
$lang['btn_profile'] = 'Actualisar perfil';
$lang['btn_reset'] = 'Reiniciar';
$lang['btn_resendpwd'] = 'Enviar contrasenya nova';
@@ -93,7 +91,7 @@ $lang['txt_filename'] = 'Enviar com (opcional)';
$lang['txt_overwrt'] = 'Sobreescriure archius existents';
$lang['lockedby'] = 'Actualment bloquejat per';
$lang['lockexpire'] = 'El bloqueig venç a les';
-$lang['willexpire'] = 'El seu bloqueig per a editar esta pàgina vencerà en un minut.\nPer a evitar conflictes utilise el botó de vista prèvia i reiniciarà el contador.';
+$lang['js']['willexpire'] = 'El seu bloqueig per a editar esta pàgina vencerà en un minut.\nPer a evitar conflictes utilise el botó de vista prèvia i reiniciarà el contador.';
$lang['js']['notsavedyet'] = "Els canvis no guardats es perdran.\n¿Segur que vol continuar?";
$lang['rssfailed'] = 'Ha ocorregut un erro al solicitar este canal: ';
$lang['nothingfound'] = 'No s\'ha trobat res.';
@@ -119,7 +117,6 @@ $lang['js']['nosmblinks'] = 'Els vínculs a recursos compartits de Windows
$lang['js']['linkwiz'] = 'Assistent de vínculs';
$lang['js']['linkto'] = 'Vincular a:';
$lang['js']['del_confirm'] = '¿Realment vol borrar el(s) ítem(s) seleccionat(s)?';
-$lang['js']['mu_btn'] = 'Enviar diversos archius d\'una';
$lang['mediausage'] = 'Utilise la següent sintaxis per a referenciar est archiu:';
$lang['mediaview'] = 'Vore l\'archiu original';
$lang['mediaroot'] = 'base';
diff --git a/inc/lang/ca/lang.php b/inc/lang/ca/lang.php
index 342257d11..7094df5b4 100644
--- a/inc/lang/ca/lang.php
+++ b/inc/lang/ca/lang.php
@@ -39,8 +39,6 @@ $lang['btn_backlink'] = 'Què hi enllaça';
$lang['btn_backtomedia'] = 'Torna a la selecció de fitxers';
$lang['btn_subscribe'] = 'Subscripció a canvis d\'aquesta pàgina';
$lang['btn_unsubscribe'] = 'Cancel·la subscripció a pàgina';
-$lang['btn_subscribens'] = 'Subscripció a canvis d\'aquest espai';
-$lang['btn_unsubscribens'] = 'Cancel·la subscripció a espai';
$lang['btn_profile'] = 'Actualització del perfil';
$lang['btn_reset'] = 'Reinicia';
$lang['btn_resendpwd'] = 'Envia nova contrasenya';
@@ -93,7 +91,7 @@ $lang['txt_filename'] = 'Introduïu el nom wiki (opcional)';
$lang['txt_overwrt'] = 'Sobreescriu el fitxer actual';
$lang['lockedby'] = 'Actualment blocat per:';
$lang['lockexpire'] = 'Venciment del blocatge:';
-$lang['willexpire'] = 'El blocatge per a editar aquesta pàgina venç d\'aquí a un minut.\nUtilitzeu la visualització prèvia per reiniciar el rellotge i evitar conflictes.';
+$lang['js']['willexpire'] = 'El blocatge per a editar aquesta pàgina venç d\'aquí a un minut.\nUtilitzeu la visualització prèvia per reiniciar el rellotge i evitar conflictes.';
$lang['js']['notsavedyet'] = "Heu fet canvis que es perdran si no els deseu.\nVoleu continuar?";
$lang['rssfailed'] = 'S\'ha produït un error en recollir aquesta alimentació: ';
$lang['nothingfound'] = 'No s\'ha trobat res.';
@@ -120,7 +118,6 @@ Si voleu podeu copiar i enganxar l\'enllaç.';
$lang['js']['linkwiz'] = 'Auxiliar d\'enllaços';
$lang['js']['linkto'] = 'Enllaça a:';
$lang['js']['del_confirm'] = 'Suprimiu aquesta entrada?';
-$lang['js']['mu_btn'] = 'Penja múltiples fitxers';
$lang['mediausage'] = 'Utilitzeu la sintaxi següent per referir-vos a aquest enllaç:';
$lang['mediaview'] = 'Mostra el fitxer original';
$lang['mediaroot'] = 'arrel';
diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php
index e1c45e0c9..292c2c42e 100644
--- a/inc/lang/cs/lang.php
+++ b/inc/lang/cs/lang.php
@@ -95,7 +95,7 @@ $lang['txt_filename'] = 'Wiki jméno (volitelné)';
$lang['txt_overwrt'] = 'Přepsat existující soubor';
$lang['lockedby'] = 'Právě zamknuto:';
$lang['lockexpire'] = 'Zámek vyprší:';
-$lang['willexpire'] = 'Váš zámek pro editaci za chvíli vyprší.\nAbyste předešli konfliktům, stiskněte tlačítko Náhled a zámek se prodlouží.';
+$lang['js']['willexpire'] = 'Váš zámek pro editaci za chvíli vyprší.\nAbyste předešli konfliktům, stiskněte tlačítko Náhled a zámek se prodlouží.';
$lang['js']['notsavedyet'] = 'Jsou tu neuložené změny, které budou ztraceny.
Chcete opravdu pokračovat?';
$lang['js']['searchmedia'] = 'Hledat soubory';
@@ -127,7 +127,6 @@ Přesto tento odkaz můžete zkopírovat a vložit jinde.';
$lang['js']['linkwiz'] = 'Průvodce odkazy';
$lang['js']['linkto'] = 'Odkaz na:';
$lang['js']['del_confirm'] = 'Vymazat tuto položku?';
-$lang['js']['mu_btn'] = 'Načíst více souborů najednou';
$lang['rssfailed'] = 'Nastala chyba při vytváření tohoto RSS: ';
$lang['nothingfound'] = 'Nic nenalezeno.';
$lang['mediaselect'] = 'Výběr dokumentu';
diff --git a/inc/lang/da/lang.php b/inc/lang/da/lang.php
index 80d55d6f5..0b6961921 100644
--- a/inc/lang/da/lang.php
+++ b/inc/lang/da/lang.php
@@ -98,7 +98,7 @@ $lang['txt_filename'] = 'Indtast wikinavn (valgfrit)';
$lang['txt_overwrt'] = 'Overskriv eksisterende fil';
$lang['lockedby'] = 'Midlertidig låst af';
$lang['lockexpire'] = 'Lås udløber kl.';
-$lang['willexpire'] = 'Din lås på dette dokument udløber om et minut.\nTryk på Forhåndsvisning-knappen for at undgå konflikter.';
+$lang['js']['willexpire'] = 'Din lås på dette dokument udløber om et minut.\nTryk på Forhåndsvisning-knappen for at undgå konflikter.';
$lang['js']['notsavedyet'] = 'Ugemte ændringer vil blive mistet
Fortsæt alligevel?';
$lang['js']['searchmedia'] = 'Søg efter filer';
@@ -130,7 +130,6 @@ Du kan stadig kopiere og indsætte linket.';
$lang['js']['linkwiz'] = 'guiden til henvisninger';
$lang['js']['linkto'] = 'Henvise til:';
$lang['js']['del_confirm'] = 'Slet valgte post(er)?';
-$lang['js']['mu_btn'] = 'Overføre flere filer på en gang';
$lang['rssfailed'] = 'Der opstod en fejl ved indhentning af: ';
$lang['nothingfound'] = 'Søgningen gav intet resultat.';
$lang['mediaselect'] = 'Vælg mediefil';
diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php
index d39bf8152..ec5e308ce 100644
--- a/inc/lang/de-informal/lang.php
+++ b/inc/lang/de-informal/lang.php
@@ -16,8 +16,9 @@
* @author Alexander Fischer <tbanus@os-forge.net>
* @author Juergen Schwarzer <jschwarzer@freenet.de>
* @author Marcel Metz <marcel_metz@gmx.de>
- * @author Matthias Schulte <post@lupo49.de>
+ * @author Matthias Schulte <mailinglist@lupo49.de>
* @author Christian Wichmann <nospam@zone0.de>
+ * @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -59,6 +60,8 @@ $lang['btn_recover'] = 'Entwurf wiederherstellen';
$lang['btn_draftdel'] = 'Entwurf löschen';
$lang['btn_revert'] = 'Wiederherstellen';
$lang['btn_register'] = 'Registrieren';
+$lang['btn_apply'] = 'Übernehmen';
+$lang['btn_media'] = 'Medien-Manager';
$lang['loggedinas'] = 'Angemeldet als';
$lang['user'] = 'Benutzername';
$lang['pass'] = 'Passwort';
@@ -70,7 +73,7 @@ $lang['fullname'] = 'Voller Name';
$lang['email'] = 'E-Mail';
$lang['profile'] = 'Benutzerprofil';
$lang['badlogin'] = 'Nutzername oder Passwort sind falsch.';
-$lang['minoredit'] = 'kleine Änderung';
+$lang['minoredit'] = 'Kleine Änderung';
$lang['draftdate'] = 'Entwurf gespeichert am';
$lang['nosecedit'] = 'Diese Seite wurde in der Zwischenzeit geändert, da das Sektionsinfo veraltet ist. Die ganze Seite wird stattdessen geladen.';
$lang['regmissing'] = 'Alle Felder müssen ausgefüllt werden';
@@ -103,7 +106,7 @@ $lang['txt_filename'] = 'Hochladen als (optional)';
$lang['txt_overwrt'] = 'Bestehende Datei überschreiben';
$lang['lockedby'] = 'Momentan gesperrt von';
$lang['lockexpire'] = 'Sperre läuft ab am';
-$lang['willexpire'] = 'Die Sperre zur Bearbeitung dieser Seite läuft in einer Minute ab.\nUm Bearbeitungskonflikte zu vermeiden, solltest du sie durch einen Klick auf den Vorschau-Knopf verlängern.';
+$lang['js']['willexpire'] = 'Die Sperre zur Bearbeitung dieser Seite läuft in einer Minute ab.\nUm Bearbeitungskonflikte zu vermeiden, solltest du sie durch einen Klick auf den Vorschau-Knopf verlängern.';
$lang['js']['notsavedyet'] = 'Nicht gespeicherte Änderungen gehen verloren!';
$lang['js']['searchmedia'] = 'Suche nach Dateien';
$lang['js']['keepopen'] = 'Fenster nach Auswahl nicht schließen';
@@ -133,7 +136,17 @@ $lang['js']['nosmblinks'] = 'Das Verlinken von Windows-Freigaben funktionie
$lang['js']['linkwiz'] = 'Link-Assistent';
$lang['js']['linkto'] = 'Link zu:';
$lang['js']['del_confirm'] = 'Die ausgewählten Dateien wirklich löschen?';
-$lang['js']['mu_btn'] = 'Mehrere Dateien gleichzeitig hochladen';
+$lang['js']['restore_confirm'] = 'Wirkliich diese Version wieder herstellen?';
+$lang['js']['media_diff'] = 'Unterschiede anzeigen:';
+$lang['js']['media_diff_both'] = 'Seite für Seite';
+$lang['js']['media_diff_opacity'] = 'Überblenden';
+$lang['js']['media_diff_portions'] = 'Übergang';
+$lang['js']['media_select'] = 'Dateien auswählen…';
+$lang['js']['media_upload_btn'] = 'Hochladen';
+$lang['js']['media_done_btn'] = 'Fertig';
+$lang['js']['media_drop'] = 'Dateien hier draufziehen um sie hochzuladen';
+$lang['js']['media_cancel'] = 'Entfernen';
+$lang['js']['media_overwrt'] = 'Existierende Dateien überschreiben';
$lang['rssfailed'] = 'Es ist ein Fehler beim Laden des Feeds aufgetreten: ';
$lang['nothingfound'] = 'Nichts gefunden.';
$lang['mediaselect'] = 'Dateiauswahl';
@@ -188,6 +201,10 @@ $lang['mail_changed'] = 'Seite geändert:';
$lang['mail_subscribe_list'] = 'Seite hat sich im Namespace geändert:';
$lang['mail_new_user'] = 'Neuer Benutzer:';
$lang['mail_upload'] = 'Datei hochgeladen:';
+$lang['changes_type'] = 'Änderungen anzeigen von';
+$lang['pages_changes'] = 'Seiten';
+$lang['media_changes'] = 'Mediendateien';
+$lang['both_changes'] = 'Beides, Seiten- und Mediendateien';
$lang['qb_bold'] = 'Fetter Text';
$lang['qb_italic'] = 'Kursiver Text';
$lang['qb_underl'] = 'Unterstrichener Text';
@@ -228,6 +245,9 @@ $lang['img_copyr'] = 'Copyright';
$lang['img_format'] = 'Format';
$lang['img_camera'] = 'Kamera';
$lang['img_keywords'] = 'Schlagwörter';
+$lang['img_width'] = 'Breite';
+$lang['img_height'] = 'Höhe';
+$lang['img_manager'] = 'Im Medien-Manager anzeigen';
$lang['subscr_subscribe_success'] = 'Die Seite %s wurde zur Abonnementenliste von %s hinzugefügt';
$lang['subscr_subscribe_error'] = 'Fehler beim Hinzufügen von %s zur Abonnementenliste von %s';
$lang['subscr_subscribe_noaddress'] = 'In deinem Account ist keine E-Mail-Adresse hinterlegt. Dadurch kann die Seite nicht abonniert werden';
@@ -292,3 +312,27 @@ $lang['hours'] = 'vor %d Stunden';
$lang['minutes'] = 'vor %d Minuten';
$lang['seconds'] = 'vor %d Sekunden';
$lang['wordblock'] = 'Deine Bearbeitung wurde nicht gespeichert, da sie gesperrten Text enthielt (Spam).';
+$lang['media_uploadtab'] = 'Hochladen';
+$lang['media_searchtab'] = 'Suchen';
+$lang['media_file'] = 'Datei';
+$lang['media_viewtab'] = 'Anzeigen';
+$lang['media_edittab'] = 'Bearbeiten';
+$lang['media_historytab'] = 'Verlauf';
+$lang['media_list_thumbs'] = 'Medien anzeigen als Miniaturansicht';
+$lang['media_list_rows'] = 'Medien anzeigen als Listenansicht';
+$lang['media_sort_name'] = 'Sortieren nach Name';
+$lang['media_sort_date'] = 'Sortieren nach Datum';
+$lang['media_namespaces'] = 'Namensraum wählen';
+$lang['media_files'] = 'Medien im Namensraum <strong>%s</strong>.';
+$lang['media_upload'] = 'In den <strong>%s</strong> Namensraum hochladen.';
+$lang['media_search'] = 'Im Namensraum <strong>%s</strong> suchen.';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s in %s';
+$lang['media_edit'] = '%s bearbeiten';
+$lang['media_history'] = 'Versionen von %s';
+$lang['media_meta_edited'] = 'Meta-Informationen bearbeitet';
+$lang['media_perm_read'] = 'Du besitzt nicht die notwendigen Berechtigungen um die Datei anzuzeigen.';
+$lang['media_perm_upload'] = 'Du besitzt nicht die notwendigen Berechtigungen um Dateien hochzuladen.';
+$lang['media_update'] = 'Neue Version hochladen';
+$lang['media_restore'] = 'Diese Version wiederherstellen';
+$lang['plugin_install_err'] = 'Plugin nicht korrekt installiert. Plugin-Verzeichnis von \'%s\' nach \'%s\' umbenennen.';
diff --git a/inc/lang/de-informal/uploadmail.txt b/inc/lang/de-informal/uploadmail.txt
index 7239cc10c..69f11400f 100644
--- a/inc/lang/de-informal/uploadmail.txt
+++ b/inc/lang/de-informal/uploadmail.txt
@@ -1,13 +1,14 @@
Eine Datei wurde in deinem Wiki hochgeladen. Hier sind die Details:
-Datei : @MEDIA@
-Datum : @DATE@
-Browser : @BROWSER@
-IP-Adresse : @IPADDRESS@
-Hostname : @HOSTNAME@
-Größe : @SIZE@
-MIME-Typ : @MIME@
-Benutzer : @USER@
+Datei : @MEDIA@
+Alte Version: @OLD@
+Datum : @DATE@
+Browser : @BROWSER@
+IP-Adresse : @IPADDRESS@
+Hostname : @HOSTNAME@
+Größe : @SIZE@
+MIME-Typ : @MIME@
+Benutzer : @USER@
--
Diese Mail wurde vom DokuWiki auf
diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php
index f9f250994..eef2f6632 100644
--- a/inc/lang/de/lang.php
+++ b/inc/lang/de/lang.php
@@ -18,6 +18,9 @@
* @author Robert Bogenschneider <robog@gmx.de>
* @author Niels Lange <niels@boldencursief.nl>
* @author Christian Wichmann <nospam@zone0.de>
+ * @author Matthias Schulte <mailinglist@lupo49.de>
+ * @author Paul Lachewsky <kaeptn.haddock@gmail.com>
+ * @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -59,6 +62,8 @@ $lang['btn_recover'] = 'Entwurf wiederherstellen';
$lang['btn_draftdel'] = 'Entwurf löschen';
$lang['btn_revert'] = 'Wiederherstellen';
$lang['btn_register'] = 'Registrieren';
+$lang['btn_apply'] = 'Übernehmen';
+$lang['btn_media'] = 'Medien-Manager';
$lang['loggedinas'] = 'Angemeldet als';
$lang['user'] = 'Benutzername';
$lang['pass'] = 'Passwort';
@@ -103,7 +108,7 @@ $lang['txt_filename'] = 'Hochladen als (optional)';
$lang['txt_overwrt'] = 'Bestehende Datei überschreiben';
$lang['lockedby'] = 'Momentan gesperrt von';
$lang['lockexpire'] = 'Sperre läuft ab am';
-$lang['willexpire'] = 'Die Sperre zur Bearbeitung dieser Seite läuft in einer Minute ab.\nUm Bearbeitungskonflikte zu vermeiden, sollten Sie sie durch einen Klick auf den Vorschau-Knopf verlängern.';
+$lang['js']['willexpire'] = 'Die Sperre zur Bearbeitung dieser Seite läuft in einer Minute ab.\nUm Bearbeitungskonflikte zu vermeiden, sollten Sie sie durch einen Klick auf den Vorschau-Knopf verlängern.';
$lang['js']['notsavedyet'] = 'Nicht gespeicherte Änderungen gehen verloren!';
$lang['js']['searchmedia'] = 'Suche Dateien';
$lang['js']['keepopen'] = 'Fenster nach Auswahl nicht schließen';
@@ -129,12 +134,21 @@ $lang['js']['medialeft'] = 'Das Bild links anordnen.';
$lang['js']['mediaright'] = 'Das Bild rechts anordnen.';
$lang['js']['mediacenter'] = 'Das Bild in der Mitte anordnen.';
$lang['js']['medianoalign'] = 'Keine Anordnung benutzen.';
-$lang['js']['nosmblinks'] = 'Das Verlinken von Windows-Freigaben funktioniert nur im Microsoft Internet Explorer.
-Der Link kann jedoch durch Kopieren und Einfügen verwendet werden.';
+$lang['js']['nosmblinks'] = 'Das Verlinken von Windows-Freigaben funktioniert nur im Microsoft Internet Explorer.\nDer Link kann jedoch durch Kopieren und Einfügen verwendet werden.';
$lang['js']['linkwiz'] = 'Link-Assistent';
$lang['js']['linkto'] = 'Link nach:';
$lang['js']['del_confirm'] = 'Eintrag wirklich löschen?';
-$lang['js']['mu_btn'] = 'Mehrere Dateien gleichzeitig hochladen';
+$lang['js']['restore_confirm'] = 'Really restore this version?';
+$lang['js']['media_diff'] = 'Unterschiede anzeigen:';
+$lang['js']['media_diff_both'] = 'Side by Side';
+$lang['js']['media_diff_opacity'] = 'Überblenden';
+$lang['js']['media_diff_portions'] = 'Übergang';
+$lang['js']['media_select'] = 'Dateien auswählen…';
+$lang['js']['media_upload_btn'] = 'Hochladen';
+$lang['js']['media_done_btn'] = 'Fertig';
+$lang['js']['media_drop'] = 'Dateien hier draufziehen um sie hochzuladen';
+$lang['js']['media_cancel'] = 'Entfernen';
+$lang['js']['media_overwrt'] = 'Existierende Dateien überschreiben';
$lang['rssfailed'] = 'Es ist ein Fehler beim Laden des Feeds aufgetreten: ';
$lang['nothingfound'] = 'Nichts gefunden.';
$lang['mediaselect'] = 'Dateiauswahl';
@@ -189,6 +203,10 @@ $lang['mail_changed'] = 'Seite geändert:';
$lang['mail_subscribe_list'] = 'Geänderte Seiten im Namensraum:';
$lang['mail_new_user'] = 'Neuer Benutzer:';
$lang['mail_upload'] = 'Datei hochgeladen:';
+$lang['changes_type'] = 'Änderungen anzeigen von';
+$lang['pages_changes'] = 'Seiten';
+$lang['media_changes'] = 'Mediendateien';
+$lang['both_changes'] = 'Beides, Seiten- und Mediendateien';
$lang['qb_bold'] = 'Fetter Text';
$lang['qb_italic'] = 'Kursiver Text';
$lang['qb_underl'] = 'Unterstrichener Text';
@@ -229,6 +247,9 @@ $lang['img_copyr'] = 'Copyright';
$lang['img_format'] = 'Format';
$lang['img_camera'] = 'Kamera';
$lang['img_keywords'] = 'Schlagwörter';
+$lang['img_width'] = 'Breite';
+$lang['img_height'] = 'Höhe';
+$lang['img_manager'] = 'Im Medien-Manager anzeigen';
$lang['subscr_subscribe_success'] = '%s hat nun Änderungen der Seite %s abonniert';
$lang['subscr_subscribe_error'] = '%s kann die Änderungen der Seite %s nicht abonnieren';
$lang['subscr_subscribe_noaddress'] = 'Weil Ihre E-Mail-Adresse fehlt, können Sie das Thema nicht abonnieren';
@@ -293,3 +314,27 @@ $lang['hours'] = 'vor %d Stunden';
$lang['minutes'] = 'vor %d Minuten';
$lang['seconds'] = 'vor %d Sekunden';
$lang['wordblock'] = 'Ihre Bearbeitung wurde nicht gespeichert, da sie gesperrten Text enthielt (Spam).';
+$lang['media_uploadtab'] = 'Hochladen';
+$lang['media_searchtab'] = 'Suchen';
+$lang['media_file'] = 'Datei';
+$lang['media_viewtab'] = 'Anzeigen';
+$lang['media_edittab'] = 'Bearbeiten';
+$lang['media_historytab'] = 'Verlauf';
+$lang['media_list_thumbs'] = 'Vorschaubilder';
+$lang['media_list_rows'] = 'Reihen';
+$lang['media_sort_name'] = 'nach Name';
+$lang['media_sort_date'] = 'nach Datum';
+$lang['media_namespaces'] = 'Namensraum wählen';
+$lang['media_files'] = 'Dateien in %s';
+$lang['media_upload'] = 'In den <strong>%s</strong> Namespace hochladen.';
+$lang['media_search'] = 'Im Namespace <strong>%s</strong> suchen.';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s in %s';
+$lang['media_edit'] = 'Bearbeiten';
+$lang['media_history'] = 'Versionsverlauf der Datei.';
+$lang['media_meta_edited'] = 'Meta-Informationen bearbeitet';
+$lang['media_perm_read'] = 'Sie besitzen nicht die notwendigen Berechtigungen um die Datei anzuzeigen.';
+$lang['media_perm_upload'] = 'Sie besitzen nicht die notwendigen Berechtigungen um Dateien hochzuladen.';
+$lang['media_update'] = 'Neue Version hochladen';
+$lang['media_restore'] = 'Diese Version wiederherstellen';
+$lang['plugin_install_err'] = 'Plugin nicht korrekt installiert. Plugin-Verzeichnis von \'%s\' nach \'%s\' umbenennen.';
diff --git a/inc/lang/de/uploadmail.txt b/inc/lang/de/uploadmail.txt
index 757729804..977e7561c 100644
--- a/inc/lang/de/uploadmail.txt
+++ b/inc/lang/de/uploadmail.txt
@@ -1,13 +1,14 @@
Eine Datei wurde in Ihrem Wiki hochgeladen. Hier sind die Details:
-Datei : @MEDIA@
-Datum : @DATE@
-Browser : @BROWSER@
-IP-Adresse : @IPADDRESS@
-Hostname : @HOSTNAME@
-Größe : @SIZE@
-MIME-Typ : @MIME@
-Benutzer : @USER@
+Datei : @MEDIA@
+Alte Version: @OLD@
+Datum : @DATE@
+Browser : @BROWSER@
+IP-Adresse : @IPADDRESS@
+Hostname : @HOSTNAME@
+Größe : @SIZE@
+MIME-Typ : @MIME@
+Benutzer : @USER@
--
Diese Mail kommt vom DokuWiki auf
diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php
index 11c64285e..4c334c1de 100644
--- a/inc/lang/el/lang.php
+++ b/inc/lang/el/lang.php
@@ -7,6 +7,7 @@
* @author Αθανάσιος Νταής <homunculus@wana.gr>
* @author Konstantinos Koryllos <koryllos@gmail.com>
* @author George Petsagourakis <petsagouris@gmail.com>
+ * @author Petros Vidalis <pvidalis@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -48,6 +49,8 @@ $lang['btn_recover'] = 'Επαναφορά αυτόματα αποθη
$lang['btn_draftdel'] = 'Διαγραφή αυτόματα αποθηκευμένης σελίδας';
$lang['btn_revert'] = 'Αποκατάσταση';
$lang['btn_register'] = 'Εγγραφή';
+$lang['btn_apply'] = 'Εφαρμογή';
+$lang['btn_media'] = 'Διαχειριστής πολυμέσων';
$lang['loggedinas'] = 'Συνδεδεμένος ως';
$lang['user'] = 'Όνομα χρήστη';
$lang['pass'] = 'Κωδικός';
@@ -92,7 +95,7 @@ $lang['txt_filename'] = 'Επιλέξτε νέο όνομα αρχεί
$lang['txt_overwrt'] = 'Αντικατάσταση υπάρχοντος αρχείου';
$lang['lockedby'] = 'Προσωρινά κλειδωμένο από';
$lang['lockexpire'] = 'Το κλείδωμα λήγει στις';
-$lang['willexpire'] = 'Το κλείδωμά σας για την επεξεργασία αυτής της σελίδας θα λήξει σε ένα λεπτό.\n Για να το ανανεώσετε χρησιμοποιήστε την Προεπισκόπηση.';
+$lang['js']['willexpire'] = 'Το κλείδωμά σας για την επεξεργασία αυτής της σελίδας θα λήξει σε ένα λεπτό.\n Για να το ανανεώσετε χρησιμοποιήστε την Προεπισκόπηση.';
$lang['js']['notsavedyet'] = 'Οι μη αποθηκευμένες αλλαγές θα χαθούν.
Θέλετε να συνεχίσετε;';
$lang['js']['searchmedia'] = 'Αναζήτηση για αρχεία';
@@ -124,7 +127,17 @@ $lang['js']['nosmblinks'] = 'Οι σύνδεσμοι προς Windows share
$lang['js']['linkwiz'] = 'Αυτόματος Οδηγός Συνδέσμων';
$lang['js']['linkto'] = 'Σύνδεση σε:';
$lang['js']['del_confirm'] = 'Να διαγραφεί;';
-$lang['js']['mu_btn'] = 'Ταυτόχρονη φόρτωση πολλαπλών φακέλων';
+$lang['js']['restore_confirm'] = 'Θέλετε την επαναφορά σε αυτή την έκδοση;';
+$lang['js']['media_diff'] = 'Εμφάνιση διαφορών:';
+$lang['js']['media_diff_both'] = 'Δίπλα δίπλα';
+$lang['js']['media_diff_opacity'] = 'Επικάλυψη';
+$lang['js']['media_diff_portions'] = 'Κύλιση';
+$lang['js']['media_select'] = 'Επιλογή αρχείων...';
+$lang['js']['media_upload_btn'] = 'Φόρτωση';
+$lang['js']['media_done_btn'] = 'Ολοκλήρωση';
+$lang['js']['media_drop'] = 'Ρίξτε αρχεία εδώ για να τα φορτώσετε';
+$lang['js']['media_cancel'] = 'αφαίρεση';
+$lang['js']['media_overwrt'] = 'Αντικατάσταση υπάρχοντων αρχείων';
$lang['rssfailed'] = 'Παρουσιάστηκε κάποιο σφάλμα κατά την ανάγνωση αυτού του feed: ';
$lang['nothingfound'] = 'Δεν βρέθηκαν σχετικά αποτελέσματα.';
$lang['mediaselect'] = 'Επιλογή Αρχείων';
@@ -179,6 +192,10 @@ $lang['mail_changed'] = 'σελίδα τροποποιήθηκε:';
$lang['mail_subscribe_list'] = 'σελίδες που άλλαξαν στον φάκελο:';
$lang['mail_new_user'] = 'νέος χρήστης:';
$lang['mail_upload'] = 'αρχείο φορτώθηκε:';
+$lang['changes_type'] = 'Εμφάνιση αλλαγών του';
+$lang['pages_changes'] = 'Σελίδες';
+$lang['media_changes'] = 'Αρχεία πολυμέσων';
+$lang['both_changes'] = 'Σελίδες και αρχεία πολυμέσων';
$lang['qb_bold'] = 'Έντονο Κείμενο';
$lang['qb_italic'] = 'Πλάγιο Κείμενο';
$lang['qb_underl'] = 'Υπογραμμισμένο Κείμενο';
@@ -219,6 +236,9 @@ $lang['img_copyr'] = 'Copyright';
$lang['img_format'] = 'Format';
$lang['img_camera'] = 'Camera';
$lang['img_keywords'] = 'Λέξεις-κλειδιά';
+$lang['img_width'] = 'Πλάτος';
+$lang['img_height'] = 'Ύψος';
+$lang['img_manager'] = 'Εμφάνιση στον διαχειριστή πολυμέσων';
$lang['subscr_subscribe_success'] = 'Ο/η %s προστέθηκε στην λίστα ειδοποιήσεων για το %s';
$lang['subscr_subscribe_error'] = 'Σφάλμα κατά την προσθήκη του/της %s στην λίστα ειδοποιήσεων για το %s';
$lang['subscr_subscribe_noaddress'] = 'Δεν υπάρχει διεύθυνση ταχυδρομείου συσχετισμένη με το όνομα χρήστη σας. Κατά συνέπεια δεν μπορείτε να προστεθείτε στην λίστα ειδοποιήσεων';
@@ -283,4 +303,24 @@ $lang['days'] = 'πριν %d ημέρες';
$lang['hours'] = 'πριν %d ώρες';
$lang['minutes'] = 'πριν %d λεπτά';
$lang['seconds'] = 'πριν %d δευτερόλεπτα';
-$lang['wordblock'] = 'Η αλλαγή σας δεν αποθηκεύτηκε γιατί περιείχε spam.'; \ No newline at end of file
+$lang['wordblock'] = 'Η αλλαγή σας δεν αποθηκεύτηκε γιατί περιείχε spam.';
+$lang['media_uploadtab'] = 'Φόρτωση';
+$lang['media_searchtab'] = 'Αναζήτηση';
+$lang['media_viewtab'] = 'Εμφάνιση';
+$lang['media_edittab'] = 'Επεξεργασία';
+$lang['media_historytab'] = 'Ιστορικό';
+$lang['media_thumbsview'] = 'Προεπισκόπιση';
+$lang['media_listview'] = 'Λίστα';
+$lang['media_sort'] = 'Ταξινόμιση';
+$lang['media_sort_name'] = 'ανά όνομα';
+$lang['media_sort_date'] = 'ανά ημερομηνία';
+$lang['media_upload'] = 'Φόρτωση στο <strong>%s</strong> φάκελο.';
+$lang['media_search'] = 'Αναζήτηση στο <strong>%s</strong> φάκελο.';
+$lang['media_edit'] = 'Επεξεργασία';
+$lang['media_history'] = 'Αυτές είναι οι παλαιότερες αναθεωρήσεις του αρχείου.';
+$lang['media_meta_edited'] = 'τα μεταδεδομένα επεξεργάστηκαν';
+$lang['media_perm_read'] = 'Συγνώμη, δεν έχετε επαρκή διακαιώματα για να διαβάσετε αυτά τα αρχεία.';
+$lang['media_perm_upload'] = 'Συγνώμη, δεν έχετε επαρκή διακαιώματα για να φορτώσετε αυτά τα αρχεία.';
+$lang['media_update'] = 'Φόρτωση νέας έκδοσης';
+$lang['media_restore'] = 'Επαναφορά αυτή της έκδοσης';
+$lang['plugin_install_err'] = 'Η επέκταση δεν εγκαταστήθηκε σωστά. Μετονομασία φακέλου επεκτάσεων από \'%s\' σε \'%s\'.';
diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php
index 51fd8f645..89a7c4d40 100644
--- a/inc/lang/en/lang.php
+++ b/inc/lang/en/lang.php
@@ -6,317 +6,355 @@
* @author Andreas Gohr <andi@splitbrain.org>
* @author Anika Henke <anika@selfthinker.org>
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
+ * @author Matthias Schulte <mailinglist@lupo49.de>
*/
-$lang['encoding'] = 'utf-8';
-$lang['direction'] = 'ltr';
-$lang['doublequoteopening'] = '“';//&ldquo;
-$lang['doublequoteclosing'] = '”';//&rdquo;
-$lang['singlequoteopening'] = '‘';//&lsquo;
-$lang['singlequoteclosing'] = '’';//&rsquo;
-$lang['apostrophe'] = '’';//&rsquo;
-
-$lang['btn_edit'] = 'Edit this page';
-$lang['btn_source'] = 'Show pagesource';
-$lang['btn_show'] = 'Show page';
-$lang['btn_create'] = 'Create this page';
-$lang['btn_search'] = 'Search';
-$lang['btn_save'] = 'Save';
-$lang['btn_preview']= 'Preview';
-$lang['btn_top'] = 'Back to top';
-$lang['btn_newer'] = '<< more recent';
-$lang['btn_older'] = 'less recent >>';
-$lang['btn_revs'] = 'Old revisions';
-$lang['btn_recent'] = 'Recent changes';
-$lang['btn_upload'] = 'Upload';
-$lang['btn_cancel'] = 'Cancel';
-$lang['btn_index'] = 'Sitemap';
-$lang['btn_secedit']= 'Edit';
-$lang['btn_login'] = 'Login';
-$lang['btn_logout'] = 'Logout';
-$lang['btn_admin'] = 'Admin';
-$lang['btn_update'] = 'Update';
-$lang['btn_delete'] = 'Delete';
-$lang['btn_back'] = 'Back';
-$lang['btn_backlink'] = "Backlinks";
-$lang['btn_backtomedia'] = 'Back to Mediafile Selection';
-$lang['btn_subscribe'] = 'Manage Subscriptions';
-$lang['btn_profile'] = 'Update Profile';
-$lang['btn_reset'] = 'Reset';
-$lang['btn_resendpwd'] = 'Send new password';
-$lang['btn_draft'] = 'Edit draft';
-$lang['btn_recover'] = 'Recover draft';
-$lang['btn_draftdel'] = 'Delete draft';
-$lang['btn_revert'] = 'Restore';
-$lang['btn_register'] = 'Register';
-
-$lang['loggedinas'] = 'Logged in as';
-$lang['user'] = 'Username';
-$lang['pass'] = 'Password';
-$lang['newpass'] = 'New password';
-$lang['oldpass'] = 'Confirm current password';
-$lang['passchk'] = 'once again';
-$lang['remember'] = 'Remember me';
-$lang['fullname'] = 'Real name';
-$lang['email'] = 'E-Mail';
-$lang['profile'] = 'User Profile';
-$lang['badlogin'] = 'Sorry, username or password was wrong.';
-$lang['minoredit'] = 'Minor Changes';
-$lang['draftdate'] = 'Draft autosaved on'; // full dformat date will be added
-$lang['nosecedit'] = 'The page was changed in the meantime, section info was out of date loaded full page instead.';
-
-$lang['regmissing'] = 'Sorry, you must fill in all fields.';
-$lang['reguexists'] = 'Sorry, a user with this login already exists.';
-$lang['regsuccess'] = 'The user has been created and the password was sent by email.';
-$lang['regsuccess2']= 'The user has been created.';
-$lang['regmailfail']= 'Looks like there was an error on sending the password mail. Please contact the admin!';
-$lang['regbadmail'] = 'The given email address looks invalid - if you think this is an error, contact the admin';
-$lang['regbadpass'] = 'The two given passwords are not identical, please try again.';
-$lang['regpwmail'] = 'Your DokuWiki password';
-$lang['reghere'] = 'You don\'t have an account yet? Just get one';
-
-$lang['profna'] = 'This wiki does not support profile modification';
-$lang['profnochange'] = 'No changes, nothing to do.';
-$lang['profnoempty'] = 'An empty name or email address is not allowed.';
-$lang['profchanged'] = 'User profile successfully updated.';
-
-$lang['pwdforget'] = 'Forgotten your password? Get a new one';
-$lang['resendna'] = 'This wiki does not support password resending.';
-$lang['resendpwd'] = 'Send new password for';
-$lang['resendpwdmissing'] = 'Sorry, you must fill in all fields.';
-$lang['resendpwdnouser'] = 'Sorry, we can\'t find this user in our database.';
-$lang['resendpwdbadauth'] = 'Sorry, this auth code is not valid. Make sure you used the complete confirmation link.';
-$lang['resendpwdconfirm'] = 'A confirmation link has been sent by email.';
-$lang['resendpwdsuccess'] = 'Your new password has been sent by email.';
-
-$lang['license'] = 'Except where otherwise noted, content on this wiki is licensed under the following license:';
-$lang['licenseok'] = 'Note: By editing this page you agree to license your content under the following license:';
-
-$lang['searchmedia'] = 'Search file name:';
-$lang['searchmedia_in'] = 'Search in %s';
-$lang['txt_upload'] = 'Select file to upload';
-$lang['txt_filename'] = 'Upload as (optional)';
-$lang['txt_overwrt'] = 'Overwrite existing file';
-$lang['lockedby'] = 'Currently locked by';
-$lang['lockexpire'] = 'Lock expires at';
-$lang['willexpire'] = 'Your lock for editing this page is about to expire in a minute.\nTo avoid conflicts use the preview button to reset the locktimer.';
-
-$lang['js']['notsavedyet'] = "Unsaved changes will be lost.";
-$lang['rssfailed'] = 'An error occurred while fetching this feed: ';
-$lang['nothingfound']= 'Nothing was found.';
-
-$lang['mediaselect'] = 'Media Files';
-$lang['fileupload'] = 'Media File Upload';
-$lang['uploadsucc'] = 'Upload successful';
-$lang['uploadfail'] = 'Upload failed. Maybe wrong permissions?';
-$lang['uploadwrong'] = 'Upload denied. This file extension is forbidden!';
-$lang['uploadexist'] = 'File already exists. Nothing done.';
-$lang['uploadbadcontent'] = 'The uploaded content did not match the %s file extension.';
-$lang['uploadspam'] = 'The upload was blocked by the spam blacklist.';
-$lang['uploadxss'] = 'The upload was blocked for possibly malicious content.';
-$lang['uploadsize'] = 'The uploaded file was too big. (max. %s)';
-$lang['deletesucc'] = 'The file "%s" has been deleted.';
-$lang['deletefail'] = '"%s" couldn\'t be deleted - check permissions.';
-$lang['mediainuse'] = 'The file "%s" hasn\'t been deleted - it is still in use.';
-$lang['namespaces'] = 'Namespaces';
-$lang['mediafiles'] = 'Available files in';
-$lang['accessdenied'] = 'You are not allowed to view this page.';
-
-$lang['js']['searchmedia'] = 'Search for files';
-$lang['js']['keepopen'] = 'Keep window open on selection';
-$lang['js']['hidedetails'] = 'Hide Details';
-$lang['mediausage'] = 'Use the following syntax to reference this file:';
-$lang['mediaview'] = 'View original file';
-$lang['mediaroot'] = 'root';
-$lang['mediaupload'] = 'Upload a file to the current namespace here. To create subnamespaces, prepend them to your "Upload as" filename separated by colons.';
-$lang['mediaextchange'] = 'Filextension changed from .%s to .%s!';
-
-$lang['js']['mediatitle'] = 'Link settings';
-$lang['js']['mediadisplay'] = 'Link type';
-$lang['js']['mediaalign'] = 'Alignment';
-$lang['js']['mediasize'] = 'Image size';
-$lang['js']['mediatarget'] = 'Link target';
-$lang['js']['mediaclose'] = 'Close';
-$lang['js']['mediainsert'] = 'Insert';
-$lang['js']['mediadisplayimg'] = 'Show the image.';
-$lang['js']['mediadisplaylnk'] = 'Show only the link.';
-$lang['js']['mediasmall'] = 'Small version';
-$lang['js']['mediamedium'] = 'Medium version';
-$lang['js']['medialarge'] = 'Large version';
-$lang['js']['mediaoriginal'] = 'Original version';
-$lang['js']['medialnk'] = 'Link to detail page';
-$lang['js']['mediadirect'] = 'Direct link to original';
-$lang['js']['medianolnk'] = 'No link';
-$lang['js']['medianolink'] = 'Do not link the image';
-$lang['js']['medialeft'] = 'Align the image on the left.';
-$lang['js']['mediaright'] = 'Align the image on the right.';
-$lang['js']['mediacenter'] = 'Align the image in the middle.';
-$lang['js']['medianoalign'] = 'Use no align.';
-
-$lang['reference'] = 'References for';
-$lang['ref_inuse'] = 'The file can\'t be deleted, because it\'s still used by the following pages:';
-$lang['ref_hidden'] = 'Some references are on pages you don\'t have permission to read';
-
-$lang['hits'] = 'Hits';
-$lang['quickhits'] = 'Matching pagenames';
-$lang['toc'] = 'Table of Contents';
-$lang['current'] = 'current';
-$lang['yours'] = 'Your Version';
-$lang['diff'] = 'Show differences to current revisions';
-$lang['diff2'] = 'Show differences between selected revisions';
-$lang['difflink'] = 'Link to this comparison view';
-$lang['diff_type'] = 'View differences:';
-$lang['diff_inline']= 'Inline';
-$lang['diff_side'] = 'Side by Side';
-$lang['line'] = 'Line';
-$lang['breadcrumb'] = 'Trace';
-$lang['youarehere'] = 'You are here';
-$lang['lastmod'] = 'Last modified';
-$lang['by'] = 'by';
-$lang['deleted'] = 'removed';
-$lang['created'] = 'created';
-$lang['restored'] = 'old revision restored';
-$lang['external_edit'] = 'external edit';
-$lang['summary'] = 'Edit summary';
-$lang['noflash'] = 'The <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> is needed to display this content.';
-$lang['download'] = 'Download Snippet';
-
-$lang['mail_newpage'] = 'page added:';
-$lang['mail_changed'] = 'page changed:';
-$lang['mail_subscribe_list'] = 'pages changed in namespace:';
-$lang['mail_new_user'] = 'new user:';
-$lang['mail_upload'] = 'file uploaded:';
-
-$lang['js']['nosmblinks'] = "Linking to Windows shares only works in Microsoft Internet Explorer.\nYou still can copy and paste the link.";
-
-$lang['qb_bold'] = 'Bold Text';
-$lang['qb_italic'] = 'Italic Text';
-$lang['qb_underl'] = 'Underlined Text';
-$lang['qb_code'] = 'Code Text';
-$lang['qb_strike'] = 'Strike-through Text';
-$lang['qb_h1'] = 'Level 1 Headline';
-$lang['qb_h2'] = 'Level 2 Headline';
-$lang['qb_h3'] = 'Level 3 Headline';
-$lang['qb_h4'] = 'Level 4 Headline';
-$lang['qb_h5'] = 'Level 5 Headline';
-
-$lang['qb_h'] = 'Headline';
-$lang['qb_hs'] = 'Select Headline';
-$lang['qb_hplus'] = 'Higher Headline';
-$lang['qb_hminus'] = 'Lower Headline';
-$lang['qb_hequal'] = 'Same Level Headline';
-
-$lang['qb_link'] = 'Internal Link';
-$lang['qb_extlink'] = 'External Link';
-$lang['qb_hr'] = 'Horizontal Rule';
-$lang['qb_ol'] = 'Ordered List Item';
-$lang['qb_ul'] = 'Unordered List Item';
-$lang['qb_media'] = 'Add Images and other files';
-$lang['qb_sig'] = 'Insert Signature';
-$lang['qb_smileys'] = 'Smileys';
-$lang['qb_chars'] = 'Special Chars';
-
-$lang['upperns'] = 'jump to parent namespace';
-$lang['js']['linkwiz'] = 'Link Wizard';
-$lang['js']['linkto'] = 'Link to:';
-
-$lang['js']['del_confirm']= 'Really delete selected item(s)?';
-$lang['admin_register']= 'Add new user';
-
-$lang['metaedit'] = 'Edit Metadata';
-$lang['metasaveerr'] = 'Writing metadata failed';
-$lang['metasaveok'] = 'Metadata saved';
-$lang['img_backto'] = 'Back to';
-$lang['img_title'] = 'Title';
-$lang['img_caption'] = 'Caption';
-$lang['img_date'] = 'Date';
-$lang['img_fname'] = 'Filename';
-$lang['img_fsize'] = 'Size';
-$lang['img_artist'] = 'Photographer';
-$lang['img_copyr'] = 'Copyright';
-$lang['img_format'] = 'Format';
-$lang['img_camera'] = 'Camera';
-$lang['img_keywords']= 'Keywords';
-
-$lang['subscr_subscribe_success'] = 'Added %s to subscription list for %s';
-$lang['subscr_subscribe_error'] = 'Error adding %s to subscription list for %s';
-$lang['subscr_subscribe_noaddress']= 'There is no address associated with your login, you cannot be added to the subscription list';
-$lang['subscr_unsubscribe_success']= 'Removed %s from subscription list for %s';
-$lang['subscr_unsubscribe_error'] = 'Error removing %s from subscription list for %s';
-$lang['subscr_already_subscribed'] = '%s is already subscribed to %s';
-$lang['subscr_not_subscribed'] = '%s is not subscribed to %s';
+$lang['encoding'] = 'utf-8';
+$lang['direction'] = 'ltr';
+$lang['doublequoteopening'] = '“'; //&ldquo;
+$lang['doublequoteclosing'] = '”'; //&rdquo;
+$lang['singlequoteopening'] = '‘'; //&lsquo;
+$lang['singlequoteclosing'] = '’'; //&rsquo;
+$lang['apostrophe'] = '’'; //&rsquo;
+
+$lang['btn_edit'] = 'Edit this page';
+$lang['btn_source'] = 'Show pagesource';
+$lang['btn_show'] = 'Show page';
+$lang['btn_create'] = 'Create this page';
+$lang['btn_search'] = 'Search';
+$lang['btn_save'] = 'Save';
+$lang['btn_preview'] = 'Preview';
+$lang['btn_top'] = 'Back to top';
+$lang['btn_newer'] = '<< more recent';
+$lang['btn_older'] = 'less recent >>';
+$lang['btn_revs'] = 'Old revisions';
+$lang['btn_recent'] = 'Recent changes';
+$lang['btn_upload'] = 'Upload';
+$lang['btn_cancel'] = 'Cancel';
+$lang['btn_index'] = 'Sitemap';
+$lang['btn_secedit'] = 'Edit';
+$lang['btn_login'] = 'Login';
+$lang['btn_logout'] = 'Logout';
+$lang['btn_admin'] = 'Admin';
+$lang['btn_update'] = 'Update';
+$lang['btn_delete'] = 'Delete';
+$lang['btn_back'] = 'Back';
+$lang['btn_backlink'] = "Backlinks";
+$lang['btn_backtomedia'] = 'Back to Mediafile Selection';
+$lang['btn_subscribe'] = 'Manage Subscriptions';
+$lang['btn_profile'] = 'Update Profile';
+$lang['btn_reset'] = 'Reset';
+$lang['btn_resendpwd'] = 'Send new password';
+$lang['btn_draft'] = 'Edit draft';
+$lang['btn_recover'] = 'Recover draft';
+$lang['btn_draftdel'] = 'Delete draft';
+$lang['btn_revert'] = 'Restore';
+$lang['btn_register'] = 'Register';
+$lang['btn_apply'] = 'Apply';
+$lang['btn_media'] = 'Media Manager';
+
+$lang['loggedinas'] = 'Logged in as';
+$lang['user'] = 'Username';
+$lang['pass'] = 'Password';
+$lang['newpass'] = 'New password';
+$lang['oldpass'] = 'Confirm current password';
+$lang['passchk'] = 'once again';
+$lang['remember'] = 'Remember me';
+$lang['fullname'] = 'Real name';
+$lang['email'] = 'E-Mail';
+$lang['profile'] = 'User Profile';
+$lang['badlogin'] = 'Sorry, username or password was wrong.';
+$lang['minoredit'] = 'Minor Changes';
+$lang['draftdate'] = 'Draft autosaved on'; // full dformat date will be added
+$lang['nosecedit'] = 'The page was changed in the meantime, section info was out of date loaded full page instead.';
+
+$lang['regmissing'] = 'Sorry, you must fill in all fields.';
+$lang['reguexists'] = 'Sorry, a user with this login already exists.';
+$lang['regsuccess'] = 'The user has been created and the password was sent by email.';
+$lang['regsuccess2'] = 'The user has been created.';
+$lang['regmailfail'] = 'Looks like there was an error on sending the password mail. Please contact the admin!';
+$lang['regbadmail'] = 'The given email address looks invalid - if you think this is an error, contact the admin';
+$lang['regbadpass'] = 'The two given passwords are not identical, please try again.';
+$lang['regpwmail'] = 'Your DokuWiki password';
+$lang['reghere'] = 'You don\'t have an account yet? Just get one';
+
+$lang['profna'] = 'This wiki does not support profile modification';
+$lang['profnochange'] = 'No changes, nothing to do.';
+$lang['profnoempty'] = 'An empty name or email address is not allowed.';
+$lang['profchanged'] = 'User profile successfully updated.';
+
+$lang['pwdforget'] = 'Forgotten your password? Get a new one';
+$lang['resendna'] = 'This wiki does not support password resending.';
+$lang['resendpwd'] = 'Send new password for';
+$lang['resendpwdmissing'] = 'Sorry, you must fill in all fields.';
+$lang['resendpwdnouser'] = 'Sorry, we can\'t find this user in our database.';
+$lang['resendpwdbadauth'] = 'Sorry, this auth code is not valid. Make sure you used the complete confirmation link.';
+$lang['resendpwdconfirm'] = 'A confirmation link has been sent by email.';
+$lang['resendpwdsuccess'] = 'Your new password has been sent by email.';
+
+$lang['license'] = 'Except where otherwise noted, content on this wiki is licensed under the following license:';
+$lang['licenseok'] = 'Note: By editing this page you agree to license your content under the following license:';
+
+$lang['searchmedia'] = 'Search file name:';
+$lang['searchmedia_in'] = 'Search in %s';
+$lang['txt_upload'] = 'Select file to upload';
+$lang['txt_filename'] = 'Upload as (optional)';
+$lang['txt_overwrt'] = 'Overwrite existing file';
+$lang['lockedby'] = 'Currently locked by';
+$lang['lockexpire'] = 'Lock expires at';
+
+$lang['js']['willexpire'] = 'Your lock for editing this page is about to expire in a minute.\nTo avoid conflicts use the preview button to reset the locktimer.';
+$lang['js']['notsavedyet'] = 'Unsaved changes will be lost.';
+$lang['js']['searchmedia'] = 'Search for files';
+$lang['js']['keepopen'] = 'Keep window open on selection';
+$lang['js']['hidedetails'] = 'Hide Details';
+$lang['js']['mediatitle'] = 'Link settings';
+$lang['js']['mediadisplay'] = 'Link type';
+$lang['js']['mediaalign'] = 'Alignment';
+$lang['js']['mediasize'] = 'Image size';
+$lang['js']['mediatarget'] = 'Link target';
+$lang['js']['mediaclose'] = 'Close';
+$lang['js']['mediainsert'] = 'Insert';
+$lang['js']['mediadisplayimg'] = 'Show the image.';
+$lang['js']['mediadisplaylnk'] = 'Show only the link.';
+$lang['js']['mediasmall'] = 'Small version';
+$lang['js']['mediamedium'] = 'Medium version';
+$lang['js']['medialarge'] = 'Large version';
+$lang['js']['mediaoriginal'] = 'Original version';
+$lang['js']['medialnk'] = 'Link to detail page';
+$lang['js']['mediadirect'] = 'Direct link to original';
+$lang['js']['medianolnk'] = 'No link';
+$lang['js']['medianolink'] = 'Do not link the image';
+$lang['js']['medialeft'] = 'Align the image on the left.';
+$lang['js']['mediaright'] = 'Align the image on the right.';
+$lang['js']['mediacenter'] = 'Align the image in the middle.';
+$lang['js']['medianoalign'] = 'Use no align.';
+$lang['js']['nosmblinks'] = 'Linking to Windows shares only works in Microsoft Internet Explorer.\nYou still can copy and paste the link.';
+$lang['js']['linkwiz'] = 'Link Wizard';
+$lang['js']['linkto'] = 'Link to:';
+$lang['js']['del_confirm'] = 'Really delete selected item(s)?';
+$lang['js']['restore_confirm'] = 'Really restore this version?';
+$lang['js']['media_diff'] = 'View differences:';
+$lang['js']['media_diff_both'] = 'Side by Side';
+$lang['js']['media_diff_opacity'] = 'Shine-through';
+$lang['js']['media_diff_portions'] = 'Swipe';
+$lang['js']['media_select'] = 'Select files…';
+$lang['js']['media_upload_btn'] = 'Upload';
+$lang['js']['media_done_btn'] = 'Done';
+$lang['js']['media_drop'] = 'Drop files here to upload';
+$lang['js']['media_cancel'] = 'remove';
+$lang['js']['media_overwrt'] = 'Overwrite existing files';
+
+$lang['rssfailed'] = 'An error occurred while fetching this feed: ';
+$lang['nothingfound'] = 'Nothing was found.';
+
+$lang['mediaselect'] = 'Media Files';
+$lang['fileupload'] = 'Media File Upload';
+$lang['uploadsucc'] = 'Upload successful';
+$lang['uploadfail'] = 'Upload failed. Maybe wrong permissions?';
+$lang['uploadwrong'] = 'Upload denied. This file extension is forbidden!';
+$lang['uploadexist'] = 'File already exists. Nothing done.';
+$lang['uploadbadcontent'] = 'The uploaded content did not match the %s file extension.';
+$lang['uploadspam'] = 'The upload was blocked by the spam blacklist.';
+$lang['uploadxss'] = 'The upload was blocked for possibly malicious content.';
+$lang['uploadsize'] = 'The uploaded file was too big. (max. %s)';
+$lang['deletesucc'] = 'The file "%s" has been deleted.';
+$lang['deletefail'] = '"%s" couldn\'t be deleted - check permissions.';
+$lang['mediainuse'] = 'The file "%s" hasn\'t been deleted - it is still in use.';
+$lang['namespaces'] = 'Namespaces';
+$lang['mediafiles'] = 'Available files in';
+$lang['accessdenied'] = 'You are not allowed to view this page.';
+$lang['mediausage'] = 'Use the following syntax to reference this file:';
+$lang['mediaview'] = 'View original file';
+$lang['mediaroot'] = 'root';
+$lang['mediaupload'] = 'Upload a file to the current namespace here. To create subnamespaces, prepend them to your "Upload as" filename separated by colons. Files also can be selected by drag and drop.';
+$lang['mediaextchange'] = 'Filextension changed from .%s to .%s!';
+$lang['reference'] = 'References for';
+$lang['ref_inuse'] = 'The file can\'t be deleted, because it\'s still used by the following pages:';
+$lang['ref_hidden'] = 'Some references are on pages you don\'t have permission to read';
+
+$lang['hits'] = 'Hits';
+$lang['quickhits'] = 'Matching pagenames';
+$lang['toc'] = 'Table of Contents';
+$lang['current'] = 'current';
+$lang['yours'] = 'Your Version';
+$lang['diff'] = 'Show differences to current revisions';
+$lang['diff2'] = 'Show differences between selected revisions';
+$lang['difflink'] = 'Link to this comparison view';
+$lang['diff_type'] = 'View differences:';
+$lang['diff_inline'] = 'Inline';
+$lang['diff_side'] = 'Side by Side';
+$lang['line'] = 'Line';
+$lang['breadcrumb'] = 'Trace';
+$lang['youarehere'] = 'You are here';
+$lang['lastmod'] = 'Last modified';
+$lang['by'] = 'by';
+$lang['deleted'] = 'removed';
+$lang['created'] = 'created';
+$lang['restored'] = 'old revision restored';
+$lang['external_edit'] = 'external edit';
+$lang['summary'] = 'Edit summary';
+$lang['noflash'] = 'The <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> is needed to display this content.';
+$lang['download'] = 'Download Snippet';
+
+$lang['mail_newpage'] = 'page added:';
+$lang['mail_changed'] = 'page changed:';
+$lang['mail_subscribe_list'] = 'pages changed in namespace:';
+$lang['mail_new_user'] = 'new user:';
+$lang['mail_upload'] = 'file uploaded:';
+
+$lang['changes_type'] = 'View changes of';
+$lang['pages_changes'] = 'Pages';
+$lang['media_changes'] = 'Media files';
+$lang['both_changes'] = 'Both pages and media files';
+
+$lang['qb_bold'] = 'Bold Text';
+$lang['qb_italic'] = 'Italic Text';
+$lang['qb_underl'] = 'Underlined Text';
+$lang['qb_code'] = 'Code Text';
+$lang['qb_strike'] = 'Strike-through Text';
+$lang['qb_h1'] = 'Level 1 Headline';
+$lang['qb_h2'] = 'Level 2 Headline';
+$lang['qb_h3'] = 'Level 3 Headline';
+$lang['qb_h4'] = 'Level 4 Headline';
+$lang['qb_h5'] = 'Level 5 Headline';
+$lang['qb_h'] = 'Headline';
+$lang['qb_hs'] = 'Select Headline';
+$lang['qb_hplus'] = 'Higher Headline';
+$lang['qb_hminus'] = 'Lower Headline';
+$lang['qb_hequal'] = 'Same Level Headline';
+$lang['qb_link'] = 'Internal Link';
+$lang['qb_extlink'] = 'External Link';
+$lang['qb_hr'] = 'Horizontal Rule';
+$lang['qb_ol'] = 'Ordered List Item';
+$lang['qb_ul'] = 'Unordered List Item';
+$lang['qb_media'] = 'Add Images and other files';
+$lang['qb_sig'] = 'Insert Signature';
+$lang['qb_smileys'] = 'Smileys';
+$lang['qb_chars'] = 'Special Chars';
+
+$lang['upperns'] = 'jump to parent namespace';
+
+$lang['admin_register'] = 'Add new user';
+
+$lang['metaedit'] = 'Edit Metadata';
+$lang['metasaveerr'] = 'Writing metadata failed';
+$lang['metasaveok'] = 'Metadata saved';
+$lang['img_backto'] = 'Back to';
+$lang['img_title'] = 'Title';
+$lang['img_caption'] = 'Caption';
+$lang['img_date'] = 'Date';
+$lang['img_fname'] = 'Filename';
+$lang['img_fsize'] = 'Size';
+$lang['img_artist'] = 'Photographer';
+$lang['img_copyr'] = 'Copyright';
+$lang['img_format'] = 'Format';
+$lang['img_camera'] = 'Camera';
+$lang['img_keywords'] = 'Keywords';
+$lang['img_width'] = 'Width';
+$lang['img_height'] = 'Height';
+$lang['img_manager'] = 'View in media manager';
+
+$lang['subscr_subscribe_success'] = 'Added %s to subscription list for %s';
+$lang['subscr_subscribe_error'] = 'Error adding %s to subscription list for %s';
+$lang['subscr_subscribe_noaddress'] = 'There is no address associated with your login, you cannot be added to the subscription list';
+$lang['subscr_unsubscribe_success'] = 'Removed %s from subscription list for %s';
+$lang['subscr_unsubscribe_error'] = 'Error removing %s from subscription list for %s';
+$lang['subscr_already_subscribed'] = '%s is already subscribed to %s';
+$lang['subscr_not_subscribed'] = '%s is not subscribed to %s';
// Manage page for subscriptions
-$lang['subscr_m_not_subscribed'] = 'You are currently not subscribed to the current page or namespace.';
-$lang['subscr_m_new_header'] = 'Add subscription';
-$lang['subscr_m_current_header'] = 'Current subscriptions';
-$lang['subscr_m_unsubscribe'] = 'Unsubscribe';
-$lang['subscr_m_subscribe'] = 'Subscribe';
-$lang['subscr_m_receive'] = 'Receive';
-$lang['subscr_style_every'] = 'email on every change';
-$lang['subscr_style_digest'] = 'digest email of changes for each page (every %.2f days)';
-$lang['subscr_style_list'] = 'list of changed pages since last email (every %.2f days)';
-
+$lang['subscr_m_not_subscribed'] = 'You are currently not subscribed to the current page or namespace.';
+$lang['subscr_m_new_header'] = 'Add subscription';
+$lang['subscr_m_current_header'] = 'Current subscriptions';
+$lang['subscr_m_unsubscribe'] = 'Unsubscribe';
+$lang['subscr_m_subscribe'] = 'Subscribe';
+$lang['subscr_m_receive'] = 'Receive';
+$lang['subscr_style_every'] = 'email on every change';
+$lang['subscr_style_digest'] = 'digest email of changes for each page (every %.2f days)';
+$lang['subscr_style_list'] = 'list of changed pages since last email (every %.2f days)';
/* auth.class language support */
-$lang['authmodfailed'] = 'Bad user authentication configuration. Please inform your Wiki Admin.';
-$lang['authtempfail'] = 'User authentication is temporarily unavailable. If this situation persists, please inform your Wiki Admin.';
+$lang['authmodfailed'] = 'Bad user authentication configuration. Please inform your Wiki Admin.';
+$lang['authtempfail'] = 'User authentication is temporarily unavailable. If this situation persists, please inform your Wiki Admin.';
/* installer strings */
-$lang['i_chooselang'] = 'Choose your language';
-$lang['i_installer'] = 'DokuWiki Installer';
-$lang['i_wikiname'] = 'Wiki Name';
-$lang['i_enableacl'] = 'Enable ACL (recommended)';
-$lang['i_superuser'] = 'Superuser';
-$lang['i_problems'] = 'The installer found some problems, indicated below. You can not continue until you have fixed them.';
-$lang['i_modified'] = 'For security reasons this script will only work with a new and unmodified Dokuwiki installation.
- You should either re-extract the files from the downloaded package or consult the complete
- <a href="http://dokuwiki.org/install">Dokuwiki installation instructions</a>';
-$lang['i_funcna'] = 'PHP function <code>%s</code> is not available. Maybe your hosting provider disabled it for some reason?';
-$lang['i_phpver'] = 'Your PHP version <code>%s</code> is lower than the needed <code>%s</code>. You need to upgrade your PHP install.';
-$lang['i_permfail'] = '<code>%s</code> is not writable by DokuWiki. You need to fix the permission settings of this directory!';
-$lang['i_confexists'] = '<code>%s</code> already exists';
-$lang['i_writeerr'] = 'Unable to create <code>%s</code>. You will need to check directory/file permissions and create the file manually.';
-$lang['i_badhash'] = 'unrecognised or modified dokuwiki.php (hash=<code>%s</code>)';
-$lang['i_badval'] = '<code>%s</code> - illegal or empty value';
-$lang['i_success'] = 'The configuration was finished successfully. You may delete the install.php file now. Continue to
- <a href="doku.php">your new DokuWiki</a>.';
-$lang['i_failure'] = 'Some errors occurred while writing the configuration files. You may need to fix them manually before
- you can use <a href="doku.php">your new DokuWiki</a>.';
-$lang['i_policy'] = 'Initial ACL policy';
-$lang['i_pol0'] = 'Open Wiki (read, write, upload for everyone)';
-$lang['i_pol1'] = 'Public Wiki (read for everyone, write and upload for registered users)';
-$lang['i_pol2'] = 'Closed Wiki (read, write, upload for registered users only)';
-
-$lang['i_retry'] = 'Retry';
-$lang['i_license'] = 'Please choose the license you want to put your content under:';
-
-$lang['mu_intro'] = 'Here you can upload multiple files at once. Click the browse button to add them to the queue. Press upload when done.';
-$lang['js']['mu_btn'] = 'Upload multiple files at once';
-$lang['mu_gridname'] = 'Filename';
-$lang['mu_gridsize'] = 'Size';
-$lang['mu_gridstat'] = 'Status';
-$lang['mu_namespace'] = 'Namespace';
-$lang['mu_browse'] = 'Browse';
-$lang['mu_toobig'] = 'too big';
-$lang['mu_ready'] = 'ready for upload';
-$lang['mu_done'] = 'complete';
-$lang['mu_fail'] = 'failed';
-$lang['mu_authfail'] = 'session expired';
-$lang['mu_progress'] = '@PCT@% uploaded';
-$lang['mu_filetypes'] = 'Allowed Filetypes';
-$lang['mu_info'] = 'files uploaded.';
-$lang['mu_lasterr'] = 'Last error:';
-
-$lang['recent_global'] = 'You\'re currently watching the changes inside the <b>%s</b> namespace. You can also <a href="%s">view the recent changes of the whole wiki</a>.';
-
-$lang['years'] = '%d years ago';
-$lang['months'] = '%d months ago';
-$lang['weeks'] = '%d weeks ago';
-$lang['days'] = '%d days ago';
-$lang['hours'] = '%d hours ago';
-$lang['minutes'] = '%d minutes ago';
-$lang['seconds'] = '%d seconds ago';
-
-$lang['wordblock'] = 'Your change was not saved because it contains blocked text (spam).';
-
+$lang['i_chooselang'] = 'Choose your language';
+$lang['i_installer'] = 'DokuWiki Installer';
+$lang['i_wikiname'] = 'Wiki Name';
+$lang['i_enableacl'] = 'Enable ACL (recommended)';
+$lang['i_superuser'] = 'Superuser';
+$lang['i_problems'] = 'The installer found some problems, indicated below. You can not continue until you have fixed them.';
+$lang['i_modified'] = 'For security reasons this script will only work with a new and unmodified Dokuwiki installation.
+ You should either re-extract the files from the downloaded package or consult the complete
+ <a href="http://dokuwiki.org/install">Dokuwiki installation instructions</a>';
+$lang['i_funcna'] = 'PHP function <code>%s</code> is not available. Maybe your hosting provider disabled it for some reason?';
+$lang['i_phpver'] = 'Your PHP version <code>%s</code> is lower than the needed <code>%s</code>. You need to upgrade your PHP install.';
+$lang['i_permfail'] = '<code>%s</code> is not writable by DokuWiki. You need to fix the permission settings of this directory!';
+$lang['i_confexists'] = '<code>%s</code> already exists';
+$lang['i_writeerr'] = 'Unable to create <code>%s</code>. You will need to check directory/file permissions and create the file manually.';
+$lang['i_badhash'] = 'unrecognised or modified dokuwiki.php (hash=<code>%s</code>)';
+$lang['i_badval'] = '<code>%s</code> - illegal or empty value';
+$lang['i_success'] = 'The configuration was finished successfully. You may delete the install.php file now. Continue to
+ <a href="doku.php">your new DokuWiki</a>.';
+$lang['i_failure'] = 'Some errors occurred while writing the configuration files. You may need to fix them manually before
+ you can use <a href="doku.php">your new DokuWiki</a>.';
+$lang['i_policy'] = 'Initial ACL policy';
+$lang['i_pol0'] = 'Open Wiki (read, write, upload for everyone)';
+$lang['i_pol1'] = 'Public Wiki (read for everyone, write and upload for registered users)';
+$lang['i_pol2'] = 'Closed Wiki (read, write, upload for registered users only)';
+$lang['i_retry'] = 'Retry';
+$lang['i_license'] = 'Please choose the license you want to put your content under:';
+
+$lang['mu_intro'] = 'Here you can upload multiple files at once. Click the browse button to add them to the queue. Press upload when done.';
+$lang['mu_gridname'] = 'Filename';
+$lang['mu_gridsize'] = 'Size';
+$lang['mu_gridstat'] = 'Status';
+$lang['mu_namespace'] = 'Namespace';
+$lang['mu_browse'] = 'Browse';
+$lang['mu_toobig'] = 'too big';
+$lang['mu_ready'] = 'ready for upload';
+$lang['mu_done'] = 'complete';
+$lang['mu_fail'] = 'failed';
+$lang['mu_authfail'] = 'session expired';
+$lang['mu_progress'] = '@PCT@% uploaded';
+$lang['mu_filetypes'] = 'Allowed Filetypes';
+$lang['mu_info'] = 'files uploaded.';
+$lang['mu_lasterr'] = 'Last error:';
+
+$lang['recent_global'] = 'You\'re currently watching the changes inside the <b>%s</b> namespace. You can also <a href="%s">view the recent changes of the whole wiki</a>.';
+$lang['years'] = '%d years ago';
+$lang['months'] = '%d months ago';
+$lang['weeks'] = '%d weeks ago';
+$lang['days'] = '%d days ago';
+$lang['hours'] = '%d hours ago';
+$lang['minutes'] = '%d minutes ago';
+$lang['seconds'] = '%d seconds ago';
+
+$lang['wordblock'] = 'Your change was not saved because it contains blocked text (spam).';
+
+$lang['media_uploadtab'] = 'Upload';
+$lang['media_searchtab'] = 'Search';
+$lang['media_file'] = 'File';
+$lang['media_viewtab'] = 'View';
+$lang['media_edittab'] = 'Edit';
+$lang['media_historytab'] = 'History';
+$lang['media_list_thumbs'] = 'Thumbnails';
+$lang['media_list_rows'] = 'Rows';
+$lang['media_sort_name'] = 'Name';
+$lang['media_sort_date'] = 'Date';
+$lang['media_namespaces'] = 'Choose namespace';
+$lang['media_files'] = 'Files in %s';
+$lang['media_upload'] = 'Upload to %s';
+$lang['media_search'] = 'Search in %s';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s at %s';
+$lang['media_edit'] = 'Edit %s';
+$lang['media_history'] = 'History of %s';
+$lang['media_meta_edited'] = 'metadata edited';
+$lang['media_perm_read'] = 'Sorry, you don\'t have enough rights to read files.';
+$lang['media_perm_upload'] = 'Sorry, you don\'t have enough rights to upload files.';
+$lang['media_update'] = 'Upload new version';
+$lang['media_restore'] = 'Restore this version';
+
+$lang['plugin_install_err'] = "Plugin installed incorrectly. Rename plugin directory '%s' to '%s'.";
//Setup VIM: ex: et ts=2 :
diff --git a/inc/lang/en/uploadmail.txt b/inc/lang/en/uploadmail.txt
index 6fa196730..16bb6989c 100644
--- a/inc/lang/en/uploadmail.txt
+++ b/inc/lang/en/uploadmail.txt
@@ -1,6 +1,7 @@
A file was uploaded to your DokuWiki. Here are the details:
File : @MEDIA@
+Old revision: @OLD@
Date : @DATE@
Browser : @BROWSER@
IP-Address : @IPADDRESS@
diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php
index 4bb1c005d..8a15981ee 100644
--- a/inc/lang/eo/lang.php
+++ b/inc/lang/eo/lang.php
@@ -9,6 +9,7 @@
* @author Felipe Castro <fefcas@gmail.com>
* @author Robert Bogenschneider <robog@gmx.de>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
+ * @author Robert BOGENSCHNEIDER <bogi@UEA.org>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -50,6 +51,8 @@ $lang['btn_recover'] = 'Restarigi skizon';
$lang['btn_draftdel'] = 'Forigi skizon';
$lang['btn_revert'] = 'Restarigi';
$lang['btn_register'] = 'Registriĝi';
+$lang['btn_apply'] = 'Apliki';
+$lang['btn_media'] = 'Media-administrilo';
$lang['loggedinas'] = 'Ensalutita kiel';
$lang['user'] = 'Uzant-nomo';
$lang['pass'] = 'Pasvorto';
@@ -94,7 +97,7 @@ $lang['txt_filename'] = 'Alŝuti kiel (laŭvole)';
$lang['txt_overwrt'] = 'Anstataŭigi ekzistantan dosieron';
$lang['lockedby'] = 'Nune ŝlosita de';
$lang['lockexpire'] = 'Ŝlosado ĉesos en';
-$lang['willexpire'] = 'Vi povos redakti ĉi tiun paĝon post unu minuto.\nSe vi volas nuligi tempkontrolon de la ŝlosado, do premu butonon "Antaŭrigardi".';
+$lang['js']['willexpire'] = 'Vi povos redakti ĉi tiun paĝon post unu minuto.\nSe vi volas nuligi tempkontrolon de la ŝlosado, do premu butonon "Antaŭrigardi".';
$lang['js']['notsavedyet'] = 'Ne konservitaj modifoj perdiĝos.
Ĉu vi certe volas daŭrigi la procezon?';
$lang['js']['searchmedia'] = 'Serĉi dosierojn';
@@ -126,7 +129,17 @@ Vi ankoraŭ povas kopii kaj almeti la ligilon.';
$lang['js']['linkwiz'] = 'Ligil-Asistanto';
$lang['js']['linkto'] = 'Ligilo al:';
$lang['js']['del_confirm'] = 'Ĉu vere forigi elektitajn ero(j)n?';
-$lang['js']['mu_btn'] = 'Alŝuti plurajn dosierojn multope.';
+$lang['js']['restore_confirm'] = 'Ĉu vere restarigi ĉi tiun version?';
+$lang['js']['media_diff'] = 'Rigardu la diferencojn:';
+$lang['js']['media_diff_both'] = 'Flankon apud flanko';
+$lang['js']['media_diff_opacity'] = 'Unu super la alia';
+$lang['js']['media_diff_portions'] = 'Ŝovilo';
+$lang['js']['media_select'] = 'Elektu dosierojn...';
+$lang['js']['media_upload_btn'] = 'Alŝuto';
+$lang['js']['media_done_btn'] = 'Finita';
+$lang['js']['media_drop'] = 'Demetu ĉi-tien por alŝuti';
+$lang['js']['media_cancel'] = 'forigi';
+$lang['js']['media_overwrt'] = 'Anstataûi ekzistantajn dosierojn';
$lang['rssfailed'] = 'Okazis eraro dum ricevado de la novaĵ-fluo: ';
$lang['nothingfound'] = 'Ankoraŭ nenio troviĝas tie ĉi.';
$lang['mediaselect'] = 'Elekto de aŭdvidaĵa dosiero';
@@ -181,6 +194,10 @@ $lang['mail_changed'] = 'paĝo modifita:';
$lang['mail_subscribe_list'] = 'ŝanĝitaj paĝoj en nomspaco:';
$lang['mail_new_user'] = 'Nova uzanto:';
$lang['mail_upload'] = 'dosiero alŝutita:';
+$lang['changes_type'] = 'Rigardi ŝanĝojn de';
+$lang['pages_changes'] = 'Paĝoj';
+$lang['media_changes'] = 'Mediaj dosieroj';
+$lang['both_changes'] = 'Ambaû - paĝojn kaj mediajn dosierojn';
$lang['qb_bold'] = 'Dika teksto';
$lang['qb_italic'] = 'Dekliva teksto';
$lang['qb_underl'] = 'Substrekita teksto';
@@ -221,6 +238,9 @@ $lang['img_copyr'] = 'Kopirajtoj';
$lang['img_format'] = 'Formato';
$lang['img_camera'] = 'Kamerao';
$lang['img_keywords'] = 'Ŝlosilvortoj';
+$lang['img_width'] = 'Larĝeco';
+$lang['img_height'] = 'Alteco';
+$lang['img_manager'] = 'Rigardi en media-administrilo';
$lang['subscr_subscribe_success'] = 'Aldonis %s al la abonlisto por %s';
$lang['subscr_subscribe_error'] = 'Eraro dum aldono de %s al la abonlisto por %s';
$lang['subscr_subscribe_noaddress'] = 'Ne estas adreso ligita al via ensaluto, ne eblas aldoni vin al la abonlisto';
@@ -286,3 +306,23 @@ $lang['hours'] = 'antaŭ %d horoj';
$lang['minutes'] = 'antaŭ %d minutoj';
$lang['seconds'] = 'antaŭ %d sekundoj';
$lang['wordblock'] = 'Via ŝanĝo ne estis savita, ĉar ĝi enhavas blokitan tekston (spamon).';
+$lang['media_uploadtab'] = 'Alŝuto';
+$lang['media_searchtab'] = 'Serĉo';
+$lang['media_viewtab'] = 'Rigardi';
+$lang['media_edittab'] = 'Modifi';
+$lang['media_historytab'] = 'Historio';
+$lang['media_thumbsview'] = 'Bildetoj';
+$lang['media_listview'] = 'Listigi';
+$lang['media_sort'] = 'Sorti';
+$lang['media_sort_name'] = 'per nomo';
+$lang['media_sort_date'] = 'per dato';
+$lang['media_upload'] = 'Alŝuti al la nomspaco <strong>%s</strong>.';
+$lang['media_search'] = 'Serĉi en la nomspaco <strong>%s</strong>.';
+$lang['media_edit'] = 'Modifi';
+$lang['media_history'] = 'Tiuj estas la pli malnovaj revizioj de la dosiero.';
+$lang['media_meta_edited'] = 'metadatumoj ŝanĝitaj';
+$lang['media_perm_read'] = 'Bedaûrinde viaj rajtoj ne sufiĉas por legi dosierojn.';
+$lang['media_perm_upload'] = 'Bedaûrinde viaj rajtoj ne sufiĉas por alŝuti dosierojn.';
+$lang['media_update'] = 'Alŝuti novan version';
+$lang['media_restore'] = 'Restarigi ĉi tiun version';
+$lang['plugin_install_err'] = 'Kromaĵo instalita malĝuste. Renomu la kromaĵan dosierujon \'%s\' al \'%s\'.';
diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php
index aad93c075..5164c3243 100644
--- a/inc/lang/es/lang.php
+++ b/inc/lang/es/lang.php
@@ -24,6 +24,8 @@
* @author Victor Castelan <victorcastelan@gmail.com>
* @author Mauro Javier Giamberardino <mgiamberardino@gmail.com>
* @author emezeta <emezeta@infoprimo.com>
+ * @author Oscar Ciudad <oscar@jacho.net>
+ * @author Ruben Figols <ruben.figols@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -65,6 +67,8 @@ $lang['btn_recover'] = 'Recuperar borrador';
$lang['btn_draftdel'] = 'Eliminar borrador';
$lang['btn_revert'] = 'Restaurar';
$lang['btn_register'] = 'Registrarse';
+$lang['btn_apply'] = 'Aplicar';
+$lang['btn_media'] = 'Gestor de ficheros';
$lang['loggedinas'] = 'Conectado como ';
$lang['user'] = 'Usuario';
$lang['pass'] = 'Contraseña';
@@ -109,7 +113,7 @@ $lang['txt_filename'] = 'Subir como (opcional)';
$lang['txt_overwrt'] = 'Sobreescribir archivo existente';
$lang['lockedby'] = 'Actualmente bloqueado por';
$lang['lockexpire'] = 'El bloqueo expira en';
-$lang['willexpire'] = 'Tu bloqueo para editar esta página expira en un minuto.\nPara evitar conflictos usa el botón previsualizar para reiniciar el contador de tiempo.';
+$lang['js']['willexpire'] = 'El bloqueo para la edición de esta página expira en un minuto.\nPAra prevenir conflictos uso el botón Previsualizar para restaurar el contador de bloqueo.';
$lang['js']['notsavedyet'] = 'Los cambios que no se han guardado se perderán.
¿Realmente quieres continuar?';
$lang['js']['searchmedia'] = 'Buscar archivos';
@@ -141,7 +145,17 @@ Lo que sí puedes hacer es copiar y pegar el enlace.';
$lang['js']['linkwiz'] = 'Asistente de enlaces';
$lang['js']['linkto'] = 'Enlazar a:';
$lang['js']['del_confirm'] = '¿Quieres realmente borrar lo seleccionado?';
-$lang['js']['mu_btn'] = 'Subir varios archivos a la vez';
+$lang['js']['restore_confirm'] = '¿Estás seguro de querer restaurar esta versión?';
+$lang['js']['media_diff'] = 'Ver diferencias:';
+$lang['js']['media_diff_both'] = 'Lado por lado';
+$lang['js']['media_diff_opacity'] = 'A través de Shine';
+$lang['js']['media_diff_portions'] = 'Pasar';
+$lang['js']['media_select'] = 'Seleccionar ficheros';
+$lang['js']['media_upload_btn'] = 'Cargar';
+$lang['js']['media_done_btn'] = 'Hecho';
+$lang['js']['media_drop'] = 'Arrastra los ficheros aquí para cargar';
+$lang['js']['media_cancel'] = 'Eliminar';
+$lang['js']['media_overwrt'] = 'Sobreescribir ficheros exitentes';
$lang['rssfailed'] = 'Se ha producido un error mientras se leían los datos de este feed: ';
$lang['nothingfound'] = 'No se ha encontrado nada.';
$lang['mediaselect'] = 'Archivos Multimedia';
@@ -196,6 +210,10 @@ $lang['mail_changed'] = 'página cambiada:';
$lang['mail_subscribe_list'] = 'páginas cambiadas en el espacio de nombre:';
$lang['mail_new_user'] = 'nuevo usuario:';
$lang['mail_upload'] = 'archivo subido:';
+$lang['changes_type'] = 'Ver cambios de';
+$lang['pages_changes'] = 'Páginas';
+$lang['media_changes'] = 'Archivos multimedia';
+$lang['both_changes'] = 'Ambas páginas y archivos multimedia';
$lang['qb_bold'] = 'Negrita';
$lang['qb_italic'] = 'Itálica';
$lang['qb_underl'] = 'Subrayado';
@@ -236,6 +254,9 @@ $lang['img_copyr'] = 'Copyright';
$lang['img_format'] = 'Formato';
$lang['img_camera'] = 'Cámara';
$lang['img_keywords'] = 'Palabras claves';
+$lang['img_width'] = 'Ancho';
+$lang['img_height'] = 'Alto';
+$lang['img_manager'] = 'Ver en el Administrador de medios';
$lang['subscr_subscribe_success'] = 'Se agregó %s a las listas de suscripción para %s';
$lang['subscr_subscribe_error'] = 'Error al agregar %s a las listas de suscripción para %s';
$lang['subscr_subscribe_noaddress'] = 'No hay dirección asociada con tu registro, no se puede agregarte a la lista de suscripción';
@@ -300,3 +321,27 @@ $lang['hours'] = '%d horas atrás';
$lang['minutes'] = '%d minutos atrás';
$lang['seconds'] = '%d segundos atrás';
$lang['wordblock'] = 'Sus cambios no se han guardado porque contienen textos bloqueados (spam).';
+$lang['media_uploadtab'] = 'Cargar';
+$lang['media_searchtab'] = 'Buscar';
+$lang['media_file'] = 'Fichero';
+$lang['media_viewtab'] = 'Ver';
+$lang['media_edittab'] = 'Editar';
+$lang['media_historytab'] = 'Historial';
+$lang['media_list_thumbs'] = 'Miniaturas';
+$lang['media_list_rows'] = 'Celdas';
+$lang['media_sort_name'] = 'Nombre';
+$lang['media_sort_date'] = 'Fecha';
+$lang['media_namespaces'] = 'Escoge "espacio de nombre"';
+$lang['media_files'] = 'Ficheros en %s';
+$lang['media_upload'] = 'Cargar a %s';
+$lang['media_search'] = 'Buscar en %s';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s en %s';
+$lang['media_edit'] = 'Editar %s';
+$lang['media_history'] = 'Historial de %s';
+$lang['media_meta_edited'] = 'Metadatos editados';
+$lang['media_perm_read'] = 'Disculpa, no tienes los permisos necesarios para leer ficheros.';
+$lang['media_perm_upload'] = 'Disculpa, no tienes los permisos necesarios para cargar ficheros.';
+$lang['media_update'] = 'Actualizar nueva versión';
+$lang['media_restore'] = 'Restaurar esta versión';
+$lang['plugin_install_err'] = 'Plugin instalado incorrectamente. Renombra el directorio de plugins \'%s\' to \'%s\'.';
diff --git a/inc/lang/et/lang.php b/inc/lang/et/lang.php
index c7060ebca..6cd2f437d 100644
--- a/inc/lang/et/lang.php
+++ b/inc/lang/et/lang.php
@@ -7,6 +7,7 @@
* @author Aari Juhanson <aari@vmg.vil.ee>
* @author Kaiko Kaur <kaiko@kultuur.edu.ee>
* @author kristian.kankainen@kuu.la
+ * @author Rivo Zängov <eraser@eraser.ee>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -14,6 +15,7 @@ $lang['doublequoteopening'] = '„';
$lang['doublequoteclosing'] = '“';
$lang['singlequoteopening'] = '‚';
$lang['singlequoteclosing'] = '‘';
+$lang['apostrophe'] = '\'';
$lang['btn_edit'] = 'Toimeta seda lehte';
$lang['btn_source'] = 'Näita lehepõhja';
$lang['btn_show'] = 'Näita lehte';
@@ -36,6 +38,7 @@ $lang['btn_admin'] = 'Administreeri';
$lang['btn_update'] = 'Uuenda';
$lang['btn_delete'] = 'Kustuta';
$lang['btn_back'] = 'Tagasi';
+$lang['btn_backlink'] = 'Tagasilingid';
$lang['btn_backtomedia'] = 'Tagasi faili valikusse';
$lang['btn_subscribe'] = 'Jälgi seda lehte (teated meilile)';
$lang['btn_profile'] = 'Minu info';
@@ -89,7 +92,7 @@ $lang['txt_filename'] = 'Siseta oma Wikinimi (soovituslik)';
$lang['txt_overwrt'] = 'Kirjutan olemasoleva faili üle';
$lang['lockedby'] = 'Praegu on selle lukustanud';
$lang['lockexpire'] = 'Lukustus aegub';
-$lang['willexpire'] = 'Teie lukustus selle lehe toimetamisele aegub umbes minuti pärast.\nIgasugu probleemide vältimiseks kasuta eelvaate nuppu, et lukustusarvesti taas tööle panna.';
+$lang['js']['willexpire'] = 'Teie lukustus selle lehe toimetamisele aegub umbes minuti pärast.\nIgasugu probleemide vältimiseks kasuta eelvaate nuppu, et lukustusarvesti taas tööle panna.';
$lang['js']['notsavedyet'] = 'Sul on seal salvestamata muudatusi, mis kohe kõige kaduva teed lähevad.
Kas Sa ikka tahad edasi liikuda?';
$lang['js']['searchmedia'] = 'Otsi faile';
@@ -121,7 +124,6 @@ Siiski võid kopeerida ja asetada lingi.';
$lang['js']['linkwiz'] = 'Lingi nõustaja';
$lang['js']['linkto'] = 'Lingi:';
$lang['js']['del_confirm'] = 'Kas kustutame selle kirje?';
-$lang['js']['mu_btn'] = 'Laadi üles mittu faili';
$lang['rssfailed'] = 'Sinu soovitud info ammutamisel tekkis viga: ';
$lang['nothingfound'] = 'Oops, aga mitte muhvigi ei leitud.';
$lang['mediaselect'] = 'Hunnik faile';
@@ -143,6 +145,7 @@ $lang['mediaview'] = 'Vaata faili algsel kujul.';
$lang['mediaroot'] = 'juur';
$lang['mediaupload'] = 'Lae fail sellesse nimeruumi (kataloogi). Et tekitada veel alam nimeruum kasuta koolonit Wiki nimes.';
$lang['mediaextchange'] = 'Faili laiend .%s-st %s-ks!';
+$lang['reference'] = 'Viited';
$lang['ref_inuse'] = 'Seda faili ei saa kustutada, sest teda kasutavad järgmised lehed:';
$lang['ref_hidden'] = 'Mõned viidad failile on lehtedel, millele sul ei ole ligipääsu';
$lang['hits'] = 'Päringu tabamused';
@@ -151,6 +154,10 @@ $lang['toc'] = 'Sisujuht';
$lang['current'] = 'Hetkel kehtiv';
$lang['yours'] = 'Sinu versioon';
$lang['diff'] = 'Näita erinevusi hetkel kehtiva versiooniga';
+$lang['diff2'] = 'Näita valitud versioonide erinevusi';
+$lang['difflink'] = 'Lõlita võrdlemise vaatele';
+$lang['diff_type'] = 'Vaata erinevusi:';
+$lang['diff_side'] = 'Kõrvuti';
$lang['line'] = 'Rida';
$lang['breadcrumb'] = 'Käidud rada';
$lang['youarehere'] = 'Sa oled siin';
@@ -159,6 +166,7 @@ $lang['by'] = 'persoon';
$lang['deleted'] = 'eemaldatud';
$lang['created'] = 'tekitatud';
$lang['restored'] = 'vana versioon taastatud';
+$lang['external_edit'] = 'väline muutmine';
$lang['summary'] = 'kokkuvõte muudatustest';
$lang['mail_newpage'] = 'leht lisatud:';
$lang['mail_changed'] = 'leht muudetud';
@@ -173,6 +181,11 @@ $lang['qb_h2'] = '2. astme pealkiri';
$lang['qb_h3'] = '3. astme pealkiri';
$lang['qb_h4'] = '4. astme pealkiri';
$lang['qb_h5'] = '5. astme pealkiri';
+$lang['qb_h'] = 'Pealkiri';
+$lang['qb_hs'] = 'Vali pealkiri';
+$lang['qb_hplus'] = 'Kõrgem pealkiri';
+$lang['qb_hminus'] = 'Madalam pealkiri';
+$lang['qb_hequal'] = 'Sama taseme pealkiri';
$lang['qb_link'] = 'Siselink';
$lang['qb_extlink'] = 'Välislink';
$lang['qb_hr'] = 'Horisontaalne vahejoon';
@@ -193,6 +206,7 @@ $lang['img_date'] = 'Kuupäev';
$lang['img_fname'] = 'Faili nimi';
$lang['img_fsize'] = 'Suurus';
$lang['img_artist'] = 'Autor';
+$lang['img_copyr'] = 'Autoriõigused';
$lang['img_format'] = 'Formaat';
$lang['img_camera'] = 'Kaamera';
$lang['img_keywords'] = 'Võtmesõnad';
@@ -217,3 +231,13 @@ $lang['i_policy'] = 'Wiki õiguste algne poliitika';
$lang['i_pol0'] = 'Avatud (lugemine, kirjutamine ja üleslaadimine kõigile lubatud)';
$lang['i_pol1'] = 'Avalikuks lugemiseks (lugeda saavad kõik, kirjutada ja üles laadida vaid registreeritud kasutajad)';
$lang['i_pol2'] = 'Suletud (kõik õigused, kaasaarvatud lugemine on lubatud vaid registreeritud kasutajatele)';
+$lang['i_retry'] = 'Proovi uuesti';
+$lang['mu_gridname'] = 'Failinimi';
+$lang['mu_gridsize'] = 'Suurus';
+$lang['mu_gridstat'] = 'Staatus';
+$lang['mu_browse'] = 'Sirvi';
+$lang['mu_toobig'] = 'liiga suur';
+$lang['mu_ready'] = 'valmis üleslaadimiseks';
+$lang['mu_done'] = 'valmis';
+$lang['mu_fail'] = 'ebaõnnestus';
+$lang['mu_lasterr'] = 'Viimane viga:';
diff --git a/inc/lang/eu/lang.php b/inc/lang/eu/lang.php
index e49290e5e..d02f281c3 100644
--- a/inc/lang/eu/lang.php
+++ b/inc/lang/eu/lang.php
@@ -90,7 +90,7 @@ $lang['txt_filename'] = 'Idatzi wikiname-a (aukerazkoa)';
$lang['txt_overwrt'] = 'Oraingo fitxategiaren gainean idatzi';
$lang['lockedby'] = 'Momentu honetan blokeatzen:';
$lang['lockexpire'] = 'Blokeaketa iraungitzen da:';
-$lang['willexpire'] = 'Zure blokeaketa orri hau aldatzeko minutu batean iraungitzen da.\nGatazkak saihesteko, aurreikusi botoia erabili blokeaketa denboragailua berrabiarazteko.';
+$lang['js']['willexpire'] = 'Zure blokeaketa orri hau aldatzeko minutu batean iraungitzen da.\nGatazkak saihesteko, aurreikusi botoia erabili blokeaketa denboragailua berrabiarazteko.';
$lang['js']['notsavedyet'] = 'Gorde gabeko aldaketak galdu egingo dira.
Benetan jarraitu nahi duzu?';
$lang['js']['searchmedia'] = 'Bilatu fitxategiak';
@@ -122,7 +122,6 @@ Esteka kopiatu eta itsatsi dezakezu dena den.';
$lang['js']['linkwiz'] = 'Estekatze Laguntzailea';
$lang['js']['linkto'] = 'Estekatu hona:';
$lang['js']['del_confirm'] = 'Benetan ezabatu aukeratutako fitxategia(k)?';
-$lang['js']['mu_btn'] = 'Igo hainbat fitxategi aldi berean';
$lang['rssfailed'] = 'Errorea gertatu da feed hau irakurtzean:';
$lang['nothingfound'] = 'Ez da ezer aurkitu.';
$lang['mediaselect'] = 'Aukeratu Multimedia fitxategia';
diff --git a/inc/lang/fa/lang.php b/inc/lang/fa/lang.php
index 4b9e9daa1..ac14ce07a 100644
--- a/inc/lang/fa/lang.php
+++ b/inc/lang/fa/lang.php
@@ -97,8 +97,8 @@ $lang['txt_filename'] = 'ارسال به صورت (اختیاری)';
$lang['txt_overwrt'] = 'بر روی فایل موجود بنویس';
$lang['lockedby'] = 'در حال حاضر قفل شده است';
$lang['lockexpire'] = 'قفل منقضی شده است';
-$lang['willexpire'] = 'حالت قفل شما مدتی است منقضی شده است \n برای جلوگیری از تداخل دکمه‌ی پیش‌نمایش را برای صفر شدن ساعت قفل بزنید.';
-$lang['js']['notsavedyet'] = 'تغییرات ذخیره شده از بین خواهد رفت.
+$lang['js']['willexpire'] = 'حالت قفل شما مدتی است منقضی شده است \n برای جلوگیری از تداخل دکمه‌ی پیش‌نمایش را برای صفر شدن ساعت قفل بزنید.';
+$lang['js']['notsavedyet'] = 'تغییرات ذخیره شده از بین خواهد رفت.
می‌خواهید ادامه دهید؟';
$lang['js']['searchmedia'] = 'جستجو برای فایل';
$lang['js']['keepopen'] = 'پنجره را ر زمان انتخاب باز نگه‌دار';
@@ -129,7 +129,6 @@ $lang['js']['nosmblinks'] = 'پیوند به Windows share فقط در ای
$lang['js']['linkwiz'] = 'ویزارد پیوند';
$lang['js']['linkto'] = 'پیوند به:';
$lang['js']['del_confirm'] = 'واقعن تصمیم به حذف این موارد دارید؟';
-$lang['js']['mu_btn'] = 'ارسال هم‌زمان چندین فایل ';
$lang['rssfailed'] = 'بروز خطا در هنگام واکشی';
$lang['nothingfound'] = 'چیزی پیدا نشد';
$lang['mediaselect'] = 'فایل‌ها';
@@ -164,9 +163,9 @@ $lang['yours'] = 'نسخه‌ی شما';
$lang['diff'] = 'تفاوت‌ها را با نگارش کنونی نمایش بده.';
$lang['diff2'] = 'تفاوت‌ها را با نگارش انتخابی نمایش بده.';
$lang['difflink'] = 'پیوند به صفحه‌ی تفاوت‌ها';
-$lang['diff_type'] = 'مشاهده‌ی تفاوت‌ها';
-$lang['diff_inline'] = 'داخلی';
-$lang['diff_side'] = 'کنارهم';
+$lang['diff_type'] = 'مشاهده تغییرات:';
+$lang['diff_inline'] = 'خطی';
+$lang['diff_side'] = 'کلی';
$lang['line'] = 'خط';
$lang['breadcrumb'] = 'ردپا';
$lang['youarehere'] = 'محل شما';
diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php
index 35f7b3c09..8d671a4cb 100644
--- a/inc/lang/fi/lang.php
+++ b/inc/lang/fi/lang.php
@@ -7,6 +7,7 @@
* @author Matti Pöllä <mpo@iki.fi>
* @author Otto Vainio <otto@valjakko.net>
* @author Teemu Mattila <ghcsystems@gmail.com>
+ * @author Sami Olmari <sami@olmari.fi>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -48,6 +49,8 @@ $lang['btn_recover'] = 'Palauta luonnos';
$lang['btn_draftdel'] = 'Poista luonnos';
$lang['btn_revert'] = 'palauta';
$lang['btn_register'] = 'Rekisteröidy';
+$lang['btn_apply'] = 'Toteuta';
+$lang['btn_media'] = 'Media manager';
$lang['loggedinas'] = 'Kirjautunut nimellä';
$lang['user'] = 'Käyttäjänimi';
$lang['pass'] = 'Salasana';
@@ -92,7 +95,7 @@ $lang['txt_filename'] = 'Lähetä nimellä (valinnainen)';
$lang['txt_overwrt'] = 'Ylikirjoita olemassa oleva';
$lang['lockedby'] = 'Tällä hetkellä tiedoston on lukinnut';
$lang['lockexpire'] = 'Lukitus päättyy';
-$lang['willexpire'] = 'Lukituksesi tämän sivun muokkaukseen päättyy minuutin kuluttua.\nRistiriitojen välttämiseksi paina esikatselu-nappia nollataksesi lukitusajan.';
+$lang['js']['willexpire'] = 'Lukituksesi tämän sivun muokkaukseen päättyy minuutin kuluttua.\nRistiriitojen välttämiseksi paina esikatselu-nappia nollataksesi lukitusajan.';
$lang['js']['notsavedyet'] = 'Dokumentissa on tallentamattomia muutoksia, jotka häviävät.
Haluatko varmasti jatkaa?';
$lang['js']['searchmedia'] = 'Etsi tiedostoja';
@@ -124,7 +127,17 @@ Voit silti kopioida ja liittää linkin.';
$lang['js']['linkwiz'] = 'Linkkivelho';
$lang['js']['linkto'] = 'Linkki kohteeseen:';
$lang['js']['del_confirm'] = 'Haluatko todella poistaa valitut kohteet?';
-$lang['js']['mu_btn'] = 'Lähetä useampia tiedostoja kerralla';
+$lang['js']['restore_confirm'] = 'Haluatko varmasti palauttaa tämän version?';
+$lang['js']['media_diff'] = 'Näytä erot:';
+$lang['js']['media_diff_both'] = 'Vierekkäin';
+$lang['js']['media_diff_opacity'] = 'Päällä';
+$lang['js']['media_diff_portions'] = 'Liukusäädin';
+$lang['js']['media_select'] = 'Valitse tiedostot...';
+$lang['js']['media_upload_btn'] = 'Lähetä';
+$lang['js']['media_done_btn'] = 'Valmis';
+$lang['js']['media_drop'] = 'Pudota lähetettävät tiedostot tähän';
+$lang['js']['media_cancel'] = 'Poista';
+$lang['js']['media_overwrt'] = 'Ylikirjoita olemassa olevat tiedostot';
$lang['rssfailed'] = 'Virhe tapahtui noudettaessa tätä syötettä: ';
$lang['nothingfound'] = 'Mitään ei löytynyt.';
$lang['mediaselect'] = 'Mediatiedoston valinta';
@@ -179,6 +192,10 @@ $lang['mail_changed'] = 'sivu muutettu:';
$lang['mail_subscribe_list'] = 'muuttuneet sivut nimiavaruudessa:';
$lang['mail_new_user'] = 'uusi käyttäjä:';
$lang['mail_upload'] = 'tiedosto lähetetty:';
+$lang['changes_type'] = 'Näytä muutokset:';
+$lang['pages_changes'] = 'Sivut';
+$lang['media_changes'] = 'Mediatiedostot';
+$lang['both_changes'] = 'Sivut ja mediatiedostot';
$lang['qb_bold'] = 'Lihavoitu teksti';
$lang['qb_italic'] = 'Kursivoitu teksti';
$lang['qb_underl'] = 'Alleviivattu teksti';
@@ -219,6 +236,9 @@ $lang['img_copyr'] = 'Tekijänoikeus';
$lang['img_format'] = 'Formaatti';
$lang['img_camera'] = 'Kamera';
$lang['img_keywords'] = 'Avainsanat';
+$lang['img_width'] = 'Leveys';
+$lang['img_height'] = 'Korkeus';
+$lang['img_manager'] = 'Näytä mediamanagerissa';
$lang['subscr_subscribe_success'] = '%s lisätty %s tilauslistalle';
$lang['subscr_subscribe_error'] = 'Virhe lisättäessä %s tilauslistalle %s';
$lang['subscr_subscribe_noaddress'] = 'Login tiedoissasi ei ole sähköpostiosoitetta. Sinua ei voi lisätä tilaukseen';
@@ -283,3 +303,23 @@ $lang['hours'] = '%d tuntia sitten';
$lang['minutes'] = '%d minuuttia sitten';
$lang['seconds'] = '% sekuntia sitten';
$lang['wordblock'] = 'Muutostasi ei talletettu, koska se sisältää estettyä tekstiä (spam).';
+$lang['media_uploadtab'] = 'Lähetä';
+$lang['media_searchtab'] = 'Etsi';
+$lang['media_viewtab'] = 'Näytä';
+$lang['media_edittab'] = 'Muokkaa';
+$lang['media_historytab'] = 'Historia';
+$lang['media_thumbsview'] = 'Pikkukuvat';
+$lang['media_listview'] = 'Lista';
+$lang['media_sort'] = 'Järjestä';
+$lang['media_sort_name'] = 'nimen mukaan';
+$lang['media_sort_date'] = 'päivämäärän mukaan';
+$lang['media_upload'] = 'Lähetä <strong>%s</strong> nimiavaruuteen';
+$lang['media_search'] = 'Etsi <strong>%s</strong> nimiavaruudesta';
+$lang['media_edit'] = 'Muokkaa';
+$lang['media_history'] = 'Nämä ovat vanhat versiot tiedostosta.';
+$lang['media_meta_edited'] = 'Metadataa muokattu';
+$lang['media_perm_read'] = 'Anteeksi. Sinulla ei ole riittävästi oikeuksia lukeaksesi tiedostoja.';
+$lang['media_perm_upload'] = 'Anteeksi. Sinulla ei ole riittävästi oikeuksia lähettääksesi tiedostoja.';
+$lang['media_update'] = 'Lähetä uusi versio';
+$lang['media_restore'] = 'Palauta tämä versio';
+$lang['plugin_install_err'] = 'Liitännäinen asentui virheellisesti. Nimeä liitännäisen hakemisto \'%s\' -> \'%s\'';
diff --git a/inc/lang/fo/lang.php b/inc/lang/fo/lang.php
index 3d4d0455b..4cb895f72 100644
--- a/inc/lang/fo/lang.php
+++ b/inc/lang/fo/lang.php
@@ -90,7 +90,7 @@ $lang['txt_filename'] = 'Sláa inn wikinavn (valfrítt)';
$lang['txt_overwrt'] = 'Yvurskriva verandi fílu';
$lang['lockedby'] = 'Fyribils læst av';
$lang['lockexpire'] = 'Lásið ferð úr gildi kl.';
-$lang['willexpire'] = 'Títt lás á hetta skjalið ferð úr gildi um ein minnutt.\nTrýst á Forskoðan-knappin fyri at sleppa undan trupulleikum.';
+$lang['js']['willexpire'] = 'Títt lás á hetta skjalið ferð úr gildi um ein minnutt.\nTrýst á Forskoðan-knappin fyri at sleppa undan trupulleikum.';
$lang['js']['notsavedyet'] = 'Tað eru gjørdar broytingar í skjalinum, um tú haldur fram vilja broytingar fara fyri skeytið.
Ynskir tú at halda fram?';
$lang['js']['searchmedia'] = 'Leita eftir dátufílum';
diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php
index 40384fecb..60b86b346 100644
--- a/inc/lang/fr/lang.php
+++ b/inc/lang/fr/lang.php
@@ -7,7 +7,7 @@
* @author Antoine Fixary <antoine.fixary@freesbee.fr>
* @author cumulus <pta-n56@myamail.com>
* @author Gwenn Gueguen <contact@demisel.net>
- * @author Guy Brand <gb@isis.u-strasbg.fr>
+ * @author Guy Brand <gb@unistra.fr>
* @author Fabien Chabreuil <fabien@integralpersonality.com>
* @author Stéphane Chamberland <stephane.chamberland@ec.gc.ca>
* @author Delassaux Julien <julien@delassaux.fr>
@@ -21,6 +21,7 @@
* @author Florian Gaub <floriang@floriang.net>
* @author Samuel Dorsaz <samuel.dorsaz@novelion.net>
* @author Johan Guilbaud <guilbaud.johan@gmail.com>
+ * @author schplurtz@laposte.net
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -62,6 +63,8 @@ $lang['btn_recover'] = 'Récupérer le brouillon';
$lang['btn_draftdel'] = 'Effacer le brouillon';
$lang['btn_revert'] = 'Restaurer';
$lang['btn_register'] = 'S\'enregistrer';
+$lang['btn_apply'] = 'Appliquer';
+$lang['btn_media'] = 'Gestionnaire de médias';
$lang['loggedinas'] = 'Connecté en tant que ';
$lang['user'] = 'Utilisateur';
$lang['pass'] = 'Mot de passe';
@@ -106,9 +109,8 @@ $lang['txt_filename'] = 'Donnez un « wikiname » (optionnel) ';
$lang['txt_overwrt'] = 'Écraser le fichier cible';
$lang['lockedby'] = 'Actuellement bloqué par';
$lang['lockexpire'] = 'Le blocage expire à';
-$lang['willexpire'] = 'Votre blocage pour modifier cette page expire dans une minute.\nPour éviter les conflits, utiliser le bouton « Aperçu » pour réinitialiser le minuteur.';
-$lang['js']['notsavedyet'] = 'Les modifications non enregistrées seront perdues.
-Voulez-vous vraiment continuer ?';
+$lang['js']['willexpire'] = 'Votre verrouillage pour la modification de cette page expire dans une minute.\nPour éviter les conflits, utilisez le bouton « Aperçu » pour réinitialiser le minuteur.';
+$lang['js']['notsavedyet'] = 'Les modifications non enregistrées seront perdues. Voulez-vous vraiment continuer ?';
$lang['js']['searchmedia'] = 'Chercher des fichiers';
$lang['js']['keepopen'] = 'Gardez la fenêtre ouverte pendant la sélection';
$lang['js']['hidedetails'] = 'Masquer détails';
@@ -121,10 +123,10 @@ $lang['js']['mediaclose'] = 'Fermer';
$lang['js']['mediainsert'] = 'Insérer';
$lang['js']['mediadisplayimg'] = 'Afficher l\'image.';
$lang['js']['mediadisplaylnk'] = 'N\'afficher que le lien.';
-$lang['js']['mediasmall'] = 'Petite version';
-$lang['js']['mediamedium'] = 'Version moyenne';
-$lang['js']['medialarge'] = 'Grande version';
-$lang['js']['mediaoriginal'] = 'Version originale';
+$lang['js']['mediasmall'] = 'Petite taille';
+$lang['js']['mediamedium'] = 'taille moyenne';
+$lang['js']['medialarge'] = 'Grande taille';
+$lang['js']['mediaoriginal'] = 'taille d\'origine';
$lang['js']['medialnk'] = 'Lien vers la page de détail';
$lang['js']['mediadirect'] = 'Lien direct vers l\'original';
$lang['js']['medianolnk'] = 'Aucun lien';
@@ -134,11 +136,22 @@ $lang['js']['mediaright'] = 'Aligner l\'image sur la droite.';
$lang['js']['mediacenter'] = 'Centrer l\'image';
$lang['js']['medianoalign'] = 'Ne pas aligner.';
$lang['js']['nosmblinks'] = 'Les liens vers les partages Windows ne fonctionnent qu\'avec Microsoft Internet Explorer.
-Vous pouvez toujours copier puis coller le lien.';
+ Vous pouvez toujours copier puis coller le lien.';
$lang['js']['linkwiz'] = 'Assistant Lien';
$lang['js']['linkto'] = 'Lien vers :';
$lang['js']['del_confirm'] = 'Effacer cette entrée ?';
$lang['js']['mu_btn'] = 'Envoyer plusieurs fichiers en même temps';
+$lang['js']['restore_confirm'] = 'Voulez vous vraiment restaurer cette version ?';
+$lang['js']['media_diff'] = 'Voir les différences:';
+$lang['js']['media_diff_both'] = 'Côte à côte';
+$lang['js']['media_diff_opacity'] = 'Calque';
+$lang['js']['media_diff_portions'] = 'Curseur';
+$lang['js']['media_select'] = 'Sélection de fichiers…';
+$lang['js']['media_upload_btn'] = 'Télécharger';
+$lang['js']['media_done_btn'] = 'Terminé';
+$lang['js']['media_drop'] = 'Déposez des fichiers ici pour les télécharger';
+$lang['js']['media_cancel'] = 'supprimer';
+$lang['js']['media_overwrt'] = 'Écraser les fichiers existants';
$lang['rssfailed'] = 'Une erreur s\'est produite en récupérant ce flux : ';
$lang['nothingfound'] = 'Pas de réponse.';
$lang['mediaselect'] = 'Sélection de fichier';
@@ -193,6 +206,10 @@ $lang['mail_changed'] = 'page modifiée :';
$lang['mail_subscribe_list'] = 'pages modifiées dans la catégorie :';
$lang['mail_new_user'] = 'nouvel utilisateur :';
$lang['mail_upload'] = 'fichier envoyé :';
+$lang['changes_type'] = 'Voir les changements';
+$lang['pages_changes'] = 'Pages';
+$lang['media_changes'] = 'Fichier multimédias';
+$lang['both_changes'] = 'Pages et fichiers multimédias';
$lang['qb_bold'] = 'Emphase forte (gras)';
$lang['qb_italic'] = 'Emphase (italique)';
$lang['qb_underl'] = 'Souligné';
@@ -233,6 +250,9 @@ $lang['img_copyr'] = 'Copyright';
$lang['img_format'] = 'Format';
$lang['img_camera'] = 'Appareil photo';
$lang['img_keywords'] = 'Mots-clés';
+$lang['img_width'] = 'Largeur';
+$lang['img_height'] = 'Hauteur';
+$lang['img_manager'] = 'Voir dans le gestionnaire de médias';
$lang['subscr_subscribe_success'] = '%s a été ajouté à la liste de souscription de %s';
$lang['subscr_subscribe_error'] = 'Erreur en ajoutant %s à la liste de souscription de %s';
$lang['subscr_subscribe_noaddress'] = 'Il n\'y a pas d\'adresse associée à votre identifiant, vous ne pouvez pas être ajouté à la liste de souscription';
@@ -297,3 +317,27 @@ $lang['hours'] = 'il y a %d heures';
$lang['minutes'] = 'il y a %d minutes';
$lang['seconds'] = 'il y a %d secondes';
$lang['wordblock'] = 'Vos modifications n\'ont pas été sauvegardées parce qu\'elles contiennent des textes non autorisé (spam).';
+$lang['media_uploadtab'] = 'Télécharger';
+$lang['media_searchtab'] = 'Rechercher';
+$lang['media_file'] = 'Fichier';
+$lang['media_viewtab'] = 'Voir';
+$lang['media_edittab'] = 'Éditer';
+$lang['media_historytab'] = 'Historique';
+$lang['media_list_thumbs'] = 'Aperçus';
+$lang['media_list_rows'] = 'Lignes';
+$lang['media_sort_name'] = 'Tri par nom';
+$lang['media_sort_date'] = 'Tri par date';
+$lang['media_namespaces'] = 'Choisissez un espace de nom';
+$lang['media_files'] = 'Fichiers présents dans';
+$lang['media_upload'] = 'Télécharger dans la catégorie <strong>%s</strong>.';
+$lang['media_search'] = 'Chercher dans la catégorie <strong>%s</strong>.';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s dans %s';
+$lang['media_edit'] = 'Éditer %s';
+$lang['media_history'] = 'Historique du %s';
+$lang['media_meta_edited'] = 'métadonnées éditées';
+$lang['media_perm_read'] = 'Désolé, vous n\'avez pas les droits pour lire les fichiers.';
+$lang['media_perm_upload'] = 'Désolé, vous n\'avez pas les droits pour télécharger des fichiers.';
+$lang['media_update'] = 'Télécharger une nouvelle version';
+$lang['media_restore'] = 'Restaurer cette version';
+$lang['plugin_install_err'] = 'Extension mal installée. Renommez le dossier de l\'extension \'%s\' en \'%s\'.';
diff --git a/inc/lang/gl/lang.php b/inc/lang/gl/lang.php
index 37cf55d22..01938b3a0 100644
--- a/inc/lang/gl/lang.php
+++ b/inc/lang/gl/lang.php
@@ -89,7 +89,7 @@ $lang['txt_filename'] = 'Subir como (opcional)';
$lang['txt_overwrt'] = 'Sobrescribir arquivo existente';
$lang['lockedby'] = 'Bloqueado actualmente por';
$lang['lockexpire'] = 'O bloqueo remata o';
-$lang['willexpire'] = 'O teu bloqueo para editares esta páxina vai caducar nun minuto.\nPara de evitar conflitos, emprega o botón de previsualización para reiniciares o contador do tempo de bloqueo.';
+$lang['js']['willexpire'] = 'O teu bloqueo para editares esta páxina vai caducar nun minuto.\nPara de evitar conflitos, emprega o botón de previsualización para reiniciares o contador do tempo de bloqueo.';
$lang['js']['notsavedyet'] = "Perderanse os trocos non gardados.\nEstá certo de quereres continuar?";
$lang['rssfailed'] = 'Houbo un erro ao tentar obter esta corrente RSS: ';
$lang['nothingfound'] = 'Non se atopou nada.';
@@ -137,7 +137,6 @@ Sempre podes copiar e colar a ligazón.';
$lang['js']['linkwiz'] = 'Asistente de ligazóns';
$lang['js']['linkto'] = 'Ligazón para:';
$lang['js']['del_confirm'] = 'Estás certo de quereres eliminar os elementos seleccionados?';
-$lang['js']['mu_btn'] = 'Subir varios arquivos de vez';
$lang['mediausage'] = 'Emprega a seguinte sintaxe para inserires unha referencia a este arquivo:';
$lang['mediaview'] = 'Ver arquivo orixinal';
$lang['mediaroot'] = 'raigaña';
diff --git a/inc/lang/he/lang.php b/inc/lang/he/lang.php
index 1a47ebcb8..f295e44a9 100644
--- a/inc/lang/he/lang.php
+++ b/inc/lang/he/lang.php
@@ -95,7 +95,7 @@ $lang['txt_filename'] = 'העלאה בשם (נתון לבחירה)';
$lang['txt_overwrt'] = 'שכתוב על קובץ קיים';
$lang['lockedby'] = 'נעול על ידי';
$lang['lockexpire'] = 'הנעילה פגה';
-$lang['willexpire'] = 'הנעילה תחלוף עוד זמן קצר. \nלמניעת התנגשויות יש להשתמש בכפתור הרענון מטה כדי לאפס את מד משך הנעילה.';
+$lang['js']['willexpire'] = 'הנעילה תחלוף עוד זמן קצר. \nלמניעת התנגשויות יש להשתמש בכפתור הרענון מטה כדי לאפס את מד משך הנעילה.';
$lang['js']['notsavedyet'] = 'שינויים שלא נשמרו ילכו לאיבוד.';
$lang['js']['searchmedia'] = 'חיפוש אחר קבצים';
$lang['js']['keepopen'] = 'השארת חלון פתוח על הבחירה';
@@ -126,7 +126,6 @@ $lang['js']['nosmblinks'] = 'קישור לכונני שיתוף של Window
$lang['js']['linkwiz'] = 'אשף הקישורים';
$lang['js']['linkto'] = 'קישור אל:';
$lang['js']['del_confirm'] = 'באמת למחוק?';
-$lang['js']['mu_btn'] = 'העלאת מספר קבצים יחד';
$lang['rssfailed'] = 'אירע כשל בעת קבלת הזנה זו:';
$lang['nothingfound'] = 'לא נמצאו תוצאות.';
$lang['mediaselect'] = 'קובצי מדיה';
diff --git a/inc/lang/hr/lang.php b/inc/lang/hr/lang.php
index a42e8c96f..ef10d7720 100644
--- a/inc/lang/hr/lang.php
+++ b/inc/lang/hr/lang.php
@@ -6,6 +6,7 @@
* @author Tomo Krajina <aaa@puzz.info>
* @author Branko Rihtman <theney@gmail.com>
* @author Dražen Odobašić <dodobasic@gmail.com>
+ * @author Dejan Igrec dejan.igrec@gmail.com
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -19,7 +20,7 @@ $lang['btn_source'] = 'Prikaži kod dokumenta';
$lang['btn_show'] = 'Prikaži dokument';
$lang['btn_create'] = 'Novi dokument';
$lang['btn_search'] = 'Pretraži';
-$lang['btn_save'] = 'Snimi';
+$lang['btn_save'] = 'Spremi';
$lang['btn_preview'] = 'Prikaži';
$lang['btn_top'] = 'Na vrh';
$lang['btn_newer'] = '<< noviji';
@@ -39,15 +40,13 @@ $lang['btn_back'] = 'Povratak';
$lang['btn_backlink'] = 'Povratni linkovi';
$lang['btn_backtomedia'] = 'Povratak na Mediafile izbornik';
$lang['btn_subscribe'] = 'Pretplati se na promjene dokumenta';
-$lang['btn_unsubscribe'] = 'Odjavi pretplatu o promjenama dokumenta';
-$lang['btn_subscribens'] = 'Pretplati se na promjene imenskog prostora';
-$lang['btn_unsubscribens'] = 'Odjavi pretplatu o promjenama imenskog prostora';
$lang['btn_profile'] = 'Ažuriraj profil';
$lang['btn_reset'] = 'Poništi promjene';
$lang['btn_resendpwd'] = 'Pošalji novu lozinku';
$lang['btn_draft'] = 'Uredi nacrt dokumenta';
$lang['btn_recover'] = 'Vrati prijašnji nacrt dokumenta';
$lang['btn_draftdel'] = 'Obriši nacrt dokumenta';
+$lang['btn_revert'] = 'Vrati';
$lang['btn_register'] = 'Registracija';
$lang['loggedinas'] = 'Prijavljen kao';
$lang['user'] = 'Korisničko ime';
@@ -86,13 +85,44 @@ $lang['resendpwdconfirm'] = 'Potvrdni link je poslan emailom.';
$lang['resendpwdsuccess'] = 'Nova lozinka je poslana emailom.';
$lang['license'] = 'Osim na mjestima gdje je naznačeno drugačije, sadržaj ovog wikija je licenciran sljedećom licencom:';
$lang['licenseok'] = 'Pažnja: promjenom ovog dokumenta pristajete licencirati sadržaj sljedećom licencom: ';
+$lang['searchmedia'] = 'Traži naziv datoteke:';
+$lang['searchmedia_in'] = 'Traži u %s';
$lang['txt_upload'] = 'Odaberite datoteku za postavljanje';
$lang['txt_filename'] = 'Postaviti kao (nije obavezno)';
$lang['txt_overwrt'] = 'Prepiši postojeću datoteku';
$lang['lockedby'] = 'Zaključao';
$lang['lockexpire'] = 'Zaključano do';
-$lang['willexpire'] = 'Dokument kojeg mijenjate će biti zaključan još 1 minutu.\n Ukoliko želite i dalje raditi izmjene na dokumentu - kliknite na "Pregled".';
-$lang['js']['notsavedyet'] = "Vaše izmjene će se izgubiti.\nŽelite li nastaviti?";
+$lang['js']['willexpire'] = 'Dokument kojeg mijenjate će biti zaključan još 1 minutu.\n Ukoliko želite i dalje raditi izmjene na dokumentu - kliknite na "Pregled".';
+$lang['js']['notsavedyet'] = 'Vaše izmjene će se izgubiti.
+Želite li nastaviti?';
+$lang['js']['searchmedia'] = 'Traži datoteke';
+$lang['js']['keepopen'] = 'Ostavi prozor otvoren nakon izbora';
+$lang['js']['hidedetails'] = 'Sakrij detalje';
+$lang['js']['mediatitle'] = 'Postavke poveznice';
+$lang['js']['mediadisplay'] = 'Vrsta poveznice';
+$lang['js']['mediaalign'] = 'Poravnanje';
+$lang['js']['mediasize'] = 'Veličina slike';
+$lang['js']['mediatarget'] = 'Cilj poveznice';
+$lang['js']['mediaclose'] = 'Zatvori';
+$lang['js']['mediainsert'] = 'Umetni';
+$lang['js']['mediadisplayimg'] = 'Prikaži sliku.';
+$lang['js']['mediadisplaylnk'] = 'Prikaži samo poveznicu.';
+$lang['js']['mediasmall'] = 'Mala verzija.';
+$lang['js']['mediamedium'] = 'Srednja verzija.';
+$lang['js']['medialarge'] = 'Velika verzija.';
+$lang['js']['mediaoriginal'] = 'Originalna verzija.';
+$lang['js']['medialnk'] = 'Poveznica na stranicu s detaljima';
+$lang['js']['mediadirect'] = 'Direktna poveznica na original';
+$lang['js']['medianolnk'] = 'Bez poveznice';
+$lang['js']['medianolink'] = 'Nemoj povezati sliku';
+$lang['js']['medialeft'] = 'Poravnaj sliku lijevo.';
+$lang['js']['mediaright'] = 'Poravnaj sliku desno.';
+$lang['js']['mediacenter'] = 'Poravnaj sliku u sredinu.';
+$lang['js']['medianoalign'] = 'Bez poravnanja.';
+$lang['js']['nosmblinks'] = 'Linkovi na dijeljene Windows mape rade samo s Internet Explorerom. Link je još uvijek moguće kopirati i zalijepiti.';
+$lang['js']['linkwiz'] = 'Čarobnjak za poveznice';
+$lang['js']['linkto'] = 'Poveznica na:';
+$lang['js']['del_confirm'] = 'Zbilja želite obrisati odabrane stavke?';
$lang['rssfailed'] = 'Došlo je do greške prilikom preuzimanja feed-a: ';
$lang['nothingfound'] = 'Traženi dokumetni nisu pronađeni.';
$lang['mediaselect'] = 'Mediafile datoteke';
@@ -110,10 +140,7 @@ $lang['deletefail'] = '"%s" se ne može obrisati - provjerite dozvole
$lang['mediainuse'] = 'Datoteka "%s" nije obrisana - još uvijek se koristi.';
$lang['namespaces'] = 'Imenski prostori';
$lang['mediafiles'] = 'Datoteke u';
-$lang['js']['keepopen'] = 'Ostavi prozor otvoren nakon izbora';
-$lang['js']['hidedetails'] = 'Sakrij detalje';
-$lang['js']['nosmblinks'] = 'Linkovi na dijeljene Windows mape rade samo s Internet Explorerom. Link je još uvijek moguće kopirati i zalijepiti.';
-$lang['js']['mu_btn'] = 'Postavi više datoteka odjednom';
+$lang['accessdenied'] = 'Nemate potrebne dozvole za pregled ove stranice.';
$lang['mediausage'] = 'Koristi sljedeću sintaksu za referenciranje ove datoteke:';
$lang['mediaview'] = 'Pregledaj originalnu datoteku';
$lang['mediaroot'] = 'root';
@@ -129,6 +156,10 @@ $lang['current'] = 'trenutno';
$lang['yours'] = 'Vaša inačica';
$lang['diff'] = 'Prikaži razlike u odnosu na trenutnu inačicu';
$lang['diff2'] = 'Pokaži razlike između odabranih inačica';
+$lang['difflink'] = 'Poveznica na ovaj prikaz usporedbe';
+$lang['diff_type'] = 'Razlike u prikazu:';
+$lang['diff_inline'] = 'U istoj razini';
+$lang['diff_side'] = 'Usporedo';
$lang['line'] = 'Redak';
$lang['breadcrumb'] = 'Putanja';
$lang['youarehere'] = 'Vi ste ovdje';
@@ -140,8 +171,10 @@ $lang['restored'] = 'vraćena prijašnja inačica';
$lang['external_edit'] = 'vanjsko uređivanje';
$lang['summary'] = 'Sažetak izmjena';
$lang['noflash'] = 'Za prikazivanje ovog sadržaja potreban je <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>';
+$lang['download'] = 'Preuzmi isječak';
$lang['mail_newpage'] = 'stranica dodana:';
$lang['mail_changed'] = 'stranica izmjenjena:';
+$lang['mail_subscribe_list'] = 'stranice promijenjene u imenskom prostoru:';
$lang['mail_new_user'] = 'novi korisnik:';
$lang['mail_upload'] = 'datoteka postavljena:';
$lang['qb_bold'] = 'Podebljani tekst';
@@ -168,7 +201,7 @@ $lang['qb_media'] = 'Dodaj slike i ostale datoteke';
$lang['qb_sig'] = 'Potpis';
$lang['qb_smileys'] = 'Smiješkići';
$lang['qb_chars'] = 'Posebni znakovi';
-$lang['js']['del_confirm'] = 'Zbilja želite obrisati odabrane stavke?';
+$lang['upperns'] = 'Skoči u nadređeni imenski prostor';
$lang['admin_register'] = 'Dodaj novog korisnika';
$lang['metaedit'] = 'Uredi metapodatake';
$lang['metasaveerr'] = 'Neuspješno zapisivanje metapodataka';
@@ -184,11 +217,22 @@ $lang['img_copyr'] = 'Autorsko pravo';
$lang['img_format'] = 'Format';
$lang['img_camera'] = 'Kamera';
$lang['img_keywords'] = 'Ključne riječi';
-$lang['subscribe_success'] = 'Dodan %s na listu preplata za %s';
-$lang['subscribe_error'] = 'Greška prilikom dodavanju %s na listu pretplata za %s';
-$lang['subscribe_noaddress'] = 'Nije postavljena email adresa za vaš korisnički profil, nije Vas moguće dodati na listu pretplata';
-$lang['unsubscribe_success'] = 'Izbrisan %s s liste pretplata za %s';
-$lang['unsubscribe_error'] = 'Greška prilikom brisanja %s s liste pretplatnika za %s';
+$lang['subscr_subscribe_success'] = 'Dodan %s u listu pretplatnika za %s';
+$lang['subscr_subscribe_error'] = 'Greška kod dodavanja %s u listu pretplatnika za %s';
+$lang['subscr_subscribe_noaddress'] = 'Ne postoji adresa povezana sa vašim podacima za prijavu, stoga ne možete biti dodani u listu pretplatnika';
+$lang['subscr_unsubscribe_success'] = 'Uklonjen %s iz liste pretplatnika za %s';
+$lang['subscr_unsubscribe_error'] = 'Greška prilikom uklanjanja %s iz liste pretplatnika za %s';
+$lang['subscr_already_subscribed'] = '%s je već pretplaćen na %s';
+$lang['subscr_not_subscribed'] = '%s nije pretplaćen na %s';
+$lang['subscr_m_not_subscribed'] = 'Trenutno niste pretplaćeni na trenutnu stranicu ili imenski prostor.';
+$lang['subscr_m_new_header'] = 'Dodaj pretplatu';
+$lang['subscr_m_current_header'] = 'Trenutne pretplate';
+$lang['subscr_m_unsubscribe'] = 'Odjavi pretplatu';
+$lang['subscr_m_subscribe'] = 'Pretplati se';
+$lang['subscr_m_receive'] = 'Primaj';
+$lang['subscr_style_every'] = 'email za svaku promjenu';
+$lang['subscr_style_digest'] = 'email s kratakim prikazom promjena za svaku stranicu (svaka %.2f dana)';
+$lang['subscr_style_list'] = 'listu promijenjenih stranica od zadnjeg primljenog email-a (svaka %.2f dana)';
$lang['authmodfailed'] = 'Greška u konfiguraciji korisničke autentifikacije. Molimo Vas da kontaktirate administratora.';
$lang['authtempfail'] = 'Autentifikacija korisnika je privremeno nedostupna. Molimo Vas da kontaktirate administratora.';
$lang['i_chooselang'] = 'Izaberite vaš jezik';
@@ -198,3 +242,42 @@ $lang['i_enableacl'] = 'Omogući ACL (preporučeno)';
$lang['i_superuser'] = 'Superkorisnik';
$lang['i_problems'] = 'Instalacija je pronašla probleme koji su naznačeni ispod. Nije moguće nastaviti dok se ti problemi ne riješe.';
$lang['i_modified'] = 'Zbog sigurnosnih razlog, ova skripta ce raditi samo sa novim i nepromijenjenim instalacijama dokuWikija. Preporucujemo da ili re-ekstraktirate fajlove iz downloadovanog paketa ili konsultujete pune a href="http://dokuwiki.org/install">Instrukcije za instalaciju Dokuwikija</a>';
+$lang['i_funcna'] = 'PHP funkcija <code>%s</code> nije dostupna. Možda ju je vaš pružatelj hostinga onemogućio iz nekog razloga?';
+$lang['i_phpver'] = 'Vaša PHP verzija <code>%s</code> je niža od potrebne <code>%s</code>. Trebate nadograditi vašu PHP instalaciju.';
+$lang['i_permfail'] = '<code>%s</code> nema dozvolu pisanja od strane DokuWiki. Trebate podesiti dozvole pristupa tom direktoriju.';
+$lang['i_confexists'] = '<code>%s</code> već postoji';
+$lang['i_writeerr'] = 'Ne može se kreirati <code>%s</code>. Trebate provjeriti dozvole direktorija/datoteke i kreirati dokument ručno.';
+$lang['i_badhash'] = 'neprepoznat ili promijenjen dokuwiki.php (hash=<code>%s</code>)';
+$lang['i_badval'] = '<code>%s</code> - nedozvoljena ili prazna vrijednost';
+$lang['i_success'] = 'Konfiguracija je uspješno završena. Sada možete obrisati install.php datoteku. Nastavite na <a href="doku.php">vaš novi DokuWiki</a>.';
+$lang['i_failure'] = 'Pojavile su se neke greške prilikom pisanja konfiguracijskih datoteka. Morati ćete ih ručno ispraviti da bi mogli koristiti <a href="doku.php">vaš novi DokuWiki</a>.';
+$lang['i_policy'] = 'Inicijalna ACL politika';
+$lang['i_pol0'] = 'Otvoreni Wiki (čitanje, pisanje, učitavanje za sve)';
+$lang['i_pol1'] = 'Javni Wiki (čitanje za sve, pisanje i učitavanje za registrirane korisnike)';
+$lang['i_pol2'] = 'Zatvoreni Wiki (čitanje, pisanje, učitavanje samo za registrirane korisnike)';
+$lang['i_retry'] = 'Pokušaj ponovo';
+$lang['i_license'] = 'Molim odaberite licencu pod kojom želite postavljati vaš sadržaj:';
+$lang['mu_intro'] = 'Ovdje možeš učitati više datoteka odjednom. Klikni gumb pregled te ih dodajte u red. Pritisnite učitaj kad ste gotovi.';
+$lang['mu_gridname'] = 'Naziv datoteke';
+$lang['mu_gridsize'] = 'Veličina';
+$lang['mu_gridstat'] = 'Status';
+$lang['mu_namespace'] = 'Imenski prostor';
+$lang['mu_browse'] = 'Pregled';
+$lang['mu_toobig'] = 'prevelik';
+$lang['mu_ready'] = 'spremno za učitavanje';
+$lang['mu_done'] = 'gotovo';
+$lang['mu_fail'] = 'nije uspio';
+$lang['mu_authfail'] = 'sjednica istekla';
+$lang['mu_progress'] = '@PCT@% učitan';
+$lang['mu_filetypes'] = 'Dozvoljeni tipovi datoteka';
+$lang['mu_info'] = 'datoteke učitane.';
+$lang['mu_lasterr'] = 'Posljednja greška:';
+$lang['recent_global'] = 'Trenutno gledate promjene unutar <b>%s</b> imenskog prostora. Također možete <a href="%s">vidjeti zadnje promjene cijelog wiki-a</a>';
+$lang['years'] = '%d godina prije';
+$lang['months'] = '%d mjeseci prije';
+$lang['weeks'] = '%d tjedana prije';
+$lang['days'] = '%d dana prije';
+$lang['hours'] = '%d sati prije';
+$lang['minutes'] = '%d minuta prije';
+$lang['seconds'] = '%d sekundi prije';
+$lang['wordblock'] = 'Vaša promjena nije spremljena jer sadrži blokirani tekst (spam).';
diff --git a/inc/lang/hr/read.txt b/inc/lang/hr/read.txt
index d036c0a7b..221f1b200 100644
--- a/inc/lang/hr/read.txt
+++ b/inc/lang/hr/read.txt
@@ -1 +1 @@
-Nije dopušteno mijenjati sadržaj ove stranice.
+Ova stranica se može samo čitati. Možete vidjeti kod, ali ga ne možete mijenjati. Javite se vašem administratoru ako se s tim ne slažete. \ No newline at end of file
diff --git a/inc/lang/hr/resendpwd.txt b/inc/lang/hr/resendpwd.txt
index fe2c72bf3..ed25f985c 100644
--- a/inc/lang/hr/resendpwd.txt
+++ b/inc/lang/hr/resendpwd.txt
@@ -1,3 +1,3 @@
====== Slanje nove lozinke ======
-Ispunite potrebne podatke da biste dobili novu lozinku za Vaš korisnički račun.
+Ispunite potrebne podatke da biste dobili novu lozinku za Vaš korisnički račun. Link za potvrdu biti će poslan na Vašu email adresu.
diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php
index 52422b53c..23419a2bd 100644
--- a/inc/lang/hu/lang.php
+++ b/inc/lang/hu/lang.php
@@ -9,6 +9,7 @@
* @author schilling.janos@gmail.com
* @author Szabó Dávid <szabo.david@gyumolcstarhely.hu>
* @author Sándor TIHANYI <stihanyi+dw@gmail.com>
+ * @author David Szabo <szabo.david@gyumolcstarhely.hu>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -94,7 +95,7 @@ $lang['txt_filename'] = 'feltöltési név (elhagyható)';
$lang['txt_overwrt'] = 'Létező fájl felülírása';
$lang['lockedby'] = 'Jelenleg zárolta:';
$lang['lockexpire'] = 'A zárolás lejár:';
-$lang['willexpire'] = 'Az oldalszerkesztési zárolásod körülbelül egy percen belül lejár.\nAz ütközések elkerülése végett használd az előnézet gombot a zárolási időzítés frissítéséhez.';
+$lang['js']['willexpire'] = 'Az oldalszerkesztési zárolásod körülbelül egy percen belül lejár.\nAz ütközések elkerülése végett használd az előnézet gombot a zárolási időzítés frissítéséhez.';
$lang['js']['notsavedyet'] = 'Elmentetlen változások vannak, amelyek el fognak veszni.
Tényleg ezt akarod?';
$lang['js']['searchmedia'] = 'Fájlok keresése';
@@ -126,7 +127,6 @@ A hivatkozást másolni és beszúrni ettől fügetlenül mndig tudod.';
$lang['js']['linkwiz'] = 'Hivatkozás varázsló';
$lang['js']['linkto'] = 'Hivatkozás erre:';
$lang['js']['del_confirm'] = 'Valóban törölni akarod a kiválasztott elem(ek)et?';
-$lang['js']['mu_btn'] = 'Több fájl feltöltése egyszerre';
$lang['rssfailed'] = 'Hiba történt ennek a betöltésekor: ';
$lang['nothingfound'] = 'Semmit sem találtam.';
$lang['mediaselect'] = 'Médiafájl kiválasztása';
diff --git a/inc/lang/ia/lang.php b/inc/lang/ia/lang.php
index bdfef88f4..8398f29f0 100644
--- a/inc/lang/ia/lang.php
+++ b/inc/lang/ia/lang.php
@@ -95,7 +95,7 @@ $lang['txt_filename'] = 'Incargar como (optional)';
$lang['txt_overwrt'] = 'Reimplaciar le file existente';
$lang['lockedby'] = 'Actualmente serrate per';
$lang['lockexpire'] = 'Serratura expira le';
-$lang['willexpire'] = 'Tu serratura super le modification de iste pagina expirara post un minuta.\nPro evitar conflictos, usa le button Previsualisar pro reinitialisar le timer del serratura.';
+$lang['js']['willexpire'] = 'Tu serratura super le modification de iste pagina expirara post un minuta.\nPro evitar conflictos, usa le button Previsualisar pro reinitialisar le timer del serratura.';
$lang['js']['notsavedyet'] = "Le modificationes non salveguardate essera perdite.\nRealmente continuar?";
$lang['rssfailed'] = 'Un error occurreva durante le obtention de iste syndication:';
$lang['nothingfound'] = 'Nihil ha essite trovate.';
@@ -143,7 +143,6 @@ Tu pote nonobstante copiar e collar le ligamine.';
$lang['js']['linkwiz'] = 'Assistente pro ligamines';
$lang['js']['linkto'] = 'Ligar verso:';
$lang['js']['del_confirm'] = 'Realmente deler le entrata(s) seligite?';
-$lang['js']['mu_btn'] = 'Incargar plure files simultaneemente';
$lang['mediausage'] = 'Usa le syntaxe sequente pro referer a iste file:';
$lang['mediaview'] = 'Vider file original';
$lang['mediaroot'] = 'radice';
diff --git a/inc/lang/id/lang.php b/inc/lang/id/lang.php
index c1480f518..e8026acee 100644
--- a/inc/lang/id/lang.php
+++ b/inc/lang/id/lang.php
@@ -85,7 +85,7 @@ $lang['txt_filename'] = 'Masukkan nama wiki (opsional)';
$lang['txt_overwrt'] = 'File yang telah ada akan ditindih';
$lang['lockedby'] = 'Sedang dikunci oleh';
$lang['lockexpire'] = 'Penguncian artikel sampai dengan';
-$lang['willexpire'] = 'Halaman yang sedang Anda kunci akan berakhir dalam waktu kurang lebih satu menit.\nUntuk menghindari konflik, gunakan tombol Preview untuk me-reset timer pengunci.';
+$lang['js']['willexpire'] = 'Halaman yang sedang Anda kunci akan berakhir dalam waktu kurang lebih satu menit.\nUntuk menghindari konflik, gunakan tombol Preview untuk me-reset timer pengunci.';
$lang['js']['notsavedyet'] = "Perubahan yang belum disimpan akan hilang.\nYakin akan dilanjutkan?";
$lang['rssfailed'] = 'Error terjadi saat mengambil feed: ';
$lang['nothingfound'] = 'Tidak menemukan samasekali.';
diff --git a/inc/lang/is/lang.php b/inc/lang/is/lang.php
index 7388e6908..0e281e58d 100644
--- a/inc/lang/is/lang.php
+++ b/inc/lang/is/lang.php
@@ -45,8 +45,6 @@ $lang['btn_backlink'] = 'Hvað tengist hingað';
$lang['btn_backtomedia'] = 'Aftur til miðlaskrá';
$lang['btn_subscribe'] = 'Vakta';
$lang['btn_unsubscribe'] = 'Afvakta';
-$lang['btn_subscribens'] = 'Vakta breytingar á nafnrými';
-$lang['btn_unsubscribens'] = 'Afvakta breytingar á nafnrými';
$lang['btn_profile'] = 'Uppfæra notanda';
$lang['btn_reset'] = 'Endurstilla';
$lang['btn_resendpwd'] = 'Senda nýtt aðgangsorð með tölvupósti';
diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php
index 682f5b8c2..9f4d42004 100644
--- a/inc/lang/it/lang.php
+++ b/inc/lang/it/lang.php
@@ -98,7 +98,7 @@ $lang['txt_filename'] = 'Carica come (opzionale)';
$lang['txt_overwrt'] = 'Sovrascrivi file esistente';
$lang['lockedby'] = 'Attualmente bloccato da';
$lang['lockexpire'] = 'Il blocco scade alle';
-$lang['willexpire'] = 'Il tuo blocco su questa pagina scadrà tra circa un minuto.\nPer evitare incongruenze usa il pulsante di anteprima per prolungare il periodo di blocco.';
+$lang['js']['willexpire'] = 'Il tuo blocco su questa pagina scadrà tra circa un minuto.\nPer evitare incongruenze usa il pulsante di anteprima per prolungare il periodo di blocco.';
$lang['js']['notsavedyet'] = 'Le modifiche non salvate andranno perse.';
$lang['js']['searchmedia'] = 'Cerca file';
$lang['js']['keepopen'] = 'Tieni la finestra aperta durante la selezione';
@@ -129,7 +129,6 @@ $lang['js']['nosmblinks'] = 'I collegamenti con le risorse condivise di Win
$lang['js']['linkwiz'] = 'Collegamento guidato';
$lang['js']['linkto'] = 'Collega a:';
$lang['js']['del_confirm'] = 'Eliminare veramente questa voce?';
-$lang['js']['mu_btn'] = 'Carica più di un file alla volta';
$lang['rssfailed'] = 'Si è verificato un errore cercando questo feed: ';
$lang['nothingfound'] = 'Nessun risultato trovato.';
$lang['mediaselect'] = 'Selezione dei file';
diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php
index e8999e05b..1eeb6bb73 100644
--- a/inc/lang/ja/lang.php
+++ b/inc/lang/ja/lang.php
@@ -92,7 +92,7 @@ $lang['txt_filename'] = '名前を変更してアップロード(オ
$lang['txt_overwrt'] = '既存のファイルを上書き';
$lang['lockedby'] = 'この文書は次のユーザによってロックされています';
$lang['lockexpire'] = 'ロック期限:';
-$lang['willexpire'] = '編集中の文書はロック期限を過ぎようとしています。このままロックする場合は、一度文書の確認を行って期限をリセットしてください。';
+$lang['js']['willexpire'] = '編集中の文書はロック期限を過ぎようとしています。このままロックする場合は、一度文書の確認を行って期限をリセットしてください。';
$lang['js']['notsavedyet'] = '変更は保存されません。このまま処理を続けてよろしいですか?';
$lang['js']['searchmedia'] = 'ファイル検索';
$lang['js']['keepopen'] = '選択中はウィンドウを閉じない';
@@ -123,7 +123,6 @@ $lang['js']['nosmblinks'] = 'ウィンドウズの共有フォルダへリ
$lang['js']['linkwiz'] = 'リンクウィザード';
$lang['js']['linkto'] = 'リンク先:';
$lang['js']['del_confirm'] = '選択した項目を本当に削除しますか?';
-$lang['js']['mu_btn'] = '複数のファイルを一度にアップロード';
$lang['rssfailed'] = 'RSSの取得に失敗しました:';
$lang['nothingfound'] = '該当文書はありませんでした。';
$lang['mediaselect'] = 'メディアファイルを選択';
diff --git a/inc/lang/kk/lang.php b/inc/lang/kk/lang.php
new file mode 100644
index 000000000..f9ea0bced
--- /dev/null
+++ b/inc/lang/kk/lang.php
@@ -0,0 +1,116 @@
+<?php
+/**
+ * kazakh language file
+ *
+ * @author Nurgozha Kaliaskarov astana08@gmail.com
+ */
+$lang['encoding'] = 'utf-8';
+$lang['direction'] = 'ltr';
+$lang['doublequoteopening'] = '"';
+$lang['doublequoteclosing'] = '"';
+$lang['singlequoteopening'] = '‘';
+$lang['singlequoteclosing'] = '’';
+$lang['apostrophe'] = '\'';
+$lang['btn_edit'] = 'Бұл мақаланы өңдеү';
+$lang['btn_source'] = 'Бастапқы мәтінді көрсету';
+$lang['btn_show'] = 'Бетті көрсету';
+$lang['btn_create'] = 'Бұл бетті жасау';
+$lang['btn_search'] = 'Іздеу';
+$lang['btn_save'] = 'Сақтау';
+$lang['btn_preview'] = 'Қарап шығу';
+$lang['btn_top'] = 'Жоғары';
+$lang['btn_newer'] = '<<жаңарақ';
+$lang['btn_older'] = 'ескірек>>';
+$lang['btn_revs'] = 'Қайта қараулары';
+$lang['btn_recent'] = 'Жуырдағы өзгерістер';
+$lang['btn_upload'] = 'Еңгізу';
+$lang['btn_cancel'] = 'Болдырмау';
+$lang['btn_index'] = 'Барлық беттері';
+$lang['btn_secedit'] = 'Өңдеу';
+$lang['btn_login'] = 'Кіру';
+$lang['btn_logout'] = 'Шығу';
+$lang['btn_admin'] = 'Басқару';
+$lang['btn_update'] = 'Жаңарту';
+$lang['btn_delete'] = 'Жою';
+$lang['btn_back'] = 'Артқа';
+$lang['btn_backlink'] = 'Кері сілтемелері';
+$lang['btn_backtomedia'] = 'Медиафайлды таңдауға қайту';
+$lang['btn_subscribe'] = 'Жазылуларды басқару';
+$lang['btn_profile'] = 'Профильді жаңарту';
+$lang['btn_reset'] = 'Түсіру';
+$lang['btn_resendpwd'] = 'Жаңа құпиясөзді жіберу';
+$lang['btn_draft'] = 'Шимайды өңдеу';
+$lang['btn_recover'] = 'Шимайды қайтару';
+$lang['btn_draftdel'] = 'Шимайды өшіру';
+$lang['btn_revert'] = 'Қалпына келтіру';
+$lang['btn_register'] = 'Тіркеу';
+$lang['loggedinas'] = 'түпнұсқамен кірген';
+$lang['user'] = 'Түпнұсқа';
+$lang['pass'] = 'Құпиясөз';
+$lang['newpass'] = 'Жаңа құпиясөз';
+$lang['oldpass'] = 'Ағымдағы құпиясөзді растау';
+$lang['passchk'] = 'Тағы бір рет';
+$lang['remember'] = 'Мені сақтау';
+$lang['fullname'] = 'Шын аты';
+$lang['email'] = 'Е-пошта';
+$lang['profile'] = 'Пайдаланушының профилі';
+$lang['badlogin'] = 'Кешріңіз, түпнұсқа әлде құпиясөз дұрыс емес';
+$lang['minoredit'] = 'Шағын өзгерістер';
+$lang['draftdate'] = 'Шимай сақталғаны';
+$lang['nosecedit'] = 'Бет өзгерді де бөлік тұралы ақпарат ескірді. Толық нұсқасы ашылды.';
+$lang['regmissing'] = 'Кешіріңіз, барлық тармақтары толтыруыңыз керек.';
+$lang['reguexists'] = 'Кешіріңіз, бұл түпнұскамен де пайдаланушы бар.';
+$lang['regsuccess'] = 'Пайдаланушы қосылды әрі құпиясөзін электрондық поштаға жіберді.';
+$lang['regsuccess2'] = 'Пайдаланушы қосылды.';
+$lang['regmailfail'] = 'Құпиясөз хатты жіберуде қате болған сияқты. Мархабат, әкімшімен хабарласыңыз.';
+$lang['regbadmail'] = 'Берілген электрондық пошта бұрыс деп көрінеді - егер бұл қателікті деп ойласаңыз, әкімшіге хабарлаңыз.';
+$lang['regbadpass'] = 'Берілген екі құпиясөз бірдей емес, мархабат. қайтадан көріңіз.';
+$lang['regpwmail'] = 'Сіздің DokuWiki құпиясөзіңіз';
+$lang['reghere'] = 'Есебіңіз әлі жоқ па? Біреуін оңай ашыңыз';
+$lang['profna'] = 'Бұл wiki профиль өзертуді қолдамайды';
+$lang['profnochange'] = 'Өзгеріс жоқ, істейтін ештеңе жоқ.';
+$lang['profnoempty'] = 'Бос есім не email рұқсат етілмейді.';
+$lang['profchanged'] = 'Пайдаланушы профилі сәтті жаңартылған.';
+$lang['pwdforget'] = 'Құпиясөзіңізді ұмыттыңызба? Жаңадан біреуін алыңыз';
+$lang['resendna'] = 'Бұл wiki құпиясөзді қайта жіберуді қолдамайды.';
+$lang['resendpwd'] = 'Келесіге жаңа құпиясөзді жіберу ';
+$lang['resendpwdmissing'] = 'Кешіріңіз, барлық тармақтары толтыруыңыз керек.';
+$lang['resendpwdnouser'] = 'Кешіріңіз, бұл пайдаланушыны дерекқорымызда тапқан жоқпыз.';
+$lang['resendpwdbadauth'] = 'Кешіріңіз, бұл түпнұсқалық коды бұрыс. Толық растау сілтемені пайдалануыңызды тексеріңіз.';
+$lang['resendpwdconfirm'] = 'Растау сілтеме email арқылы жіберілді.';
+$lang['resendpwdsuccess'] = 'Сіздің жаңа құпиясөзіңіз email арқылы жіберілді.';
+$lang['license'] = 'Басқаша көрсетілген болмаса, бұл wiki-дің мазмұны келесі лицензия бойынша беріледі:';
+$lang['licenseok'] = 'Ескерту: бұл бетті өңдеуіңізбен мазмұныңыз келесі лицензия бойынша беруге келесесіз:';
+$lang['searchmedia'] = 'Іздеу файлдың атауы:';
+$lang['searchmedia_in'] = '%-мен іздеу:';
+$lang['txt_upload'] = 'Еңгізетін файлды таңдау';
+$lang['txt_filename'] = 'Келесідей еңгізу (қалауынша)';
+$lang['txt_overwrt'] = 'Бар файлды қайта жазу';
+$lang['lockedby'] = 'Осы уақытта тойтарылған';
+$lang['lockexpire'] = 'Тойтару келесі уақытта бітеді';
+$lang['js']['willexpire'] = 'Бұл бетті түзеу тойтаруыңыз бір минутта бітеді. Қақтығыс болмау және тойтару таймерді түсіру үшін қарап шығу пернені басыңыз.';
+$lang['js']['notsavedyet'] = 'Сақталмаған өзгерістер жоғалатын болады.';
+$lang['js']['searchmedia'] = 'Файлдарды іздеу';
+$lang['js']['keepopen'] = 'Таңдаған соң терезе жаппаңыз';
+$lang['js']['hidedetails'] = 'Ұсақтарды жасыру';
+$lang['js']['mediatitle'] = 'Султеме теңшелімдері';
+$lang['js']['mediadisplay'] = 'Сілтеме түрі';
+$lang['js']['mediaalign'] = 'Тегістеуі';
+$lang['js']['mediasize'] = 'Сүреттің өлшемі';
+$lang['js']['mediatarget'] = 'Сілтеме нысанасы';
+$lang['js']['mediaclose'] = 'Жабу';
+$lang['js']['mediainsert'] = 'Еңгізу';
+$lang['js']['mediadisplayimg'] = 'Бұл сүретті көрсету';
+$lang['js']['mediadisplaylnk'] = 'Бұл сілтемені ғана көрсету,';
+$lang['js']['mediasmall'] = 'Шағын нұсқасы';
+$lang['js']['mediamedium'] = 'Орташа нұсқасы';
+$lang['js']['medialarge'] = 'Үлкен нұсқасы';
+$lang['js']['mediaoriginal'] = 'Түпнұсқалық нұсқасы';
+$lang['js']['medialnk'] = 'Толық бетке сілтеме';
+$lang['js']['mediadirect'] = 'Түпнұсқалыққа тұра сілтемесі';
+$lang['js']['medianolnk'] = 'Сілтеме жоқ';
+$lang['js']['medianolink'] = 'Суретті сілтетпеу';
+$lang['js']['medialeft'] = 'Сүретті сол жаққа тегістеу';
+$lang['js']['mediaright'] = 'Сүретті оң жаққа тегістеу';
+$lang['js']['mediacenter'] = 'Сүретті ортаға тегістеу';
+$lang['js']['medianoalign'] = 'Тегістеусіз';
diff --git a/inc/lang/km/lang.php b/inc/lang/km/lang.php
index 90cad3133..68587e90f 100644
--- a/inc/lang/km/lang.php
+++ b/inc/lang/km/lang.php
@@ -88,7 +88,7 @@ $lang['txt_filename'] = 'រុញឡើងជា (ស្រេច​ចិត
$lang['txt_overwrt'] = 'កត់ពីលើ';//'Overwrite existing file';
$lang['lockedby'] = 'ឥឡូវនេះចកជាប់​';
$lang['lockexpire'] = 'សោជាប់ផុត​កំណត់ម៉ោង';
-$lang['willexpire'] = 'សោអ្នកចំពោះកែតម្រូវទំព័រនេះ ហួសពែលក្នុងមួយនាទី។\nកុំឲ្យមានជម្លោះ ប្រើ «បង្ហាញ»​ ទៅកំណត់​ឡើង​វិញ។';
+$lang['js']['willexpire'] = 'សោអ្នកចំពោះកែតម្រូវទំព័រនេះ ហួសពែលក្នុងមួយនាទី។\nកុំឲ្យមានជម្លោះ ប្រើ «បង្ហាញ»​ ទៅកំណត់​ឡើង​វិញ។';
$lang['js']['notsavedyet'] = "កម្រែមិនទានរុក្សាទកត្រូវបោះបង់។\nបន្តទៅទាឬទេ?";
$lang['rssfailed'] = 'មានកំហុសពេលទៅ​ប្រមូល​យកមតិ​ព័ត៌មាន៖ ';
diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php
index c85a66d38..91825c797 100644
--- a/inc/lang/ko/lang.php
+++ b/inc/lang/ko/lang.php
@@ -93,7 +93,7 @@ $lang['txt_filename'] = '업로드 파일 이름을 입력합니다.(
$lang['txt_overwrt'] = '새로운 파일로 이전 파일을 교체합니다.';
$lang['lockedby'] = '현재 잠금 사용자';
$lang['lockexpire'] = '잠금 해제 시간';
-$lang['willexpire'] = '잠시 후 편집 잠금이 해제됩니다.\n편집 충돌을 피하려면 미리보기를 눌러 잠금 시간을 다시 설정하기 바랍니다.';
+$lang['js']['willexpire'] = '잠시 후 편집 잠금이 해제됩니다.\n편집 충돌을 피하려면 미리보기를 눌러 잠금 시간을 다시 설정하기 바랍니다.';
$lang['js']['notsavedyet'] = '저장하지 않은 변경은 지워집니다.
계속하시겠습니까?';
$lang['js']['searchmedia'] = '파일 찾기';
@@ -125,7 +125,6 @@ $lang['js']['nosmblinks'] = '윈도우 공유 파일과의 연결은 MS 인
$lang['js']['linkwiz'] = '링크 마법사';
$lang['js']['linkto'] = '다음으로 연결:';
$lang['js']['del_confirm'] = '정말로 선택된 항목(들)을 삭제하시겠습니까?';
-$lang['js']['mu_btn'] = '여러 파일들을 한번에 업로드합니다.';
$lang['rssfailed'] = 'feed 가져오기 실패: ';
$lang['nothingfound'] = '아무 것도 없습니다.';
$lang['mediaselect'] = '미디어 파일 선택';
diff --git a/inc/lang/ku/lang.php b/inc/lang/ku/lang.php
index 9bed43cd1..63ccafa35 100644
--- a/inc/lang/ku/lang.php
+++ b/inc/lang/ku/lang.php
@@ -60,7 +60,7 @@ $lang['txt_filename'] = 'Enter wikiname (optional)';
$lang['txt_overwrt'] = 'Overwrite existing file';
$lang['lockedby'] = 'Currently locked by';
$lang['lockexpire'] = 'Lock expires at';
-$lang['willexpire'] = 'Your lock for editing this page is about to expire in a minute.\nTo avoid conflicts use the preview button to reset the locktimer.';
+$lang['js']['willexpire'] = 'Your lock for editing this page is about to expire in a minute.\nTo avoid conflicts use the preview button to reset the locktimer.';
$lang['js']['notsavedyet'] = "Unsaved changes will be lost.\nReally continue?";
diff --git a/inc/lang/la/lang.php b/inc/lang/la/lang.php
index d10c094f8..fd34a4ef8 100644
--- a/inc/lang/la/lang.php
+++ b/inc/lang/la/lang.php
@@ -94,7 +94,7 @@ $lang['txt_filename'] = 'Onerare (optio):';
$lang['txt_overwrt'] = 'Documento ueteri imponere:';
$lang['lockedby'] = 'Nunc hoc intercludit';
$lang['lockexpire'] = 'Hoc apertum';
-$lang['willexpire'] = 'Interclusio paginae recensendae uno minuto finita est.\nUt errores uites, \'praeuisio\' preme ut interclusionem ripristines.';
+$lang['js']['willexpire'] = 'Interclusio paginae recensendae uno minuto finita est.\nUt errores uites, \'praeuisio\' preme ut interclusionem ripristines.';
$lang['js']['notsavedyet'] = 'Res non seruatae amissurae sunt.';
$lang['js']['searchmedia'] = 'Quaere inter documenta';
$lang['js']['keepopen'] = 'Fenestram apertam tene';
@@ -125,7 +125,6 @@ Adhuc transcribere nexum potes.';
$lang['js']['linkwiz'] = 'Connectendi ductor';
$lang['js']['linkto'] = 'Nexum ad:';
$lang['js']['del_confirm'] = 'Delere electas res uin?';
-$lang['js']['mu_btn'] = 'Plura documenta uno tempore onerare';
$lang['rssfailed'] = 'Error in restituendo ';
$lang['nothingfound'] = 'Nihil inuentum est.';
$lang['mediaselect'] = 'Documenta uisiua:';
diff --git a/inc/lang/lb/lang.php b/inc/lang/lb/lang.php
index 09fc41f08..191a9bab5 100644
--- a/inc/lang/lb/lang.php
+++ b/inc/lang/lb/lang.php
@@ -84,7 +84,7 @@ $lang['txt_filename'] = 'Eroplueden als (optional)';
$lang['txt_overwrt'] = 'Bestehend Datei iwwerschreiwen';
$lang['lockedby'] = 'Am Moment gespaart vun';
$lang['lockexpire'] = 'D\'Spär leeft of ëm';
-$lang['willexpire'] = 'Deng Spär fir d\'Säit ze änneren leeft an enger Minutt of.\nFir Konflikter ze verhënneren, dréck op Kucken ouni ofzespäicheren.';
+$lang['js']['willexpire'] = 'Deng Spär fir d\'Säit ze änneren leeft an enger Minutt of.\nFir Konflikter ze verhënneren, dréck op Kucken ouni ofzespäicheren.';
$lang['js']['notsavedyet'] = "Net gespäicher Ännerunge gi verluer.\nWierklech weiderfueren?";
$lang['rssfailed'] = 'Et ass e Feeler virkomm beim erofluede vun dësem Feed: ';
$lang['nothingfound'] = 'Näischt fond.';
diff --git a/inc/lang/lt/lang.php b/inc/lang/lt/lang.php
index 6ae5f6c73..d14a0695a 100644
--- a/inc/lang/lt/lang.php
+++ b/inc/lang/lt/lang.php
@@ -41,8 +41,6 @@ $lang['btn_backlink'] = 'Atgalinės nuorodos';
$lang['btn_backtomedia'] = 'Atgal į Mediabylos išsirinkimą';
$lang['btn_subscribe'] = 'Užsisakyti keitimų prenumeratą';
$lang['btn_unsubscribe'] = 'Atsisakyti keitimų prenumeratos';
-$lang['btn_subscribens'] = 'Užsakyti vardų srities prenumeratą';
-$lang['btn_unsubscribens'] = 'Atsisakyti vardų srities prenumeratos';
$lang['btn_profile'] = 'Atnaujinti profilį';
$lang['btn_reset'] = 'Atstata';
$lang['btn_resendpwd'] = 'Išsiųsti naują slaptažodį';
@@ -92,7 +90,7 @@ $lang['txt_filename'] = 'Įveskite wikivardą (nebūtina)';
$lang['txt_overwrt'] = 'Perrašyti egzistuojančią bylą';
$lang['lockedby'] = 'Užrakintas vartotojo';
$lang['lockexpire'] = 'Užraktas bus nuimtas';
-$lang['willexpire'] = 'Šio puslapio redagavimo užrakto galiojimo laikas baigsis po minutės.\nNorėdami išvengti nesklandumų naudokite peržiūros mygtuką ir užraktas atsinaujins.';
+$lang['js']['willexpire'] = 'Šio puslapio redagavimo užrakto galiojimo laikas baigsis po minutės.\nNorėdami išvengti nesklandumų naudokite peržiūros mygtuką ir užraktas atsinaujins.';
$lang['js']['notsavedyet'] = "Pakeitimai nebus išsaugoti.\nTikrai tęsti?";
$lang['rssfailed'] = 'Siunčiant šį feed\'ą įvyko klaida: ';
$lang['nothingfound'] = 'Paieškos rezultatų nėra.';
@@ -115,7 +113,6 @@ $lang['js']['keepopen'] = 'Pažymėjus palikti langą atvertą';
$lang['js']['hidedetails'] = 'Paslėpti Detales';
$lang['js']['nosmblinks'] = 'Nurodos į "Windows shares" veikia tik su Microsoft Internet Explorer naršykle.
Vis dėlto, jūs galite nukopijuoti šią nuorodą.';
-$lang['js']['mu_btn'] = 'Pateikite kelis failus vienu ypu';
$lang['mediausage'] = 'Failo nuorodai užrašyti naudokite tokią sintaksę:';
$lang['mediaview'] = 'Žiūrėti pirminį failą';
$lang['mediaroot'] = 'pradžia (root)';
diff --git a/inc/lang/lv/lang.php b/inc/lang/lv/lang.php
index 519ca231a..205d2e56d 100644
--- a/inc/lang/lv/lang.php
+++ b/inc/lang/lv/lang.php
@@ -45,6 +45,8 @@ $lang['btn_recover'] = 'Atjaunot melnrakstu';
$lang['btn_draftdel'] = 'Dzēst melnrakstu';
$lang['btn_revert'] = 'Atjaunot';
$lang['btn_register'] = 'Reģistrēties';
+$lang['btn_apply'] = 'Labi';
+$lang['btn_media'] = 'Mēdiju pārvaldnieks';
$lang['loggedinas'] = 'Pieteicies kā';
$lang['user'] = 'Lietotājvārds';
$lang['pass'] = 'Parole';
@@ -89,7 +91,7 @@ $lang['txt_filename'] = 'Ievadi vikivārdu (nav obligāts)';
$lang['txt_overwrt'] = 'Aizstāt esošo failu';
$lang['lockedby'] = 'Patlaban bloķējis ';
$lang['lockexpire'] = 'Bloķējums beigsies ';
-$lang['willexpire'] = 'Tavs bloķējums uz šo lapu pēc minūtes beigsies.\nLai izvairītos no konflikta, nospied Iepriekšapskata pogu\n un bloķējuma laiku sāks skaitīt no jauna.';
+$lang['js']['willexpire'] = 'Tavs bloķējums uz šo lapu pēc minūtes beigsies.\nLai izvairītos no konflikta, nospied Iepriekšapskata pogu\n un bloķējuma laiku sāks skaitīt no jauna.';
$lang['js']['notsavedyet'] = 'Veiktas bet nav saglabātas izmaiņas.
Vai tiešām tās nevajag?';
$lang['js']['searchmedia'] = 'Meklēt failus';
@@ -122,6 +124,15 @@ $lang['js']['linkwiz'] = 'Saišu vednis';
$lang['js']['linkto'] = 'Saite uz: ';
$lang['js']['del_confirm'] = 'Dzēst šo šķirkli?';
$lang['js']['mu_btn'] = 'Augšuplādēt uzreiz vairākus failus.';
+$lang['js']['restore_confirm'] = 'Tiešām atjaunot šo versiju';
+$lang['js']['media_diff'] = 'Skatīt atšķirību';
+$lang['js']['media_diff_both'] = 'Blakus';
+$lang['js']['media_diff_opacity'] = 'Pārklāti';
+$lang['js']['media_select'] = 'Norādīt failus...';
+$lang['js']['media_upload_btn'] = 'Augšuplādēt';
+$lang['js']['media_done_btn'] = 'Gatavs';
+$lang['js']['media_drop'] = 'Nomet te augšuplādējamos failus';
+$lang['js']['media_overwrt'] = 'Rakstīt pāri esošajiem failiem';
$lang['rssfailed'] = 'Kļūda saņemot saturu no ';
$lang['nothingfound'] = 'Nekas nav atrasts.';
$lang['mediaselect'] = 'Mēdiju faila izvēle';
@@ -160,7 +171,7 @@ $lang['diff_type'] = 'Skatīt atšķirības:';
$lang['diff_inline'] = 'Iekļauti';
$lang['diff_side'] = 'Blakus';
$lang['line'] = 'Rinda';
-$lang['breadcrumb'] = 'Ceļš';
+$lang['breadcrumb'] = 'Apmeklēts';
$lang['youarehere'] = 'Tu atrodies šeit';
$lang['lastmod'] = 'Labota';
$lang['by'] = ', labojis';
@@ -176,6 +187,10 @@ $lang['mail_changed'] = 'lapa mainīta:';
$lang['mail_subscribe_list'] = 'Nodaļā mainītās lapas:';
$lang['mail_new_user'] = 'Jauns lietotājs:';
$lang['mail_upload'] = 'augšupielādētais fails:';
+$lang['changes_type'] = 'Skatīt izmaiņas';
+$lang['pages_changes'] = 'Lapās';
+$lang['media_changes'] = 'Mēdiju failos';
+$lang['both_changes'] = 'Gan lapās, gan mēdiju failos';
$lang['qb_bold'] = 'Trekninājums';
$lang['qb_italic'] = 'Kursīvs';
$lang['qb_underl'] = 'Pasvītrojums';
@@ -216,6 +231,9 @@ $lang['img_copyr'] = 'Autortiesības';
$lang['img_format'] = 'Formāts';
$lang['img_camera'] = 'Fotoaparāts';
$lang['img_keywords'] = 'Atslēgvārdi';
+$lang['img_width'] = 'Platums';
+$lang['img_height'] = 'Augstums';
+$lang['img_manager'] = 'Skatīt mēdiju pārvaldniekā';
$lang['subscr_subscribe_success'] = '%s pievienots %s abonēšanas sarakstam';
$lang['subscr_subscribe_error'] = 'Kļūme pievienojot %s %s abonēšanas sarakstam.';
$lang['subscr_subscribe_noaddress'] = 'Nav zināma jūsu e-pasta adrese, tāpēc nevarat abonēt.';
@@ -281,3 +299,27 @@ $lang['hours'] = 'pirms %d stundām';
$lang['minutes'] = 'pirms %d minūtēm';
$lang['seconds'] = 'pirms %d sekundēm';
$lang['wordblock'] = 'Grozījumus nevarēju saglabāt, jo tie satur aizliegto vārdu (spamu).';
+$lang['media_uploadtab'] = 'Augšuplādēt';
+$lang['media_searchtab'] = 'Meklēt';
+$lang['media_file'] = 'Fails';
+$lang['media_viewtab'] = 'Skatīt';
+$lang['media_edittab'] = 'Labot';
+$lang['media_historytab'] = 'Vēsture';
+$lang['media_list_thumbs'] = 'Sīktēli';
+$lang['media_list_rows'] = 'Rindas';
+$lang['media_sort_name'] = 'Nosaukums';
+$lang['media_sort_date'] = 'Datums';
+$lang['media_namespaces'] = 'Norādīt nodaļu';
+$lang['media_files'] = 'Faili nodaļā s%';
+$lang['media_upload'] = 'Augšuplādēt nodaļā s%';
+$lang['media_search'] = 'Meklēt nodaļā s%';
+$lang['media_view'] = 's%';
+$lang['media_viewold'] = 's% nodaļā s%';
+$lang['media_edit'] = 'Labot %s';
+$lang['media_history'] = 's% vēsture';
+$lang['media_meta_edited'] = 'metadati laboti';
+$lang['media_perm_read'] = 'Atvainojiet, jums nav tiesību skatīt failus. ';
+$lang['media_perm_upload'] = 'Atvainojiet, jums nav tiesību augšupielādēt. ';
+$lang['media_update'] = 'Augšupielādēt jaunu versiju';
+$lang['media_restore'] = 'Atjaunot šo versiju';
+$lang['plugin_install_err'] = 'Modulis aplami instalēts. Pārdēvē moduļa direktoriju s% par s%.';
diff --git a/inc/lang/mg/lang.php b/inc/lang/mg/lang.php
index 8c95a9e02..4142f00d0 100644
--- a/inc/lang/mg/lang.php
+++ b/inc/lang/mg/lang.php
@@ -54,7 +54,7 @@ $lang['txt_filename'] = 'Ampidiro ny anaran\'ny wiki (tsy voatery)';
$lang['txt_overwrt'] = 'Fafana izay rakitra efa misy?';
$lang['lockedby'] = 'Mbola voahidin\'i';
$lang['lockexpire'] = 'Afaka ny hidy amin\'ny';
-$lang['willexpire'] = 'Efa ho lany fotoana afaka iray minitra ny hidy ahafahanao manova ny pejy.\nMba hialana amin\'ny conflit dia ampiasao ny bokotra topi-maso hamerenana ny timer-n\'ny hidy.';
+$lang['js']['willexpire'] = 'Efa ho lany fotoana afaka iray minitra ny hidy ahafahanao manova ny pejy.\nMba hialana amin\'ny conflit dia ampiasao ny bokotra topi-maso hamerenana ny timer-n\'ny hidy.';
$lang['js']['notsavedyet'] = "Misy fiovana tsy voarakitra, ho very izany ireo.\nAzo antoka fa hotohizana?";
$lang['rssfailed'] = 'An error occured while fetching this feed: ';
diff --git a/inc/lang/mk/lang.php b/inc/lang/mk/lang.php
index 456a5a3d4..ca4a746cd 100644
--- a/inc/lang/mk/lang.php
+++ b/inc/lang/mk/lang.php
@@ -92,7 +92,7 @@ $lang['txt_filename'] = 'Качи како (неморално)';
$lang['txt_overwrt'] = 'Пребриши ја веќе постоечката датотека';
$lang['lockedby'] = 'Моментално заклучена од';
$lang['lockexpire'] = 'Клучот истекува на';
-$lang['willexpire'] = 'Вашиот клуч за уредување на оваа страница ќе истече за една минута.\nЗа да избегнете конфликти и да го ресетирате бројачот за време, искористете го копчето за преглед.';
+$lang['js']['willexpire'] = 'Вашиот клуч за уредување на оваа страница ќе истече за една минута.\nЗа да избегнете конфликти и да го ресетирате бројачот за време, искористете го копчето за преглед.';
$lang['js']['notsavedyet'] = "Незачуваните промени ќе бидат изгубени.\nСакате да продолжите?";
$lang['rssfailed'] = 'Се појави грешка при повлекувањето на овој канал:';
$lang['nothingfound'] = 'Ништо не е пронајдено.';
@@ -117,7 +117,6 @@ $lang['js']['nosmblinks'] = 'Поврзувањето со Windows Shares
$lang['js']['linkwiz'] = 'Волшебник за врски';
$lang['js']['linkto'] = 'Врска до:';
$lang['js']['del_confirm'] = 'Дали навистина да ги избришам избраните датотеки?';
-$lang['js']['mu_btn'] = 'Качете повеќе датотеки наеднаш';
$lang['mediausage'] = 'Користете ја следнава синтакса за референцирање кон оваа датотека:';
$lang['mediaview'] = 'Види ја оригиналната датотека';
$lang['mediaroot'] = 'root';
diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php
index d991d46cf..63fda3e5a 100644
--- a/inc/lang/mr/lang.php
+++ b/inc/lang/mr/lang.php
@@ -45,8 +45,6 @@ $lang['btn_backlink'] = 'येथे काय जोडले आह
$lang['btn_backtomedia'] = 'परत माध्यम फाइल निवडीकड़े';
$lang['btn_subscribe'] = 'पृष्ठाच्या बदलांची पुरवणी (फीड) लावा ';
$lang['btn_unsubscribe'] = 'पृष्ठाच्या बदलांची पुरवणी (फीड) बंद करा';
-$lang['btn_subscribens'] = 'नामसमुहाच्या (नेमस्पेस) बदलांची पुरवणी (फीड) लावा';
-$lang['btn_unsubscribens'] = 'नामसमुहाच्या (नेमस्पेस) बदलांची पुरवणी (फीड) बंद करा';
$lang['btn_profile'] = 'प्रोफाइल अद्ययावत करा';
$lang['btn_reset'] = 'रिसेट';
$lang['btn_resendpwd'] = 'कृपया परवलीचा नवीन शब्द माझ्या इमेल पत्त्यावर पाठविणे.';
@@ -96,7 +94,7 @@ $lang['txt_filename'] = 'अपलोड उर्फ़ ( वैकल्
$lang['txt_overwrt'] = 'अस्तित्वात असलेल्या फाइलवरच सुरक्षित करा.';
$lang['lockedby'] = 'सध्या लॉक करणारा :';
$lang['lockexpire'] = 'सध्या लॉक करणारा :';
-$lang['willexpire'] = 'हे पृष्ठ संपादित करण्यासाठी मिळालेले लॉक एखाद्या मिनिटात संपणार आहे.\n चुका होऊ नयेत म्हणुन कृपया प्रीव्यू बटन दाबुन लॉक ची वेळ पुन्हा चालू करा.';
+$lang['js']['willexpire'] = 'हे पृष्ठ संपादित करण्यासाठी मिळालेले लॉक एखाद्या मिनिटात संपणार आहे.\n चुका होऊ नयेत म्हणुन कृपया प्रीव्यू बटन दाबुन लॉक ची वेळ पुन्हा चालू करा.';
$lang['js']['notsavedyet'] = "सुरक्षित न केलेले बदल नष्ट होतील. नक्की करू का ?";
$lang['rssfailed'] = 'ही पुरवणी आणण्यात काही चूक झाली:';
$lang['nothingfound'] = 'काही सापडला नाही.';
@@ -118,7 +116,6 @@ $lang['mediafiles'] = 'मध्ये उपलब्ध असल
$lang['js']['keepopen'] = 'निवड केल्यावर विण्डो उघडी ठेवा';
$lang['js']['hidedetails'] = 'सविस्तर मजकूर लपवा';
$lang['js']['nosmblinks'] = 'विन्डोज़ शेअर ला लिंक केल्यास ते फक्त मायक्रोसॉफ़्ट इन्टरनेट एक्स्प्लोरर वरच चालते. तरी तुम्ही लिंक कॉपी करू शकता.';
-$lang['js']['mu_btn'] = 'एक वेळेस अनेक फाइल वापरा';
$lang['mediausage'] = 'ह्या फाइलचा संदर्भ देण्यासाठी खालील सिन्टॅक्स वापरा :';
$lang['mediaview'] = 'मूळ फाइल बघू ';
$lang['mediaroot'] = 'रूट';
diff --git a/inc/lang/ne/lang.php b/inc/lang/ne/lang.php
index e5b30ceaf..97e2dde5c 100644
--- a/inc/lang/ne/lang.php
+++ b/inc/lang/ne/lang.php
@@ -38,8 +38,6 @@ $lang['btn_backlink'] = 'पछाडिका लिङ्कहरु
$lang['btn_backtomedia'] = 'मिडिया छनौटमा फर्कनुहोस्';
$lang['btn_subscribe'] = 'पृष्ठ परिवर्तन ग्राह्य गर्नुहोस्';
$lang['btn_unsubscribe'] = 'पृष्ठ परिवर्तन अग्राह्य गर्नुहोस्';
-$lang['btn_subscribens'] = 'नेमस्पेस परिवर्तन ग्राह्य गर्नुहोस् ';
-$lang['btn_unsubscribens'] = 'नेमस्पेस परिवर्तन अग्राह्य गर्नुहोस् ';
$lang['btn_profile'] = 'प्रोफाइल अध्यावधिक गर्नुहोस् ';
$lang['btn_reset'] = 'पूर्वरुपमा फर्काउनुहोस';
$lang['btn_resendpwd'] = 'नयाँ प्रवेश शव्द(पासवर्ड) पठाउनुहोस् ';
@@ -89,7 +87,7 @@ $lang['txt_filename'] = 'अर्को रुपमा अपलो
$lang['txt_overwrt'] = 'रहेको उहि नामको फाइललाई मेटाउने';
$lang['lockedby'] = 'अहिले ताल्चा लगाइएको';
$lang['lockexpire'] = 'ताल्चा अवधि सकिने :';
-$lang['willexpire'] = 'तपाईलले यो पृष्ठ सम्पादन गर्न लगाउनु भएको ताल्चाको अवधि एक मिनेट भित्र सकिदै छ। \n द्वन्द हुन नदिन पूर्वरुप वा ताल्चा समय परिवर्तन गर्नुहोस् ।';
+$lang['js']['willexpire'] = 'तपाईलले यो पृष्ठ सम्पादन गर्न लगाउनु भएको ताल्चाको अवधि एक मिनेट भित्र सकिदै छ। \n द्वन्द हुन नदिन पूर्वरुप वा ताल्चा समय परिवर्तन गर्नुहोस् ।';
$lang['js']['notsavedyet'] = "तपाईले वचन गर्नु नभएको परिवर्रन हराउने छ। \n साच्चै जारी गर्नुहुन्छ ।";
$lang['rssfailed'] = 'यो फिड लिइ आउदा गल्ति भयो ।';
$lang['nothingfound'] = 'केहि पनि भेटिएन ।';
@@ -110,7 +108,6 @@ $lang['mediafiles'] = ' उपलब्ध फाइलहरु ';
$lang['js']['keepopen'] = 'छनौटमा विन्डो खुला राख्नुहोस् ';
$lang['js']['hidedetails'] = 'जानकारी लुकाउनु होस् ';
$lang['js']['nosmblinks'] = 'विन्डोहरु लिङ्क गर्दा माइक्रो सफ्ट एक्सप्लोररमामात्र काम साझा हुन्छ । तर कपि गर्न र टास्न मिल्छ। ';
-$lang['js']['mu_btn'] = 'धेरै वटा फाइलहरु एकैपटक अपलोड गर्नुहोस् ।';
$lang['mediausage'] = 'फाइललाई रेफरेन्स गर्न निम्न सुत्र प्रयोग गर्नुहोस् :';
$lang['mediaview'] = 'सक्कली फाइल हेर्नुहोस् ';
$lang['mediaroot'] = 'रुट(मूख्य प्रयोगकर्ता)';
diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php
index 7dbde5ac8..62d23b0d2 100644
--- a/inc/lang/nl/lang.php
+++ b/inc/lang/nl/lang.php
@@ -14,6 +14,7 @@
* @author Matthias Carchon <webmaster@c-mattic.be>
* @author Marijn Hofstra <hofstra.m@gmail.com>
* @author Timon Van Overveldt <timonvo@gmail.com>
+ * @author Jeroen
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -55,6 +56,8 @@ $lang['btn_recover'] = 'Herstel concept';
$lang['btn_draftdel'] = 'Verwijder concept';
$lang['btn_revert'] = 'Herstellen';
$lang['btn_register'] = 'Registreren';
+$lang['btn_apply'] = 'Toepassen';
+$lang['btn_media'] = 'Media beheerder';
$lang['loggedinas'] = 'Ingelogd als';
$lang['user'] = 'Gebruikersnaam';
$lang['pass'] = 'Wachtwoord';
@@ -99,7 +102,7 @@ $lang['txt_filename'] = 'Vul nieuwe naam in (optioneel)';
$lang['txt_overwrt'] = 'Overschrijf bestaand bestand';
$lang['lockedby'] = 'Momenteel in gebruik door';
$lang['lockexpire'] = 'Exclusief gebruiksrecht vervalt op';
-$lang['willexpire'] = 'Je exclusieve gebruiksrecht voor het aanpassen van deze pagina verloopt over een minuut.\nKlik op de Voorbeeld-knop om het exclusieve gebruiksrecht te verlengen.';
+$lang['js']['willexpire'] = 'Je exclusieve gebruiksrecht voor het aanpassen van deze pagina verloopt over een minuut.\nKlik op de Voorbeeld-knop om het exclusieve gebruiksrecht te verlengen.';
$lang['js']['notsavedyet'] = 'Nog niet bewaarde wijzigingen zullen verloren gaan.
Weet je zeker dat je wilt doorgaan?';
$lang['js']['searchmedia'] = 'Zoek naar bestanden';
@@ -131,7 +134,14 @@ Je kan de link wel kopiëren en plakken.';
$lang['js']['linkwiz'] = 'Linkwizard';
$lang['js']['linkto'] = 'Link naar:';
$lang['js']['del_confirm'] = 'Item(s) verwijderen?';
-$lang['js']['mu_btn'] = 'Meerdere files tegelijk uploaden';
+$lang['js']['restore_confirm'] = 'Werkelijk deze versie terugzetten?';
+$lang['js']['media_diff'] = 'Verschillen bekijken:';
+$lang['js']['media_diff_both'] = 'Naast elkaar';
+$lang['js']['media_diff_opacity'] = 'Doorschijnend';
+$lang['js']['media_select'] = 'Selecteer bestanden';
+$lang['js']['media_done_btn'] = 'Klaar';
+$lang['js']['media_cancel'] = 'Verwijderen';
+$lang['js']['media_overwrt'] = 'Bestaande bestanden overschrijven';
$lang['rssfailed'] = 'Er is een fout opgetreden bij het ophalen van de feed: ';
$lang['nothingfound'] = 'Er werd niets gevonden.';
$lang['mediaselect'] = 'Bestandsselectie';
@@ -186,6 +196,9 @@ $lang['mail_changed'] = 'pagina aangepast:';
$lang['mail_subscribe_list'] = 'Pagina\'s veranderd in namespace:';
$lang['mail_new_user'] = 'nieuwe gebruiker:';
$lang['mail_upload'] = 'bestand geüpload:';
+$lang['pages_changes'] = 'Pagina\'s';
+$lang['media_changes'] = 'Media bestanden';
+$lang['both_changes'] = 'Zowel pagina\'s als media bestanden';
$lang['qb_bold'] = 'Vette tekst';
$lang['qb_italic'] = 'Cursieve tekst';
$lang['qb_underl'] = 'Onderstreepte tekst';
@@ -226,6 +239,9 @@ $lang['img_copyr'] = 'Copyright';
$lang['img_format'] = 'Formaat';
$lang['img_camera'] = 'Camera';
$lang['img_keywords'] = 'Trefwoorden';
+$lang['img_width'] = 'Breedte';
+$lang['img_height'] = 'Hoogte';
+$lang['img_manager'] = 'In media beheerder bekijken';
$lang['subscr_subscribe_success'] = '%s is ingeschreven voor %s';
$lang['subscr_subscribe_error'] = 'Fout bij inschrijven van %s voor %s';
$lang['subscr_subscribe_noaddress'] = 'Er is geen emailadres geassocieerd met uw account, u kunt daardoor niet worden ingeschreven.';
@@ -290,3 +306,22 @@ $lang['hours'] = '%d uren geleden';
$lang['minutes'] = '%d minuten geleden';
$lang['seconds'] = '%d seconden geleden';
$lang['wordblock'] = 'Uw wijziging is niet opgeslagen omdat deze niet-toegestane tekst bevat (spam).';
+$lang['media_searchtab'] = 'Zoeken';
+$lang['media_file'] = 'Bestand';
+$lang['media_viewtab'] = 'Beeld';
+$lang['media_edittab'] = 'Bewerken';
+$lang['media_historytab'] = 'Geschiedenis';
+$lang['media_list_rows'] = 'Regels';
+$lang['media_sort_name'] = 'Naam';
+$lang['media_sort_date'] = 'Datum';
+$lang['media_namespaces'] = 'Kies naamruimte';
+$lang['media_files'] = 'Bestanden in %s';
+$lang['media_search'] = 'Zoeken in %s';
+$lang['media_view'] = '%s';
+$lang['media_edit'] = '%s bewerken';
+$lang['media_history'] = 'Geschiedenis van %s';
+$lang['media_meta_edited'] = 'Metagegevens bewerkt';
+$lang['media_perm_read'] = 'Sorry, u heeft niet voldoende rechten om bestanden te lezen.';
+$lang['media_perm_upload'] = 'Sorry, u heeft niet voldoende rechten om bestanden te uploaden.';
+$lang['media_restore'] = 'Deze versie terugzetten';
+$lang['plugin_install_err'] = 'Plugin is juist geinstalleerd. Hernoem plugin map \'%s\' naar \'%s\'.';
diff --git a/inc/lang/no/adminplugins.txt b/inc/lang/no/adminplugins.txt
index 32499a2e4..091ae4d7e 100644
--- a/inc/lang/no/adminplugins.txt
+++ b/inc/lang/no/adminplugins.txt
@@ -1 +1 @@
-====== Ekstra tilleggene ====== \ No newline at end of file
+====== Ekstra tillegg ====== \ No newline at end of file
diff --git a/inc/lang/no/conflict.txt b/inc/lang/no/conflict.txt
index 89479af4f..855034685 100644
--- a/inc/lang/no/conflict.txt
+++ b/inc/lang/no/conflict.txt
@@ -1,4 +1,4 @@
-====== Det fins en nyere versjon ======
+====== Det finnes en nyere versjon ======
Det fins en nyere versjon av dokumentet du har redigert. Dette kan skje når en annen bruker redigerer dokumentet samtidig med deg.
diff --git a/inc/lang/no/lang.php b/inc/lang/no/lang.php
index d2be945e6..88d21b536 100644
--- a/inc/lang/no/lang.php
+++ b/inc/lang/no/lang.php
@@ -15,11 +15,13 @@
* @author Knut Staring <knutst@gmail.com>
* @author Lisa Ditlefsen <lisa@vervesearch.com>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
+ * @author Rune Rasmussen syntaxerror.no@gmail.com
+ * @author Jon Bøe <jonmagneboe@hotmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
-$lang['doublequoteopening'] = '“';
-$lang['doublequoteclosing'] = '”';
+$lang['doublequoteopening'] = '«';
+$lang['doublequoteclosing'] = '»';
$lang['singlequoteopening'] = '‘';
$lang['singlequoteclosing'] = '’';
$lang['apostrophe'] = '\'';
@@ -48,9 +50,6 @@ $lang['btn_back'] = 'Tilbake';
$lang['btn_backlink'] = 'Tilbakelenker';
$lang['btn_backtomedia'] = 'Tilbake til valg av mediafil';
$lang['btn_subscribe'] = 'Abonner på endringer';
-$lang['btn_unsubscribe'] = 'Ikke abonner på endringer';
-$lang['btn_subscribens'] = 'Abonner på endringer i navnerom';
-$lang['btn_unsubscribens'] = 'Stopp abonnement på endringer i navnerom';
$lang['btn_profile'] = 'Oppdater profil';
$lang['btn_reset'] = 'Tilbakestill';
$lang['btn_resendpwd'] = 'Send nytt passord';
@@ -59,6 +58,8 @@ $lang['btn_recover'] = 'Gjennvinn kladd';
$lang['btn_draftdel'] = 'Slett kladd';
$lang['btn_revert'] = 'Gjenopprette';
$lang['btn_register'] = 'Registrer deg';
+$lang['btn_apply'] = 'Bruk';
+$lang['btn_media'] = 'Mediefiler';
$lang['loggedinas'] = 'Innlogget som';
$lang['user'] = 'Brukernavn';
$lang['pass'] = 'Passord';
@@ -103,8 +104,49 @@ $lang['txt_filename'] = 'Skriv inn wikinavn (alternativt)';
$lang['txt_overwrt'] = 'Overskriv eksisterende fil';
$lang['lockedby'] = 'Stengt av';
$lang['lockexpire'] = 'Avstengningen opphører';
-$lang['willexpire'] = 'Din redigeringslås for dette dokumentet kommer snart til å opphøre.\nFor å unngå versjonskonflikter bør du forhåndsvise dokumentet ditt for å forlenge redigeringslåsen.';
-$lang['js']['notsavedyet'] = "Ulagrede endringer vil gå tapt.\nVil du fortsette?";
+$lang['js']['willexpire'] = 'Din redigeringslås for dette dokumentet kommer snart til å opphøre.\nFor å unngå versjonskonflikter bør du forhåndsvise dokumentet ditt for å forlenge redigeringslåsen.';
+$lang['js']['notsavedyet'] = 'Ulagrede endringer vil gå tapt.
+Vil du fortsette?';
+$lang['js']['searchmedia'] = 'Søk for filer';
+$lang['js']['keepopen'] = 'Hold vindu åpent ved valg';
+$lang['js']['hidedetails'] = 'Skjul detaljer';
+$lang['js']['mediatitle'] = 'Lenkeinnstillinger';
+$lang['js']['mediadisplay'] = 'Lenketype';
+$lang['js']['mediaalign'] = 'Justering';
+$lang['js']['mediasize'] = 'Bildestørrelse';
+$lang['js']['mediatarget'] = 'Lenkemål';
+$lang['js']['mediaclose'] = 'Lukk';
+$lang['js']['mediainsert'] = 'Sett inn';
+$lang['js']['mediadisplayimg'] = 'Vis bilde';
+$lang['js']['mediadisplaylnk'] = 'Vis bare lenken';
+$lang['js']['mediasmall'] = 'Liten versjon';
+$lang['js']['mediamedium'] = 'Medium versjon';
+$lang['js']['medialarge'] = 'Stor versjon';
+$lang['js']['mediaoriginal'] = 'Original versjon';
+$lang['js']['medialnk'] = 'Lenke til detaljeside';
+$lang['js']['mediadirect'] = 'Direktelenke til original';
+$lang['js']['medianolnk'] = 'Ingen lenke';
+$lang['js']['medianolink'] = 'Ikke lenk bilde';
+$lang['js']['medialeft'] = 'Venstrejuster bilde';
+$lang['js']['mediaright'] = 'Høyrejuster bilde';
+$lang['js']['mediacenter'] = 'Midtstill bilde';
+$lang['js']['medianoalign'] = 'Ingen justering';
+$lang['js']['nosmblinks'] = 'Lenker til Windows-ressurser fungerer bare i Microsoft sin Internet Explorer.
+Du kan fortsatt kopiere og lime inn lenken.';
+$lang['js']['linkwiz'] = 'guide til lenker';
+$lang['js']['linkto'] = 'Lenke til:';
+$lang['js']['del_confirm'] = 'Slett denne oppføringen?';
+$lang['js']['restore_confirm'] = 'Er du sikker på at du vil gjenopprette denne versjonen?';
+$lang['js']['media_diff'] = 'Vis forskjeller:';
+$lang['js']['media_diff_both'] = 'Side ved side';
+$lang['js']['media_diff_opacity'] = 'Gjennomskinnelighet';
+$lang['js']['media_diff_portions'] = 'Glidebryter';
+$lang['js']['media_select'] = 'Velg filer…';
+$lang['js']['media_upload_btn'] = 'Last opp';
+$lang['js']['media_done_btn'] = 'Ferdig';
+$lang['js']['media_drop'] = 'Dra filer hit for å laste dem opp';
+$lang['js']['media_cancel'] = 'fjern';
+$lang['js']['media_overwrt'] = 'Erstatt eksisterende filer';
$lang['rssfailed'] = 'En feil oppstod da denne kilden skulle hentes:';
$lang['nothingfound'] = 'Ingen data funnet.';
$lang['mediaselect'] = 'Valg av mediafil';
@@ -122,15 +164,7 @@ $lang['deletefail'] = '"%s" kunne ikke slettes - sjekk rettighetene.'
$lang['mediainuse'] = 'Filen "%s" har ikke biltt slettet - den er fortsatt i bruk.';
$lang['namespaces'] = 'Navnerom';
$lang['mediafiles'] = 'Tilgjengelige filer i';
-$lang['js']['searchmedia'] = 'Søk for filer';
-$lang['js']['keepopen'] = 'Hold vindu åpent ved valg';
-$lang['js']['hidedetails'] = 'Skjul detaljer';
-$lang['js']['nosmblinks'] = 'Lenker til Windows-ressurser fungerer bare i Microsoft sin Internet Explorer.
-Du kan fortsatt kopiere og lime inn lenken.';
-$lang['js']['linkwiz'] = 'guide til lenker';
-$lang['js']['linkto'] = 'Lenke til:';
-$lang['js']['del_confirm'] = 'Slett denne oppføringen?';
-$lang['js']['mu_btn'] = 'Last opp flere filer samtidig';
+$lang['accessdenied'] = 'Du har ikke tilgang til å se denne siden';
$lang['mediausage'] = 'Bruk følgende syntaks til å refferer til denne filen:';
$lang['mediaview'] = 'Vis original fil';
$lang['mediaroot'] = 'rot';
@@ -146,6 +180,10 @@ $lang['current'] = 'nåværende versjon';
$lang['yours'] = 'Din versjon';
$lang['diff'] = 'Vis forskjeller mot nåværende versjon';
$lang['diff2'] = 'Vis forskjeller mellom valgte versjoner';
+$lang['difflink'] = 'Lenk til denne sammenligningen';
+$lang['diff_type'] = 'Vis forskjeller:';
+$lang['diff_inline'] = 'I teksten';
+$lang['diff_side'] = 'Side ved side';
$lang['line'] = 'Linje';
$lang['breadcrumb'] = 'Spor';
$lang['youarehere'] = 'Du er her';
@@ -160,8 +198,13 @@ $lang['noflash'] = 'For at dette innholdet skal vises må du ha <a
$lang['download'] = 'Last ned utdraget';
$lang['mail_newpage'] = 'side lagt til:';
$lang['mail_changed'] = 'side endret:';
+$lang['mail_subscribe_list'] = 'side endret i \'namespace\':';
$lang['mail_new_user'] = 'ny bruker:';
$lang['mail_upload'] = 'fil opplastet:';
+$lang['changes_type'] = 'Vis endringer av';
+$lang['pages_changes'] = 'Sider';
+$lang['media_changes'] = 'Mediefiler';
+$lang['both_changes'] = 'Både sider og mediefiler';
$lang['qb_bold'] = 'Fet tekst';
$lang['qb_italic'] = 'Kursiv tekst';
$lang['qb_underl'] = 'Understreket tekst';
@@ -202,11 +245,25 @@ $lang['img_copyr'] = 'Opphavsrett';
$lang['img_format'] = 'Format';
$lang['img_camera'] = 'Kamera';
$lang['img_keywords'] = 'Nøkkelord';
-$lang['subscribe_success'] = 'Lagt til %s som abonnent av listen for %s';
-$lang['subscribe_error'] = 'En feil oppstod når %s skulle legges til som abonnent av listen for %s';
-$lang['subscribe_noaddress'] = 'Det er ingen adresse assosiert med din login. Du kan dermed ikke bli lagt til som abonnent av listen.';
-$lang['unsubscribe_success'] = 'Fjernet %s som abonnent for listen %s';
-$lang['unsubscribe_error'] = 'En feil oppstod når %s skulle fjernes som abonnent fra listen for %s';
+$lang['img_width'] = 'Bredde';
+$lang['img_height'] = 'Høyde';
+$lang['img_manager'] = 'Vis i mediefilbehandler';
+$lang['subscr_subscribe_success'] = 'La til %s som abonnent på %s';
+$lang['subscr_subscribe_error'] = 'Klarte ikke å legge til %s som abonnent på %s';
+$lang['subscr_subscribe_noaddress'] = 'Brukeren din er ikke registrert med noen adresse. Du kan derfor ikke legges til som abonnent.';
+$lang['subscr_unsubscribe_success'] = 'Avsluttet %s sitt abonnement på %s';
+$lang['subscr_unsubscribe_error'] = 'Klarte ikke å avslutte %s sitt abonnement på %s';
+$lang['subscr_already_subscribed'] = '%s abonnerer allerede på %s';
+$lang['subscr_not_subscribed'] = '%s abonnerer ikke på %s';
+$lang['subscr_m_not_subscribed'] = 'Du abonnerer ikke på denne sida eller dette navnerommet';
+$lang['subscr_m_new_header'] = 'Legg til abonnement';
+$lang['subscr_m_current_header'] = 'Gjeldende abonnementer';
+$lang['subscr_m_unsubscribe'] = 'Avmeld';
+$lang['subscr_m_subscribe'] = 'Påmeld';
+$lang['subscr_m_receive'] = 'Motta';
+$lang['subscr_style_every'] = 'e-post for alle endringer';
+$lang['subscr_style_digest'] = 'e-post med sammendrag av endringer for hver side (%.2f dager mellom hver)';
+$lang['subscr_style_list'] = 'liste med sider som er endra siden forrige e-post (%.2f dager mellom hver)';
$lang['authmodfailed'] = 'Feilkonfigurert brukerautorisasjon. Vennligst innformer Wiki-admin.';
$lang['authtempfail'] = 'Brukerautorisasjon er midlertidig utilgjengelig. Om dette vedvarer, vennligst informer Wiki-admin.';
$lang['i_chooselang'] = 'Velg ditt språk';
@@ -234,6 +291,7 @@ $lang['i_pol0'] = 'Åpen Wiki (les, skriv og opplasting for alle)
$lang['i_pol1'] = 'Offentlig Wiki (les for alle, skriving og opplasting bare for registrerte brukere)';
$lang['i_pol2'] = 'Lukket Wiki (les, skriv og opplasting bare for registrerte brukere)';
$lang['i_retry'] = 'Prøv igjen';
+$lang['i_license'] = 'Velg lisens som du vil legge ut innholdet under:';
$lang['mu_intro'] = 'Her kan du laste opp flere filer samtidig. Klikk på utforsk-knappen for å legge dem til i køen. Klikk på "last opp" når du er ferdig med å velge filene. ';
$lang['mu_gridname'] = 'Filnavn';
$lang['mu_gridsize'] = 'Størrelse';
@@ -257,3 +315,28 @@ $lang['days'] = '%d dager siden';
$lang['hours'] = '%d timer siden';
$lang['minutes'] = '%d minutter siden';
$lang['seconds'] = '%d sekunder siden';
+$lang['wordblock'] = 'Din endring ble ikke lagret ettersom den inneholder blokkert tekst (søppel).';
+$lang['media_uploadtab'] = 'Last opp';
+$lang['media_searchtab'] = 'Søk';
+$lang['media_file'] = 'Fil';
+$lang['media_viewtab'] = 'Vis';
+$lang['media_edittab'] = 'Rediger';
+$lang['media_historytab'] = 'Historikk';
+$lang['media_list_thumbs'] = 'Miniatyrbilder';
+$lang['media_list_rows'] = 'Rader';
+$lang['media_sort_name'] = 'etter navn';
+$lang['media_sort_date'] = 'etter dato';
+$lang['media_namespaces'] = 'Velg navnerom';
+$lang['media_files'] = 'Filer i %s';
+$lang['media_upload'] = 'Last opp til navnerommet <strong>%s</strong>.';
+$lang['media_search'] = 'Søk i navnerommet <strong>%s</strong>.';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s på %s';
+$lang['media_edit'] = 'Rediger';
+$lang['media_history'] = 'Dette er de tidligere versjonene av fila.';
+$lang['media_meta_edited'] = 'metadata er endra';
+$lang['media_perm_read'] = 'Beklager, du har ikke tilgang til å lese filer.';
+$lang['media_perm_upload'] = 'Beklager, du har ikke tilgang til å laste opp filer.';
+$lang['media_update'] = 'Last opp ny versjon';
+$lang['media_restore'] = 'Gjenopprett denne versjonen';
+$lang['plugin_install_err'] = 'Tillegget ble feil installert. Skift navn på mappa \'%s\' til \'%s\'.';
diff --git a/inc/lang/no/newpage.txt b/inc/lang/no/newpage.txt
index 8f4b8da79..f712998d2 100644
--- a/inc/lang/no/newpage.txt
+++ b/inc/lang/no/newpage.txt
@@ -1,3 +1,3 @@
-====== Det fins ikke noe innhold ======
+====== Dette emnet har ikke noe innhold ======
Du har klikket på en lenke til et emne som ikke finnes ennå. Du kan skape det gjennom å klikke på ''**Lag denne siden**''.
diff --git a/inc/lang/no/norev.txt b/inc/lang/no/norev.txt
index dfd71db0f..cc58c99e3 100644
--- a/inc/lang/no/norev.txt
+++ b/inc/lang/no/norev.txt
@@ -1,4 +1,4 @@
-====== Det fins ingen slik versjon ======
+====== Versjonen finnes ikke ======
-Den angitte versjonen fins ikke. Bruk ''**Historikk**'' for en oversikt over de versjoner som fins av dette dokumentet.
+Den angitte versjonen finnes ikke. Bruk ''**Historikk**'' for en oversikt over de versjoner som finnes av dette dokumentet.
diff --git a/inc/lang/no/registermail.txt b/inc/lang/no/registermail.txt
index e1fae2b90..35ed253ab 100644
--- a/inc/lang/no/registermail.txt
+++ b/inc/lang/no/registermail.txt
@@ -1,4 +1,4 @@
-En ny bruker har registret seg, her er detaljene:
+En ny bruker har registrert seg, her er detaljene:
Brukernavn : @NEWUSER@
Fult navn : @NEWNAME@
diff --git a/inc/lang/no/stopwords.txt b/inc/lang/no/stopwords.txt
index 2b2ab11e2..9a4c302d9 100644
--- a/inc/lang/no/stopwords.txt
+++ b/inc/lang/no/stopwords.txt
@@ -1,130 +1,68 @@
-# This is a list of words the indexer ignores, one word per line
-# When you edit this file be sure to use UNIX line endings (single newline)
-# No need to include words shorter than 3 chars - these are ignored anyway
-# This list is based upon the ones found at http://www.ranks.nl/stopwords/
-alle
-andre
-arbeid
-begge
-bort
-bra
-bruke
-denne
-der
-deres
+# Dette er en liste med ord som indeksereren ignorerer, ett ord per linje.
+# Når du redigerer siden, pass på å bruke UNIX linjeslutt (enkel ny linje).
+# Ord kortere enn 3 bokstaver er automatisk ignorert.
+# Listen er basert på http://helmer.aksis.uib.no/nta/ord10000.txt
+i
+og
det
-din
-disse
-eller
-ene
-eneste
-enhver
-enn
-folk
+er
+på
+til
+som
+en
for
-fordi
-forsÛke
-fra
-fÅ
-fÛr
-fÛrst
-gjorde
-gjÛre
-god
-gÅ
-hadde
-han
-hans
-hennes
-her
-hva
-hvem
-hver
-hvilken
-hvis
-hvor
-hvordan
-hvorfor
-ikke
-inn
-innen
-kan
-kunne
-lage
-lang
-lik
-like
-makt
-mange
+av
+at
+har
med
-meg
-meget
-men
-mens
-mer
-mest
-min
-mye
-mÅ
-mÅte
-navn
-nei
-nÅ
-nÅr
-ogsÅ
-opp
-oss
-over
-part
-punkt
-pÅ
-rett
-riktig
-samme
-sant
-siden
-sist
-skulle
-slik
-slutt
-som
-start
-stille
-sÅ
-tid
-til
-tilbake
-tilstand
-under
-uten
-var
-ved
-verdi
-vil
-ville
-vite
-vÅr
-vÖre
-vÖrt
-om
-er
-og
-du
-dine
de
-deres
-com
-for
+ikke
+den
+han
+om
+et
fra
-inni
-hvordan
-det
-dette
+men
+vi
var
-hva
-når
-hvor
-hvem
+jeg
+seg
+sier
vil
-med
+kan
+ble
+skal
+etter
+også
+så
+ut
+år
+nå
+da
+dette
+blir
+ved
+mot
+hadde
+to
+hun
+over
+være
+ha
+må
+går
+opp
+få
+andre
+eller
+bare
+sin
+mer
+inn
+før
+bli
+vært
+enn
+alle
www \ No newline at end of file
diff --git a/inc/lang/no/subscr_digest.txt b/inc/lang/no/subscr_digest.txt
new file mode 100644
index 000000000..6afd0cc5c
--- /dev/null
+++ b/inc/lang/no/subscr_digest.txt
@@ -0,0 +1,20 @@
+Hei!
+
+Siden @PAGE@ på wikien @TITLE@ har blitt endret.
+Her er endringene:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+
+Gammel versjon : @OLDPAGE@
+Ny versjon: @NEWPAGE@
+
+For å avslutte varslingen, logg inn på
+@DOKUWIKIURL@ og gå til
+@NEWPAGE@
+og avslutt abonnementet på endringer av siden eller i navnerommet.
+
+--
+Denne e-posten ble generert av DokuWiki på
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/no/subscr_form.txt b/inc/lang/no/subscr_form.txt
new file mode 100644
index 000000000..c3df69e02
--- /dev/null
+++ b/inc/lang/no/subscr_form.txt
@@ -0,0 +1,3 @@
+====== Administrere abonnement ======
+
+Denne sida lar deg administrere abonnementene dine for denne sida og dette navnerommet. \ No newline at end of file
diff --git a/inc/lang/no/subscr_list.txt b/inc/lang/no/subscr_list.txt
new file mode 100644
index 000000000..72cd307cb
--- /dev/null
+++ b/inc/lang/no/subscr_list.txt
@@ -0,0 +1,17 @@
+Hei!
+
+Sider i navnerommet @PAGE@ på wikien @TITLE@ har blitt endra.
+Her er endringene:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+
+For å avslutte varslinga, logg inn på
+@DOKUWIKIURL@ og gå til
+@NEWPAGE@
+og avslutt abonnementet på endringer av sida eller i navnerommet.
+
+--
+Denne e-posten ble generert av DokuWiki på
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/no/subscr_single.txt b/inc/lang/no/subscr_single.txt
new file mode 100644
index 000000000..25296da58
--- /dev/null
+++ b/inc/lang/no/subscr_single.txt
@@ -0,0 +1,23 @@
+Hei!
+
+Siden @PAGE@ på wikien @TITLE@ har blitt endret.
+Her er endringene:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+
+Dato : @DATE@
+Bruker : @USER@
+Sammendrag: @SUMMARY@
+Gammel versjon : @OLDPAGE@
+Ny versjon: @NEWPAGE@
+
+For å avslutte varslingen, logg inn på
+@DOKUWIKIURL@, gå til
+@NEWPAGE@
+og avslutt abonnementet på endringer av siden eller i navnerommet.
+
+--
+Denne e-posten ble generert av DokuWiki på
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/no/updateprofile.txt b/inc/lang/no/updateprofile.txt
index 5565e528f..b2e37e76d 100644
--- a/inc/lang/no/updateprofile.txt
+++ b/inc/lang/no/updateprofile.txt
@@ -1,5 +1,5 @@
====== Oppdater din brukerprofil ======
-Du behøver bare fylle ut de felter du ønsker å endre. Du kan ikke endre ditt brukernavn.
+Du behøver bare fylle ut de felter du ønsker å endre. Du kan ikke endre brukernavnet ditt.
diff --git a/inc/lang/no/uploadmail.txt b/inc/lang/no/uploadmail.txt
index b01905009..2890d962d 100644
--- a/inc/lang/no/uploadmail.txt
+++ b/inc/lang/no/uploadmail.txt
@@ -1,6 +1,7 @@
En fil ble lastet opp på din DokuWiki. Her er detaljene:
Fil : @MEDIA@
+Gammel versjon: @OLD@
Dato : @DATE@
Nettleser : @BROWSER@
IP-adresse : @IPADDRESS@
diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php
index bc0509df3..a6fc3d52e 100644
--- a/inc/lang/pl/lang.php
+++ b/inc/lang/pl/lang.php
@@ -11,6 +11,7 @@
* @author Leszek Stachowski <shazarre@gmail.com>
* @author maros <dobrimaros@yahoo.pl>
* @author Grzegorz Widła <dzesdzes@gmail.com>
+ * @author Łukasz Chmaj <teachmeter@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -128,7 +129,6 @@ Możesz skopiować odnośnik.';
$lang['js']['linkwiz'] = 'Tworzenie odnośników';
$lang['js']['linkto'] = 'Link do';
$lang['js']['del_confirm'] = 'Czy na pewno usunąć?';
-$lang['js']['mu_btn'] = 'Wyślij wiele plików na raz';
$lang['rssfailed'] = 'Wystąpił błąd przy pobieraniu tych danych: ';
$lang['nothingfound'] = 'Nic nie znaleziono.';
$lang['mediaselect'] = 'Wysyłanie pliku';
@@ -163,6 +163,9 @@ $lang['yours'] = 'Twoja wersja';
$lang['diff'] = 'Pokaż różnice między wersjami';
$lang['diff2'] = 'Pokaż różnice między zaznaczonymi wersjami';
$lang['difflink'] = 'Odnośnik do tego porównania';
+$lang['diff_type'] = 'Zobacz różnice:';
+$lang['diff_inline'] = 'W linii';
+$lang['diff_side'] = 'Jeden obok drugiego';
$lang['line'] = 'Linia';
$lang['breadcrumb'] = 'Ślad';
$lang['youarehere'] = 'Jesteś tutaj';
diff --git a/inc/lang/pt-br/lang.php b/inc/lang/pt-br/lang.php
index f3b012521..066b3acaa 100644
--- a/inc/lang/pt-br/lang.php
+++ b/inc/lang/pt-br/lang.php
@@ -18,6 +18,7 @@
* @author Sergio Motta <sergio@cisne.com.br>
* @author Isaias Masiero Filho <masiero@masiero.org>
* @author Frederico Guimarães <frederico@teia.bio.br>
+ * @author Balaco Baco <balacobaco@imap.cc>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -103,7 +104,7 @@ $lang['txt_filename'] = 'Enviar como (opcional)';
$lang['txt_overwrt'] = 'Substituir o arquivo existente';
$lang['lockedby'] = 'Atualmente bloqueada por';
$lang['lockexpire'] = 'O bloqueio expira em';
-$lang['willexpire'] = 'O seu bloqueio de edição deste página irá expirar em um minuto.\nPara evitar conflitos de edição, clique no botão de visualização para reiniciar o temporizador de bloqueio.';
+$lang['js']['willexpire'] = 'O seu bloqueio de edição deste página irá expirar em um minuto.\nPara evitar conflitos de edição, clique no botão de visualização para reiniciar o temporizador de bloqueio.';
$lang['js']['notsavedyet'] = 'As alterações não salvas serão perdidas.
Deseja realmente continuar?';
$lang['js']['searchmedia'] = 'Buscar por arquivos';
@@ -135,7 +136,6 @@ Entretanto, você ainda pode copiar e colar o atalho.';
$lang['js']['linkwiz'] = 'Link Wizard';
$lang['js']['linkto'] = 'Link para:';
$lang['js']['del_confirm'] = 'Deseja realmente excluir o(s) item(ns) selecionado(s)?';
-$lang['js']['mu_btn'] = 'Enviar vários arquivos de uma vez';
$lang['rssfailed'] = 'Ocorreu um erro durante a atualização dessa fonte: ';
$lang['nothingfound'] = 'Não foi encontrado nada.';
$lang['mediaselect'] = 'Arquivos de mídia';
diff --git a/inc/lang/pt/lang.php b/inc/lang/pt/lang.php
index 41406ee60..3c3a8d9da 100644
--- a/inc/lang/pt/lang.php
+++ b/inc/lang/pt/lang.php
@@ -12,11 +12,12 @@
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
-$lang['doublequoteopening'] = '“';
-$lang['doublequoteclosing'] = '”';
-$lang['singlequoteopening'] = '‘';
-$lang['singlequoteclosing'] = '’';
-$lang['apostrophe'] = '´';
+$lang['doublequoteopening'] = '“';//&ldquo;
+$lang['doublequoteclosing'] = '”';//&rdquo;
+$lang['singlequoteopening'] = '‘';//&lsquo;
+$lang['singlequoteclosing'] = '’';//&rsquo;
+$lang['apostrophe'] = '’';//&rsquo;
+
$lang['btn_edit'] = 'Editar página';
$lang['btn_source'] = 'Ver fonte';
$lang['btn_show'] = 'Ver página';
@@ -50,6 +51,9 @@ $lang['btn_recover'] = 'Recuperar rascunho';
$lang['btn_draftdel'] = 'Apagar rascunho';
$lang['btn_revert'] = 'Restaurar';
$lang['btn_register'] = 'Registar';
+$lang['btn_apply'] = 'Aplicar';
+$lang['btn_media'] = 'Gestor de Media';
+
$lang['loggedinas'] = 'Está em sessão como';
$lang['user'] = 'Utilizador';
$lang['pass'] = 'Senha';
@@ -64,6 +68,7 @@ $lang['badlogin'] = 'O utilizador inválido ou senha inválida.';
$lang['minoredit'] = 'Alterações Menores';
$lang['draftdate'] = 'Rascunho automaticamente gravado em';
$lang['nosecedit'] = 'A página foi modificada entretanto. Como a informação da secção estava desactualizada, foi carregada a página inteira.';
+
$lang['regmissing'] = 'Por favor, preencha todos os campos.';
$lang['reguexists'] = 'Este utilizador já está inscrito. Por favor escolha outro nome de utilizador.';
$lang['regsuccess'] = 'O utilizador foi criado e a senha foi enviada para o endereço de correio electrónico usado na inscrição.';
@@ -73,10 +78,12 @@ $lang['regbadmail'] = 'O endereço de correio electrónico é inváli
$lang['regbadpass'] = 'As duas senhas não são idênticas, por favor tente de novo.';
$lang['regpwmail'] = 'A sua senha DokuWiki';
$lang['reghere'] = 'Para se registar, clique em';
+
$lang['profna'] = 'Este Wiki não suporta modificações aos perfis.';
$lang['profnochange'] = 'Nada alteração, nada a fazer.';
$lang['profnoempty'] = 'Não são permitidos nomes ou endereços em branco.';
$lang['profchanged'] = 'Perfil do utilizador actualizado com sucesso.';
+
$lang['pwdforget'] = 'Esqueceu a sua senha? Pedir nova senha';
$lang['resendna'] = 'Este wiki não suporta reenvio de senhas.';
$lang['resendpwd'] = 'Enviar nova senha para';
@@ -85,8 +92,10 @@ $lang['resendpwdnouser'] = 'Não foi possível encontrar este utilizador.'
$lang['resendpwdbadauth'] = 'O código de autenticação não é válido. Por favor, assegure-se de que o link de confirmação está completo.';
$lang['resendpwdconfirm'] = 'O link de confirmação foi enviado por e-mail.';
$lang['resendpwdsuccess'] = 'A nova senha foi enviada por e-mail.';
+
$lang['license'] = 'Excepto menção em contrário, o conteúdo neste wiki está sob a seguinte licença:';
$lang['licenseok'] = 'Nota: Ao editar esta página você aceita disponibilizar o seu conteúdo sob a seguinte licença:';
+
$lang['searchmedia'] = 'Procurar nome de ficheiro:';
$lang['searchmedia_in'] = 'Procurar em %s';
$lang['txt_upload'] = 'Escolha ficheiro para carregar';
@@ -94,9 +103,10 @@ $lang['txt_filename'] = 'Carregar como (opcional)';
$lang['txt_overwrt'] = 'Escrever por cima do ficheiro já existente';
$lang['lockedby'] = 'Bloqueado por';
$lang['lockexpire'] = 'Expira em';
-$lang['willexpire'] = 'O bloqueio de edição para este documento irá expirar num minuto.\nPara evitar conflitos de edição, clique no botão <Prever> para re-iniciar o temporizador de bloqueio.';
-$lang['js']['notsavedyet'] = 'Existem alterações não gravadas, que serão perdidas se continuar.
-Deseja realmente continuar?';
+$lang['js']['willexpire'] = 'O bloqueio de edição para este documento irá expirar num minuto.\nPara evitar conflitos use o botão Prever para re-iniciar o temporizador de bloqueio.';
+
+$lang['js']['notsavedyet'] = 'Alterações não gravadas serão perdidas.';
+
$lang['js']['searchmedia'] = 'Procurar por ficheiros';
$lang['js']['keepopen'] = 'Mantenha a janela aberta durante a selecção';
$lang['js']['hidedetails'] = 'Esconder Detalhes';
@@ -125,8 +135,8 @@ $lang['js']['nosmblinks'] = 'Ligação a pastas Windows partilhadas apenas
Pode no entanto copiar e colar o link.';
$lang['js']['linkwiz'] = 'Assistente de Criação de Ligação';
$lang['js']['linkto'] = 'Ligação para:';
-$lang['js']['del_confirm'] = 'Remover esta entrada?';
-$lang['js']['mu_btn'] = 'Enviar múltiplos ficheiros de uma vez';
+$lang['js']['del_confirm'] = 'Remover o(s) item(s) selecionados?';
+$lang['js']['restore_confirm'] = 'Restaurar esta versão?';
$lang['rssfailed'] = 'Ocorreu um erro neste canal RSS: ';
$lang['nothingfound'] = 'Nada foi encontrado.';
$lang['mediaselect'] = 'Selecção de ficheiros';
@@ -176,6 +186,10 @@ $lang['external_edit'] = 'Edição externa';
$lang['summary'] = 'Sumário da Edição';
$lang['noflash'] = 'O <a href="http://www.adobe.com/products/flashplayer/">Plugin Adobe Flash</a> é necessário para exibir este conteúdo.';
$lang['download'] = 'Descarregar Snippet';
+$lang['changes_type'] = 'Ver alterações de';
+$lang['pages_changes'] = 'Páginas';
+$lang['media_changes'] = 'Ficheiros Media';
+$lang['both_changes'] = 'Tanto páginas como ficheiros media';
$lang['mail_newpage'] = 'documento adicionado:';
$lang['mail_changed'] = 'documento modificado:';
$lang['mail_subscribe_list'] = 'páginas alteradas no espaço de nome:';
@@ -221,6 +235,9 @@ $lang['img_copyr'] = 'Copyright';
$lang['img_format'] = 'Formato';
$lang['img_camera'] = 'Câmara';
$lang['img_keywords'] = 'Palavras-Chave';
+$lang['img_width'] = 'Largura';
+$lang['img_height'] = 'Altura';
+$lang['img_manager'] = 'Ver em gestor de media';
$lang['subscr_subscribe_success'] = 'Adicionado %s à lista de subscrição para %s';
$lang['subscr_subscribe_error'] = 'Erro ao adicionar %s à lista de subscrição para %s';
$lang['subscr_subscribe_noaddress'] = 'Não existe endereço algum associado com o seu nome de utilizador, não pode ser adicionado à lista de subscrição';
@@ -285,3 +302,36 @@ $lang['hours'] = '%d horas atrás';
$lang['minutes'] = '%d minutos atrás';
$lang['seconds'] = '%d segundos atrás';
$lang['wordblock'] = 'A sua alteração não foi guardada porque contém texto bloqueado (spam).';
+
+$lang['media_uploadtab'] = 'Enviar';
+$lang['media_searchtab'] = 'Procurar';
+$lang['media_viewtab'] = 'Ver';
+$lang['media_edittab'] = 'Editar';
+$lang['media_historytab'] = 'Histórico';
+$lang['media_sort'] = 'Ordenar';
+$lang['media_sort_name'] = 'Ordenar por nome';
+$lang['media_sort_date'] = 'Ordenar por data';
+$lang['media_upload'] = 'Enviar para o grupo <strong>%s</strong>.';
+$lang['media_search'] = 'Procurar no grupo <strong>%s</strong>.';
+$lang['media_view'] = '%s';
+$lang['media_edit'] = 'Editar %s';
+$lang['media_history'] = 'Histórico do %s';
+$lang['media_meta_edited']= 'metadata editada';
+$lang['media_perm_read'] = 'Perdão, não tem permissão para ler ficheiros.';
+$lang['media_perm_upload']= 'Perdão, não tem permissão para enviar ficheiros.';
+$lang['media_update'] = 'enviar nova versão';
+$lang['media_restore'] = 'Restaurar esta versão';
+
+$lang['js']['media_diff'] = 'Ver diferenças:';
+$lang['js']['media_diff_both'] = 'Lado a Lado';
+$lang['js']['media_diff_opacity'] = 'Sobreposição';
+$lang['js']['media_diff_portions'] = 'Slider'; // Needs translation. 'Deslizador' ?
+
+$lang['js']['media_select'] = 'Selecione ficheiros…';
+$lang['js']['media_upload_btn'] = 'Enviar';
+$lang['js']['media_done_btn'] = 'Feito';
+$lang['js']['media_drop'] = 'Largue ficheiros aqui para enviar';
+$lang['js']['media_cancel'] = 'remover';
+$lang['js']['media_overwrt'] = 'Escrever por cima de ficheiros existentes';
+
+$lang['plugin_install_err'] = "Plugin instalado incorrectamente. Renomeie a pasta do plugin de '%s' para '%s'.";
diff --git a/inc/lang/pt/uploadmail.txt b/inc/lang/pt/uploadmail.txt
index 597ba4a01..bb571ffae 100644
--- a/inc/lang/pt/uploadmail.txt
+++ b/inc/lang/pt/uploadmail.txt
@@ -1,15 +1,15 @@
Um ficheiro foi carregado. Aqui estão os detalhes:
-Ficheiro : @MEDIA@
-Data : @DATE@
-Browser : @BROWSER@
-Endereço IP : @IPADDRESS@
-Hostname : @HOSTNAME@
-Tamanho : @SIZE@
-MIME Type : @MIME@
-Utilizador : @USER@
-
-----
+Ficheiro : @MEDIA@
+Revisão antiga : @OLD@
+Data : @DATE@
+Navegador : @BROWSER@
+Endereço IP : @IPADDRESS@
+Hostname : @HOSTNAME@
+Tamanho : @SIZE@
+MIME Type : @MIME@
+Utilizador : @USER@
+--
Esta mensagem foi gerada pelo DokuWiki em
-@DOKUWIKIURL@ \ No newline at end of file
+@DOKUWIKIURL@
diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php
index cbecf6f6c..91f8ebb97 100644
--- a/inc/lang/ro/lang.php
+++ b/inc/lang/ro/lang.php
@@ -7,6 +7,7 @@
* @author Sergiu Baltariu <s_baltariu@yahoo.com>
* @author Emanuel-Emeric Andrași <n30@mandrivausers.ro>
* @author Emanuel-Emeric Andraşi <em.andrasi@mandrivausers.ro>
+ * @author Marius OLAR <olarmariusalex@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -48,6 +49,8 @@ $lang['btn_recover'] = 'Recuperează schiţă';
$lang['btn_draftdel'] = 'Şterge schiţă';
$lang['btn_revert'] = 'Revenire';
$lang['btn_register'] = 'Înregistrează';
+$lang['btn_apply'] = 'Aplică';
+$lang['btn_media'] = 'Administrare media';
$lang['loggedinas'] = 'Logat ca şi';
$lang['user'] = 'Utilizator';
$lang['pass'] = 'Parola';
@@ -92,7 +95,7 @@ $lang['txt_filename'] = 'Încarcă fişierul ca (opţional)';
$lang['txt_overwrt'] = 'Suprascrie fişierul existent';
$lang['lockedby'] = 'Momentan blocat de';
$lang['lockexpire'] = 'Blocarea expiră la';
-$lang['willexpire'] = 'Blocarea pentru editarea paginii expiră intr-un minut.\nPentru a preveni conflictele foloseşte butonul de previzualizare pentru resetarea blocării.';
+$lang['js']['willexpire'] = 'Blocarea pentru editarea paginii expiră intr-un minut.\nPentru a preveni conflictele foloseşte butonul de previzualizare pentru resetarea blocării.';
$lang['js']['notsavedyet'] = 'Există modificări nesalvate, care se vor pierde.
Doreşti să continui?';
$lang['js']['searchmedia'] = 'Caută fişiere';
@@ -124,7 +127,17 @@ Puteţi însă copia şi insera legătura.';
$lang['js']['linkwiz'] = 'Asistent legătură';
$lang['js']['linkto'] = 'Legătură la:';
$lang['js']['del_confirm'] = 'Doriţi într-adevăr ştergerea elementelor selectate?';
-$lang['js']['mu_btn'] = 'Încarcă mai multe fişiere simultan';
+$lang['js']['restore_confirm'] = 'Sunteți sigur că doriți restaurarea acestei versiuni?';
+$lang['js']['media_diff'] = 'Arată diferențele:';
+$lang['js']['media_diff_both'] = 'Unul lângă altul';
+$lang['js']['media_diff_opacity'] = 'Străveziu';
+$lang['js']['media_diff_portions'] = 'Lovește cu putere';
+$lang['js']['media_select'] = 'Selectează fișierele...';
+$lang['js']['media_upload_btn'] = 'Încarcă';
+$lang['js']['media_done_btn'] = 'Gata';
+$lang['js']['media_drop'] = 'Lasă fișierele aici pentru încărcarea lor';
+$lang['js']['media_cancel'] = 'înlătură';
+$lang['js']['media_overwrt'] = 'Suprascrie fișierele deja existente';
$lang['rssfailed'] = 'A apărut o eroare in timpul descărcării acestui cîmp: ';
$lang['nothingfound'] = 'Nu am găsit nimic.';
$lang['mediaselect'] = 'Selectare fişiere media';
@@ -179,6 +192,10 @@ $lang['mail_changed'] = 'page schimbată:';
$lang['mail_subscribe_list'] = 'pagini modificate în spaţiul de nume:';
$lang['mail_new_user'] = 'utilizator nou';
$lang['mail_upload'] = 'fişier încărcat:';
+$lang['changes_type'] = 'Vizualizare modificări';
+$lang['pages_changes'] = 'Pagini';
+$lang['media_changes'] = 'Fișiere media';
+$lang['both_changes'] = 'Ambele pagini şi fişiere media';
$lang['qb_bold'] = 'Text Îngroşat';
$lang['qb_italic'] = 'Text Italic';
$lang['qb_underl'] = 'Text Subliniat';
@@ -219,6 +236,9 @@ $lang['img_copyr'] = 'Copyright';
$lang['img_format'] = 'Format';
$lang['img_camera'] = 'Camera';
$lang['img_keywords'] = 'Cuvinte cheie';
+$lang['img_width'] = 'Lățime';
+$lang['img_height'] = 'Înălțime';
+$lang['img_manager'] = 'Vizualizează în administratorul media';
$lang['subscr_subscribe_success'] = 'Adăugat %s la lista de abonare pentru %s';
$lang['subscr_subscribe_error'] = 'Eroare la adăugarea %s la lista de abonare pentru %s';
$lang['subscr_subscribe_noaddress'] = 'Nu există adresa asociată cu logarea dvs., nu puteţi fi adăugat la lista de abonare';
@@ -271,7 +291,7 @@ $lang['mu_ready'] = 'pregătit pentru încărcare';
$lang['mu_done'] = 'complet';
$lang['mu_fail'] = 'eşuat';
$lang['mu_authfail'] = 'sesiunea a expirat';
-$lang['mu_progress'] = '@PCT@% incărcat';
+$lang['mu_progress'] = '@PCT@% încărcat';
$lang['mu_filetypes'] = 'Tipuri de fişiere permise';
$lang['mu_info'] = 'fişiere încărcate';
$lang['mu_lasterr'] = 'Ultima eroare:';
@@ -284,3 +304,27 @@ $lang['hours'] = 'acum %d ore';
$lang['minutes'] = 'acum %d minute';
$lang['seconds'] = 'acum %d secunde';
$lang['wordblock'] = 'Modificarea dvs. nu au fost salvate deoarece conţine text blocat (spam).';
+$lang['media_uploadtab'] = 'Încarcă';
+$lang['media_searchtab'] = 'Căutare';
+$lang['media_file'] = 'Fișier';
+$lang['media_viewtab'] = 'Vizualizare';
+$lang['media_edittab'] = 'Editare';
+$lang['media_historytab'] = 'Istoric';
+$lang['media_list_thumbs'] = 'Miniaturi';
+$lang['media_list_rows'] = 'Linii';
+$lang['media_sort_name'] = 'Nume';
+$lang['media_sort_date'] = 'Data';
+$lang['media_namespaces'] = 'Alegeți numele se spațiu';
+$lang['media_files'] = 'Fișiere în %s';
+$lang['media_upload'] = 'Încarcă în %s';
+$lang['media_search'] = 'Caută în %s';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s în %s';
+$lang['media_edit'] = 'Editare %s';
+$lang['media_history'] = 'Istoricul pentru %s';
+$lang['media_meta_edited'] = 'metadate editate';
+$lang['media_perm_read'] = 'Ne pare rău, dar nu aveți suficiente drepturi pentru a putea citi fișiere.';
+$lang['media_perm_upload'] = 'Ne pare rău, dar nu aveți suficiente drepturi pentru a putea încărca fișiere.';
+$lang['media_update'] = 'Încarcă noua versiune';
+$lang['media_restore'] = 'Restaurează această versiune';
+$lang['plugin_install_err'] = 'Modul instalat greșit. Redenumește directorul modulului \'%s\' în \'%s\'.';
diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php
index 1eaa488ec..eda838451 100644
--- a/inc/lang/ru/lang.php
+++ b/inc/lang/ru/lang.php
@@ -22,11 +22,12 @@
*/
$lang['encoding'] = ' utf-8';
$lang['direction'] = 'ltr';
-$lang['doublequoteopening'] = '«';
-$lang['doublequoteclosing'] = '»';
-$lang['singlequoteopening'] = '„';
-$lang['singlequoteclosing'] = '“';
-$lang['apostrophe'] = '’';
+$lang['doublequoteopening'] = '«'; //&ldquo;
+$lang['doublequoteclosing'] = '»'; //&rdquo;
+$lang['singlequoteopening'] = '„'; //&lsquo;
+$lang['singlequoteclosing'] = '“'; //&rsquo;
+$lang['apostrophe'] = '’'; //&rsquo;
+
$lang['btn_edit'] = 'Править страницу';
$lang['btn_source'] = 'Показать исходный текст';
$lang['btn_show'] = 'Показать страницу';
@@ -60,6 +61,9 @@ $lang['btn_recover'] = 'Восстановить черновик';
$lang['btn_draftdel'] = 'Удалить черновик';
$lang['btn_revert'] = 'Восстановить';
$lang['btn_register'] = 'Зарегистрироваться';
+$lang['btn_apply'] = 'Применить';
+$lang['btn_media'] = 'Media Manager';
+
$lang['loggedinas'] = 'Зашли как';
$lang['user'] = 'Логин';
$lang['pass'] = 'Пароль';
@@ -74,6 +78,7 @@ $lang['badlogin'] = 'Извините, неверное имя по
$lang['minoredit'] = 'Небольшие изменения';
$lang['draftdate'] = 'Черновик сохранён';
$lang['nosecedit'] = 'За это время страница была изменена и информация о секции устарела. Загружена полная версия страницы.';
+
$lang['regmissing'] = 'Извините, вам следует заполнить все поля.';
$lang['reguexists'] = 'Извините, пользователь с таким логином уже существует.';
$lang['regsuccess'] = 'Пользователь создан, пароль выслан на адрес электронной почты.';
@@ -83,10 +88,12 @@ $lang['regbadmail'] = 'Данный вами адрес электр
$lang['regbadpass'] = 'Два введённых пароля не идентичны. Пожалуйста, попробуйте ещё раз.';
$lang['regpwmail'] = 'Ваш пароль для системы «ДокуВики»';
$lang['reghere'] = 'У вас ещё нет аккаунта? Зарегистрируйтесь';
+
$lang['profna'] = 'Данная вики не поддерживает изменение профиля';
$lang['profnochange'] = 'Изменений не было внесено, профиль не обновлён.';
$lang['profnoempty'] = 'Логин и адрес электронной почты не могут быть пустыми.';
$lang['profchanged'] = 'Профиль пользователя успешно обновлён.';
+
$lang['pwdforget'] = 'Забыли пароль? Получите новый';
$lang['resendna'] = 'Данная вики не поддерживает повторную отправку пароля.';
$lang['resendpwd'] = 'Выслать пароль для';
@@ -95,8 +102,10 @@ $lang['resendpwdnouser'] = 'Пользователь с таким лог
$lang['resendpwdbadauth'] = 'Извините, неверный код авторизации. Убедитесь, что вы полностью скопировали ссылку. ';
$lang['resendpwdconfirm'] = 'Ссылка для подтверждения пароля была выслана по электронной почте. ';
$lang['resendpwdsuccess'] = 'Ваш новый пароль был выслан по электронной почте.';
+
$lang['license'] = 'За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии:';
$lang['licenseok'] = 'Примечание: редактируя эту страницу, вы соглашаетесь на использование своего вклада на условиях следующей лицензии:';
+
$lang['searchmedia'] = 'Поиск по имени файла:';
$lang['searchmedia_in'] = 'Поиск в %s';
$lang['txt_upload'] = 'Выберите файл для загрузки';
@@ -104,7 +113,7 @@ $lang['txt_filename'] = 'Введите имя файла в вики (
$lang['txt_overwrt'] = 'Перезаписать существующий файл';
$lang['lockedby'] = 'В данный момент заблокирован';
$lang['lockexpire'] = 'Блокировка истекает в';
-$lang['willexpire'] = 'Ваша блокировка редактирования этой страницы истекает в течение минуты.\nЧтобы избежать конфликтов и сбросить таймер блокировки, нажмите кнопку просмотра.';
+$lang['js']['willexpire'] = 'Ваша блокировка редактирования этой страницы истекает в течение минуты.\nЧтобы избежать конфликтов и сбросить таймер блокировки, нажмите кнопку просмотра.';
$lang['js']['notsavedyet'] = 'Несохранённые изменения будут потеряны. Вы действительно хотите продолжить?';
$lang['js']['searchmedia'] = 'Поиск файлов';
$lang['js']['keepopen'] = 'Не закрывать окно после выбора';
@@ -134,9 +143,22 @@ $lang['js']['nosmblinks'] = 'Ссылка на сетевые катало
$lang['js']['linkwiz'] = 'Мастер ссылок';
$lang['js']['linkto'] = 'Ссылка на:';
$lang['js']['del_confirm'] = 'Вы на самом деле желаете удалить выбранное?';
-$lang['js']['mu_btn'] = 'Загрузить несколько файлов одновременно';
+$lang['js']['willexpire'] = 'Ваша блокировка этой страницы на редактирование истекает в течении минуты.\nЧтобы предотвратить конфликты используйте кнопку "Просмотр" для сброса таймера блокировки.';
+$lang['js']['restore_confirm'] = 'Действительно восстановить эту версию?';
+$lang['js']['media_diff'] = 'Просмотр отличий:';
+$lang['js']['media_diff_both'] = 'Рядом';
+$lang['js']['media_diff_opacity'] = 'Наложением';
+$lang['js']['media_diff_portions'] = 'Частями';
+$lang['js']['media_select'] = 'Выбрать файлы…';
+$lang['js']['media_upload_btn'] = 'Загрузить';
+$lang['js']['media_done_btn'] = 'Готово';
+$lang['js']['media_drop'] = 'Переместите файлы сюда для загрузки';
+$lang['js']['media_cancel'] = 'отменить';
+$lang['js']['media_overwrt'] = 'Перезаписать существующие файлы';
+
$lang['rssfailed'] = 'Произошла ошибка при получении следующей новостной ленты: ';
$lang['nothingfound'] = 'Ничего не найдено.';
+
$lang['mediaselect'] = 'Выбор медиафайла';
$lang['fileupload'] = 'Загрузка медиафайла';
$lang['uploadsucc'] = 'Загрузка произведена успешно';
@@ -161,6 +183,7 @@ $lang['mediaextchange'] = 'Расширение изменилось: с
$lang['reference'] = 'Ссылки для';
$lang['ref_inuse'] = 'Этот файл не может быть удалён, так как он используется на следующих страницах:';
$lang['ref_hidden'] = 'Некоторые ссылки находятся на страницах, на чтение которых у вас нет прав доступа';
+
$lang['hits'] = 'соответствий';
$lang['quickhits'] = 'Соответствия в названиях страниц';
$lang['toc'] = 'Содержание';
@@ -184,11 +207,18 @@ $lang['external_edit'] = 'внешнее изменение';
$lang['summary'] = 'Сводка изменений';
$lang['noflash'] = 'Для просмотра этого содержимого требуется <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>.';
$lang['download'] = 'Скачать код';
+
$lang['mail_newpage'] = 'страница добавлена:';
$lang['mail_changed'] = 'страница изменена:';
$lang['mail_subscribe_list'] = 'изменились страницы в пространстве имён:';
$lang['mail_new_user'] = 'новый пользователь:';
$lang['mail_upload'] = 'файл закачан:';
+
+$lang['changes_type'] = 'Посмотреть изменения';
+$lang['pages_changes'] = 'Страниц';
+$lang['media_changes'] = 'Медиа файлов';
+$lang['both_changes'] = 'И страниц и медиа файлов';
+
$lang['qb_bold'] = 'Полужирный';
$lang['qb_italic'] = 'Курсив';
$lang['qb_underl'] = 'Подчёркнутый';
@@ -213,8 +243,11 @@ $lang['qb_media'] = 'Добавить изображения или
$lang['qb_sig'] = 'Вставить подпись';
$lang['qb_smileys'] = 'Смайлики';
$lang['qb_chars'] = 'Специальные символы';
+
$lang['upperns'] = 'Перейти в родительское пространство имён';
+
$lang['admin_register'] = 'Добавить пользователя';
+
$lang['metaedit'] = 'Править метаданные';
$lang['metasaveerr'] = 'Ошибка записи метаданных';
$lang['metasaveok'] = 'Метаданные сохранены';
@@ -229,24 +262,33 @@ $lang['img_copyr'] = 'Авторские права';
$lang['img_format'] = 'Формат';
$lang['img_camera'] = 'Модель';
$lang['img_keywords'] = 'Ключевые слова';
-$lang['subscr_subscribe_success'] = 'Добавлен %s в подписку на %s';
-$lang['subscr_subscribe_error'] = 'Невозможно добавить %s в подписку на %s';
+$lang['img_width'] = 'Ширина';
+$lang['img_height'] = 'Высота';
+$lang['img_manager'] = 'Просмотр в media manager';
+
+$lang['subscr_subscribe_success'] = 'Добавлен %s в подписку на %s';
+$lang['subscr_subscribe_error'] = 'Невозможно добавить %s в подписку на %s';
$lang['subscr_subscribe_noaddress'] = 'Нет адреса электронной почты, сопоставленного с вашей учётной записью. Вы не можете подписаться на рассылку';
$lang['subscr_unsubscribe_success'] = 'Удалён %s из подписки на %s';
-$lang['subscr_unsubscribe_error'] = 'Ошибка удаления %s из подписки на %s';
-$lang['subscr_already_subscribed'] = '%s уже подписан на %s';
-$lang['subscr_not_subscribed'] = '%s не подписан на %s';
-$lang['subscr_m_not_subscribed'] = 'Вы не подписаны на текущую страницу или пространство имён.';
-$lang['subscr_m_new_header'] = 'Добавить подписку';
-$lang['subscr_m_current_header'] = 'Текущие подписки';
-$lang['subscr_m_unsubscribe'] = 'Отменить подписку';
-$lang['subscr_m_subscribe'] = 'Подписаться';
-$lang['subscr_m_receive'] = 'Получить';
-$lang['subscr_style_every'] = 'уведомлять о каждом изменении';
-$lang['subscr_style_digest'] = 'сводка изменений по каждой странице';
-$lang['subscr_style_list'] = 'перечислять изменившиеся страницы с прошлого уведомления';
+$lang['subscr_unsubscribe_error'] = 'Ошибка удаления %s из подписки на %s';
+$lang['subscr_already_subscribed'] = '%s уже подписан на %s';
+$lang['subscr_not_subscribed'] = '%s не подписан на %s';
+// Manage page for subscriptions
+$lang['subscr_m_not_subscribed'] = 'Вы не подписаны на текущую страницу или пространство имён.';
+$lang['subscr_m_new_header'] = 'Добавить подписку';
+$lang['subscr_m_current_header'] = 'Текущие подписки';
+$lang['subscr_m_unsubscribe'] = 'Отменить подписку';
+$lang['subscr_m_subscribe'] = 'Подписаться';
+$lang['subscr_m_receive'] = 'Получить';
+$lang['subscr_style_every'] = 'уведомлять о каждом изменении';
+$lang['subscr_style_digest'] = 'сводка изменений по каждой странице';
+$lang['subscr_style_list'] = 'перечислять изменившиеся страницы с прошлого уведомления';
+
+/* auth.class language support */
$lang['authmodfailed'] = 'Неправильная конфигурация аутентификации пользователя. Пожалуйста, сообщите об этом своему администратору вики.';
$lang['authtempfail'] = 'Аутентификация пользователей временно недоступна. Если проблема продолжается какое-то время, пожалуйста, сообщите об этом своему администратору вики.';
+
+/* installer strings */
$lang['i_chooselang'] = 'Выберите свой язык/Choose your language';
$lang['i_installer'] = 'Установка «ДокуВики»';
$lang['i_wikiname'] = 'Название вики';
@@ -254,8 +296,8 @@ $lang['i_enableacl'] = 'Разрешить ограничение пр
$lang['i_superuser'] = 'Суперпользователь';
$lang['i_problems'] = 'Программа установки столкнулась с проблемами, перечисленными ниже. Чтобы продолжить, вам необходимо их устранить. ';
$lang['i_modified'] = 'Из соображений безопасности эта программа запускается только на новой, неизменённой установке «ДокуВики».
-Вам нужно либо заново распаковать скачанный пакет установки, либо обратиться к полной
-<a href="http://www.dokuwiki.org/install">инструкции по установке «ДокуВики»</a>';
+ Вам нужно либо заново распаковать скачанный пакет установки, либо обратиться к полной
+ <a href="http://www.dokuwiki.org/install">инструкции по установке «ДокуВики»</a>';
$lang['i_funcna'] = 'Функция PHP <code>%s</code> недоступна. Может быть, она по какой-то причине заблокирована вашим хостером?';
$lang['i_phpver'] = 'Ваша версия PHP (<code>%s</code>) ниже требуемой (<code>%s</code>). Вам необходимо обновить установленную версию PHP.';
$lang['i_permfail'] = '<code>%s</code> недоступна для записи «ДокуВики». Вам необходимо исправить системные права доступа для этой директории!';
@@ -264,7 +306,7 @@ $lang['i_writeerr'] = 'Не удалось создать <code>%s</c
$lang['i_badhash'] = 'dokuwiki.php не распознан или изменён (хэш=<code>%s</code>)';
$lang['i_badval'] = '<code>%s</code> — недопустимое или пустое значение';
$lang['i_success'] = 'Конфигурация прошла успешно. Теперь вы можете удалить файл install.php. Переходите к
- <a href="doku.php">своей новой «ДокуВики»</a>.';
+ <a href="doku.php">своей новой «ДокуВики»</a>.';
$lang['i_failure'] = 'При записи в файлы конфигурации были обнаружены ошибки. Возможно, вам придётся исправить их вручную, прежде чем вы сможете использовать <a href="doku.php">свою новую «ДокуВики»</a>.';
$lang['i_policy'] = 'Исходная политика прав доступа';
$lang['i_pol0'] = 'Открытая вики (чтение, запись, закачка файлов для всех)';
@@ -272,6 +314,7 @@ $lang['i_pol1'] = 'Общедоступная вики (чтен
$lang['i_pol2'] = 'Закрытая вики (чтение, запись и загрузка файлов только для зарегистрированных пользователей)';
$lang['i_retry'] = 'Повторить попытку';
$lang['i_license'] = 'Пожалуйста, выберите тип лицензии для своей вики:';
+
$lang['mu_intro'] = 'Здесь вы можете загрузить несколько файлов сразу. Кликните на «обзор», чтобы добавить их в список. Нажмите «загрузить», когда будете готовы.';
$lang['mu_gridname'] = 'Имя файла';
$lang['mu_gridsize'] = 'Размер';
@@ -287,6 +330,7 @@ $lang['mu_progress'] = '@PCT@% загружено';
$lang['mu_filetypes'] = 'Допустимые типы файлов';
$lang['mu_info'] = 'файлов загружено.';
$lang['mu_lasterr'] = 'Последняя ошибка:';
+
$lang['recent_global'] = 'Вы просматриваете изменения в пространстве имён <b>%s</b>. Вы можете также <a href="%s">просмотреть недавние изменения во всей вики</a>.';
$lang['years'] = '%d лет назад';
$lang['months'] = '%d месяц(ев) назад';
@@ -295,4 +339,24 @@ $lang['days'] = '%d дней назад';
$lang['hours'] = '%d час(ов) назад';
$lang['minutes'] = '%d минут назад';
$lang['seconds'] = '%d секунд назад';
+
$lang['wordblock'] = 'Ваши изменения не сохранены, поскольку они содержат блокируемые слова (спам).';
+
+$lang['media_uploadtab'] = 'Загрузка';
+$lang['media_searchtab'] = 'Поиск';
+$lang['media_viewtab'] = 'Просмотр';
+$lang['media_edittab'] = 'Правка';
+$lang['media_historytab'] = 'История';
+$lang['media_sort_name'] = 'Сортировка по имени';
+$lang['media_sort_date'] = 'Сортировка по дате';
+$lang['media_upload'] = 'Загрузка в пространство имён <strong>%s</strong>.';
+$lang['media_search'] = 'Поиск в пространстве имён <strong>%s</strong>.';
+$lang['media_view'] = '%s';
+$lang['media_edit'] = 'Правка %s';
+$lang['media_meta_edited'] = 'метаданные изменены';
+$lang['media_perm_read'] = 'Извините, у Вас недостаточно прав для чтения файлов.';
+$lang['media_perm_upload'] = 'Извините, у Вас недостаточно прав для загрузки файлов.';
+$lang['media_update'] = 'Загрузить новую версию';
+$lang['media_restore'] = 'Восстановить эту версию';
+
+$lang['plugin_install_err'] = "Плагин установлен некорректно. Переименуйте папку плагина из '%s' в '%s'.";
diff --git a/inc/lang/ru/uploadmail.txt b/inc/lang/ru/uploadmail.txt
index fd7c4a7f8..77f79231e 100644
--- a/inc/lang/ru/uploadmail.txt
+++ b/inc/lang/ru/uploadmail.txt
@@ -1,13 +1,14 @@
В вашу вики был закачан файл. Подробная информация:
-Файл : @MEDIA@
-Дата : @DATE@
-Браузер : @BROWSER@
-Адрес IP : @IPADDRESS@
-Хост : @HOSTNAME@
-Размер : @SIZE@
-Тип MIME : @MIME@
-Пользователь: @USER@
+Файл : @MEDIA@
+Старая версия: @OLD@
+Дата : @DATE@
+Браузер : @BROWSER@
+Адрес IP : @IPADDRESS@
+Хост : @HOSTNAME@
+Размер : @SIZE@
+Тип MIME : @MIME@
+Пользователь : @USER@
--
Это письмо было сгенерировано «ДокуВики» по адресу
diff --git a/inc/lang/sk/lang.php b/inc/lang/sk/lang.php
index 4a2520abd..c0d45da58 100644
--- a/inc/lang/sk/lang.php
+++ b/inc/lang/sk/lang.php
@@ -48,6 +48,8 @@ $lang['btn_recover'] = 'Obnoviť koncept';
$lang['btn_draftdel'] = 'Zmazať koncept';
$lang['btn_revert'] = 'Obnoviť';
$lang['btn_register'] = 'Registrovať';
+$lang['btn_apply'] = 'Použiť';
+$lang['btn_media'] = 'Správa médií';
$lang['loggedinas'] = 'Prihlásený(á) ako';
$lang['user'] = 'Užívateľské meno';
$lang['pass'] = 'Heslo';
@@ -92,7 +94,7 @@ $lang['txt_filename'] = 'Uložiť ako (voliteľné)';
$lang['txt_overwrt'] = 'Prepísať existujúci súbor';
$lang['lockedby'] = 'Práve zamknuté:';
$lang['lockexpire'] = 'Zámok stratí platnosť:';
-$lang['willexpire'] = 'Váš zámok pre editáciu za chvíľu stratí platnosť.\nAby ste predišli konfliktom, stlačte tlačítko Náhľad a zámok sa predĺži.';
+$lang['js']['willexpire'] = 'Váš zámok pre editáciu za chvíľu stratí platnosť.\nAby ste predišli konfliktom, stlačte tlačítko Náhľad a zámok sa predĺži.';
$lang['js']['notsavedyet'] = 'Neuložené zmeny budú stratené.
Chcete naozaj pokračovať?';
$lang['js']['searchmedia'] = 'Hľadať súbory';
@@ -101,7 +103,7 @@ $lang['js']['hidedetails'] = 'Skryť detaily';
$lang['js']['mediatitle'] = 'Nastavenia odkazu';
$lang['js']['mediadisplay'] = 'Typ odkazu';
$lang['js']['mediaalign'] = 'Zarovnanie';
-$lang['js']['mediasize'] = 'Veľkosť obrázku';
+$lang['js']['mediasize'] = 'Veľkosť obrázka';
$lang['js']['mediatarget'] = 'Cieľ odkazu';
$lang['js']['mediaclose'] = 'Zatvoriť';
$lang['js']['mediainsert'] = 'Vložiť';
@@ -124,7 +126,17 @@ Aj napriek tomu tento odkaz môžete skopírovať a vložiť inde.';
$lang['js']['linkwiz'] = 'Sprievodca odkazmi';
$lang['js']['linkto'] = 'Odkaz na:';
$lang['js']['del_confirm'] = 'Zmazať túto položku?';
-$lang['js']['mu_btn'] = 'Nahrať viac súborov súčasne';
+$lang['js']['restore_confirm'] = 'Skutočne obnoviť túto verziu?';
+$lang['js']['media_diff'] = 'Zobraziť rozdiely:';
+$lang['js']['media_diff_both'] = 'Vedľa seba';
+$lang['js']['media_diff_opacity'] = 'Presvitaním';
+$lang['js']['media_diff_portions'] = 'Potiahnutím';
+$lang['js']['media_select'] = 'Vybrať súbory...';
+$lang['js']['media_upload_btn'] = 'Nahrať';
+$lang['js']['media_done_btn'] = 'Hotovo';
+$lang['js']['media_drop'] = 'Pridajte súbory potiahnutím myšou';
+$lang['js']['media_cancel'] = 'odstrániť';
+$lang['js']['media_overwrt'] = 'Prepísať existujúce súbory';
$lang['rssfailed'] = 'Nastala chyba pri vytváraní tohto RSS: ';
$lang['nothingfound'] = 'Nič nenájdené.';
$lang['mediaselect'] = 'Výber dokumentu';
@@ -179,6 +191,10 @@ $lang['mail_changed'] = 'stránka zmenená:';
$lang['mail_subscribe_list'] = 'stránky zmenené v mennom priestore:';
$lang['mail_new_user'] = 'nový užívateľ:';
$lang['mail_upload'] = 'nahraný súbor:';
+$lang['changes_type'] = 'Prehľad zmien';
+$lang['pages_changes'] = 'Stránok';
+$lang['media_changes'] = 'Média súborov';
+$lang['both_changes'] = 'Stránok spolu s média súbormi';
$lang['qb_bold'] = 'Tučné';
$lang['qb_italic'] = 'Kurzíva';
$lang['qb_underl'] = 'Podčiarknutie';
@@ -219,6 +235,9 @@ $lang['img_copyr'] = 'Kopírovacie práva';
$lang['img_format'] = 'Formát';
$lang['img_camera'] = 'Fotoaparát';
$lang['img_keywords'] = 'Kľúčové slová';
+$lang['img_width'] = 'Šírka';
+$lang['img_height'] = 'Výška';
+$lang['img_manager'] = 'Prezrieť v správcovi médií';
$lang['subscr_subscribe_success'] = 'Používateľ %s bol pridaný do zoznamu hlásení o zmenách %s';
$lang['subscr_subscribe_error'] = 'Chyba pri pridaní používateľa %s do zoznamu hlásení o zmenách %s';
$lang['subscr_subscribe_noaddress'] = 'Vaše prihlasovacie meno nemá priradenú žiadnu email adresu, nemôžete byť pridaný do zoznamu hlásení o zmenách';
@@ -283,3 +302,27 @@ $lang['hours'] = 'pred %d hodinami';
$lang['minutes'] = 'pred %d minútami';
$lang['seconds'] = 'pred %d sekundami';
$lang['wordblock'] = 'Vaše zmeny neboli uložené, pretože obsahovali nepovolený text (spam).';
+$lang['media_uploadtab'] = 'Nahrať';
+$lang['media_searchtab'] = 'Hľadať';
+$lang['media_file'] = 'Súbor';
+$lang['media_viewtab'] = 'Náhľad';
+$lang['media_edittab'] = 'Upraviť';
+$lang['media_historytab'] = 'História';
+$lang['media_list_thumbs'] = 'Miniatúry';
+$lang['media_list_rows'] = 'Zoznam';
+$lang['media_sort_name'] = 'Meno';
+$lang['media_sort_date'] = 'Dátum';
+$lang['media_namespaces'] = 'Vybrať priestor';
+$lang['media_files'] = 'Súbory v %s';
+$lang['media_upload'] = 'Nahrať do %s';
+$lang['media_search'] = 'Hľadať v %s';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s v %s';
+$lang['media_edit'] = 'Upraviť %s';
+$lang['media_history'] = 'História %s';
+$lang['media_meta_edited'] = 'metadáta upravené';
+$lang['media_perm_read'] = 'Prepáčte, ale nemáte dostatočné oprávnenie na čítanie súborov.';
+$lang['media_perm_upload'] = 'Prepáčte, ale nemáte dostatočné oprávnenie na nahrávanie súborov.';
+$lang['media_update'] = 'Nahrať novú verziu';
+$lang['media_restore'] = 'Obnoviť túto verziu';
+$lang['plugin_install_err'] = 'Plugin nebol nainštalovaný úspešne. Premenujte adresár s pluginom \'%s\' na \'%s\'.';
diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php
index 0e6c0a706..9acf13504 100644
--- a/inc/lang/sl/lang.php
+++ b/inc/lang/sl/lang.php
@@ -93,7 +93,7 @@ $lang['txt_filename'] = 'Pošlji z imenom (izborno)';
$lang['txt_overwrt'] = 'Prepiši obstoječo datoteko';
$lang['lockedby'] = 'Trenutno je zaklenjeno s strani';
$lang['lockexpire'] = 'Zaklep preteče ob';
-$lang['willexpire'] = 'Zaklep za urejevanje bo pretekel čez eno minuto.\nV izogib sporom, uporabite predogled, da se merilnik časa za zaklep ponastavi.';
+$lang['js']['willexpire'] = 'Zaklep za urejevanje bo pretekel čez eno minuto.\nV izogib sporom, uporabite predogled, da se merilnik časa za zaklep ponastavi.';
$lang['js']['notsavedyet'] = 'Neshranjene spremembe bodo izgubljene.';
$lang['js']['searchmedia'] = 'Poišči datoteke';
$lang['js']['keepopen'] = 'Od izbiri ohrani okno odprto';
@@ -123,7 +123,6 @@ $lang['js']['nosmblinks'] = 'Povezovanje do souporabnih datotek sistema Win
$lang['js']['linkwiz'] = 'Čarovnik za povezave';
$lang['js']['linkto'] = 'Poveži na:';
$lang['js']['del_confirm'] = 'Ali naj se res izbrišejo izbrani predmeti?';
-$lang['js']['mu_btn'] = 'Pošiljanje več dokumentov hkrati.';
$lang['rssfailed'] = 'Prišlo je do napake med pridobivanjem vira: ';
$lang['nothingfound'] = 'Ni najdenih predmetov.';
$lang['mediaselect'] = 'Predstavne datoteke';
diff --git a/inc/lang/sq/lang.php b/inc/lang/sq/lang.php
index 47a54d2ea..87d0f30b5 100644
--- a/inc/lang/sq/lang.php
+++ b/inc/lang/sq/lang.php
@@ -94,7 +94,7 @@ $lang['txt_filename'] = 'Ngarko si (alternative)';
$lang['txt_overwrt'] = 'Zëvendëso skedarin ekzistues';
$lang['lockedby'] = 'Kyçur momentalisht nga';
$lang['lockexpire'] = 'Kyçi skadon në';
-$lang['willexpire'] = 'Kyçi juaj për redaktimin e kësaj faqeje është duke skaduar.\nPër të shmangur konflikte përdorni butonin Shiko Paraprakisht për të rivendosur kohën e kyçjes.';
+$lang['js']['willexpire'] = 'Kyçi juaj për redaktimin e kësaj faqeje është duke skaduar.\nPër të shmangur konflikte përdorni butonin Shiko Paraprakisht për të rivendosur kohën e kyçjes.';
$lang['js']['notsavedyet'] = "Ndryshimet e paruajtura do të humbasin.\nVazhdo me të vërtetë?";
$lang['rssfailed'] = 'Ndoshi një gabim gjatë kapjes së këtij lajmi:';
$lang['nothingfound'] = 'Nuk u gjet asgjë.';
@@ -120,7 +120,6 @@ $lang['js']['nosmblinks'] = 'Lidhja te Windows shares funksionon vetëm në
$lang['js']['linkwiz'] = 'Magjistari i Link';
$lang['js']['linkto'] = 'Lidh tek:';
$lang['js']['del_confirm'] = 'Fshiji vërtetë objektet e përzgjedhura?';
-$lang['js']['mu_btn'] = 'Ngarko shumë skedarë njëkohësisht';
$lang['mediausage'] = 'Përdor sintaksën e mëposhtme për të referuar këtë skedar:';
$lang['mediaview'] = 'Shiko skedarin origjinal';
$lang['mediaroot'] = 'rrënja';
diff --git a/inc/lang/sr/lang.php b/inc/lang/sr/lang.php
index b35956f03..22bcf4e33 100644
--- a/inc/lang/sr/lang.php
+++ b/inc/lang/sr/lang.php
@@ -91,7 +91,7 @@ $lang['txt_filename'] = 'Унесите вики-име (опционо
$lang['txt_overwrt'] = 'Препишите тренутни фајл';
$lang['lockedby'] = 'Тренутно закључано од стране';
$lang['lockexpire'] = 'Закључавање истиче';
-$lang['willexpire'] = 'Ваше закључавање за измену ове странице ће да истекне за један минут.\nДа би сте избегли конфликте, искористите дугме за преглед како би сте ресетовали тајмер закључавања.';
+$lang['js']['willexpire'] = 'Ваше закључавање за измену ове странице ће да истекне за један минут.\nДа би сте избегли конфликте, искористите дугме за преглед како би сте ресетовали тајмер закључавања.';
$lang['js']['notsavedyet'] = 'Несачуване измене ће бити изгубљене.
Да ли стварно желите да наставите?';
$lang['js']['searchmedia'] = 'Потражи фајлове';
@@ -123,7 +123,6 @@ $lang['js']['nosmblinks'] = 'Повезивање са Windows дељени
$lang['js']['linkwiz'] = 'Чаробњак за стварање везе';
$lang['js']['linkto'] = 'Повежи ка:';
$lang['js']['del_confirm'] = 'Обриши овај унос?';
-$lang['js']['mu_btn'] = 'Слање више датотека одједном';
$lang['rssfailed'] = 'Дошло је до грешке приликом преузимања овог довода: ';
$lang['nothingfound'] = 'Ништа није нађено.';
$lang['mediaselect'] = 'Избор медијске датотеке';
diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php
index 801e2d879..943509fed 100644
--- a/inc/lang/sv/lang.php
+++ b/inc/lang/sv/lang.php
@@ -16,6 +16,7 @@
* @author Emil Lind <emil@sys.nu>
* @author Bogge Bogge <bogge@bogge.com>
* @author Peter Åström <eaustreum@gmail.com>
+ * @author mikael@mallander.net
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -101,7 +102,7 @@ $lang['txt_filename'] = 'Ladda upp som (ej obligatoriskt)';
$lang['txt_overwrt'] = 'Skriv över befintlig fil';
$lang['lockedby'] = 'Låst av';
$lang['lockexpire'] = 'Lås upphör att gälla';
-$lang['willexpire'] = 'Ditt redigeringslås för detta dokument kommer snart att upphöra.\nFör att undvika versionskonflikter bör du förhandsgranska ditt dokument för att förlänga redigeringslåset.';
+$lang['js']['willexpire'] = 'Ditt redigeringslås för detta dokument kommer snart att upphöra.\nFör att undvika versionskonflikter bör du förhandsgranska ditt dokument för att förlänga redigeringslåset.';
$lang['js']['notsavedyet'] = 'Det finns ändringar som inte är sparade.
Är du säker på att du vill fortsätta?';
$lang['js']['searchmedia'] = 'Sök efter filer';
@@ -130,7 +131,6 @@ Du kan fortfarande klippa och klistra in länken om du använder en annan webbl
$lang['js']['linkwiz'] = 'Snabbguide Länkar';
$lang['js']['linkto'] = 'Länk till:';
$lang['js']['del_confirm'] = 'Vill du verkligen radera?';
-$lang['js']['mu_btn'] = 'Ladda upp flera filer samtidigt';
$lang['rssfailed'] = 'Ett fel uppstod när detta RSS-flöde skulle hämtas: ';
$lang['nothingfound'] = 'Inga filer hittades.';
$lang['mediaselect'] = 'Mediafiler';
@@ -225,8 +225,8 @@ $lang['img_camera'] = 'Kamera';
$lang['img_keywords'] = 'Nyckelord';
$lang['subscr_m_new_header'] = 'Lägg till prenumeration';
$lang['subscr_m_current_header'] = 'Nuvarande prenumerationer';
-$lang['subscr_m_unsubscribe'] = 'Prenumerera';
-$lang['subscr_m_subscribe'] = 'Avsluta prenumeration';
+$lang['subscr_m_unsubscribe'] = 'Avsluta prenumeration';
+$lang['subscr_m_subscribe'] = 'Prenumerera';
$lang['subscr_m_receive'] = 'Ta emot';
$lang['subscr_style_every'] = 'skicka epost vid varje ändring';
$lang['authmodfailed'] = 'Felaktiga inställningar för användarautentisering. Var vänlig meddela wikiadministratören.';
diff --git a/inc/lang/th/lang.php b/inc/lang/th/lang.php
index d40f30f4a..0d0613961 100644
--- a/inc/lang/th/lang.php
+++ b/inc/lang/th/lang.php
@@ -46,8 +46,6 @@ $lang['btn_backlink'] = 'หน้าที่ลิงก์มา';
$lang['btn_backtomedia'] = 'กลับไปยังหน้าเลือกไฟล์สื่อ';
$lang['btn_subscribe'] = 'เฝ้าดู';
$lang['btn_unsubscribe'] = 'เลิกเฝ้าดู';
-$lang['btn_subscribens'] = 'สมัครเพื่อตามการเปลี่ยนแปลงเนมสเปซ';
-$lang['btn_unsubscribens'] = 'ยกเลิกสมัครเพื่อตามการเปลี่ยนแปลงเนมสเปซ';
$lang['btn_profile'] = 'แก้ข้อมูลผู้ใช้';
$lang['btn_reset'] = 'เริ่มใหม่';
$lang['btn_resendpwd'] = 'ลืมรหัส ส่งให้ใหม่ทางอีเมล';
@@ -100,7 +98,7 @@ $lang['txt_filename'] = 'อัพโหลดเป็น(ตัวเ
$lang['txt_overwrt'] = 'เขียนทับไฟล์ที่มีอยู่แล้ว';
$lang['lockedby'] = 'ตอนนี้ถูกล๊อคโดย';
$lang['lockexpire'] = 'การล๊อคจะหมดอายุเมื่อ';
-$lang['willexpire'] = 'การล๊อคเพื่อแก้ไขหน้านี้กำลังจะหมดเวลาในอีก \n นาที เพื่อที่จะหลีกเลี่ยงข้อขัดแย้งให้ใช้ปุ่ม "Preview" เพื่อรีเซ็ทเวลาใหม่';
+$lang['js']['willexpire'] = 'การล๊อคเพื่อแก้ไขหน้านี้กำลังจะหมดเวลาในอีก \n นาที เพื่อที่จะหลีกเลี่ยงข้อขัดแย้งให้ใช้ปุ่ม "Preview" เพื่อรีเซ็ทเวลาใหม่';
$lang['js']['notsavedyet'] = "การแก้ไขที่ไม่ได้บันทึกจะสูญหาย \n ต้องการทำต่อจริงๆหรือ?";
$lang['rssfailed'] = 'มีข้อผิดพลาดขณะดูดฟีดนี้';
$lang['nothingfound'] = 'ไม่พบสิ่งใด';
@@ -126,7 +124,6 @@ $lang['js']['nosmblinks'] = 'เชื่อมไปยังหน้า
$lang['js']['linkwiz'] = 'ลิงค์วิเศษ';
$lang['js']['linkto'] = 'ลิงค์ไป:';
$lang['js']['del_confirm'] = 'ต้องการลบรายการที่เลือกจริงๆหรือ?';
-$lang['js']['mu_btn'] = 'อัพโหลดหลายๆไฟล์ในครั้งเดียว';
$lang['mediausage'] = 'ให้ใช้ไวยกรณ์ต่อไปนี้เพื่ออ้างอิงไฟล์นี้';
$lang['mediaview'] = 'ดูไฟล์ต้นฉบับ';
$lang['mediaroot'] = 'ราก(รูท)';
diff --git a/inc/lang/tr/lang.php b/inc/lang/tr/lang.php
index 0509113b0..94b1c951a 100644
--- a/inc/lang/tr/lang.php
+++ b/inc/lang/tr/lang.php
@@ -93,7 +93,7 @@ $lang['txt_filename'] = 'Dosya adı (zorunlu değil)';
$lang['txt_overwrt'] = 'Mevcut dosyanın üstüne yaz';
$lang['lockedby'] = 'Şu an şunun tarafından kilitli:';
$lang['lockexpire'] = 'Kilitin açılma tarihi:';
-$lang['willexpire'] = 'Bu sayfayı değiştirme kilidinin süresi yaklaşık bir dakika içinde geçecek.\nÇakışmaları önlemek için önizleme tuşunu kullanarak kilit sayacını sıfırla.';
+$lang['js']['willexpire'] = 'Bu sayfayı değiştirme kilidinin süresi yaklaşık bir dakika içinde geçecek.\nÇakışmaları önlemek için önizleme tuşunu kullanarak kilit sayacını sıfırla.';
$lang['js']['notsavedyet'] = 'Kaydedilmemiş değişiklikler kaybolacak.
Devam etmek istiyor musunuz?';
$lang['js']['searchmedia'] = 'Dosyalar için Ara';
@@ -124,7 +124,6 @@ $lang['js']['nosmblinks'] = 'Windows paylaşımı sadece Microsoft Internet
$lang['js']['linkwiz'] = 'Bağlantı sihirbazı';
$lang['js']['linkto'] = 'Bağlantı:';
$lang['js']['del_confirm'] = 'Bu girişi sil?';
-$lang['js']['mu_btn'] = 'Birden fazla dosyayı bir seferde gönder';
$lang['rssfailed'] = 'Bu beslemeyi çekerken hata oluştu: ';
$lang['nothingfound'] = 'Hiçbir şey yok.';
$lang['mediaselect'] = 'Çokluortam dosyası seçimi';
diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php
index 7bda02501..22d61c9bf 100644
--- a/inc/lang/uk/lang.php
+++ b/inc/lang/uk/lang.php
@@ -94,7 +94,7 @@ $lang['txt_filename'] = 'Завантажити як (не обов\'я
$lang['txt_overwrt'] = 'Перезаписати існуючий файл';
$lang['lockedby'] = 'Заблоковано';
$lang['lockexpire'] = 'Блокування завершується в';
-$lang['willexpire'] = 'Блокування редагування цієї сторінки закінчується через хвилину.\n Щоб уникнути конфліктів використовуйте кнопку перегляду для продовження блокування.';
+$lang['js']['willexpire'] = 'Блокування редагування цієї сторінки закінчується через хвилину.\n Щоб уникнути конфліктів використовуйте кнопку перегляду для продовження блокування.';
$lang['js']['notsavedyet'] = 'Незбережені зміни будуть втрачені.
Дійсно продовжити?';
$lang['js']['searchmedia'] = 'Шукати файли';
@@ -126,7 +126,6 @@ $lang['js']['nosmblinks'] = 'Посилання на мережеві па
$lang['js']['linkwiz'] = 'Чарівник посилань';
$lang['js']['linkto'] = 'Посилання на:';
$lang['js']['del_confirm'] = 'Дійсно знищити обрані елементи?';
-$lang['js']['mu_btn'] = 'Завантажити одночасно кілька файлів';
$lang['rssfailed'] = 'Виникла помилка під час отримання RSS-стрічки: ';
$lang['nothingfound'] = 'Нічого не знайдено.';
$lang['mediaselect'] = 'Вибір медіа-файлу';
diff --git a/inc/lang/vi/lang.php b/inc/lang/vi/lang.php
index 89c9e9cfc..361e51e84 100644
--- a/inc/lang/vi/lang.php
+++ b/inc/lang/vi/lang.php
@@ -49,7 +49,7 @@ $lang['txt_upload'] = 'Chọn tệp để tải lên';
$lang['txt_filename'] = 'Điền wikiname (tuỳ ý)';
$lang['lockedby'] = 'Đang khoá bởi';
$lang['lockexpire'] = 'Khoá sẽ hết hạn vào lúc';
-$lang['willexpire'] = 'Khoá của bạn để biên soạn trang này sẽ hết hạn trong vòng 1 phút.\nĐể tránh xung đột, bạn nên bấm nút xem trước để lập lại thời gian khoá';
+$lang['js']['willexpire'] = 'Khoá của bạn để biên soạn trang này sẽ hết hạn trong vòng 1 phút.\nĐể tránh xung đột, bạn nên bấm nút xem trước để lập lại thời gian khoá';
$lang['js']['notsavedyet'] = "Hiện có những thay đổi chưa được bảo lưu, và sẽ mất.\nBạn thật sự muốn tiếp tục?";
$lang['rssfailed'] = 'Rút nguồn này gặp phải lỗi';
diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php
index 074c510e9..a46869d6c 100644
--- a/inc/lang/zh-tw/lang.php
+++ b/inc/lang/zh-tw/lang.php
@@ -95,7 +95,7 @@ $lang['txt_filename'] = '請輸入要存在維基內的檔案名稱 (
$lang['txt_overwrt'] = '是否要覆蓋原有檔案';
$lang['lockedby'] = '目前已被下列人員鎖定';
$lang['lockexpire'] = '預計解除鎖定於';
-$lang['willexpire'] = '本頁的編輯鎖定將在一分鐘內到期。要避免發生衝突,請按「預覽」鍵重設鎖定計時。';
+$lang['js']['willexpire'] = '本頁的編輯鎖定將在一分鐘內到期。要避免發生衝突,請按「預覽」鍵重設鎖定計時。';
$lang['js']['notsavedyet'] = '未儲存的變更將會遺失,繼續嗎?';
$lang['js']['searchmedia'] = '搜尋檔案';
$lang['js']['keepopen'] = '選擇時保持視窗開啟';
@@ -126,7 +126,6 @@ $lang['js']['nosmblinks'] = '只有在 Microsoft IE 下才能執行「連
$lang['js']['linkwiz'] = '建立連結精靈';
$lang['js']['linkto'] = '連結至:';
$lang['js']['del_confirm'] = '確定刪除選取的項目?';
-$lang['js']['mu_btn'] = '上傳多個檔案';
$lang['rssfailed'] = '擷取 RSS 饋送檔時發生錯誤:';
$lang['nothingfound'] = '沒找到任何結果。';
$lang['mediaselect'] = '媒體檔案';
diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php
index 14c92c4b3..6e6dff6f4 100644
--- a/inc/lang/zh/lang.php
+++ b/inc/lang/zh/lang.php
@@ -13,6 +13,7 @@
* @author caii <zhoucaiqi@gmail.com>
* @author Hiphen Lee <jacob.b.leung@gmail.com>
* @author caii, patent agent in China <zhoucaiqi@gmail.com>
+ * @author lainme993@gmail.com
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -54,6 +55,8 @@ $lang['btn_recover'] = '恢复草稿';
$lang['btn_draftdel'] = '删除草稿';
$lang['btn_revert'] = '恢复';
$lang['btn_register'] = '注册';
+$lang['btn_apply'] = '应用';
+$lang['btn_media'] = '媒体管理器';
$lang['loggedinas'] = '登录为';
$lang['user'] = '用户名';
$lang['pass'] = '密码';
@@ -98,7 +101,7 @@ $lang['txt_filename'] = '上传并重命名为(可选)';
$lang['txt_overwrt'] = '覆盖已存在的同名文件';
$lang['lockedby'] = '目前已被下列人员锁定';
$lang['lockexpire'] = '预计锁定解除于';
-$lang['willexpire'] = '您对本页的独有编辑权将于一分钟之后解除。\n为了防止与其他人的编辑冲突,请使用预览按钮重设计时器。';
+$lang['js']['willexpire'] = '您对本页的独有编辑权将于一分钟之后解除。\n为了防止与其他人的编辑冲突,请使用预览按钮重设计时器。';
$lang['js']['notsavedyet'] = '未保存的更改将丢失。
真的要继续?';
$lang['js']['searchmedia'] = '查找文件';
@@ -130,7 +133,17 @@ $lang['js']['nosmblinks'] = '连接到 Windows 共享功能只有在 IE 浏
$lang['js']['linkwiz'] = '链接向导';
$lang['js']['linkto'] = '链接到:';
$lang['js']['del_confirm'] = '真的要删除选中的项目吗?';
-$lang['js']['mu_btn'] = '一次上传了多个文件';
+$lang['js']['restore_confirm'] = '确实要恢复这个版本么?';
+$lang['js']['media_diff'] = '查看差异:';
+$lang['js']['media_diff_both'] = '肩并肩';
+$lang['js']['media_diff_opacity'] = '叠加';
+$lang['js']['media_diff_portions'] = '滑块';
+$lang['js']['media_select'] = '选择文件……';
+$lang['js']['media_upload_btn'] = '上传';
+$lang['js']['media_done_btn'] = '完成';
+$lang['js']['media_drop'] = '拖拽文件到此处来上传';
+$lang['js']['media_cancel'] = '删除';
+$lang['js']['media_overwrt'] = '覆盖已存在的文件';
$lang['rssfailed'] = '获取该 RSS 信息时产生错误:';
$lang['nothingfound'] = '什么都没有找到。';
$lang['mediaselect'] = '媒体文件';
@@ -185,6 +198,10 @@ $lang['mail_changed'] = '更改页面:';
$lang['mail_subscribe_list'] = '命名空间中改变的页面:';
$lang['mail_new_user'] = '新用户:';
$lang['mail_upload'] = '已上传的文件:';
+$lang['changes_type'] = '查看何种更改';
+$lang['pages_changes'] = '页面';
+$lang['media_changes'] = '媒体文件';
+$lang['both_changes'] = '页面和媒体文件';
$lang['qb_bold'] = '粗体';
$lang['qb_italic'] = '斜体';
$lang['qb_underl'] = '下划线';
@@ -225,6 +242,9 @@ $lang['img_copyr'] = '版权';
$lang['img_format'] = '格式';
$lang['img_camera'] = '相机';
$lang['img_keywords'] = '关键字';
+$lang['img_width'] = '宽度';
+$lang['img_height'] = '高度';
+$lang['img_manager'] = '在媒体管理器中查看';
$lang['subscr_subscribe_success'] = '添加 %s 到 %s 的订阅列表';
$lang['subscr_subscribe_error'] = '添加 %s 到 %s 的订阅列表中出现错误';
$lang['subscr_subscribe_noaddress'] = '没有与您登录信息相关联的地址,您无法被添加到订阅列表';
@@ -293,3 +313,23 @@ $lang['hours'] = '%d小时前';
$lang['minutes'] = '%d分钟前';
$lang['seconds'] = '%d秒前';
$lang['wordblock'] = '您的更改没有被保存,因为它包含被屏蔽的文字(垃圾信息)。';
+$lang['media_uploadtab'] = '上传';
+$lang['media_searchtab'] = '搜索';
+$lang['media_viewtab'] = '查看';
+$lang['media_edittab'] = '编辑';
+$lang['media_historytab'] = '历史';
+$lang['media_thumbsview'] = '缩略图';
+$lang['media_listview'] = '列表';
+$lang['media_sort'] = '排序';
+$lang['media_sort_name'] = '按名称';
+$lang['media_sort_date'] = '按日期';
+$lang['media_upload'] = '上传到 <strong>%s</strong> 命名空间。';
+$lang['media_search'] = '在 <strong>%s</strong> 命名空间中搜索。';
+$lang['media_edit'] = '编辑';
+$lang['media_history'] = '这些是文件的旧版本。';
+$lang['media_meta_edited'] = '元数据已编辑';
+$lang['media_perm_read'] = '抱歉,您没有足够权限读取这些文件。';
+$lang['media_perm_upload'] = '抱歉,您没有足够权限来上传文件。';
+$lang['media_update'] = '上传新版本';
+$lang['media_restore'] = '恢复这个版本';
+$lang['plugin_install_err'] = '插件安装不正确。重命名插件目录“%s”为“%s”。';
diff --git a/inc/load.php b/inc/load.php
index ef6f7f31c..d30397f6e 100644
--- a/inc/load.php
+++ b/inc/load.php
@@ -43,7 +43,7 @@ require_once(DOKU_INC.'inc/auth.php');
* require()s their associated php files when an object is instantiated.
*
* @author Andreas Gohr <andi@splitbrain.org>
- * @todo add generic loading of plugins and other generically named classes
+ * @todo add generic loading of renderers and auth backends
*/
function load_autoload($name){
static $classes = null;
@@ -87,5 +87,16 @@ function load_autoload($name){
require_once($classes[$name]);
return;
}
+
+ // Plugin loading
+ if(preg_match('/^(helper|syntax|action|admin|renderer)_plugin_([^_]+)(?:_([^_]+))?$/',
+ $name, $m)) {
+ //try to load the wanted plugin file
+ // include, but be silent. Maybe some other autoloader has an idea
+ // how to load this class.
+ $c = ((count($m) === 4) ? "/{$m[3]}" : '');
+ @include DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php";
+ return;
+ }
}
diff --git a/inc/mail.php b/inc/mail.php
index 8742e17f6..01b2895e1 100644
--- a/inc/mail.php
+++ b/inc/mail.php
@@ -104,6 +104,9 @@ function _mail_send_action($data) {
$headers = isset($data['headers']) ? $data['headers'] : null;
$params = isset($data['params']) ? $data['params'] : null;
+ // discard mail request if no recipients are available
+ if(trim($to) === '' && trim($cc) === '' && trim($bcc) === '') return false;
+
// end additional code to support event ... original mail_send() code from here
if(defined('MAILHEADER_ASCIIONLY')){
diff --git a/inc/media.php b/inc/media.php
index 3c9340d51..9d3e90a54 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -40,6 +40,7 @@ function media_filesinuse($data,$id){
* Handles the saving of image meta data
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
function media_metasave($id,$auth,$data){
if($auth < AUTH_UPLOAD) return false;
@@ -60,8 +61,19 @@ function media_metasave($id,$auth,$data){
}
}
+ $old = @filemtime($src);
+ if(!@file_exists(mediaFN($id, $old)) && @file_exists($src)) {
+ // add old revision to the attic
+ media_saveOldRevision($id);
+ }
+
if($meta->save()){
if($conf['fperm']) chmod($src, $conf['fperm']);
+
+ $new = @filemtime($src);
+ // add a log entry to the media changelog
+ addMediaLogEntry($new, $id, DOKU_CHANGE_TYPE_EDIT, $lang['media_meta_edited']);
+
msg($lang['metasaveok'],1);
return $id;
}else{
@@ -74,33 +86,35 @@ function media_metasave($id,$auth,$data){
* Display the form to edit image meta data
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
function media_metaform($id,$auth){
- if($auth < AUTH_UPLOAD) return false;
global $lang, $config_cascade;
+ if($auth < AUTH_UPLOAD) {
+ echo '<div class="nothing">'.$lang['media_perm_upload'].'</div>'.NL;
+ return false;
+ }
+
// load the field descriptions
static $fields = null;
if(is_null($fields)){
-
- foreach (array('default','local') as $config_group) {
- if (empty($config_cascade['mediameta'][$config_group])) continue;
- foreach ($config_cascade['mediameta'][$config_group] as $config_file) {
- if(@file_exists($config_file)){
- include($config_file);
- }
- }
+ $config_files = getConfigFiles('mediameta');
+ foreach ($config_files as $config_file) {
+ if(@file_exists($config_file)) include($config_file);
}
}
$src = mediaFN($id);
// output
- echo '<h1>'.hsc(noNS($id)).'</h1>'.NL;
- echo '<form action="'.DOKU_BASE.'lib/exe/mediamanager.php" accept-charset="utf-8" method="post" class="meta">'.NL;
- formSecurityToken();
+ $form = new Doku_Form(array('action' => media_managerURL(array('tab_details' => 'view')),
+ 'class' => 'meta'));
+ $form->addHidden('img', $id);
+ $form->addHidden('mediado', 'save');
foreach($fields as $key => $field){
// get current value
+ if (empty($field[0])) continue;
$tags = array($field[0]);
if(is_array($field[3])) $tags = array_merge($tags,$field[3]);
$value = tpl_img_getTag($tags,'',$src);
@@ -111,33 +125,22 @@ function media_metaform($id,$auth){
$p['class'] = 'edit';
$p['id'] = 'meta__'.$key;
$p['name'] = 'meta['.$field[0].']';
+ $p_attrs = array('class' => 'edit');
- // put label
- echo '<div class="metafield">';
- echo '<label for="meta__'.$key.'">';
- echo ($lang[$field[1]]) ? $lang[$field[1]] : $field[1];
- echo ':</label>';
-
- // put input field
+ $form->addElement('<div class="row">');
if($field[2] == 'text'){
- $p['value'] = $value;
- $p['type'] = 'text';
- $att = buildAttributes($p);
- echo "<input $att/>".NL;
+ $form->addElement(form_makeField('text', $p['name'], $value, ($lang[$field[1]]) ? $lang[$field[1]] : $field[1] . ':', $p['id'], $p['class'], $p_attrs));
}else{
$att = buildAttributes($p);
- echo "<textarea $att rows=\"6\" cols=\"50\">".formText($value).'</textarea>'.NL;
+ $form->addElement('<label for="meta__'.$key.'">'.$lang[$field[1]].'</label>');
+ $form->addElement("<textarea $att rows=\"6\" cols=\"50\">".formText($value).'</textarea>');
}
- echo '</div>'.NL;
+ $form->addElement('</div>'.NL);
}
- echo '<div class="buttons">'.NL;
- echo '<input type="hidden" name="img" value="'.hsc($id).'" />'.NL;
- echo '<input name="do[save]" type="submit" value="'.$lang['btn_save'].
- '" title="'.$lang['btn_save'].' [S]" accesskey="s" class="button" />'.NL;
- echo '<input name="do[cancel]" type="submit" value="'.$lang['btn_cancel'].
- '" title="'.$lang['btn_cancel'].' [C]" accesskey="c" class="button" />'.NL;
- echo '</div>'.NL;
- echo '</form>'.NL;
+ $form->addElement('<div class="buttons">');
+ $form->addElement(form_makeButton('submit', '', $lang['btn_save'], array('accesskey' => 's', 'name' => 'mediado[save]')));
+ $form->addElement('</div>'.NL);
+ $form->printForm();
}
/**
@@ -178,6 +181,7 @@ define('DOKU_MEDIA_EMPTY_NS', 8);
DOKU_MEDIA_INUSE
*/
function media_delete($id,$auth){
+ global $lang;
if($auth < AUTH_DELETE) return DOKU_MEDIA_NOT_AUTH;
if(media_inuse($id)) return DOKU_MEDIA_INUSE;
@@ -193,9 +197,15 @@ function media_delete($id,$auth){
$data['del'] = false;
$evt = new Doku_Event('MEDIA_DELETE_FILE',$data);
if ($evt->advise_before()) {
+ $old = @filemtime($file);
+ if(!@file_exists(mediaFN($id, $old)) && @file_exists($file)) {
+ // add old revision to the attic
+ media_saveOldRevision($id);
+ }
+
$data['unl'] = @unlink($file);
if($data['unl']){
- addMediaLogEntry(time(), $id, DOKU_CHANGE_TYPE_DELETE);
+ addMediaLogEntry(time(), $id, DOKU_CHANGE_TYPE_DELETE, $lang['deleted']);
$data['del'] = io_sweepNS($id,'mediadir');
}
}
@@ -210,19 +220,58 @@ function media_delete($id,$auth){
}
/**
+ * Handle file uploads via XMLHttpRequest
+ *
+ * @return mixed false on error, id of the new file on success
+ */
+function media_upload_xhr($ns,$auth){
+ if(!checkSecurityToken()) return false;
+
+ $id = $_GET['qqfile'];
+ list($ext,$mime,$dl) = mimetype($id);
+ $input = fopen("php://input", "r");
+ $temp = tmpfile();
+ $realSize = stream_copy_to_stream($input, $temp);
+ fclose($input);
+ if ($realSize != (int)$_SERVER["CONTENT_LENGTH"]) return false;
+ if (!($tmp = io_mktmpdir())) return false;
+ $path = $tmp.'/'.md5($id);
+ $target = fopen($path, "w");
+ fseek($temp, 0, SEEK_SET);
+ stream_copy_to_stream($temp, $target);
+ fclose($target);
+ $res = media_save(
+ array('name' => $path,
+ 'mime' => $mime,
+ 'ext' => $ext),
+ $ns.':'.$id,
+ (($_REQUEST['ow'] == 'checked') ? true : false),
+ $auth,
+ 'copy'
+ );
+ unlink($path);
+ if ($tmp) dir_delete($tmp);
+ if (is_array($res)) {
+ msg($res[0], $res[1]);
+ return false;
+ }
+ return $res;
+}
+
+/**
* Handles media file uploads
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Michael Klier <chi@chimeric.de>
* @return mixed false on error, id of the new file on success
*/
-function media_upload($ns,$auth){
+function media_upload($ns,$auth,$file=false){
if(!checkSecurityToken()) return false;
global $lang;
// get file and id
- $id = $_POST['id'];
- $file = $_FILES['upload'];
+ $id = $_POST['mediaid'];
+ if (!$file) $file = $_FILES['upload'];
if(empty($id)) $id = $file['name'];
// check for errors (messages are done in lib/exe/mediamanager.php)
@@ -280,7 +329,7 @@ function media_save($file, $id, $ow, $auth, $move) {
}
}
- global $lang;
+ global $lang, $conf;
// get filename
$id = cleanID($id,false,true);
@@ -298,7 +347,8 @@ function media_save($file, $id, $ow, $auth, $move) {
//check for overwrite
$overwrite = @file_exists($fn);
- if($overwrite && (!$ow || $auth < AUTH_DELETE)) {
+ $auth_ow = (($conf['mediarevisions']) ? AUTH_UPLOAD : AUTH_DELETE);
+ if($overwrite && (!$ow || $auth < $auth_ow)) {
return array($lang['uploadexist'], 0);
}
// check for valid content
@@ -341,26 +391,38 @@ function _media_upload_action($data) {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Michael Klier <chi@chimeric.de>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
function media_upload_finish($fn_tmp, $fn, $id, $imime, $overwrite, $move = 'move_uploaded_file') {
global $conf;
global $lang;
+ global $REV;
+
+ $old = @filemtime($fn);
+ if(!@file_exists(mediaFN($id, $old)) && @file_exists($fn)) {
+ // add old revision to the attic if missing
+ media_saveOldRevision($id);
+ }
// prepare directory
io_createNamespace($id, 'media');
if($move($fn_tmp, $fn)) {
+ @clearstatcache(true,$fn);
+ $new = @filemtime($fn);
// Set the correct permission here.
// Always chmod media because they may be saved with different permissions than expected from the php umask.
// (Should normally chmod to $conf['fperm'] only if $conf['fperm'] is set.)
chmod($fn, $conf['fmode']);
msg($lang['uploadsucc'],1);
- media_notify($id,$fn,$imime);
+ media_notify($id,$fn,$imime,$old);
// add a log entry to the media changelog
- if ($overwrite) {
- addMediaLogEntry(time(), $id, DOKU_CHANGE_TYPE_EDIT);
+ if ($REV){
+ addMediaLogEntry($new, $id, DOKU_CHANGE_TYPE_REVERT, $lang['restored'], $REV);
+ } elseif ($overwrite) {
+ addMediaLogEntry($new, $id, DOKU_CHANGE_TYPE_EDIT);
} else {
- addMediaLogEntry(time(), $id, DOKU_CHANGE_TYPE_CREATE);
+ addMediaLogEntry($new, $id, DOKU_CHANGE_TYPE_CREATE, $lang['created']);
}
return $id;
}else{
@@ -369,6 +431,43 @@ function media_upload_finish($fn_tmp, $fn, $id, $imime, $overwrite, $move = 'mov
}
/**
+ * Moves the current version of media file to the media_attic
+ * directory
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ * @param string $id
+ * @return int - revision date
+ */
+function media_saveOldRevision($id){
+ global $conf, $lang;
+
+ $oldf = mediaFN($id);
+ if(!@file_exists($oldf)) return '';
+ $date = filemtime($oldf);
+ if (!$conf['mediarevisions']) return $date;
+
+ if (!getRevisionInfo($id, $date, 8192, true)) {
+ // there was an external edit,
+ // there is no log entry for current version of file
+ if (!@file_exists(mediaMetaFN($id,'.changes'))) {
+ addMediaLogEntry($date, $id, DOKU_CHANGE_TYPE_CREATE, $lang['created']);
+ } else {
+ addMediaLogEntry($date, $id, DOKU_CHANGE_TYPE_EDIT);
+ }
+ }
+
+ $newf = mediaFN($id,$date);
+ io_makeFileDir($newf);
+ if(copy($oldf, $newf)) {
+ // Set the correct permission here.
+ // Always chmod media because they may be saved with different permissions than expected from the php umask.
+ // (Should normally chmod to $conf['fperm'] only if $conf['fperm'] is set.)
+ chmod($newf, $conf['fmode']);
+ }
+ return $date;
+}
+
+/**
* This function checks if the uploaded content is really what the
* mimetype says it is. We also do spam checking for text types here.
*
@@ -416,7 +515,7 @@ function media_contentcheck($file,$mime){
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
-function media_notify($id,$file,$mime){
+function media_notify($id,$file,$mime,$old_rev=false){
global $lang;
global $conf;
global $INFO;
@@ -434,8 +533,17 @@ function media_notify($id,$file,$mime){
$text = str_replace('@MIME@',$mime,$text);
$text = str_replace('@MEDIA@',ml($id,'',true,'&',true),$text);
$text = str_replace('@SIZE@',filesize_h(filesize($file)),$text);
+ if ($old_rev && $conf['mediarevisions']) {
+ $text = str_replace('@OLD@', ml($id, "rev=$old_rev", true, '&', true), $text);
+ } else {
+ $text = str_replace('@OLD@', '', $text);
+ }
- $subject = '['.$conf['title'].'] '.$lang['mail_upload'].' '.$id;
+ if(empty($conf['mailprefix'])) {
+ $subject = '['.$conf['title'].'] '.$lang['mail_upload'].' '.$id;
+ } else {
+ $subject = '['.$conf['mailprefix'].'] '.$lang['mail_upload'].' '.$id;
+ }
mail_send($conf['notify'],$subject,$text,$conf['mailfrom']);
}
@@ -443,7 +551,7 @@ function media_notify($id,$file,$mime){
/**
* List all files in a given Media namespace
*/
-function media_filelist($ns,$auth=null,$jump=''){
+function media_filelist($ns,$auth=null,$jump='',$fullscreenview=false,$sort=false){
global $conf;
global $lang;
$ns = cleanID($ns);
@@ -451,26 +559,694 @@ function media_filelist($ns,$auth=null,$jump=''){
// check auth our self if not given (needed for ajax calls)
if(is_null($auth)) $auth = auth_quickaclcheck("$ns:*");
- echo '<h1 id="media__ns">:'.hsc($ns).'</h1>'.NL;
+ if (!$fullscreenview) echo '<h1 id="media__ns">:'.hsc($ns).'</h1>'.NL;
if($auth < AUTH_READ){
// FIXME: print permission warning here instead?
echo '<div class="nothing">'.$lang['nothingfound'].'</div>'.NL;
}else{
- media_uploadform($ns, $auth);
+ if (!$fullscreenview) media_uploadform($ns, $auth);
$dir = utf8_encodeFN(str_replace(':','/',$ns));
$data = array();
search($data,$conf['mediadir'],'search_media',
- array('showmsg'=>true,'depth'=>1),$dir);
+ array('showmsg'=>true,'depth'=>1),$dir,1,$sort);
if(!count($data)){
echo '<div class="nothing">'.$lang['nothingfound'].'</div>'.NL;
- }else foreach($data as $item){
- media_printfile($item,$auth,$jump);
+ }else {
+ if ($fullscreenview) {
+ echo '<ul class="' . _media_get_list_type() . '">';
+ }
+ foreach($data as $item){
+ if (!$fullscreenview) {
+ media_printfile($item,$auth,$jump);
+ } else {
+ media_printfile_thumbs($item,$auth,$jump);
+ }
+ }
+ if ($fullscreenview) echo '</ul>'.NL;
+ }
+ }
+ if (!$fullscreenview) media_searchform($ns);
+}
+
+/**
+ * Prints tabs for files list actions
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ * @author Adrian Lang <mail@adrianlang.de>
+ *
+ * @param string $selected_tab - opened tab
+ */
+
+function media_tabs_files($selected_tab = ''){
+ global $lang;
+ $tabs = array();
+ foreach(array('files' => 'mediaselect',
+ 'upload' => 'media_uploadtab',
+ 'search' => 'media_searchtab') as $tab => $caption) {
+ $tabs[$tab] = array('href' => media_managerURL(array('tab_files' => $tab), '&'),
+ 'caption' => $lang[$caption]);
+ }
+
+ html_tabs($tabs, $selected_tab);
+}
+
+/**
+ * Prints tabs for files details actions
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ * @param string $selected_tab - opened tab
+ */
+function media_tabs_details($image, $selected_tab = ''){
+ global $lang, $conf;
+
+ $tabs = array();
+ $tabs['view'] = array('href' => media_managerURL(array('tab_details' => 'view'), '&'),
+ 'caption' => $lang['media_viewtab']);
+
+ list($ext, $mime) = mimetype($image);
+ if ($mime == 'image/jpeg' && @file_exists(mediaFN($image))) {
+ $tabs['edit'] = array('href' => media_managerURL(array('tab_details' => 'edit'), '&'),
+ 'caption' => $lang['media_edittab']);
+ }
+ if ($conf['mediarevisions']) {
+ $tabs['history'] = array('href' => media_managerURL(array('tab_details' => 'history'), '&'),
+ 'caption' => $lang['media_historytab']);
+ }
+
+ html_tabs($tabs, $selected_tab);
+}
+
+/**
+ * Prints options for the tab that displays a list of all files
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function media_tab_files_options(){
+ global $lang, $NS;
+ $form = new Doku_Form(array('class' => 'options', 'method' => 'get',
+ 'action' => wl($ID)));
+ $media_manager_params = media_managerURL(array(), '', false, true);
+ foreach($media_manager_params as $pKey => $pVal){
+ $form->addHidden($pKey, $pVal);
+ }
+ $form->addHidden('sectok', null);
+ if (isset($_REQUEST['q'])) {
+ $form->addHidden('q', $_REQUEST['q']);
+ }
+ $form->addElement('<ul>'.NL);
+ foreach(array('list' => array('listType', array('thumbs', 'rows')),
+ 'sort' => array('sortBy', array('name', 'date')))
+ as $group => $content) {
+ $checked = "_media_get_${group}_type";
+ $checked = $checked();
+
+ $form->addElement('<li class="' . $content[0] . '">');
+ foreach($content[1] as $option) {
+ $attrs = array();
+ if ($checked == $option) {
+ $attrs['checked'] = 'checked';
+ }
+ $form->addElement(form_makeRadioField($group, $option,
+ $lang['media_' . $group . '_' . $option],
+ $content[0] . '__' . $option,
+ $option, $attrs));
+ }
+ $form->addElement('</li>'.NL);
+ }
+ $form->addElement('<li>');
+ $form->addElement(form_makeButton('submit', '', $lang['btn_apply']));
+ $form->addElement('</li>'.NL);
+ $form->addElement('</ul>'.NL);
+ $form->printForm();
+}
+
+/**
+ * Returns type of sorting for the list of files in media manager
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ * @return string - sort type
+ */
+function _media_get_sort_type() {
+ return _media_get_display_param('sort', array('default' => 'name', 'date'));
+}
+
+function _media_get_list_type() {
+ return _media_get_display_param('list', array('default' => 'thumbs', 'rows'));
+}
+
+function _media_get_display_param($param, $values) {
+ if (isset($_REQUEST[$param]) && in_array($_REQUEST[$param], $values)) {
+ // FIXME: Set cookie
+ return $_REQUEST[$param];
+ } else {
+ $val = get_doku_pref($param, $values['default']);
+ if (!in_array($val, $values)) {
+ $val = $values['default'];
+ }
+ return $val;
+ }
+}
+
+/**
+ * Prints tab that displays a list of all files
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function media_tab_files($ns,$auth=null,$jump='') {
+ global $lang;
+ if(is_null($auth)) $auth = auth_quickaclcheck("$ns:*");
+
+ if($auth < AUTH_READ){
+ echo '<div class="nothing">'.$lang['media_perm_read'].'</div>'.NL;
+ }else{
+ media_filelist($ns,$auth,$jump,true,_media_get_sort_type());
+ }
+}
+
+/**
+ * Prints tab that displays uploading form
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function media_tab_upload($ns,$auth=null,$jump='') {
+ global $lang;
+ if(is_null($auth)) $auth = auth_quickaclcheck("$ns:*");
+
+ echo '<div class="upload">'.NL;
+ if ($auth >= AUTH_UPLOAD) {
+ echo '<p>' . $lang['mediaupload'] . '</p>';
+ }
+ media_uploadform($ns, $auth, true);
+ echo '</div>'.NL;
+}
+
+/**
+ * Prints tab that displays search form
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function media_tab_search($ns,$auth=null) {
+ global $lang;
+
+ $do = $_REQUEST['mediado'];
+ $query = $_REQUEST['q'];
+ if (!$query) $query = '';
+ echo '<div class="search">'.NL;
+
+ media_searchform($ns, $query, true);
+ if ($do == 'searchlist') {
+ media_searchlist($query,$ns,$auth,true,_media_get_sort_type());
+ }
+ echo '</div>'.NL;
+}
+
+/**
+ * Prints tab that displays mediafile details
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function media_tab_view($image, $ns, $auth=null, $rev=false) {
+ global $lang, $conf;
+ if(is_null($auth)) $auth = auth_quickaclcheck("$ns:*");
+
+ if ($image && $auth >= AUTH_READ) {
+ $meta = new JpegMeta(mediaFN($image, $rev));
+ media_preview($image, $auth, $rev, $meta);
+ media_preview_buttons($image, $auth, $rev);
+ media_details($image, $auth, $rev, $meta);
+
+ } else {
+ echo '<div class="nothing">'.$lang['media_perm_read'].'</div>'.NL;
+ }
+}
+
+/**
+ * Prints tab that displays form for editing mediafile metadata
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function media_tab_edit($image, $ns, $auth=null) {
+ global $lang;
+ if(is_null($auth)) $auth = auth_quickaclcheck("$ns:*");
+
+ if ($image) {
+ list($ext, $mime) = mimetype($image);
+ if ($mime == 'image/jpeg') media_metaform($image,$auth);
+ }
+}
+
+/**
+ * Prints tab that displays mediafile revisions
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function media_tab_history($image, $ns, $auth=null) {
+ global $lang;
+ if(is_null($auth)) $auth = auth_quickaclcheck("$ns:*");
+ $do = $_REQUEST['mediado'];
+
+ if ($auth >= AUTH_READ && $image) {
+ if ($do == 'diff'){
+ media_diff($image, $ns, $auth);
+ } else {
+ $first = isset($_REQUEST['first']) ? intval($_REQUEST['first']) : 0;
+ html_revisions($first, $image);
+ }
+ } else {
+ echo '<div class="nothing">'.$lang['media_perm_read'].'</div>'.NL;
+ }
+}
+
+/**
+ * Prints mediafile details
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function media_preview($image, $auth, $rev=false, $meta=false) {
+
+ $size = media_image_preview_size($image, $rev, $meta);
+
+ if ($size) {
+ echo '<div class="image">';
+
+ $more = array();
+ if ($rev) {
+ $more['rev'] = $rev;
+ } else {
+ $t = @filemtime(mediaFN($image));
+ $more['t'] = $t;
+ }
+
+ $more['w'] = $size[0];
+ $more['h'] = $size[1];
+ $src = ml($image, $more);
+ echo '<img src="'.$src.'" alt="" style="max-width: '.$size[0].'px;" />';
+
+ echo '</div>'.NL;
+ }
+}
+
+/**
+ * Prints mediafile action buttons
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function media_preview_buttons($image, $auth, $rev=false) {
+ global $lang, $conf;
+
+ echo '<ul class="actions">'.NL;
+
+ if($auth >= AUTH_DELETE && !$rev && @file_exists(mediaFN($image))){
+
+ // delete button
+ $form = new Doku_Form(array('id' => 'mediamanager__btn_delete',
+ 'action'=>media_managerURL(array('delete' => $image), '&')));
+ $form->addElement(form_makeButton('submit','',$lang['btn_delete']));
+ echo '<li>';
+ $form->printForm();
+ echo '</li>'.NL;
+ }
+
+ $auth_ow = (($conf['mediarevisions']) ? AUTH_UPLOAD : AUTH_DELETE);
+ if($auth >= $auth_ow && !$rev){
+
+ // upload new version button
+ $form = new Doku_Form(array('id' => 'mediamanager__btn_update',
+ 'action'=>media_managerURL(array('image' => $image, 'mediado' => 'update'), '&')));
+ $form->addElement(form_makeButton('submit','',$lang['media_update']));
+ echo '<li>';
+ $form->printForm();
+ echo '</li>'.NL;
+ }
+
+ if($auth >= AUTH_UPLOAD && $rev && $conf['mediarevisions'] && @file_exists(mediaFN($image, $rev))){
+
+ // restore button
+ $form = new Doku_Form(array('id' => 'mediamanager__btn_restore',
+ 'action'=>media_managerURL(array('image' => $image), '&')));
+ $form->addHidden('mediado','restore');
+ $form->addHidden('rev',$rev);
+ $form->addElement(form_makeButton('submit','',$lang['media_restore']));
+ echo '<li>';
+ $form->printForm();
+ echo '</li>'.NL;
+ }
+
+ echo '</ul>'.NL;
+}
+
+/**
+ * Returns image width and height for mediamanager preview panel
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ * @param string $image
+ * @param int $rev
+ * @param JpegMeta $meta
+ * @return array
+ */
+function media_image_preview_size($image, $rev, $meta, $size = 500) {
+ if (!preg_match("/\.(jpe?g|gif|png)$/", $image) || !file_exists(mediaFN($image, $rev))) return false;
+
+ $info = getimagesize(mediaFN($image, $rev));
+ $w = (int) $info[0];
+ $h = (int) $info[1];
+
+ if($meta && ($w > $size || $h > $size)){
+ $ratio = $meta->getResizeRatio($size, $size);
+ $w = floor($w * $ratio);
+ $h = floor($h * $ratio);
+ }
+ return array($w, $h);
+}
+
+/**
+ * Returns the requested EXIF/IPTC tag from the image meta
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ * @param array $tags
+ * @param JpegMeta $meta
+ * @param string $alt
+ * @return string
+ */
+function media_getTag($tags,$meta,$alt=''){
+ if($meta === false) return $alt;
+ $info = $meta->getField($tags);
+ if($info == false) return $alt;
+ return $info;
+}
+
+/**
+ * Returns mediafile tags
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ * @param JpegMeta $meta
+ * @return array
+ */
+function media_file_tags($meta) {
+ global $config_cascade;
+
+ // load the field descriptions
+ static $fields = null;
+ if(is_null($fields)){
+ $config_files = getConfigFiles('mediameta');
+ foreach ($config_files as $config_file) {
+ if(@file_exists($config_file)) include($config_file);
+ }
+ }
+
+ $tags = array();
+
+ foreach($fields as $key => $tag){
+ $t = array();
+ if (!empty($tag[0])) $t = array($tag[0]);
+ if(is_array($tag[3])) $t = array_merge($t,$tag[3]);
+ $value = media_getTag($t, $meta);
+ $tags[] = array('tag' => $tag, 'value' => $value);
+ }
+
+ return $tags;
+}
+
+/**
+ * Prints mediafile tags
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function media_details($image, $auth, $rev=false, $meta=false) {
+ global $lang;
+
+ if (!$meta) $meta = new JpegMeta(mediaFN($image, $rev));
+ $tags = media_file_tags($meta);
+
+ echo '<dl>'.NL;
+ foreach($tags as $tag){
+ if ($tag['value']) {
+ $value = cleanText($tag['value']);
+ echo '<dt>'.$lang[$tag['tag'][1]].':</dt><dd>';
+ if ($tag['tag'][2] == 'date') echo dformat($value);
+ else echo hsc($value);
+ echo '</dd>'.NL;
+ }
+ }
+ echo '</dl>'.NL;
+}
+
+/**
+ * Shows difference between two revisions of file
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function media_diff($image, $ns, $auth, $fromajax = false) {
+ global $lang;
+ global $conf;
+
+ if ($auth < AUTH_READ || !$image || !$conf['mediarevisions']) return '';
+
+ $rev1 = (int) $_REQUEST['rev'];
+
+ if(is_array($_REQUEST['rev2'])){
+ $rev1 = (int) $_REQUEST['rev2'][0];
+ $rev2 = (int) $_REQUEST['rev2'][1];
+
+ if(!$rev1){
+ $rev1 = $rev2;
+ unset($rev2);
+ }
+ }else{
+ $rev2 = (int) $_REQUEST['rev2'];
+ }
+
+ if ($rev1 && !file_exists(mediaFN($image, $rev1))) $rev1 = false;
+ if ($rev2 && !file_exists(mediaFN($image, $rev2))) $rev2 = false;
+
+ if($rev1 && $rev2){ // two specific revisions wanted
+ // make sure order is correct (older on the left)
+ if($rev1 < $rev2){
+ $l_rev = $rev1;
+ $r_rev = $rev2;
+ }else{
+ $l_rev = $rev2;
+ $r_rev = $rev1;
+ }
+ }elseif($rev1){ // single revision given, compare to current
+ $r_rev = '';
+ $l_rev = $rev1;
+ }else{ // no revision was given, compare previous to current
+ $r_rev = '';
+ $revs = getRevisions($image, 0, 1, 8192, true);
+ if (file_exists(mediaFN($image, $revs[0]))) {
+ $l_rev = $revs[0];
+ } else {
+ $l_rev = '';
+ }
+ }
+
+ // prepare event data
+ $data[0] = $image;
+ $data[1] = $l_rev;
+ $data[2] = $r_rev;
+ $data[3] = $ns;
+ $data[4] = $auth;
+ $data[5] = $fromajax;
+
+ // trigger event
+ return trigger_event('MEDIA_DIFF', $data, '_media_file_diff', true);
+
+}
+
+function _media_file_diff($data) {
+ if(is_array($data) && count($data)===6) {
+ return media_file_diff($data[0], $data[1], $data[2], $data[3], $data[4], $data[5]);
+ } else {
+ return false;
+ }
+}
+
+/**
+ * Shows difference between two revisions of image
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function media_file_diff($image, $l_rev, $r_rev, $ns, $auth, $fromajax){
+ global $lang, $config_cascade;
+
+ $l_meta = new JpegMeta(mediaFN($image, $l_rev));
+ $r_meta = new JpegMeta(mediaFN($image, $r_rev));
+
+ $is_img = preg_match("/\.(jpe?g|gif|png)$/", $image);
+ if ($is_img) {
+ $l_size = media_image_preview_size($image, $l_rev, $l_meta);
+ $r_size = media_image_preview_size($image, $r_rev, $r_meta);
+ $is_img = ($l_size && $r_size && ($l_size[0] >= 30 || $r_size[0] >= 30));
+
+ $difftype = $_REQUEST['difftype'];
+
+ if (!$fromajax) {
+ $form = new Doku_Form(array(
+ 'action' => media_managerURL(array(), '&'),
+ 'method' => 'get',
+ 'id' => 'mediamanager__form_diffview',
+ 'class' => 'diffView'
+ ));
+ $form->addHidden('sectok', null);
+ $form->addElement('<input type="hidden" name="rev2[]" value="'.$l_rev.'" ></input>');
+ $form->addElement('<input type="hidden" name="rev2[]" value="'.$r_rev.'" ></input>');
+ $form->addHidden('mediado', 'diff');
+ $form->printForm();
+
+ echo NL.'<div id="mediamanager__diff" >'.NL;
+ }
+
+ if ($difftype == 'opacity' || $difftype == 'portions') {
+ media_image_diff($image, $l_rev, $r_rev, $l_size, $r_size, $difftype);
+ if (!$fromajax) echo '</div>';
+ return '';
+ }
+ }
+
+ list($l_head, $r_head) = html_diff_head($l_rev, $r_rev, $image, true);
+
+ ?>
+ <table>
+ <tr>
+ <th><?php echo $l_head; ?></th>
+ <th><?php echo $r_head; ?></th>
+ </tr>
+ <?php
+
+ echo '<tr class="image">';
+ echo '<td>';
+ media_preview($image, $auth, $l_rev, $l_meta);
+ echo '</td>';
+
+ echo '<td>';
+ media_preview($image, $auth, $r_rev, $r_meta);
+ echo '</td>';
+ echo '</tr>'.NL;
+
+ echo '<tr class="actions">';
+ echo '<td>';
+ media_preview_buttons($image, $auth, $l_rev);
+ echo '</td>';
+
+ echo '<td>';
+ media_preview_buttons($image, $auth, $r_rev);
+ echo '</td>';
+ echo '</tr>'.NL;
+
+ $l_tags = media_file_tags($l_meta);
+ $r_tags = media_file_tags($r_meta);
+ // FIXME r_tags-only stuff
+ foreach ($l_tags as $key => $l_tag) {
+ if ($l_tag['value'] != $r_tags[$key]['value']) {
+ $r_tags[$key]['highlighted'] = true;
+ $l_tags[$key]['highlighted'] = true;
+ } else if (!$l_tag['value'] || !$r_tags[$key]['value']) {
+ unset($r_tags[$key]);
+ unset($l_tags[$key]);
+ }
+ }
+
+ echo '<tr>';
+ foreach(array($l_tags,$r_tags) as $tags){
+ echo '<td>'.NL;
+
+ echo '<dl class="img_tags">';
+ foreach($tags as $tag){
+ $value = cleanText($tag['value']);
+ if (!$value) $value = '-';
+ echo '<dt>'.$lang[$tag['tag'][1]].':</dt>';
+ echo '<dd>';
+ if ($tag['highlighted']) {
+ echo '<strong>';
+ }
+ if ($tag['tag'][2] == 'date') echo dformat($value);
+ else echo hsc($value);
+ if ($tag['highlighted']) {
+ echo '</strong>';
+ }
+ echo '</dd>';
+ }
+ echo '</dl>'.NL;
+
+ echo '</td>';
+ }
+ echo '</tr>'.NL;
+
+ echo '</table>'.NL;
+
+ if ($is_img && !$fromajax) echo '</div>';
+}
+
+/**
+ * Prints two images side by side
+ * and slider
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ * @param string $image
+ * @param int $l_rev
+ * @param int $r_rev
+ * @param array $l_size
+ * @param array $r_size
+ * @param string $type
+ */
+function media_image_diff($image, $l_rev, $r_rev, $l_size, $r_size, $type) {
+ if ($l_size != $r_size) {
+ if ($r_size[0] > $l_size[0]) {
+ $l_size = $r_size;
}
}
- media_searchform($ns);
+
+ $l_more = array('rev' => $l_rev, 'h' => $l_size[1], 'w' => $l_size[0]);
+ $r_more = array('rev' => $r_rev, 'h' => $l_size[1], 'w' => $l_size[0]);
+
+ $l_src = ml($image, $l_more);
+ $r_src = ml($image, $r_more);
+
+ // slider
+ echo '<div class="slider" style="max-width: '.($l_size[0]-20).'px;" ></div>'.NL;
+
+ // two images in divs
+ echo '<div class="imageDiff ' . $type . '">'.NL;
+ echo '<div class="image1" style="max-width: '.$l_size[0].'px;">';
+ echo '<img src="'.$l_src.'" alt="" />';
+ echo '</div>'.NL;
+ echo '<div class="image2" style="max-width: '.$l_size[0].'px;">';
+ echo '<img src="'.$r_src.'" alt="" />';
+ echo '</div>'.NL;
+ echo '</div>'.NL;
+}
+
+/**
+ * Restores an old revision of a media file
+ *
+ * @param string $image
+ * @param int $rev
+ * @param int $auth
+ * @return string - file's id
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function media_restore($image, $rev, $auth){
+ global $conf;
+ if ($auth < AUTH_UPLOAD || !$conf['mediarevisions']) return false;
+ $removed = (!file_exists(mediaFN($image)) && file_exists(mediaMetaFN($image, '.changes')));
+ if (!$image || (!file_exists(mediaFN($image)) && !$removed)) return false;
+ if (!$rev || !file_exists(mediaFN($image, $rev))) return false;
+ list($iext,$imime,$dl) = mimetype($image);
+ $res = media_upload_finish(mediaFN($image, $rev),
+ mediaFN($image),
+ $image,
+ $imime,
+ true,
+ 'copy');
+ if (is_array($res)) {
+ msg($res[0], $res[1]);
+ return false;
+ }
+ return $res;
}
/**
@@ -478,11 +1254,13 @@ function media_filelist($ns,$auth=null,$jump=''){
*
* @author Tobias Sarnowski <sarnowski@cosmocode.de>
* @author Andreas Gohr <gohr@cosmocode.de>
+ * @author Kate Arzamastseva <pshns@ukr.net>
* @triggers MEDIA_SEARCH
*/
-function media_searchlist($query,$ns,$auth=null){
+function media_searchlist($query,$ns,$auth=null,$fullscreen=false,$sort=''){
global $conf;
global $lang;
+
$ns = cleanID($ns);
if ($query) {
@@ -501,50 +1279,34 @@ function media_searchlist($query,$ns,$auth=null){
array('showmsg'=>false,'pattern'=>$pattern),
$dir);
}
+
+ $data = array();
+ foreach ($evdata['data'] as $k => $v) {
+ $data[$k] = ($sort == 'date') ? $v['mtime'] : $v['id'];
+ }
+ array_multisort($data, SORT_DESC, SORT_NUMERIC, $evdata['data']);
+
$evt->advise_after();
unset($evt);
}
- echo '<h1 id="media__ns">'.sprintf($lang['searchmedia_in'],hsc($ns).':*').'</h1>'.NL;
- media_searchform($ns,$query);
+ if (!$fullscreen) {
+ echo '<h1 id="media__ns">'.sprintf($lang['searchmedia_in'],hsc($ns).':*').'</h1>'.NL;
+ media_searchform($ns,$query);
+ }
if(!count($evdata['data'])){
echo '<div class="nothing">'.$lang['nothingfound'].'</div>'.NL;
- }else foreach($evdata['data'] as $item){
- media_printfile($item,$item['perm'],'',true);
- }
-}
-
-/**
- * Print action links for a file depending on filetype
- * and available permissions
- */
-function media_fileactions($item,$auth){
- global $lang;
-
- // view button
- $link = ml($item['id'],'',true);
- echo ' <a href="'.$link.'" target="_blank"><img src="'.DOKU_BASE.'lib/images/magnifier.png" '.
- 'alt="'.$lang['mediaview'].'" title="'.$lang['mediaview'].'" class="btn" /></a>';
-
- // no further actions if not writable
- if(!$item['writable']) return;
-
- // delete button
- if($auth >= AUTH_DELETE){
- echo ' <a href="'.DOKU_BASE.'lib/exe/mediamanager.php?delete='.rawurlencode($item['id']).
- '&amp;sectok='.getSecurityToken().'" class="btn_media_delete" title="'.$item['id'].'">'.
- '<img src="'.DOKU_BASE.'lib/images/trash.png" alt="'.$lang['btn_delete'].'" '.
- 'title="'.$lang['btn_delete'].'" class="btn" /></a>';
- }
-
- // edit button
- if($auth >= AUTH_UPLOAD && $item['isimg'] && $item['meta']->getField('File.Mime') == 'image/jpeg'){
- echo ' <a href="'.DOKU_BASE.'lib/exe/mediamanager.php?edit='.rawurlencode($item['id']).'">'.
- '<img src="'.DOKU_BASE.'lib/images/pencil.png" alt="'.$lang['metaedit'].'" '.
- 'title="'.$lang['metaedit'].'" class="btn" /></a>';
+ }else {
+ if ($fullscreen) {
+ echo '<ul class="' . _media_get_list_type() . '">';
+ }
+ foreach($evdata['data'] as $item){
+ if (!$fullscreen) media_printfile($item,$item['perm'],'',true);
+ else media_printfile_thumbs($item,$item['perm'],false,true);
+ }
+ if ($fullscreen) echo '</ul>'.NL;
}
-
}
/**
@@ -595,7 +1357,26 @@ function media_printfile($item,$auth,$jump,$display_namespace=false){
echo '<a name="h_:'.$item['id'].'" class="'.$class.'">'.hsc($item['id']).'</a><br/>';
}
echo '<span class="info">('.$info.')</span>'.NL;
- media_fileactions($item,$auth);
+
+ // view button
+ $link = ml($item['id'],'',true);
+ echo ' <a href="'.$link.'" target="_blank"><img src="'.DOKU_BASE.'lib/images/magnifier.png" '.
+ 'alt="'.$lang['mediaview'].'" title="'.$lang['mediaview'].'" class="btn" /></a>';
+
+ // mediamanager button
+ $link = wl('',array('do'=>'media','image'=>$item['id']));
+ echo ' <a href="'.$link.'" target="_blank"><img src="'.DOKU_BASE.'lib/images/mediamanager.png" '.
+ 'alt="'.$lang['btn_media'].'" title="'.$lang['btn_media'].'" class="btn" /></a>';
+
+ // delete button
+ if($item['writable'] && $auth >= AUTH_DELETE){
+ $link = DOKU_BASE.'lib/exe/mediamanager.php?delete='.rawurlencode($item['id']).
+ '&amp;sectok='.getSecurityToken();
+ echo ' <a href="'.$link.'" class="btn_media_delete" title="'.$item['id'].'">'.
+ '<img src="'.DOKU_BASE.'lib/images/trash.png" alt="'.$lang['btn_delete'].'" '.
+ 'title="'.$lang['btn_delete'].'" class="btn" /></a>';
+ }
+
echo '<div class="example" id="ex_'.str_replace(':','_',$item['id']).'">';
echo $lang['mediausage'].' <code>{{:'.$item['id'].'}}</code>';
echo '</div>';
@@ -604,27 +1385,108 @@ function media_printfile($item,$auth,$jump,$display_namespace=false){
echo '</div>'.NL;
}
+function media_printicon($filename){
+ list($ext,$mime,$dl) = mimetype(mediaFN($filename),false);
+
+ if (@file_exists(DOKU_INC.'lib/images/fileicons/'.$ext.'.png')) {
+ $icon = DOKU_BASE.'lib/images/fileicons/'.$ext.'.png';
+ } else {
+ $icon = DOKU_BASE.'lib/images/fileicons/file.png';
+ }
+
+ return '<img src="'.$icon.'" alt="'.$filename.'" class="icon" />';
+
+}
+
+/**
+ * Formats and prints one file in the list in the thumbnails view
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function media_printfile_thumbs($item,$auth,$jump=false,$display_namespace=false){
+ global $lang;
+ global $conf;
+
+ // Prepare filename
+ $file = utf8_decodeFN($item['file']);
+
+ // output
+ echo '<li><dl>'.NL;
+
+ echo '<dt>';
+ if($item['isimg']) {
+ media_printimgdetail($item, true);
+
+ } else {
+ echo '<a name="d_:'.$item['id'].'" class="image" title="'.$item['id'].'" href="'.
+ media_managerURL(array('image' => hsc($item['id']), 'ns' => getNS($item['id']),
+ 'tab_details' => 'view')).'">';
+ echo media_printicon($item['id']);
+ echo '</a>';
+ }
+ echo '</dt>'.NL;
+ if (!$display_namespace) {
+ $name = hsc($file);
+ } else {
+ $name = hsc($item['id']);
+ }
+ echo '<dd class="name"><a href="'.media_managerURL(array('image' => hsc($item['id']), 'ns' => getNS($item['id']),
+ 'tab_details' => 'view')).'" name="h_:'.$item['id'].'">'.$name.'</a></dd>'.NL;
+
+ if($item['isimg']){
+ $size = '';
+ $size .= (int) $item['meta']->getField('File.Width');
+ $size .= '&#215;';
+ $size .= (int) $item['meta']->getField('File.Height');
+ echo '<dd class="size">'.$size.'</dd>'.NL;
+ } else {
+ echo '<dd class="size">&nbsp;</dd>'.NL;
+ }
+ $date = dformat($item['mtime']);
+ echo '<dd class="date">'.$date.'</dd>'.NL;
+ $filesize = filesize_h($item['size']);
+ echo '<dd class="filesize">'.$filesize.'</dd>'.NL;
+ echo '</dl></li>'.NL;
+}
+
/**
* Prints a thumbnail and metainfos
*/
-function media_printimgdetail($item){
+function media_printimgdetail($item, $fullscreen=false){
// prepare thumbnail
+ $size = $fullscreen ? 90 : 120;
+
$w = (int) $item['meta']->getField('File.Width');
$h = (int) $item['meta']->getField('File.Height');
- if($w>120 || $h>120){
- $ratio = $item['meta']->getResizeRatio(120);
+ if($w>$size || $h>$size){
+ if (!$fullscreen) {
+ $ratio = $item['meta']->getResizeRatio($size);
+ } else {
+ $ratio = $item['meta']->getResizeRatio($size,$size);
+ }
$w = floor($w * $ratio);
$h = floor($h * $ratio);
}
- $src = ml($item['id'],array('w'=>$w,'h'=>$h));
+ $src = ml($item['id'],array('w'=>$w,'h'=>$h,'t'=>$item['mtime']));
$p = array();
- $p['width'] = $w;
- $p['height'] = $h;
+ if (!$fullscreen) {
+ // In fullscreen mediamanager view, image resizing is done via CSS.
+ $p['width'] = $w;
+ $p['height'] = $h;
+ }
$p['alt'] = $item['id'];
- $p['class'] = 'thumb';
$att = buildAttributes($p);
// output
+ if ($fullscreen) {
+ echo '<a name="l_:'.$item['id'].'" class="image thumb" href="'.
+ media_managerURL(array('image' => hsc($item['id']), 'ns' => getNS($item['id']), 'tab_details' => 'view')).'">';
+ echo '<img src="'.$src.'" '.$att.' />';
+ echo '</a>';
+ }
+
+ if ($fullscreen) return;
+
echo '<div class="detail">';
echo '<div class="thumb">';
echo '<a name="d_:'.$item['id'].'" class="select">';
@@ -652,88 +1514,116 @@ function media_printimgdetail($item){
}
/**
+ * Build link based on the current, adding/rewriting
+ * parameters
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ * @param array $params
+ * @param string $amp - separator
+ * @return string - link
+ */
+function media_managerURL($params=false, $amp='&amp;', $abs=false, $params_array=false) {
+ global $conf;
+ global $ID;
+
+ $gets = array('do' => 'media');
+ $media_manager_params = array('tab_files', 'tab_details', 'image', 'ns', 'list', 'sort');
+ foreach ($media_manager_params as $x) {
+ if (isset($_REQUEST[$x])) $gets[$x] = $_REQUEST[$x];
+ }
+
+ if ($params) {
+ $gets = $params + $gets;
+ }
+ unset($gets['id']);
+ if (isset($gets['delete'])) {
+ unset($gets['image']);
+ unset($gets['tab_details']);
+ }
+
+ if ($params_array) return $gets;
+
+ return wl($ID,$gets,$abs,$amp);
+}
+
+/**
* Print the media upload form if permissions are correct
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
-function media_uploadform($ns, $auth){
- global $lang;
+function media_uploadform($ns, $auth, $fullscreen = false){
+ global $lang, $conf;
- if($auth < AUTH_UPLOAD) return; //fixme print info on missing permissions?
+ if($auth < AUTH_UPLOAD) {
+ echo '<div class="nothing">'.$lang['media_perm_upload'].'</div>'.NL;
+ return;
+ }
+ $auth_ow = (($conf['mediarevisions']) ? AUTH_UPLOAD : AUTH_DELETE);
+
+ $update = false;
+ $id = '';
+ if ($auth >= $auth_ow && $fullscreen && $_REQUEST['mediado'] == 'update') {
+ $update = true;
+ $id = cleanID($_REQUEST['image']);
+ }
// The default HTML upload form
- $form = new Doku_Form(array('id' => 'dw__upload',
- 'action' => DOKU_BASE.'lib/exe/mediamanager.php',
- 'enctype' => 'multipart/form-data'));
- $form->addElement('<div class="upload">' . $lang['mediaupload'] . '</div>');
+ $params = array('id' => 'dw__upload',
+ 'enctype' => 'multipart/form-data');
+ if (!$fullscreen) {
+ $params['action'] = DOKU_BASE.'lib/exe/mediamanager.php';
+ } else {
+ $params['action'] = media_managerURL(array('tab_files' => 'files',
+ 'tab_details' => 'view'), '&');
+ }
+
+ $form = new Doku_Form($params);
+ if (!$fullscreen) echo '<div class="upload">' . $lang['mediaupload'] . '</div>';
$form->addElement(formSecurityToken());
$form->addHidden('ns', hsc($ns));
$form->addElement(form_makeOpenTag('p'));
$form->addElement(form_makeFileField('upload', $lang['txt_upload'].':', 'upload__file'));
$form->addElement(form_makeCloseTag('p'));
$form->addElement(form_makeOpenTag('p'));
- $form->addElement(form_makeTextField('id', '', $lang['txt_filename'].':', 'upload__name'));
+ $form->addElement(form_makeTextField('mediaid', noNS($id), $lang['txt_filename'].':', 'upload__name'));
$form->addElement(form_makeButton('submit', '', $lang['btn_upload']));
$form->addElement(form_makeCloseTag('p'));
- if($auth >= AUTH_DELETE){
+ if($auth >= $auth_ow){
$form->addElement(form_makeOpenTag('p'));
- $form->addElement(form_makeCheckboxField('ow', 1, $lang['txt_overwrt'], 'dw__ow', 'check'));
+ $attrs = array();
+ if ($update) $attrs['checked'] = 'checked';
+ $form->addElement(form_makeCheckboxField('ow', 1, $lang['txt_overwrt'], 'dw__ow', 'check', $attrs));
$form->addElement(form_makeCloseTag('p'));
}
- html_form('upload', $form);
- // prepare flashvars for multiupload
- $opt = array(
- 'L_gridname' => $lang['mu_gridname'] ,
- 'L_gridsize' => $lang['mu_gridsize'] ,
- 'L_gridstat' => $lang['mu_gridstat'] ,
- 'L_namespace' => $lang['mu_namespace'] ,
- 'L_overwrite' => $lang['txt_overwrt'],
- 'L_browse' => $lang['mu_browse'],
- 'L_upload' => $lang['btn_upload'],
- 'L_toobig' => $lang['mu_toobig'],
- 'L_ready' => $lang['mu_ready'],
- 'L_done' => $lang['mu_done'],
- 'L_fail' => $lang['mu_fail'],
- 'L_authfail' => $lang['mu_authfail'],
- 'L_progress' => $lang['mu_progress'],
- 'L_filetypes' => $lang['mu_filetypes'],
- 'L_info' => $lang['mu_info'],
- 'L_lasterr' => $lang['mu_lasterr'],
-
- 'O_ns' => ":$ns",
- 'O_backend' => 'mediamanager.php?'.session_name().'='.session_id(),
- 'O_maxsize' => php_to_byte(ini_get('upload_max_filesize')),
- 'O_extensions'=> join('|',array_keys(getMimeTypes())),
- 'O_overwrite' => ($auth >= AUTH_DELETE),
- 'O_sectok' => getSecurityToken(),
- 'O_authtok' => auth_createToken(),
- );
- $var = buildURLparams($opt);
- // output the flash uploader
- ?>
- <div id="dw__flashupload" style="display:none">
- <div class="upload"><?php echo $lang['mu_intro']?></div>
- <?php echo html_flashobject('multipleUpload.swf','500','190',null,$opt); ?>
- </div>
- <?php
+ echo NL.'<div id="mediamanager__uploader">'.NL;
+ html_form('upload', $form);
+ echo '</div>'.NL;
}
/**
* Print the search field form
*
* @author Tobias Sarnowski <sarnowski@cosmocode.de>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
-function media_searchform($ns,$query=''){
+function media_searchform($ns,$query='',$fullscreen=false){
global $lang;
// The default HTML search form
- $form = new Doku_Form(array('id' => 'dw__mediasearch', 'action' => DOKU_BASE.'lib/exe/mediamanager.php'));
- $form->addElement('<div class="upload">' . $lang['mediasearch'] . '</div>');
- $form->addElement(formSecurityToken());
+ $params = array('id' => 'dw__mediasearch');
+ if (!$fullscreen) {
+ $params['action'] = DOKU_BASE.'lib/exe/mediamanager.php';
+ } else {
+ $params['action'] = media_managerURL(array(), '&');
+ }
+ $form = new Doku_Form($params);
$form->addHidden('ns', $ns);
- $form->addHidden('do', 'searchlist');
+ $form->addHidden($fullscreen ? 'mediado' : 'do', 'searchlist');
+
+ if (!$fullscreen) $form->addElement('<div class="upload">' . $lang['mediasearch'] . '</div>'.NL);
$form->addElement(form_makeOpenTag('p'));
$form->addElement(form_makeTextField('q', $query,$lang['searchmedia'],'','',array('title'=>sprintf($lang['searchmedia_in'],hsc($ns).':*'))));
$form->addElement(form_makeButton('submit', '', $lang['btn_search']));
@@ -763,15 +1653,10 @@ function media_nstree($ns){
search($data,$conf['mediadir'],'search_index',array('ns' => $ns, 'nofiles' => true));
// wrap a list with the root level around the other namespaces
- $item = array( 'level' => 0, 'id' => '',
- 'open' =>'true', 'label' => '['.$lang['mediaroot'].']');
+ array_unshift($data, array('level' => 0, 'id' => '', 'open' =>'true',
+ 'label' => '['.$lang['mediaroot'].']'));
- echo '<ul class="idx">';
- echo media_nstree_li($item);
- echo media_nstree_item($item);
echo html_buildlist($data,'idx','media_nstree_item','media_nstree_li');
- echo '</li>';
- echo '</ul>';
}
/**
@@ -787,7 +1672,10 @@ function media_nstree_item($item){
if(!$item['label']) $item['label'] = $label;
$ret = '';
+ if (!($_REQUEST['do'] == 'media'))
$ret .= '<a href="'.DOKU_BASE.'lib/exe/mediamanager.php?ns='.idfilter($item['id']).'" class="idx_dir">';
+ else $ret .= '<a href="'.media_managerURL(array('ns' => idfilter($item['id']), 'tab_files' => 'files'))
+ .'" class="idx_dir">';
$ret .= $item['label'];
$ret .= '</a>';
return $ret;
@@ -811,6 +1699,7 @@ function media_nstree_li($item){
$img = DOKU_BASE.'lib/images/plus.gif';
$alt = '+';
}
+ // TODO: only deliver an image if it actually has a subtree...
return '<li class="'.$class.'">'.
'<img src="'.$img.'" alt="'.$alt.'" />';
}
diff --git a/inc/pageutils.php b/inc/pageutils.php
index c9bf60135..31b5f9ff9 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -134,6 +134,7 @@ function cleanID($raw_id,$ascii=false,$media=false){
$id = preg_replace('#:+#',':',$id);
$id = ($media ? trim($id,':.-') : trim($id,':._-'));
$id = preg_replace('#:[:\._\-]+#',':',$id);
+ $id = preg_replace('#[:\._\-]+:#',':',$id);
$cache[(string)$raw_id] = $id;
return($id);
@@ -295,8 +296,6 @@ function wikiLockFN($id) {
/**
* returns the full path to the meta file specified by ID and extension
*
- * The filename is URL encoded to protect Unicode chars
- *
* @author Steven Danz <steven-danz@kc.rr.com>
*/
function metaFN($id,$ext){
@@ -308,6 +307,19 @@ function metaFN($id,$ext){
}
/**
+ * returns the full path to the media's meta file specified by ID and extension
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function mediaMetaFN($id,$ext){
+ global $conf;
+ $id = cleanID($id);
+ $id = str_replace(':','/',$id);
+ $fn = $conf['mediametadir'].'/'.utf8_encodeFN($id).$ext;
+ return $fn;
+}
+
+/**
* returns an array of full paths to all metafiles of a given ID
*
* @author Esther Brunner <esther@kaffeehaus.ch>
@@ -326,12 +338,19 @@ function metaFiles($id){
* The filename is URL encoded to protect Unicode chars
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
-function mediaFN($id){
+function mediaFN($id, $rev=''){
global $conf;
$id = cleanID($id);
$id = str_replace(':','/',$id);
- $fn = $conf['mediadir'].'/'.utf8_encodeFN($id);
+ if(empty($rev)){
+ $fn = $conf['mediadir'].'/'.utf8_encodeFN($id);
+ }else{
+ $ext = mimetype($id);
+ $name = substr($id,0, -1*strlen($ext[0])-1);
+ $fn = $conf['mediaolddir'].'/'.utf8_encodeFN($name .'.'.( (int) $rev ).'.'.$ext[0]);
+ }
return $fn;
}
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index 22a50d1b7..55b715ad9 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -1489,10 +1489,10 @@ class Doku_Handler_Block {
}
}
- function openParagraph($pos){
+ function openParagraph($pos){
if ($this->inParagraph) return;
$this->calls[] = array('p_open',array(), $pos);
- $this->inParagraph = true;
+ $this->inParagraph = true;
$this->skipEol = true;
}
@@ -1503,11 +1503,12 @@ class Doku_Handler_Block {
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
- function closeParagraph($pos){
+ function closeParagraph($pos){
if (!$this->inParagraph) return;
// look back if there was any content - we don't want empty paragraphs
$content = '';
- for($i=count($this->calls)-1; $i>=0; $i--){
+ $ccount = count($this->calls);
+ for($i=$ccount-1; $i>=0; $i--){
if($this->calls[$i][0] == 'p_open'){
break;
}elseif($this->calls[$i][0] == 'cdata'){
@@ -1520,18 +1521,19 @@ class Doku_Handler_Block {
if(trim($content)==''){
//remove the whole paragraph
- array_splice($this->calls,$i);
- }else{
- // remove ending linebreaks in the paragraph
- $i=count($this->calls)-1;
+ //array_splice($this->calls,$i); // <- this is much slower than the loop below
+ for($x=$ccount; $x>$i; $x--) array_pop($this->calls);
+ }else{
+ // remove ending linebreaks in the paragraph
+ $i=count($this->calls)-1;
if ($this->calls[$i][0] == 'cdata') $this->calls[$i][1][0] = rtrim($this->calls[$i][1][0],DOKU_PARSER_EOL);
$this->calls[] = array('p_close',array(), $pos);
}
- $this->inParagraph = false;
+ $this->inParagraph = false;
$this->skipEol = true;
}
-
+
function addCall($call) {
$key = count($this->calls);
if ($key and ($call[0] == 'cdata') and ($this->calls[$key-1][0] == 'cdata')) {
@@ -1553,7 +1555,7 @@ class Doku_Handler_Block {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function process($calls) {
- // open first paragraph
+ // open first paragraph
$this->openParagraph(0);
foreach ( $calls as $key => $call ) {
$cname = $call[0];
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 83359cd55..ea1756803 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -805,8 +805,10 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
if($hash) $link['url'] .= '#'.$hash;
//markup non existing files
- if (!$exists)
- $link['class'] .= ' wikilink2';
+ if (!$exists) {
+ $link['class'] .= ' wikilink2';
+ $link['url'] = media_managerURL(array('tab_details' => 'view', 'image' => $src, 'ns' => getNS($src)), '&');
+ }
//output formatted
if ($linking == 'nolink' || $noLink) $this->doc .= $link['name'];
diff --git a/inc/parserutils.php b/inc/parserutils.php
index abba89b5a..9384929bf 100644
--- a/inc/parserutils.php
+++ b/inc/parserutils.php
@@ -411,6 +411,7 @@ function p_set_metadata($id, $data, $render=false, $persistent=true){
// set both keys individually as the renderer has references to the individual keys
$METADATA_RENDERERS[$id]['current'] = $meta['current'];
$METADATA_RENDERERS[$id]['persistent'] = $meta['persistent'];
+ return true;
} else {
return p_save_metadata($id, $meta);
}
@@ -676,12 +677,16 @@ function & p_get_renderer($mode) {
global $conf, $plugin_controller;
$rname = !empty($conf['renderer_'.$mode]) ? $conf['renderer_'.$mode] : $mode;
+ $rclass = "Doku_Renderer_$rname";
+
+ if( class_exists($rclass) ) {
+ return new $rclass();
+ }
// try default renderer first:
$file = DOKU_INC."inc/parser/$rname.php";
if(@file_exists($file)){
require_once $file;
- $rclass = "Doku_Renderer_$rname";
if ( !class_exists($rclass) ) {
trigger_error("Unable to resolve render class $rclass",E_USER_WARNING);
diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php
index cec5c73a9..734331c94 100644
--- a/inc/plugincontroller.class.php
+++ b/inc/plugincontroller.class.php
@@ -11,11 +11,16 @@ if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
class Doku_Plugin_Controller {
- var $list_enabled = array();
- var $list_disabled = array();
var $list_bytype = array();
+ var $tmp_plugins = array();
+ var $plugin_cascade = array('default'=>array(),'local'=>array(),'protected'=>array());
+ var $last_local_config_file = '';
- function Doku_Plugin_Controller() {
+ /**
+ * Populates the master list of plugins
+ */
+ function __construct() {
+ $this->loadConfig();
$this->_populateMasterList();
}
@@ -37,7 +42,7 @@ class Doku_Plugin_Controller {
// request the complete list
if (!$type) {
- return $all ? array_merge($this->list_enabled,$this->list_disabled) : $this->list_enabled;
+ return $all ? array_keys($this->tmp_plugins) : array_keys(array_filter($this->tmp_plugins));
}
if (!isset($this->list_bytype[$type]['enabled'])) {
@@ -61,9 +66,11 @@ class Doku_Plugin_Controller {
* @param $disabled bool true to load even disabled plugins
* @return objectreference the plugin object or null on failure
*/
- function &load($type,$name,$new=false,$disabled=false){
+ function load($type,$name,$new=false,$disabled=false){
+
//we keep all loaded plugins available in global scope for reuse
global $DOKU_PLUGINS;
+ global $lang;
list($plugin,$component) = $this->_splitName($name);
@@ -72,36 +79,25 @@ class Doku_Plugin_Controller {
return null;
}
+ $class = $type.'_plugin_'.$name;
+
//plugin already loaded?
if(!empty($DOKU_PLUGINS[$type][$name])){
if ($new || !$DOKU_PLUGINS[$type][$name]->isSingleton()) {
- $class = $type.'_plugin_'.$name;
- return class_exists($class) ? new $class : null;
+ return class_exists($class, true) ? new $class : null;
} else {
return $DOKU_PLUGINS[$type][$name];
}
}
- //try to load the wanted plugin file
- $dir = $this->get_directory($plugin);
- $file = $component ? "$type/$component.php" : "$type.php";
-
- if(!is_file(DOKU_PLUGIN."$dir/$file")){
- return null;
- }
-
- if (!include_once(DOKU_PLUGIN."$dir/$file")) {
- return null;
- }
-
//construct class and instantiate
- $class = $type.'_plugin_'.$name;
- if (!class_exists($class)){
+ if (!class_exists($class, true)) {
+
# the plugin might be in the wrong directory
+ $dir = $this->get_directory($plugin);
$inf = confToHash(DOKU_PLUGIN."$dir/plugin.info.txt");
if($inf['base'] && $inf['base'] != $plugin){
- msg("Plugin installed incorrectly. Rename plugin directory '".
- hsc($plugin)."' to '".hsc($inf['base'])."'.",-1);
+ msg(sprintf($lang['plugin_install_err'],hsc($plugin),hsc($inf['base'])),-1);
}
return null;
}
@@ -111,30 +107,28 @@ class Doku_Plugin_Controller {
}
function isdisabled($plugin) {
- return (array_search($plugin, $this->list_enabled) === false);
+ return empty($this->tmp_plugins[$plugin]);
}
- function enable($plugin) {
- if (array_search($plugin, $this->list_disabled) !== false) {
- return @unlink(DOKU_PLUGIN.$plugin.'/disabled');
- }
- return false;
+ function disable($plugin) {
+ if(array_key_exists($plugin,$this->plugin_cascade['protected'])) return false;
+ $this->tmp_plugins[$plugin] = 0;
+ return $this->saveList();
}
- function disable($plugin) {
- if (array_search($plugin, $this->list_enabled) !== false) {
- return @touch(DOKU_PLUGIN.$plugin.'/disabled');
- }
- return false;
+ function enable($plugin) {
+ if(array_key_exists($plugin,$this->plugin_cascade['protected'])) return false;
+ $this->tmp_plugins[$plugin] = 1;
+ return $this->saveList();
}
function get_directory($plugin) {
return $plugin;
}
- function _populateMasterList() {
- global $conf;
- if ($dh = opendir(DOKU_PLUGIN)) {
+ protected function _populateMasterList() {
+ if ($dh = @opendir(DOKU_PLUGIN)) {
+ $all_plugins = array();
while (false !== ($plugin = readdir($dh))) {
if ($plugin[0] == '.') continue; // skip hidden entries
if (is_file(DOKU_PLUGIN.$plugin)) continue; // skip files, we're only interested in directories
@@ -143,19 +137,119 @@ class Doku_Plugin_Controller {
// the plugin was disabled by rc2009-01-26
// disabling mechanism was changed back very soon again
// to keep everything simple we just skip the plugin completely
- }elseif(@file_exists(DOKU_PLUGIN.$plugin.'/disabled') ||
- ($plugin === 'plugin' && isset($conf['pluginmanager']) &&
- !$conf['pluginmanager'])){
- $this->list_disabled[] = $plugin;
+ } elseif (@file_exists(DOKU_PLUGIN.$plugin.'/disabled')) {
+ // treat this as a default disabled plugin(over-rideable by the plugin manager)
+ // deprecated 2011-09-10 (usage of disabled files)
+ if (empty($this->plugin_cascade['local'][$plugin])) {
+ $all_plugins[$plugin] = 0;
+ } else {
+ $all_plugins[$plugin] = 1;
+ }
+ $this->plugin_cascade['default'][$plugin] = 0;
+
+ } elseif ((array_key_exists($plugin,$this->tmp_plugins) && $this->tmp_plugins[$plugin] == 0) ||
+ ($plugin === 'plugin' && isset($conf['pluginmanager']) && !$conf['pluginmanager'])){
+ $all_plugins[$plugin] = 0;
+
+ } elseif ((array_key_exists($plugin,$this->tmp_plugins) && $this->tmp_plugins[$plugin] == 1)) {
+ $all_plugins[$plugin] = 1;
} else {
- $this->list_enabled[] = $plugin;
+ $all_plugins[$plugin] = 1;
}
}
+ $this->tmp_plugins = $all_plugins;
+ if (!file_exists($this->last_local_config_file)) {
+ $this->saveList(true);
+ }
}
}
+ protected function checkRequire($files) {
+ $plugins = array();
+ foreach($files as $file) {
+ if(file_exists($file)) {
+ @include_once($file);
+ }
+ }
+ return $plugins;
+ }
+
+ function getCascade() {
+ return $this->plugin_cascade;
+ }
+
+ /**
+ * Save the current list of plugins
+ */
+ function saveList($forceSave = false) {
+ global $conf;
+
+ if (empty($this->tmp_plugins)) return false;
+
+ // Rebuild list of local settings
+ $local_plugins = $this->rebuildLocal();
+ if($local_plugins != $this->plugin_cascade['local'] || $forceSave) {
+ $file = $this->last_local_config_file;
+ $out = "<?php\n/*\n * Local plugin enable/disable settings\n * Auto-generated through plugin/extension manager\n *\n".
+ " * NOTE: Plugins will not be added to this file unless there is a need to override a default setting. Plugins are\n".
+ " * enabled by default, unless having a 'disabled' file in their plugin folder.\n */\n";
+ foreach ($local_plugins as $plugin => $value) {
+ $out .= "\$plugins['$plugin'] = $value;\n";
+ }
+ // backup current file (remove any existing backup)
+ if (@file_exists($file)) {
+ $backup = $file.'.bak';
+ if (@file_exists($backup)) @unlink($backup);
+ if (!@copy($file,$backup)) return false;
+ if ($conf['fperm']) chmod($backup, $conf['fperm']);
+ }
+ //check if can open for writing, else restore
+ return io_saveFile($file,$out);
+ }
+ return false;
+ }
+
+ /**
+ * Rebuild the set of local plugins
+ * @return array array of plugins to be saved in end($config_cascade['plugins']['local'])
+ */
+ function rebuildLocal() {
+ //assign to local variable to avoid overwriting
+ $backup = $this->tmp_plugins;
+ //Can't do anything about protected one so rule them out completely
+ $local_default = array_diff_key($backup,$this->plugin_cascade['protected']);
+ //Diff between local+default and default
+ //gives us the ones we need to check and save
+ $diffed_ones = array_diff_key($local_default,$this->plugin_cascade['default']);
+ //The ones which we are sure of (list of 0s not in default)
+ $sure_plugins = array_filter($diffed_ones,array($this,'negate'));
+ //the ones in need of diff
+ $conflicts = array_diff_key($local_default,$diffed_ones);
+ //The final list
+ return array_merge($sure_plugins,array_diff_assoc($conflicts,$this->plugin_cascade['default']));
+ }
+
+ /**
+ * Build the list of plugins and cascade
+ *
+ */
+ function loadConfig() {
+ global $config_cascade;
+ foreach(array('default','protected') as $type) {
+ if(array_key_exists($type,$config_cascade['plugins']))
+ $this->plugin_cascade[$type] = $this->checkRequire($config_cascade['plugins'][$type]);
+ }
+ $local = $config_cascade['plugins']['local'];
+ $this->last_local_config_file = array_pop($local);
+ $this->plugin_cascade['local'] = $this->checkRequire(array($this->last_local_config_file));
+ if(is_array($local)) {
+ $this->plugin_cascade['default'] = array_merge($this->plugin_cascade['default'],$this->checkRequire($local));
+ }
+ $this->tmp_plugins = array_merge($this->plugin_cascade['default'],$this->plugin_cascade['local'],$this->plugin_cascade['protected']);
+ }
+
function _getListByType($type, $enabled) {
- $master_list = $enabled ? $this->list_enabled : $this->list_disabled;
+ $master_list = $enabled ? array_keys(array_filter($this->tmp_plugins)) : array_keys(array_filter($this->tmp_plugins,array($this,'negate')));
$plugins = array();
foreach ($master_list as $plugin) {
@@ -180,11 +274,13 @@ class Doku_Plugin_Controller {
}
function _splitName($name) {
- if (array_search($name, $this->list_enabled + $this->list_disabled) === false) {
+ if (array_search($name, array_keys($this->tmp_plugins)) === false) {
return explode('_',$name,2);
}
return array($name,'');
}
-
+ function negate($input) {
+ return !(bool) $input;
+ }
}
diff --git a/inc/pluginutils.php b/inc/pluginutils.php
index 85bcaee1e..53cfedf82 100644
--- a/inc/pluginutils.php
+++ b/inc/pluginutils.php
@@ -16,7 +16,7 @@ function plugin_list($type='',$all=false) {
global $plugin_controller;
return $plugin_controller->getList($type,$all);
}
-function &plugin_load($type,$name,$new=false,$disabled=false) {
+function plugin_load($type,$name,$new=false,$disabled=false) {
global $plugin_controller;
return $plugin_controller->load($type,$name,$new,$disabled);
}
@@ -36,3 +36,7 @@ function plugin_directory($plugin) {
global $plugin_controller;
return $plugin_controller->get_directory($plugin);
}
+function plugin_getcascade() {
+ global $plugin_controller;
+ return $plugin_controller->getCascade();
+}
diff --git a/inc/search.php b/inc/search.php
index 7b53edabe..a26ae4808 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -21,9 +21,10 @@ if(!defined('DOKU_INC')) die('meh.');
* @param int $lvl Recursion Level
* @author Andreas Gohr <andi@splitbrain.org>
*/
-function search(&$data,$base,$func,$opts,$dir='',$lvl=1){
+function search(&$data,$base,$func,$opts,$dir='',$lvl=1,$sort=false){
$dirs = array();
$files = array();
+ $filepaths = array();
//read in directories and files
$dh = @opendir($base.'/'.$dir);
@@ -35,9 +36,14 @@ function search(&$data,$base,$func,$opts,$dir='',$lvl=1){
continue;
}
$files[] = $dir.'/'.$file;
+ $filepaths[] = $base.'/'.$dir.'/'.$file;
}
closedir($dh);
- sort($files);
+ if ($sort == 'date') {
+ @array_multisort(array_map('filemtime', $filepaths), SORT_NUMERIC, SORT_DESC, $files);
+ } else {
+ sort($files);
+ }
sort($dirs);
//give directories to userfunction then recurse
@@ -78,8 +84,8 @@ function search_callback($func,&$data,$base,$file,$type,$lvl,$opts){
* return values for files are ignored
*
* All functions should check the ACL for document READ rights
- * namespaces (directories) are NOT checked as this would break
- * the recursion (You can have an nonreadable dir over a readable
+ * namespaces (directories) are NOT checked (when sneaky_index is 0) as this
+ * would break the recursion (You can have an nonreadable dir over a readable
* one deeper nested) also make sure to check the file type (for example
* in case of lockfiles).
*/
@@ -101,45 +107,22 @@ function search_qsearch(&$data,$base,$file,$type,$lvl,$opts){
/**
* Build the browsable index of pages
*
- * $opts['ns'] is the current namespace
+ * $opts['ns'] is the currently viewed namespace
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function search_index(&$data,$base,$file,$type,$lvl,$opts){
global $conf;
- $return = true;
-
- $item = array();
-
- if($type == 'd' && !preg_match('#^'.$file.'(/|$)#','/'.$opts['ns'])){
- //add but don't recurse
- $return = false;
- }elseif($type == 'f' && ($opts['nofiles'] || substr($file,-4) != '.txt')){
- //don't add
- return false;
- }
-
- $id = pathID($file,($type == 'd'));
-
- if($type=='d' && $conf['sneaky_index'] && auth_quickaclcheck($id.':') < AUTH_READ){
- return false;
- }
-
- //check hidden
- if(isHiddenPage($id)){
- return false;
- }
-
- //check ACL
- if($type=='f' && auth_quickaclcheck($id) < AUTH_READ){
- return false;
- }
-
- $data[]=array( 'id' => $id,
- 'type' => $type,
- 'level' => $lvl,
- 'open' => $return );
- return $return;
+ $opts = array(
+ 'pagesonly' => true,
+ 'listdirs' => true,
+ 'listfiles' => !$opts['nofiles'],
+ 'sneakyacl' => $conf['sneaky_index'],
+ // Hacky, should rather use recmatch
+ 'depth' => preg_match('#^'.$file.'(/|$)#','/'.$opts['ns']) ? 0 : -1
+ );
+
+ return search_universal($data, $base, $file, $type, $lvl, $opts);
}
/**
diff --git a/inc/template.php b/inc/template.php
index b9b3951ff..c70e407d6 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -89,7 +89,8 @@ function tpl_content_core(){
$_REQUEST['first'] = $_REQUEST['first'][0];
}
$first = is_numeric($_REQUEST['first']) ? intval($_REQUEST['first']) : 0;
- html_recent($first);
+ $show_changes = $_REQUEST['show_changes'];
+ html_recent($first, $show_changes);
break;
case 'index':
html_index($IDX); #FIXME can this be pulled from globals? is it sanitized correctly?
@@ -122,6 +123,9 @@ function tpl_content_core(){
case 'subscribe':
tpl_subscribe();
break;
+ case 'media':
+ tpl_media();
+ break;
default:
$evt = new Doku_Event('TPL_ACT_UNKNOWN',$ACT);
if ($evt->advise_before())
@@ -476,10 +480,15 @@ function tpl_actionlink($type,$pre='',$suf='',$inner='',$return=false){
$linktarget = wl($id, $params);
}
$caption = $lang['btn_' . $type];
+ $akey = $addTitle = '';
+ if($accesskey){
+ $akey = 'accesskey="'.$accesskey.'" ';
+ $addTitle = ' ['.strtoupper($accesskey).']';
+ }
$out = tpl_link($linktarget, $pre.(($inner)?$inner:$caption).$suf,
'class="action ' . $type . '" ' .
- 'accesskey="' . $accesskey . '" rel="nofollow" ' .
- 'title="' . hsc($caption) . '"', 1);
+ $akey . 'rel="nofollow" ' .
+ 'title="' . hsc($caption).$addTitle . '"', 1);
}
if ($return) return $out;
echo $out;
@@ -622,9 +631,7 @@ function tpl_get_action($type) {
return false;
}
break;
- case 'subscribens':
- // Superseded by subscribe/subscription
- return '';
+ case 'media':
break;
default:
return '[unknown %s type]';
@@ -972,8 +979,7 @@ function _tpl_img_action($data, $param=NULL) {
}
/**
- * This function inserts a 1x1 pixel gif which in reality
- * is the indexer function.
+ * This function inserts a small gif which in reality is the indexer function.
*
* Should be called somewhere at the very end of the main.php
* template
@@ -986,7 +992,7 @@ function tpl_indexerWebBug(){
$p = array();
$p['src'] = DOKU_BASE.'lib/exe/indexer.php?id='.rawurlencode($ID).
'&'.time();
- $p['width'] = 2;
+ $p['width'] = 2; //no more 1x1 px image because we live in times of ad blockers...
$p['height'] = 1;
$p['alt'] = '';
$att = buildAttributes($p);
@@ -1104,9 +1110,7 @@ function tpl_mediaContent($fromajax=false){
$evt = new Doku_Event('MEDIAMANAGER_CONTENT_OUTPUT', $data);
if ($evt->advise_before()) {
$do = $data['do'];
- if($do == 'metaform'){
- media_metaform($IMG,$AUTH);
- }elseif($do == 'filesinuse'){
+ if($do == 'filesinuse'){
media_filesinuse($INUSE,$IMG);
}elseif($do == 'filelist'){
media_filelist($NS,$AUTH,$JUMPTO);
@@ -1123,6 +1127,109 @@ function tpl_mediaContent($fromajax=false){
}
/**
+ * Prints the central column in full-screen media manager
+ * Depending on the opened tab this may be a list of
+ * files in a namespace, upload form or search form
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function tpl_mediaFileList(){
+ global $AUTH;
+ global $NS;
+ global $JUMPTO;
+ global $lang;
+
+ $opened_tab = $_REQUEST['tab_files'];
+ if (!$opened_tab || !in_array($opened_tab, array('files', 'upload', 'search'))) $opened_tab = 'files';
+ if ($_REQUEST['mediado'] == 'update') $opened_tab = 'upload';
+
+ echo '<h2 class="a11y">' . $lang['mediaselect'] . '</h2>'.NL;
+
+ media_tabs_files($opened_tab);
+
+ echo '<div class="panelHeader">'.NL;
+ echo '<h3>';
+ $tabTitle = ($NS) ? $NS : '['.$lang['mediaroot'].']';
+ printf($lang['media_' . $opened_tab], '<strong>'.$tabTitle.'</strong>');
+ echo '</h3>'.NL;
+ if ($opened_tab === 'search' || $opened_tab === 'files') {
+ media_tab_files_options();
+ }
+ echo '</div>'.NL;
+
+ echo '<div class="panelContent">'.NL;
+ if ($opened_tab == 'files') {
+ media_tab_files($NS,$AUTH,$JUMPTO);
+ } elseif ($opened_tab == 'upload') {
+ media_tab_upload($NS,$AUTH,$JUMPTO);
+ } elseif ($opened_tab == 'search') {
+ media_tab_search($NS,$AUTH);
+ }
+ echo '</div>'.NL;
+}
+
+/**
+ * Prints the third column in full-screen media manager
+ * Depending on the opened tab this may be details of the
+ * selected file, the meta editing dialog or
+ * list of file revisions
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function tpl_mediaFileDetails($image, $rev){
+ global $AUTH, $NS, $conf, $DEL, $lang;
+
+ $removed = (!file_exists(mediaFN($image)) && file_exists(mediaMetaFN($image, '.changes')) && $conf['mediarevisions']);
+ if (!$image || (!file_exists(mediaFN($image)) && !$removed) || $DEL) return '';
+ if ($rev && !file_exists(mediaFN($image, $rev))) $rev = false;
+ if (isset($NS) && getNS($image) != $NS) return '';
+ $do = $_REQUEST['mediado'];
+
+ $opened_tab = $_REQUEST['tab_details'];
+
+ $tab_array = array('view');
+ list($ext, $mime) = mimetype($image);
+ if ($mime == 'image/jpeg') {
+ $tab_array[] = 'edit';
+ }
+ if ($conf['mediarevisions']) {
+ $tab_array[] = 'history';
+ }
+
+ if (!$opened_tab || !in_array($opened_tab, $tab_array)) $opened_tab = 'view';
+ if ($_REQUEST['edit']) $opened_tab = 'edit';
+ if ($do == 'restore') $opened_tab = 'view';
+
+ media_tabs_details($image, $opened_tab);
+
+ echo '<div class="panelHeader"><h3>';
+ list($ext,$mime,$dl) = mimetype($image,false);
+ $class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext);
+ $class = 'select mediafile mf_'.$class;
+ $tabTitle = '<strong class="'.$class.'">'.$image.'</strong>';
+ if ($opened_tab === 'view' && $rev) {
+ printf($lang['media_viewold'], $tabTitle, dformat($rev));
+ } else {
+ printf($lang['media_' . $opened_tab], $tabTitle);
+ }
+ echo '</h3></div>'.NL;
+
+ echo '<div class="panelContent">'.NL;
+
+ if ($opened_tab == 'view') {
+ media_tab_view($image, $NS, $AUTH, $rev);
+
+ } elseif ($opened_tab == 'edit' && !$removed) {
+ media_tab_edit($image, $NS, $AUTH);
+
+ } elseif ($opened_tab == 'history' && $conf['mediarevisions']) {
+ media_tab_history($image,$NS,$AUTH);
+ }
+
+ echo '</div>'.NL;
+}
+
+/**
* prints the namespace tree in the mediamanger popup
*
* Only allowed in mediamanager.php
@@ -1131,7 +1238,6 @@ function tpl_mediaContent($fromajax=false){
*/
function tpl_mediaTree(){
global $NS;
-
ptln('<div id="media__tree">');
media_nstree($NS);
ptln('</div>');
@@ -1341,23 +1447,93 @@ function tpl_flush(){
/**
- * Use favicon.ico from data/media root directory if it exists, otherwise use
+ * Returns icon from data/media root directory if it exists, otherwise
* the one in the template's image directory.
*
+ * @param bool $abs - if to use absolute URL
+ * @param string $fileName - file name of icon
* @author Anika Henke <anika@selfthinker.org>
*/
-function tpl_getFavicon($abs=false) {
- if (file_exists(mediaFN('favicon.ico'))) {
- return ml('favicon.ico', '', true, '', $abs);
+function tpl_getFavicon($abs=false, $fileName='favicon.ico') {
+ if (file_exists(mediaFN($fileName))) {
+ return ml($fileName, '', true, '', $abs);
}
if($abs) {
- return DOKU_URL.substr(DOKU_TPL.'images/favicon.ico', strlen(DOKU_REL));
+ return DOKU_URL.substr(DOKU_TPL.'images/'.$fileName, strlen(DOKU_REL));
}
+ return DOKU_TPL.'images/'.$fileName;
+}
- return DOKU_TPL.'images/favicon.ico';
+/**
+ * Returns <link> tag for various icon types (favicon|mobile|generic)
+ *
+ * @param array $types - list of icon types to display (favicon|mobile|generic)
+ * @author Anika Henke <anika@selfthinker.org>
+ */
+function tpl_favicon($types=array('favicon')) {
+
+ $return = '';
+
+ foreach ($types as $type) {
+ switch($type) {
+ case 'favicon':
+ $return .= '<link rel="shortcut icon" href="'.tpl_getFavicon().'" />'.NL;
+ break;
+ case 'mobile':
+ $return .= '<link rel="apple-touch-icon" href="'.tpl_getFavicon(false, 'apple-touch-icon.png').'" />'.NL;
+ break;
+ case 'generic':
+ // ideal world solution, which doesn't work in any browser yet
+ $return .= '<link rel="icon" href="'.tpl_getFavicon(false, 'icon.svg').'" type="image/svg+xml" />'.NL;
+ break;
+ }
+ }
+
+ return $return;
}
+/**
+ * Prints full-screen media manager
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function tpl_media() {
+ global $DEL, $NS, $IMG, $AUTH, $JUMPTO, $REV, $lang, $fullscreen, $conf;
+ $fullscreen = true;
+ require_once DOKU_INC.'lib/exe/mediamanager.php';
+
+ if ($_REQUEST['image']) $image = cleanID($_REQUEST['image']);
+ if (isset($IMG)) $image = $IMG;
+ if (isset($JUMPTO)) $image = $JUMPTO;
+ if (isset($REV) && !$JUMPTO) $rev = $REV;
+
+ echo '<div id="mediamanager__page">'.NL;
+ echo '<h1>'.$lang['btn_media'].'</h1>'.NL;
+ html_msgarea();
+
+ echo '<div class="panel namespaces">'.NL;
+ echo '<h2>'.$lang['namespaces'].'</h2>'.NL;
+ echo '<div class="panelHeader">';
+ echo $lang['media_namespaces'];
+ echo '</div>'.NL;
+
+ echo '<div class="panelContent" id="media__tree">'.NL;
+ media_nstree($NS);
+ echo '</div>'.NL;
+ echo '</div>'.NL;
+
+ echo '<div class="panel filelist">'.NL;
+ tpl_mediaFileList();
+ echo '</div>'.NL;
+
+ echo '<div class="panel file">'.NL;
+ echo '<h2 class="a11y">'.$lang['media_file'].'</h2>'.NL;
+ tpl_mediaFileDetails($image, $rev);
+ echo '</div>'.NL;
+
+ echo '</div>'.NL;
+}
//Setup VIM: ex: et ts=4 :
diff --git a/inc/toolbar.php b/inc/toolbar.php
index 58d80043c..02172510e 100644
--- a/inc/toolbar.php
+++ b/inc/toolbar.php
@@ -213,7 +213,7 @@ function toolbar_JSdefines($varname){
'type' => 'picker',
'title' => $lang['qb_chars'],
'icon' => 'chars.png',
- 'list' => explode(' ','À à Á á  â à ã Ä ä Ǎ ǎ Ă ă Å å Ā ā Ą ą Æ æ Ć ć Ç ç Č č Ĉ ĉ Ċ ċ Ð đ ð Ď ď È è É é Ê ê Ë ë Ě ě Ē ē Ė ė Ę ę Ģ ģ Ĝ ĝ Ğ ğ Ġ ġ Ĥ ĥ Ì ì Í í Î î Ï ï Ǐ ǐ Ī ī İ ı Į į Ĵ ĵ Ķ ķ Ĺ ĺ Ļ ļ Ľ ľ Ł ł Ŀ ŀ Ń ń Ñ ñ Ņ ņ Ň ň Ò ò Ó ó Ô ô Õ õ Ö ö Ǒ ǒ Ō ō Ő ő Œ œ Ø ø Ŕ ŕ Ŗ ŗ Ř ř Ś ś Ş ş Š š Ŝ ŝ Ţ ţ Ť ť Ù ù Ú ú Û û Ü ü Ǔ ǔ Ŭ ŭ Ū ū Ů ů ǖ ǘ ǚ ǜ Ų ų Ű ű Ŵ ŵ Ý ý Ÿ ÿ Ŷ ŷ Ź ź Ž ž Ż ż Þ þ ß Ħ ħ ¿ ¡ ¢ £ ¤ ¥ € ¦ § ª ¬ ¯ ° ± ÷ ‰ ¼ ½ ¾ ¹ ² ³ µ ¶ † ‡ · • º ∀ ∂ ∃ Ə ə ∅ ∇ ∈ ∉ ∋ ∏ ∑ ‾ − ∗ √ ∝ ∞ ∠ ∧ ∨ ∩ ∪ ∫ ∴ ∼ ≅ ≈ ≠ ≡ ≤ ≥ ⊂ ⊃ ⊄ ⊆ ⊇ ⊕ ⊗ ⊥ ⋅ ◊ ℘ ℑ ℜ ℵ ♠ ♣ ♥ ♦ α β Γ γ Δ δ ε ζ η Θ θ ι κ Λ λ μ Ξ ξ Π π ρ Σ σ Τ τ υ Φ φ χ Ψ ψ Ω ω ★ ☆ ☎ ☚ ☛ ☜ ☝ ☞ ☟ ☹ ☺ ✔ ✘ × „ “ ” ‚ ‘ ’ « » ‹ › — – … ← ↑ → ↓ ↔ ⇐ ⇑ ⇒ ⇓ ⇔ © ™ ® ′ ″ [ ] { } ~ ( ) % § $ # | @'),
+ 'list' => explode(' ','À à Á á  â à ã Ä ä Ǎ ǎ Ă ă Å å Ā ā Ą ą Æ æ Ć ć Ç ç Č č Ĉ ĉ Ċ ċ Ð đ ð Ď ď È è É é Ê ê Ë ë Ě ě Ē ē Ė ė Ę ę Ģ ģ Ĝ ĝ Ğ ğ Ġ ġ Ĥ ĥ Ì ì Í í Î î Ï ï Ǐ ǐ Ī ī İ ı Į į Ĵ ĵ Ķ ķ Ĺ ĺ Ļ ļ Ľ ľ Ł ł Ŀ ŀ Ń ń Ñ ñ Ņ ņ Ň ň Ò ò Ó ó Ô ô Õ õ Ö ö Ǒ ǒ Ō ō Ő ő Œ œ Ø ø Ŕ ŕ Ŗ ŗ Ř ř Ś ś Ş ş Š š Ŝ ŝ Ţ ţ Ť ť Ù ù Ú ú Û û Ü ü Ǔ ǔ Ŭ ŭ Ū ū Ů ů ǖ ǘ ǚ ǜ Ų ų Ű ű Ŵ ŵ Ý ý Ÿ ÿ Ŷ ŷ Ź ź Ž ž Ż ż Þ þ ß Ħ ħ ¿ ¡ ¢ £ ¤ ¥ € ¦ § ª ¬ ¯ ° ± ÷ ‰ ¼ ½ ¾ ¹ ² ³ µ ¶ † ‡ · • º ∀ ∂ ∃ Ə ə ∅ ∇ ∈ ∉ ∋ ∏ ∑ ‾ − ∗ × ⁄ √ ∝ ∞ ∠ ∧ ∨ ∩ ∪ ∫ ∴ ∼ ≅ ≈ ≠ ≡ ≤ ≥ ⊂ ⊃ ⊄ ⊆ ⊇ ⊕ ⊗ ⊥ ⋅ ◊ ℘ ℑ ℜ ℵ ♠ ♣ ♥ ♦ α β Γ γ Δ δ ε ζ η Θ θ ι κ Λ λ μ Ξ ξ Π π ρ Σ σ Τ τ υ Φ φ χ Ψ ψ Ω ω ★ ☆ ☎ ☚ ☛ ☜ ☝ ☞ ☟ ☹ ☺ ✔ ✘ „ “ ” ‚ ‘ ’ « » ‹ › — – … ← ↑ → ↓ ↔ ⇐ ⇑ ⇒ ⇓ ⇔ © ™ ® ′ ″ [ ] { } ~ ( ) % § $ # | @'),
'block' => false
),
array(
diff --git a/inc/utf8.php b/inc/utf8.php
index 3d4de2289..9d0d17f78 100644
--- a/inc/utf8.php
+++ b/inc/utf8.php
@@ -1219,7 +1219,7 @@ if(empty($UTF8_SPECIAL_CHARS)) $UTF8_SPECIAL_CHARS = array(
global $UTF8_SPECIAL_CHARS2;
if(empty($UTF8_SPECIAL_CHARS2)) $UTF8_SPECIAL_CHARS2 =
"\x1A".' !"#$%&\'()+,/;<=>?@[\]^`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•�'.
- '�—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½�'.
+ '�—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½�'.
'�¿×÷ˇ˘˙˚˛˜˝̣̀́̃̉΄΅·ϖְֱֲֳִֵֶַָֹֻּֽ־ֿ�'.
'�ׁׂ׃׳״،؛؟ـًٌٍَُِّْ٪฿‌‍‎‏–—―‗‘’‚“”�'.
'��†‡•…‰′″‹›⁄₧₪₫€№℘™Ωℵ←↑→↓↔↕↵'.
@@ -1261,6 +1261,7 @@ if(empty($UTF8_SPECIAL_CHARS2)) $UTF8_SPECIAL_CHARS2 =
* @link http://www.btranslations.com/resources/romanization/korean.asp
* @author Arthit Suriyawongkul <arthit@gmail.com>
* @author Denis Scheither <amorphis@uni-bremen.de>
+ * @author Eivind Morland <eivind.morland@gmail.com>
*/
global $UTF8_ROMANIZATION;
if(empty($UTF8_ROMANIZATION)) $UTF8_ROMANIZATION = array(
@@ -1293,6 +1294,11 @@ if(empty($UTF8_ROMANIZATION)) $UTF8_ROMANIZATION = array(
'ड'=>'dq','ढ'=>'dqh','ण'=>'nq','त'=>'t','थ'=>'th','द'=>'d','ध'=>'dh',
'न'=>'n','प'=>'p','फ'=>'ph','ब'=>'b','भ'=>'bh','म'=>'m','य'=>'z','र'=>'r',
'ल'=>'l','व'=>'v','श'=>'sh','ष'=>'sqh','स'=>'s','ह'=>'x',
+ //Sanskrit diacritics
+ 'Ā'=>'A','Ī'=>'I','Ū'=>'U','Ṛ'=>'R','Ṝ'=>'R','Ṅ'=>'N','Ñ'=>'N','Ṭ'=>'T',
+ 'Ḍ'=>'D','Ṇ'=>'N','Ś'=>'S','Ṣ'=>'S','Ṁ'=>'M','Ṃ'=>'M','Ḥ'=>'H','Ḷ'=>'L','Ḹ'=>'L',
+ 'ā'=>'a','ī'=>'i','ū'=>'u','ṛ'=>'r','ṝ'=>'r','ṅ'=>'n','ñ'=>'n','ṭ'=>'t',
+ 'ḍ'=>'d','ṇ'=>'n','ś'=>'s','ṣ'=>'s','ṁ'=>'m','ṃ'=>'m','ḥ'=>'h','ḷ'=>'l','ḹ'=>'l',
//Hebrew
'א'=>'a', 'ב'=>'b','ג'=>'g','ד'=>'d','ה'=>'h','ו'=>'v','ז'=>'z','ח'=>'kh','ט'=>'th',
'י'=>'y','ך'=>'h','כ'=>'k','ל'=>'l','ם'=>'m','מ'=>'m','ן'=>'n','נ'=>'n',
diff --git a/install.php b/install.php
index 5d71db515..2f600c925 100644
--- a/install.php
+++ b/install.php
@@ -48,6 +48,7 @@ $dokuwiki_hash = array(
'2009-12-25' => '993c4b2b385643efe5abf8e7010e11f4',
'2010-11-07' => '7921d48195f4db21b8ead6d9bea801b8',
'2011-05-25' => '4241865472edb6fa14a1227721008072',
+ '2011-11-10' => 'b46ff19a7587966ac4df61cbab1b8b31',
);
diff --git a/lib/_fla/.htaccess b/lib/_fla/.htaccess
deleted file mode 100644
index 055d099c7..000000000
--- a/lib/_fla/.htaccess
+++ /dev/null
@@ -1,4 +0,0 @@
-## no access to the fla directory
-order allow,deny
-deny from all
-Satisfy All
diff --git a/lib/_fla/MultipleUpload.as b/lib/_fla/MultipleUpload.as
deleted file mode 100644
index 259441656..000000000
--- a/lib/_fla/MultipleUpload.as
+++ /dev/null
@@ -1,330 +0,0 @@
-/**
- * Flash Multi Upload
- *
- * Based on a example from Alastair Dawson
- *
- * @link http://blog.vixiom.com/2006/09/08/multiple-file-upload-with-flash-and-ruby-on-rails/
- * @author Alastair Dawson
- * @author Andreas Gohr <andi@splitbrain.org>
- * @license MIT <http://www.opensource.org/licenses/mit-license.php>
- */
-
-// delegate
-import mx.utils.Delegate;
-// ui components
-import mx.controls.DataGrid;
-import mx.controls.gridclasses.DataGridColumn
-import mx.controls.Button;
-import mx.controls.TextInput;
-import mx.controls.CheckBox;
-import mx.controls.Label;
-// file reference
-import flash.net.FileReferenceList;
-import flash.net.FileReference;
-
-class MultipleUpload {
-
- private var fileRef:FileReferenceList;
- private var fileRefListener:Object;
- private var list:Array;
- private var dp:Array;
-
- private var files_dg:DataGrid;
- private var browse_btn:Button;
- private var upload_btn:Button;
- private var ns_input:TextInput;
- private var ns_label:Label;
- private var overwrite_cb:CheckBox;
-
- private var url:String;
- private var upurl:String;
- private var current:Number;
- private var done:Number;
- private var lasterror:String;
-
- /**
- * Constructor.
- *
- * Initializes the needed objects and stage objects
- */
- public function MultipleUpload(fdg:DataGrid, bb:Button, ub:Button, nsi:TextInput, nsl:Label, ob:CheckBox) {
- // references for objects on the stage
- files_dg = fdg;
- browse_btn = bb;
- upload_btn = ub;
- ns_input = nsi;
- ns_label = nsl;
- overwrite_cb = ob;
-
- // file list references & listener
- fileRef = new FileReferenceList();
- fileRefListener = new Object();
- fileRef.addListener(fileRefListener);
-
- // setup
- iniUI();
- inifileRefListener();
- }
-
- /**
- * Initializes the User Interface
- *
- * Uses flashvars to access possibly localized names
- */
- private function iniUI() {
- // register button handlers
- browse_btn.onRelease = Delegate.create(this, this.browse);
- upload_btn.onRelease = Delegate.create(this, this.upload);
-
- // columns for dataGrid
- var col:DataGridColumn;
- col = new DataGridColumn('name');
- col.headerText = ( _root.L_gridname ? _root.L_gridname : 'Filename' );
- col.sortable = false;
- files_dg.addColumn(col);
- col = new DataGridColumn('size');
- col.headerText = ( _root.L_gridsize ? _root.L_gridsize : 'Size' );
- col.sortable = false;
- files_dg.addColumn(col);
- col = new DataGridColumn('status');
- col.headerText = ( _root.L_gridstat ? _root.L_gridstat : 'Status' );
- col.sortable = false;
- files_dg.addColumn(col);
-
- // label translations
- if(_root.L_overwrite) overwrite_cb.label = _root.L_overwrite;
- if(_root.L_browse) browse_btn.label = _root.L_browse;
- if(_root.L_upload) upload_btn.label = _root.L_upload;
- if(_root.L_namespace) ns_label.text = _root.L_namespace;
-
- // prefill input field
- if(_root.O_ns) ns_input.text = _root.O_ns;
-
- // disable buttons
- upload_btn.enabled = false;
- if(!_root.O_overwrite) overwrite_cb.visible = false;
-
- // initalize the data provider list
- dp = new Array();
- list = new Array();
- files_dg.spaceColumnsEqually();
- }
-
- /**
- * Open files selection dialog
- *
- * Adds the allowed file types
- */
- private function browse() {
- if(_root.O_extensions){
- var exts:Array = _root.O_extensions.split('|');
- var filter:Object = new Object();
- filter.description = (_root.L_filetypes ? _root.L_filetypes : 'Allowed filetypes');
- filter.extension = '';
- for(var i:Number = 0; i<exts.length; i++){
- filter.extension += '*.'+exts[i]+';';
- }
- filter.extension = filter.extension.substr(0,filter.extension.length-1);
- var apply:Array = new Array();
- apply.push(filter);
- fileRef.browse(apply);
- }else{
- fileRef.browse();
- }
- }
-
- /**
- * Initiates the upload process
- */
- private function upload() {
- // prepare backend URL
- this.url = _root.O_backend; // from flashvars
- this.url += '&ns='+escape(ns_input.text);
-
- // prepare upload url
- this.upurl = this.url;
- this.upurl += '&sectok='+escape(_root.O_sectok);
- this.upurl += '&authtok='+escape(_root.O_authtok);
- if(overwrite_cb.selected) this.upurl += '&ow=1';
-
- // disable buttons
- upload_btn.enabled = false;
- browse_btn.enabled = false;
- ns_input.enabled = false;
- overwrite_cb.enabled = false;
-
- // init states
- this.current = -1;
- this.done = 0;
- this.lasterror = '';
-
- // start process detached
- _global.setTimeout(this,'uploadNext',100);
- nextFrame();
- }
-
- /**
- * Uploads the next file in the list
- */
- private function uploadNext(){
- this.current++;
- if(this.current >= this.list.length){
- return this.uploadDone();
- }
-
- var file = this.list[this.current];
-
- if(_root.O_maxsize && (file.size > _root.O_maxsize)){
- this.lasterror = (_root.L_toobig ? _root.L_toobig : 'too big');
- _global.setTimeout(this,'uploadNext',100);
- nextFrame();
- }else{
- file.addListener(fileRefListener);
- file.upload(upurl);
- // continues in the handlers
- }
- }
-
- /**
- * Redirect to the namespace and set a success/error message
- *
- * Called when all files in the list where processed
- */
- private function uploadDone(){
- var info = (_root.L_info ? _root.L_info : 'files uploaded');
- if(this.done == this.list.length){
- this.url += '&msg1='+escape(this.done+'/'+this.list.length+' '+info);
- }else{
- var lasterr = (_root.L_lasterr ? _root.L_lasterr : 'Last error:');
- this.url += '&err='+escape(this.done+'/'+this.list.length+' '+info+' '+lasterr+' '+this.lasterror);
- }
-
- // when done redirect
- getURL(this.url,'_self');
- }
-
- /**
- * Set the status of a given file in the data grid
- */
- private function setStatus(file,msg){
- for(var i:Number = 0; i < list.length; i++) {
- if (list[i].name == file.name) {
- files_dg.editField(i, 'status', msg);
- nextFrame();
- return;
- }
- }
- }
-
- /**
- * Initialize the file reference listener
- */
- private function inifileRefListener() {
- fileRefListener.onSelect = Delegate.create(this, this.onSelect);
- fileRefListener.onCancel = Delegate.create(this, this.onCancel);
- fileRefListener.onOpen = Delegate.create(this, this.onOpen);
- fileRefListener.onProgress = Delegate.create(this, this.onProgress);
- fileRefListener.onComplete = Delegate.create(this, this.onComplete);
- fileRefListener.onHTTPError = Delegate.create(this, this.onHTTPError);
- fileRefListener.onIOError = Delegate.create(this, this.onIOError);
- fileRefListener.onSecurityError = Delegate.create(this, this.onSecurityError);
- }
-
- /**
- * Handle file selection
- *
- * Files are added as in a list of references and beautified into the data grid dataprovider array
- *
- * Multiple browses will add to the list
- */
- private function onSelect(fileRefList:FileReferenceList) {
- var sel = fileRefList.fileList;
- for(var i:Number = 0; i < sel.length; i++) {
- // check size
- var stat:String;
- if(_root.O_maxsize && sel[i].size > _root.O_maxsize){
- stat = (_root.L_toobig ? _root.L_toobig : 'too big');
- }else{
- stat = (_root.L_ready ? _root.L_ready : 'ready for upload');
- }
- // add to grid
- dp.push({name:sel[i].name, size:Math.round(sel[i].size / 1000) + " kb", status:stat});
- // add to reference list
- list.push(sel[i]);
- }
- // update dataGrid
- files_dg.dataProvider = dp;
- files_dg.spaceColumnsEqually();
-
- if(list.length > 0) upload_btn.enabled = true;
- }
-
- /**
- * Does nothing
- */
- private function onCancel() {
- }
-
- /**
- * Does nothing
- */
- private function onOpen(file:FileReference) {
- }
-
- /**
- * Set the upload progress
- */
- private function onProgress(file:FileReference, bytesLoaded:Number, bytesTotal:Number) {
- var percentDone = Math.round((bytesLoaded / bytesTotal) * 100);
- var msg:String = 'uploading @PCT@%';
- if(_root.L_progress) msg = _root.L_progress;
- msg = msg.split('@PCT@').join(percentDone);
- this.setStatus(file,msg);
- }
-
- /**
- * Handle upload completion
- */
- private function onComplete(file:FileReference) {
- this.setStatus(file,(_root.L_done ? _root.L_done : 'complete'));
- this.done++;
- uploadNext();
- }
-
- /**
- * Handle upload errors
- */
- private function onHTTPError(file:FileReference, httpError:Number) {
- var error;
- if(httpError == 400){
- error = (_root.L_fail ? _root.L_fail : 'failed');
- }else if(httpError == 401){
- error = (_root.L_authfail ? _root.L_authfail : 'auth failed');
- }else{
- error = "HTTP Error " + httpError
- }
- this.setStatus(file,error);
- this.lasterror = error;
- uploadNext();
- }
-
- /**
- * Handle IO errors
- */
- private function onIOError(file:FileReference) {
- this.setStatus(file,"IO Error");
- this.lasterror = "IO Error";
- uploadNext();
- }
-
- /**
- * Handle Security errors
- */
- private function onSecurityError(file:FileReference, errorString:String) {
- this.setStatus(file,"SecurityError: " + errorString);
- this.lasterror = "SecurityError: " + errorString;
- uploadNext();
- }
-
-
-}
diff --git a/lib/_fla/README b/lib/_fla/README
deleted file mode 100644
index 6ecc72ac1..000000000
--- a/lib/_fla/README
+++ /dev/null
@@ -1,4 +0,0 @@
-This directory contains the sources for the Flash Multiuploader. Its based on
-a example from Alastair Dawson given at
-http://blog.vixiom.com/2006/09/08/multiple-file-upload-with-flash-and-ruby-on-rails/
-
diff --git a/lib/_fla/index.html b/lib/_fla/index.html
deleted file mode 100644
index d614603ac..000000000
--- a/lib/_fla/index.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="refresh" content="0; URL=../../" />
-<meta name="robots" content="noindex" />
-<title>nothing here...</title>
-</head>
-<body>
-<!-- this is just here to prevent directory browsing -->
-</body>
-</html>
diff --git a/lib/_fla/multipleUpload.fla b/lib/_fla/multipleUpload.fla
deleted file mode 100644
index 220616960..000000000
--- a/lib/_fla/multipleUpload.fla
+++ /dev/null
Binary files differ
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php
index 1056a05f8..f8d62cb57 100644
--- a/lib/exe/ajax.php
+++ b/lib/exe/ajax.php
@@ -192,12 +192,10 @@ function ajax_medians(){
$data = array();
search($data,$conf['mediadir'],'search_index',array('nofiles' => true),$dir);
- foreach($data as $item){
- $item['level'] = $lvl+1;
- echo media_nstree_li($item);
- echo media_nstree_item($item);
- echo '</li>';
+ foreach(array_keys($data) as $item){
+ $data[$item]['level'] = $lvl+1;
}
+ echo html_buildlist($data, 'idx', 'media_nstree_item', 'media_nstree_li');
}
/**
@@ -210,7 +208,101 @@ function ajax_medialist(){
global $NS;
$NS = $_POST['ns'];
- tpl_mediaContent(true);
+ if ($_POST['do'] == 'media') {
+ tpl_mediaFileList();
+ } else {
+ tpl_mediaContent(true);
+ }
+}
+
+/**
+ * Return the content of the right column
+ * (image details) for the Mediamanager
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function ajax_mediadetails(){
+ global $DEL, $NS, $IMG, $AUTH, $JUMPTO, $REV, $lang, $fullscreen, $conf;
+ $fullscreen = true;
+ require_once(DOKU_INC.'lib/exe/mediamanager.php');
+
+ if ($_REQUEST['image']) $image = cleanID($_REQUEST['image']);
+ if (isset($IMG)) $image = $IMG;
+ if (isset($JUMPTO)) $image = $JUMPTO;
+ if (isset($REV) && !$JUMPTO) $rev = $REV;
+
+ html_msgarea();
+ tpl_mediaFileDetails($image, $rev);
+}
+
+/**
+ * Returns image diff representation for mediamanager
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function ajax_mediadiff(){
+ global $NS;
+
+ if ($_REQUEST['image']) $image = cleanID($_REQUEST['image']);
+ $NS = $_POST['ns'];
+ $auth = auth_quickaclcheck("$ns:*");
+ media_diff($image, $NS, $auth, true);
+}
+
+function ajax_mediaupload(){
+ global $NS, $MSG;
+
+ if ($_FILES['qqfile']['tmp_name']) {
+ $id = ((empty($_POST['mediaid'])) ? $_FILES['qqfile']['name'] : $_POST['mediaid']);
+ } elseif (isset($_GET['qqfile'])) {
+ $id = $_GET['qqfile'];
+ }
+
+ $id = cleanID($id, false, true);
+
+ $NS = $_REQUEST['ns'];
+ $ns = $NS.':'.getNS($id);
+
+ $AUTH = auth_quickaclcheck("$ns:*");
+ if($AUTH >= AUTH_UPLOAD) { io_createNamespace("$ns:xxx", 'media'); }
+
+ if ($_FILES['qqfile']['error']) unset($_FILES['qqfile']);
+
+ if ($_FILES['qqfile']['tmp_name']) $res = media_upload($NS, $AUTH, $_FILES['qqfile']);
+ if (isset($_GET['qqfile'])) $res = media_upload_xhr($NS, $AUTH);
+
+ if ($res) $result = array('success' => true,
+ 'link' => media_managerURL(array('ns' => $ns, 'image' => $NS.':'.$id), '&'),
+ 'id' => $NS.':'.$id, 'ns' => $NS);
+
+ if (!$result) {
+ $error = '';
+ if (isset($MSG)) {
+ foreach($MSG as $msg) $error .= $msg['msg'];
+ }
+ $result = array('error' => $msg['msg'], 'ns' => $NS);
+ }
+ $json = new JSON;
+ echo htmlspecialchars($json->encode($result), ENT_NOQUOTES);
+}
+
+function dir_delete($path) {
+ if (!is_string($path) || $path == "") return false;
+
+ if (is_dir($path) && !is_link($path)) {
+ if (!$dh = @opendir($path)) return false;
+
+ while ($f = readdir($dh)) {
+ if ($f == '..' || $f == '.') continue;
+ dir_delete("$path/$f");
+ }
+
+ closedir($dh);
+ return @rmdir($path);
+ } else {
+ return @unlink($path);
+ }
+
+ return false;
}
/**
@@ -229,14 +321,10 @@ function ajax_index(){
$data = array();
search($data,$conf['datadir'],'search_index',array('ns' => $ns),$dir);
- foreach($data as $item){
- $item['level'] = $lvl+1;
- echo html_li_index($item);
- echo '<div class="li">';
- echo html_list_index($item);
- echo '</div>';
- echo '</li>';
+ foreach(array_keys($data) as $item){
+ $data[$item]['level'] = $lvl+1;
}
+ echo html_buildlist($data, 'idx', 'html_list_index', 'html_li_index');
}
/**
diff --git a/lib/exe/css.php b/lib/exe/css.php
index 03f900034..d54e2e46c 100644
--- a/lib/exe/css.php
+++ b/lib/exe/css.php
@@ -46,7 +46,7 @@ function css_out(){
}
// The generated script depends on some dynamic options
- $cache = getCacheName('styles'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].DOKU_BASE.$tplinc.$mediatype,'.css');
+ $cache = new cache('styles'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].DOKU_BASE.$tplinc.$mediatype,'.css');
// load template styles
$tplstyles = array();
@@ -62,6 +62,8 @@ function css_out(){
$files = array();
// load core styles
$files[DOKU_INC.'lib/styles/'.$mediatype.'.css'] = DOKU_BASE.'lib/styles/';
+ // load jQuery-UI theme
+ $files[DOKU_INC.'lib/scripts/jquery/jquery-ui-theme/smoothness.css'] = DOKU_BASE.'lib/scripts/jquery/jquery-ui-theme/';
// load plugin styles
$files = array_merge($files, css_pluginstyles($mediatype));
// load template styles
@@ -85,26 +87,14 @@ function css_out(){
}
}
- // check cache age & handle conditional request
- header('Cache-Control: public, max-age=3600');
- header('Pragma: public');
- if(css_cacheok($cache,array_keys($files),$tplinc)){
- http_conditionalRequest(filemtime($cache));
- if($conf['allowdebug']) header("X-CacheUsed: $cache");
-
- // finally send output
- if ($conf['gzip_output'] && http_gzip_valid($cache)) {
- header('Vary: Accept-Encoding');
- header('Content-Encoding: gzip');
- readfile($cache.".gz");
- } else {
- if (!http_sendfile($cache)) readfile($cache);
- }
+ $cache_files = array_merge(array_keys($files), getConfigFiles('main'));
+ $cache_files[] = $tplinc.'style.ini';
+ $cache_files[] = __FILE__;
- return;
- } else {
- http_conditionalRequest(time());
- }
+ // check cache age & handle conditional request
+ // This may exit if a cache can be used
+ http_cached($cache->cache,
+ $cache->useCache(array('files' => $cache_files)));
// start output buffering and build the stylesheet
ob_start();
@@ -133,45 +123,13 @@ function css_out(){
$css = css_compress($css);
}
- // save cache file
- io_saveFile($cache,$css);
- if(function_exists('gzopen')) io_saveFile("$cache.gz",$css);
-
- // finally send output
- if ($conf['gzip_output']) {
- header('Vary: Accept-Encoding');
- header('Content-Encoding: gzip');
- print gzencode($css,9,FORCE_GZIP);
- } else {
- print $css;
+ // embed small images right into the stylesheet
+ if($conf['cssdatauri']){
+ $base = preg_quote(DOKU_BASE,'#');
+ $css = preg_replace_callback('#(url\([ \'"]*)('.$base.')(.*?(?:\.(png|gif)))#i','css_datauri',$css);
}
-}
-
-/**
- * Checks if a CSS Cache file still is valid
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-function css_cacheok($cache,$files,$tplinc){
- global $config_cascade;
-
- if(isset($_REQUEST['purge'])) return false; //support purge request
-
- $ctime = @filemtime($cache);
- if(!$ctime) return false; //There is no cache
-
- // some additional files to check
- $files = array_merge($files, getConfigFiles('main'));
- $files[] = $tplinc.'style.ini';
- $files[] = __FILE__;
- // now walk the files
- foreach($files as $file){
- if(@filemtime($file) > $ctime){
- return false;
- }
- }
- return true;
+ http_cached_finish($cache->cache, $css);
}
/**
@@ -231,7 +189,7 @@ function css_interwiki(){
function css_filetypes(){
// default style
- echo 'a.mediafile {';
+ echo '.mediafile {';
echo ' background: transparent url('.DOKU_BASE.'lib/images/fileicons/file.png) 0px 1px no-repeat;';
echo ' padding-left: 18px;';
echo ' padding-bottom: 1px;';
@@ -254,7 +212,7 @@ function css_filetypes(){
}
foreach($exts as $ext=>$type){
$class = preg_replace('/[^_\-a-z0-9]+/','_',$ext);
- echo "a.mf_$class {";
+ echo ".mf_$class {";
echo ' background-image: url('.DOKU_BASE.'lib/images/fileicons/'.$ext.$type.')';
echo '}';
}
@@ -269,11 +227,38 @@ function css_loadfile($file,$location=''){
$css = io_readFile($file);
if(!$location) return $css;
- $css = preg_replace('#(url\([ \'"]*)(?!/|http://|https://| |\'|")#','\\1'.$location,$css);
- $css = preg_replace('#(@import\s+[\'"])(?!/|http://|https://)#', '\\1'.$location, $css);
+ $css = preg_replace('#(url\([ \'"]*)(?!/|data:|http://|https://| |\'|")#','\\1'.$location,$css);
+ $css = preg_replace('#(@import\s+[\'"])(?!/|data:|http://|https://)#', '\\1'.$location, $css);
+
return $css;
}
+/**
+ * Converte local image URLs to data URLs if the filesize is small
+ *
+ * Callback for preg_replace_callback
+ */
+function css_datauri($match){
+ global $conf;
+
+ $pre = unslash($match[1]);
+ $base = unslash($match[2]);
+ $url = unslash($match[3]);
+ $ext = unslash($match[4]);
+
+ $local = DOKU_INC.$url;
+ $size = @filesize($local);
+ if($size && $size < $conf['cssdatauri']){
+ $data = base64_encode(file_get_contents($local));
+ }
+ if($data){
+ $url = 'data:image/'.$ext.';base64,'.$data;
+ }else{
+ $url = $base.$url;
+ }
+ return $pre.$url;
+}
+
/**
* Returns a list of possible Plugin Styles (no existance check here)
@@ -334,7 +319,8 @@ function css_compress($css){
// strip whitespaces
$css = preg_replace('![\r\n\t ]+!',' ',$css);
- $css = preg_replace('/ ?([:;,{}\/]) ?/','\\1',$css);
+ $css = preg_replace('/ ?([;,{}\/]) ?/','\\1',$css);
+ $css = preg_replace('/ ?: /',':',$css);
// shorten colors
$css = preg_replace("/#([0-9a-fA-F]{1})\\1([0-9a-fA-F]{1})\\2([0-9a-fA-F]{1})\\3/", "#\\1\\2\\3",$css);
diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php
index 3ad4f1937..143d40f22 100644
--- a/lib/exe/fetch.php
+++ b/lib/exe/fetch.php
@@ -20,6 +20,10 @@
$CACHE = calc_cache($_REQUEST['cache']);
$WIDTH = (int) $_REQUEST['w'];
$HEIGHT = (int) $_REQUEST['h'];
+ $REV = (int) @$_REQUEST['rev'];
+ //sanitize revision
+ $REV = preg_replace('/[^0-9]/','',$REV);
+
list($EXT,$MIME,$DL) = mimetype($MEDIA,false);
if($EXT === false){
$EXT = 'unknown';
@@ -28,7 +32,7 @@
}
// check for permissions, preconditions and cache external files
- list($STATUS, $STATUSMESSAGE) = checkFileStatus($MEDIA, $FILE);
+ list($STATUS, $STATUSMESSAGE) = checkFileStatus($MEDIA, $FILE, $REV);
// prepare data for plugin events
$data = array('media' => $MEDIA,
@@ -147,7 +151,7 @@ function sendFile($file,$mime,$dl,$cache){
* @param $file reference to the file variable
* @returns array(STATUS, STATUSMESSAGE)
*/
-function checkFileStatus(&$media, &$file) {
+function checkFileStatus(&$media, &$file, $rev='') {
global $MIME, $EXT, $CACHE;
//media to local file
@@ -172,7 +176,7 @@ function checkFileStatus(&$media, &$file) {
if(auth_quickaclcheck(getNS($media).':X') < AUTH_READ){
return array( 403, 'Forbidden' );
}
- $file = mediaFN($media);
+ $file = mediaFN($media, $rev);
}
//check file existance
diff --git a/lib/exe/js.php b/lib/exe/js.php
index b2ae3f7fe..b7f2fd222 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -32,27 +32,39 @@ function js_out(){
global $config_cascade;
// The generated script depends on some dynamic options
- $cache = getCacheName('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.js');
+ $cache = new cache('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],
+ '.js');
+
+ // load minified version for some files
+ $min = $conf['compress'] ? '.min' : '';
// array of core files
$files = array(
+ DOKU_INC."lib/scripts/jquery/jquery$min.js",
+ DOKU_INC.'lib/scripts/jquery/jquery.cookie.js',
+ DOKU_INC."lib/scripts/jquery/jquery-ui$min.js",
+ DOKU_INC."lib/scripts/fileuploader.js",
+ DOKU_INC."lib/scripts/fileuploaderextended.js",
DOKU_INC.'lib/scripts/helpers.js',
- DOKU_INC.'lib/scripts/events.js',
DOKU_INC.'lib/scripts/delay.js',
DOKU_INC.'lib/scripts/cookie.js',
DOKU_INC.'lib/scripts/script.js',
DOKU_INC.'lib/scripts/tw-sack.js',
- DOKU_INC.'lib/scripts/ajax.js',
+ DOKU_INC.'lib/scripts/qsearch.js',
+ DOKU_INC.'lib/scripts/tree.js',
DOKU_INC.'lib/scripts/index.js',
DOKU_INC.'lib/scripts/drag.js',
DOKU_INC.'lib/scripts/textselection.js',
DOKU_INC.'lib/scripts/toolbar.js',
DOKU_INC.'lib/scripts/edit.js',
+ DOKU_INC.'lib/scripts/editor.js',
DOKU_INC.'lib/scripts/locktimer.js',
DOKU_INC.'lib/scripts/linkwiz.js',
DOKU_INC.'lib/scripts/media.js',
- DOKU_INC.'lib/scripts/subscriptions.js',
+ DOKU_INC.'lib/scripts/compatibility.js',
# disabled for FS#1958 DOKU_INC.'lib/scripts/hotkeys.js',
+ DOKU_INC.'lib/scripts/behaviour.js',
+ DOKU_INC.'lib/scripts/page.js',
DOKU_TPLINC.'script.js',
);
@@ -62,25 +74,13 @@ function js_out(){
$files[] = $config_cascade['userscript']['default'];
}
+ $cache_files = array_merge($files, getConfigFiles('main'));
+ $cache_files[] = __FILE__;
+
// check cache age & handle conditional request
- header('Cache-Control: public, max-age=3600');
- header('Pragma: public');
- if(js_cacheok($cache,$files)){
- http_conditionalRequest(filemtime($cache));
- if($conf['allowdebug']) header("X-CacheUsed: $cache");
-
- // finally send output
- if ($conf['gzip_output'] && http_gzip_valid($cache)) {
- header('Vary: Accept-Encoding');
- header('Content-Encoding: gzip');
- readfile($cache.".gz");
- } else {
- if (!http_sendfile($cache)) readfile($cache);
- }
- return;
- } else {
- http_conditionalRequest(time());
- }
+ // This may exit if a cache can be used
+ http_cached($cache->cache,
+ $cache->useCache(array('files' => $cache_files)));
// start output buffering and build the script
ob_start();
@@ -88,6 +88,7 @@ function js_out(){
// add some global variables
print "var DOKU_BASE = '".DOKU_BASE."';";
print "var DOKU_TPL = '".DOKU_TPL."';";
+ // FIXME: Move those to JSINFO
print "var DOKU_UHN = ".((int) useHeading('navigation')).";";
print "var DOKU_UHC = ".((int) useHeading('content')).";";
@@ -106,17 +107,10 @@ function js_out(){
echo "\n\n/* XXXXXXXXXX end of " . str_replace(DOKU_INC, '', $file) . " XXXXXXXXXX */\n\n";
}
-
// init stuff
- js_runonstart("addEvent(document,'click',closePopups)");
- js_runonstart('addTocToggle()');
- js_runonstart("initSizeCtl('size__ctl','wiki__text')");
- js_runonstart("initToolbar('tool__bar','wiki__text',toolbar)");
if($conf['locktime'] != 0){
- js_runonstart("locktimer.init(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].", 'wiki__text')");
+ js_runonstart("dw_locktimer.init(".($conf['locktime'] - 60).",".$conf['usedraft'].")");
}
- js_runonstart('scrollToMarker()');
- js_runonstart('focusMarker()');
// init hotkeys - must have been done after init of toolbar
# disabled for FS#1958 js_runonstart('initializeHotkeys()');
@@ -131,18 +125,7 @@ function js_out(){
$js .= "\n"; // https://bugzilla.mozilla.org/show_bug.cgi?id=316033
- // save cache file
- io_saveFile($cache,$js);
- if(function_exists('gzopen')) io_saveFile("$cache.gz",$js);
-
- // finally send output
- if ($conf['gzip_output']) {
- header('Vary: Accept-Encoding');
- header('Content-Encoding: gzip');
- print gzencode($js,9,FORCE_GZIP);
- } else {
- print $js;
- }
+ http_cached_finish($cache->cache, $js);
}
/**
@@ -174,34 +157,7 @@ function js_load($file){
}
$data = str_replace($match[0],$idata,$data);
}
- echo $data;
-}
-
-/**
- * Checks if a JavaScript Cache file still is valid
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-function js_cacheok($cache,$files){
- if(isset($_REQUEST['purge'])) return false; //support purge request
-
- $ctime = @filemtime($cache);
- if(!$ctime) return false; //There is no cache
-
- global $config_cascade;
-
- // some additional files to check
- $files = array_merge($files, getConfigFiles('main'));
- $files[] = $config_cascade['userscript']['default'];
- $files[] = __FILE__;
-
- // now walk the files
- foreach($files as $file){
- if(@filemtime($file) > $ctime){
- return false;
- }
- }
- return true;
+ echo "$data\n";
}
/**
@@ -262,7 +218,7 @@ function js_escape($string){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function js_runonstart($func){
- echo "addInitEvent(function(){ $func; });".NL;
+ echo "jQuery(function(){ $func; });".NL;
}
/**
@@ -288,7 +244,7 @@ function js_compress($s){
// items that don't need spaces next to them
$chars = "^&|!+\-*\/%=\?:;,{}()<>% \t\n\r'\"[]";
- $regex_starters = array("(", "=", "[", "," , ":");
+ $regex_starters = array("(", "=", "[", "," , ":", "!");
$whitespaces_chars = array(" ", "\t", "\n", "\r", "\0", "\x0B");
diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php
index 02fde5a8d..5f09fe1f8 100644
--- a/lib/exe/mediamanager.php
+++ b/lib/exe/mediamanager.php
@@ -35,7 +35,7 @@
$AUTH = auth_quickaclcheck("$NS:*");
// do not display the manager if user does not have read access
- if($AUTH < AUTH_READ) {
+ if($AUTH < AUTH_READ && !$fullscreen) {
header('HTTP/1.0 403 Forbidden');
die($lang['accessdenied']);
}
@@ -76,10 +76,20 @@
}
// handle meta saving
- if($IMG && $_REQUEST['do']['save']){
+ if($IMG && @array_key_exists('save', $_REQUEST['do'])){
$JUMPTO = media_metasave($IMG,$AUTH,$_REQUEST['meta']);
}
+ if($IMG && ($_REQUEST['mediado'] == 'save' || @array_key_exists('save', $_REQUEST['mediado']))) {
+ $JUMPTO = media_metasave($IMG,$AUTH,$_REQUEST['meta']);
+ }
+
+ if ($_REQUEST['rev'] && $conf['mediarevisions']) $REV = (int) $_REQUEST['rev'];
+
+ if($_REQUEST['mediado'] == 'restore' && $conf['mediarevisions']){
+ $JUMPTO = media_restore($_REQUEST['image'], $REV, $AUTH);
+ }
+
// handle deletion
if($DEL) {
$res = 0;
@@ -88,7 +98,7 @@
}
if ($res & DOKU_MEDIA_DELETED) {
$msg = sprintf($lang['deletesucc'], noNS($DEL));
- if ($res & DOKU_MEDIA_EMPTY_NS) {
+ if ($res & DOKU_MEDIA_EMPTY_NS && !$fullscreen) {
// current namespace was removed. redirecting to root ns passing msg along
send_redirect(DOKU_URL.'lib/exe/mediamanager.php?msg1='.
rawurlencode($msg).'&edid='.$_REQUEST['edid']);
@@ -102,9 +112,11 @@
msg(sprintf($lang['deletefail'],noNS($DEL)),-1);
}
}
-
// finished - start output
- header('Content-Type: text/html; charset=utf-8');
- include(template('mediamanager.php'));
+
+ if (!$fullscreen) {
+ header('Content-Type: text/html; charset=utf-8');
+ include(template('mediamanager.php'));
+ }
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
diff --git a/lib/exe/multipleUpload.swf b/lib/exe/multipleUpload.swf
deleted file mode 100644
index 888aab045..000000000
--- a/lib/exe/multipleUpload.swf
+++ /dev/null
Binary files differ
diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php
index 108dd8fd1..e5e3298ae 100644
--- a/lib/exe/xmlrpc.php
+++ b/lib/exe/xmlrpc.php
@@ -7,7 +7,7 @@ if(isset($HTTP_RAW_POST_DATA)) $HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA);
/**
* Increased whenever the API is changed
*/
-define('DOKU_XMLRPC_API_VERSION',5);
+define('DOKU_XMLRPC_API_VERSION', 6);
require_once(DOKU_INC.'inc/init.php');
session_write_close(); //close session
@@ -30,26 +30,9 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
global $USERINFO;
if(!$conf['useacl']) return true; //no ACL - then no checks
+ if(trim($conf['xmlrpcuser']) == '') return true; //no restrictions
- $allowed = explode(',',$conf['xmlrpcuser']);
- $allowed = array_map('trim', $allowed);
- $allowed = array_unique($allowed);
- $allowed = array_filter($allowed);
-
- if(!count($allowed)) return true; //no restrictions
-
- $user = $_SERVER['REMOTE_USER'];
- $groups = (array) $USERINFO['grps'];
-
- if(in_array($user,$allowed)) return true; //user explicitly mentioned
-
- //check group memberships
- foreach($groups as $group){
- if(in_array('@'.$group,$allowed)) return true;
- }
-
- //still here? no access!
- return false;
+ return auth_isMember($conf['xmlrpcuser'],$_SERVER['REMOTE_USER'],(array) $USERINFO['grps']);
}
/**
@@ -70,6 +53,11 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
*/
function call($methodname, $args){
if(!in_array($methodname,$this->public_methods) && !$this->checkAuth()){
+ if (!isset($_SERVER['REMOTE_USER'])) {
+ header('HTTP/1.1 401 Unauthorized');
+ } else {
+ header('HTTP/1.1 403 Forbidden');
+ }
return new IXR_Error(-32603, 'server error. not authorized to call method "'.$methodname.'".');
}
return parent::call($methodname, $args);
@@ -596,8 +584,12 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
// save temporary file
@unlink($ftmp);
- $buff = base64_decode($file);
- io_saveFile($ftmp, $buff);
+ if (preg_match('/^[A-Za-z0-9\+\/]*={0,2}$/', $file) === 1) {
+ // DEPRECATED: Double-decode file if it still looks like base64
+ // after first decoding (which is done by the library)
+ $file = base64_decode($file);
+ }
+ io_saveFile($ftmp, $file);
$res = media_save(array('name' => $ftmp), $id, $params['ow'], $auth, 'rename');
if (is_array($res)) {
@@ -870,11 +862,22 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
global $auth;
if(!$conf['useacl']) return 0;
if(!$auth) return 0;
+
+ @session_start(); // reopen session for login
if($auth->canDo('external')){
- return $auth->trustExternal($user,$pass,false);
+ $ok = $auth->trustExternal($user,$pass,false);
}else{
- return auth_login($user,$pass,false,true);
+ $evdata = array(
+ 'user' => $user,
+ 'password' => $pass,
+ 'sticky' => false,
+ 'silent' => true,
+ );
+ $ok = trigger_event('AUTH_LOGIN_CHECK', $evdata, 'auth_login_wrapper');
}
+ session_write_close(); // we're done with the session
+
+ return $ok;
}
diff --git a/lib/images/admin/plugin.png b/lib/images/admin/plugin.png
index 6896a1365..f71124e5c 100644
--- a/lib/images/admin/plugin.png
+++ b/lib/images/admin/plugin.png
Binary files differ
diff --git a/lib/images/admin/popularity.png b/lib/images/admin/popularity.png
index f7fe254f8..19392367a 100644
--- a/lib/images/admin/popularity.png
+++ b/lib/images/admin/popularity.png
Binary files differ
diff --git a/lib/images/admin/revert.png b/lib/images/admin/revert.png
index 76cc3e9bc..5304f1b76 100644
--- a/lib/images/admin/revert.png
+++ b/lib/images/admin/revert.png
Binary files differ
diff --git a/lib/images/admin/usermanager.png b/lib/images/admin/usermanager.png
index e1edff2fc..898544ce9 100644
--- a/lib/images/admin/usermanager.png
+++ b/lib/images/admin/usermanager.png
Binary files differ
diff --git a/lib/images/fileicons/deb.png b/lib/images/fileicons/deb.png
index e61300de9..8fe57327a 100644
--- a/lib/images/fileicons/deb.png
+++ b/lib/images/fileicons/deb.png
Binary files differ
diff --git a/lib/images/fileicons/doc.png b/lib/images/fileicons/doc.png
index b48fdac89..79d8ff1cd 100644
--- a/lib/images/fileicons/doc.png
+++ b/lib/images/fileicons/doc.png
Binary files differ
diff --git a/lib/images/fileicons/docx.png b/lib/images/fileicons/docx.png
index b48fdac89..79d8ff1cd 100644
--- a/lib/images/fileicons/docx.png
+++ b/lib/images/fileicons/docx.png
Binary files differ
diff --git a/lib/images/fileicons/file.png b/lib/images/fileicons/file.png
index c1a7ef1b4..8158a8a21 100644
--- a/lib/images/fileicons/file.png
+++ b/lib/images/fileicons/file.png
Binary files differ
diff --git a/lib/images/fileicons/lua.png b/lib/images/fileicons/lua.png
index dd72770bb..994c6e8f0 100644
--- a/lib/images/fileicons/lua.png
+++ b/lib/images/fileicons/lua.png
Binary files differ
diff --git a/lib/images/fileicons/mp3.png b/lib/images/fileicons/mp3.png
index d5d3ec1e4..411dad080 100644
--- a/lib/images/fileicons/mp3.png
+++ b/lib/images/fileicons/mp3.png
Binary files differ
diff --git a/lib/images/fileicons/odf.png b/lib/images/fileicons/odf.png
index 65c62ebbe..cb88d68e6 100644
--- a/lib/images/fileicons/odf.png
+++ b/lib/images/fileicons/odf.png
Binary files differ
diff --git a/lib/images/fileicons/odp.png b/lib/images/fileicons/odp.png
index ed51fcaf1..2f2574af6 100644
--- a/lib/images/fileicons/odp.png
+++ b/lib/images/fileicons/odp.png
Binary files differ
diff --git a/lib/images/fileicons/odt.png b/lib/images/fileicons/odt.png
index 67ef1a42d..f9c126efd 100644
--- a/lib/images/fileicons/odt.png
+++ b/lib/images/fileicons/odt.png
Binary files differ
diff --git a/lib/images/fileicons/pdf.png b/lib/images/fileicons/pdf.png
index f40f22826..029dcffec 100644
--- a/lib/images/fileicons/pdf.png
+++ b/lib/images/fileicons/pdf.png
Binary files differ
diff --git a/lib/images/fileicons/ps.png b/lib/images/fileicons/ps.png
index 78e3af8fb..40a80baad 100644
--- a/lib/images/fileicons/ps.png
+++ b/lib/images/fileicons/ps.png
Binary files differ
diff --git a/lib/images/fileicons/rtf.png b/lib/images/fileicons/rtf.png
index a1170af7f..99fe3d8fd 100644
--- a/lib/images/fileicons/rtf.png
+++ b/lib/images/fileicons/rtf.png
Binary files differ
diff --git a/lib/images/fileicons/sql.png b/lib/images/fileicons/sql.png
index 13772b73c..a7b0684c7 100644
--- a/lib/images/fileicons/sql.png
+++ b/lib/images/fileicons/sql.png
Binary files differ
diff --git a/lib/images/fileicons/sxi.png b/lib/images/fileicons/sxi.png
index ed51fcaf1..2f2574af6 100644
--- a/lib/images/fileicons/sxi.png
+++ b/lib/images/fileicons/sxi.png
Binary files differ
diff --git a/lib/images/fileicons/sxw.png b/lib/images/fileicons/sxw.png
index 67ef1a42d..f9c126efd 100644
--- a/lib/images/fileicons/sxw.png
+++ b/lib/images/fileicons/sxw.png
Binary files differ
diff --git a/lib/images/fileicons/wav.png b/lib/images/fileicons/wav.png
index 46ff63f0f..c167f4fdb 100644
--- a/lib/images/fileicons/wav.png
+++ b/lib/images/fileicons/wav.png
Binary files differ
diff --git a/lib/images/fileicons/zip.png b/lib/images/fileicons/zip.png
index f4a10bf9c..fb8850c9a 100644
--- a/lib/images/fileicons/zip.png
+++ b/lib/images/fileicons/zip.png
Binary files differ
diff --git a/lib/images/icon-file.png b/lib/images/icon-file.png
new file mode 100644
index 000000000..d350c8c31
--- /dev/null
+++ b/lib/images/icon-file.png
Binary files differ
diff --git a/lib/images/icon-list.png b/lib/images/icon-list.png
new file mode 100644
index 000000000..ecfeed92d
--- /dev/null
+++ b/lib/images/icon-list.png
Binary files differ
diff --git a/lib/images/icon-sort.png b/lib/images/icon-sort.png
new file mode 100644
index 000000000..c6403dd3c
--- /dev/null
+++ b/lib/images/icon-sort.png
Binary files differ
diff --git a/lib/images/icon-thumb.png b/lib/images/icon-thumb.png
new file mode 100644
index 000000000..ccc7a101d
--- /dev/null
+++ b/lib/images/icon-thumb.png
Binary files differ
diff --git a/lib/images/interwiki.png b/lib/images/interwiki.png
index f9c73d505..f957e71e5 100644
--- a/lib/images/interwiki.png
+++ b/lib/images/interwiki.png
Binary files differ
diff --git a/lib/images/interwiki/amazon.de.gif b/lib/images/interwiki/amazon.de.gif
index f52c1c581..6e36a051a 100644
--- a/lib/images/interwiki/amazon.de.gif
+++ b/lib/images/interwiki/amazon.de.gif
Binary files differ
diff --git a/lib/images/interwiki/amazon.gif b/lib/images/interwiki/amazon.gif
index f52c1c581..6e36a051a 100644
--- a/lib/images/interwiki/amazon.gif
+++ b/lib/images/interwiki/amazon.gif
Binary files differ
diff --git a/lib/images/interwiki/amazon.uk.gif b/lib/images/interwiki/amazon.uk.gif
index f52c1c581..6e36a051a 100644
--- a/lib/images/interwiki/amazon.uk.gif
+++ b/lib/images/interwiki/amazon.uk.gif
Binary files differ
diff --git a/lib/images/interwiki/callto.gif b/lib/images/interwiki/callto.gif
index 880e9d8e7..f6d424554 100644
--- a/lib/images/interwiki/callto.gif
+++ b/lib/images/interwiki/callto.gif
Binary files differ
diff --git a/lib/images/interwiki/doku.gif b/lib/images/interwiki/doku.gif
index 7dc4248e8..3ccf01227 100644
--- a/lib/images/interwiki/doku.gif
+++ b/lib/images/interwiki/doku.gif
Binary files differ
diff --git a/lib/images/interwiki/google.gif b/lib/images/interwiki/google.gif
index fb39f6152..3a28437f3 100644
--- a/lib/images/interwiki/google.gif
+++ b/lib/images/interwiki/google.gif
Binary files differ
diff --git a/lib/images/interwiki/meatball.gif b/lib/images/interwiki/meatball.gif
index 7ac545436..8a4cbdbfc 100644
--- a/lib/images/interwiki/meatball.gif
+++ b/lib/images/interwiki/meatball.gif
Binary files differ
diff --git a/lib/images/interwiki/paypal.gif b/lib/images/interwiki/paypal.gif
index 4a063b4a5..1d2834062 100644
--- a/lib/images/interwiki/paypal.gif
+++ b/lib/images/interwiki/paypal.gif
Binary files differ
diff --git a/lib/images/interwiki/phpfn.gif b/lib/images/interwiki/phpfn.gif
index 638d4c450..89ac1db94 100644
--- a/lib/images/interwiki/phpfn.gif
+++ b/lib/images/interwiki/phpfn.gif
Binary files differ
diff --git a/lib/images/interwiki/sb.gif b/lib/images/interwiki/sb.gif
index 8771b346d..710e4945b 100644
--- a/lib/images/interwiki/sb.gif
+++ b/lib/images/interwiki/sb.gif
Binary files differ
diff --git a/lib/images/interwiki/wiki.gif b/lib/images/interwiki/wiki.gif
index e8dc5d274..df241d6bb 100644
--- a/lib/images/interwiki/wiki.gif
+++ b/lib/images/interwiki/wiki.gif
Binary files differ
diff --git a/lib/images/interwiki/wp.gif b/lib/images/interwiki/wp.gif
index ca853b8c9..b07fd893d 100644
--- a/lib/images/interwiki/wp.gif
+++ b/lib/images/interwiki/wp.gif
Binary files differ
diff --git a/lib/images/interwiki/wpde.gif b/lib/images/interwiki/wpde.gif
index ca853b8c9..b07fd893d 100644
--- a/lib/images/interwiki/wpde.gif
+++ b/lib/images/interwiki/wpde.gif
Binary files differ
diff --git a/lib/images/interwiki/wpes.gif b/lib/images/interwiki/wpes.gif
index ca853b8c9..b07fd893d 100644
--- a/lib/images/interwiki/wpes.gif
+++ b/lib/images/interwiki/wpes.gif
Binary files differ
diff --git a/lib/images/interwiki/wpfr.gif b/lib/images/interwiki/wpfr.gif
index ca853b8c9..b07fd893d 100644
--- a/lib/images/interwiki/wpfr.gif
+++ b/lib/images/interwiki/wpfr.gif
Binary files differ
diff --git a/lib/images/interwiki/wpjp.gif b/lib/images/interwiki/wpjp.gif
index ca853b8c9..b07fd893d 100644
--- a/lib/images/interwiki/wpjp.gif
+++ b/lib/images/interwiki/wpjp.gif
Binary files differ
diff --git a/lib/images/interwiki/wpmeta.gif b/lib/images/interwiki/wpmeta.gif
index ca853b8c9..b07fd893d 100644
--- a/lib/images/interwiki/wpmeta.gif
+++ b/lib/images/interwiki/wpmeta.gif
Binary files differ
diff --git a/lib/images/interwiki/wppl.gif b/lib/images/interwiki/wppl.gif
index ca853b8c9..b07fd893d 100644
--- a/lib/images/interwiki/wppl.gif
+++ b/lib/images/interwiki/wppl.gif
Binary files differ
diff --git a/lib/images/license/badge/cc-by-nc-nd.png b/lib/images/license/badge/cc-by-nc-nd.png
index 3231da3a3..94aae9e09 100644
--- a/lib/images/license/badge/cc-by-nc-nd.png
+++ b/lib/images/license/badge/cc-by-nc-nd.png
Binary files differ
diff --git a/lib/images/license/badge/cc-by-nc-sa.png b/lib/images/license/badge/cc-by-nc-sa.png
index 6bcf6a11d..51141f5ec 100644
--- a/lib/images/license/badge/cc-by-nc-sa.png
+++ b/lib/images/license/badge/cc-by-nc-sa.png
Binary files differ
diff --git a/lib/images/license/badge/cc-by-nc.png b/lib/images/license/badge/cc-by-nc.png
index 6d646321f..aeb8cdc8c 100644
--- a/lib/images/license/badge/cc-by-nc.png
+++ b/lib/images/license/badge/cc-by-nc.png
Binary files differ
diff --git a/lib/images/license/badge/cc-by-nd.png b/lib/images/license/badge/cc-by-nd.png
index 442353808..6a2e59a68 100644
--- a/lib/images/license/badge/cc-by-nd.png
+++ b/lib/images/license/badge/cc-by-nd.png
Binary files differ
diff --git a/lib/images/license/badge/cc-by-sa.png b/lib/images/license/badge/cc-by-sa.png
index e9fb436af..f0aa4aaf0 100644
--- a/lib/images/license/badge/cc-by-sa.png
+++ b/lib/images/license/badge/cc-by-sa.png
Binary files differ
diff --git a/lib/images/license/badge/cc-by.png b/lib/images/license/badge/cc-by.png
index cdc1f58fa..c7389b2f6 100644
--- a/lib/images/license/badge/cc-by.png
+++ b/lib/images/license/badge/cc-by.png
Binary files differ
diff --git a/lib/images/license/badge/publicdomain.png b/lib/images/license/badge/publicdomain.png
index ea8eeb4e1..8148d037a 100644
--- a/lib/images/license/badge/publicdomain.png
+++ b/lib/images/license/badge/publicdomain.png
Binary files differ
diff --git a/lib/images/license/button/cc-by-nc-nd.png b/lib/images/license/button/cc-by-nc-nd.png
index e1344a954..ac58d8627 100644
--- a/lib/images/license/button/cc-by-nc-nd.png
+++ b/lib/images/license/button/cc-by-nc-nd.png
Binary files differ
diff --git a/lib/images/license/button/cc-by-nc-sa.png b/lib/images/license/button/cc-by-nc-sa.png
index 6855a7586..a9d23c0b6 100644
--- a/lib/images/license/button/cc-by-nc-sa.png
+++ b/lib/images/license/button/cc-by-nc-sa.png
Binary files differ
diff --git a/lib/images/license/button/cc-by-nc.png b/lib/images/license/button/cc-by-nc.png
index 0b4d97268..d936464ad 100644
--- a/lib/images/license/button/cc-by-nc.png
+++ b/lib/images/license/button/cc-by-nc.png
Binary files differ
diff --git a/lib/images/license/button/cc-by-nd.png b/lib/images/license/button/cc-by-nd.png
index cdd3da9cc..3fc490870 100644
--- a/lib/images/license/button/cc-by-nd.png
+++ b/lib/images/license/button/cc-by-nd.png
Binary files differ
diff --git a/lib/images/license/button/cc-by-sa.png b/lib/images/license/button/cc-by-sa.png
index c512da0c4..3c6270a0d 100644
--- a/lib/images/license/button/cc-by-sa.png
+++ b/lib/images/license/button/cc-by-sa.png
Binary files differ
diff --git a/lib/images/license/button/cc-by.png b/lib/images/license/button/cc-by.png
index 9179e2f57..867daaee4 100644
--- a/lib/images/license/button/cc-by.png
+++ b/lib/images/license/button/cc-by.png
Binary files differ
diff --git a/lib/images/license/button/cc-zero.png b/lib/images/license/button/cc-zero.png
index 9243a8097..251efcd1c 100644
--- a/lib/images/license/button/cc-zero.png
+++ b/lib/images/license/button/cc-zero.png
Binary files differ
diff --git a/lib/images/license/button/cc.png b/lib/images/license/button/cc.png
index 087115aa6..9c492950f 100644
--- a/lib/images/license/button/cc.png
+++ b/lib/images/license/button/cc.png
Binary files differ
diff --git a/lib/images/license/button/gnufdl.png b/lib/images/license/button/gnufdl.png
index d26e95f77..0b52ea12e 100644
--- a/lib/images/license/button/gnufdl.png
+++ b/lib/images/license/button/gnufdl.png
Binary files differ
diff --git a/lib/images/license/button/publicdomain.png b/lib/images/license/button/publicdomain.png
index 1dcde15eb..54ea38b64 100644
--- a/lib/images/license/button/publicdomain.png
+++ b/lib/images/license/button/publicdomain.png
Binary files differ
diff --git a/lib/images/loading.gif b/lib/images/loading.gif
index 240bd88c5..35058e20f 100644
--- a/lib/images/loading.gif
+++ b/lib/images/loading.gif
Binary files differ
diff --git a/lib/images/mediamanager.png b/lib/images/mediamanager.png
new file mode 100644
index 000000000..822b8458a
--- /dev/null
+++ b/lib/images/mediamanager.png
Binary files differ
diff --git a/lib/images/minus.gif b/lib/images/minus.gif
index 499a2e2aa..7e8cbd754 100644
--- a/lib/images/minus.gif
+++ b/lib/images/minus.gif
Binary files differ
diff --git a/lib/images/multiupload.png b/lib/images/multiupload.png
deleted file mode 100644
index bc16c76d6..000000000
--- a/lib/images/multiupload.png
+++ /dev/null
Binary files differ
diff --git a/lib/images/pencil.png b/lib/images/pencil.png
index 3ea754120..78142b61e 100644
--- a/lib/images/pencil.png
+++ b/lib/images/pencil.png
Binary files differ
diff --git a/lib/images/plus.gif b/lib/images/plus.gif
index 9306686d8..3da3b9458 100644
--- a/lib/images/plus.gif
+++ b/lib/images/plus.gif
Binary files differ
diff --git a/lib/images/smileys/delete.gif b/lib/images/smileys/delete.gif
index d668348b9..e94c68c56 100644
--- a/lib/images/smileys/delete.gif
+++ b/lib/images/smileys/delete.gif
Binary files differ
diff --git a/lib/images/smileys/facepalm.gif b/lib/images/smileys/facepalm.gif
index 4ce005e63..5bebb2097 100644
--- a/lib/images/smileys/facepalm.gif
+++ b/lib/images/smileys/facepalm.gif
Binary files differ
diff --git a/lib/images/smileys/fixme.gif b/lib/images/smileys/fixme.gif
index b66ea99d6..e19141370 100644
--- a/lib/images/smileys/fixme.gif
+++ b/lib/images/smileys/fixme.gif
Binary files differ
diff --git a/lib/images/smileys/icon_arrow.gif b/lib/images/smileys/icon_arrow.gif
index 2880055cc..6771defd3 100644
--- a/lib/images/smileys/icon_arrow.gif
+++ b/lib/images/smileys/icon_arrow.gif
Binary files differ
diff --git a/lib/images/smileys/icon_biggrin.gif b/lib/images/smileys/icon_biggrin.gif
index d3527723c..aa29c14f6 100644
--- a/lib/images/smileys/icon_biggrin.gif
+++ b/lib/images/smileys/icon_biggrin.gif
Binary files differ
diff --git a/lib/images/smileys/icon_confused.gif b/lib/images/smileys/icon_confused.gif
index 0c49e0698..0ea9ed241 100644
--- a/lib/images/smileys/icon_confused.gif
+++ b/lib/images/smileys/icon_confused.gif
Binary files differ
diff --git a/lib/images/smileys/icon_cool.gif b/lib/images/smileys/icon_cool.gif
index cead0306c..3469ad482 100644
--- a/lib/images/smileys/icon_cool.gif
+++ b/lib/images/smileys/icon_cool.gif
Binary files differ
diff --git a/lib/images/smileys/icon_cry.gif b/lib/images/smileys/icon_cry.gif
index 7d54b1f99..25aea5753 100644
--- a/lib/images/smileys/icon_cry.gif
+++ b/lib/images/smileys/icon_cry.gif
Binary files differ
diff --git a/lib/images/smileys/icon_doubt.gif b/lib/images/smileys/icon_doubt.gif
index fd7903b19..b4afc6da7 100644
--- a/lib/images/smileys/icon_doubt.gif
+++ b/lib/images/smileys/icon_doubt.gif
Binary files differ
diff --git a/lib/images/smileys/icon_doubt2.gif b/lib/images/smileys/icon_doubt2.gif
index eb4b70b66..1f57eb963 100644
--- a/lib/images/smileys/icon_doubt2.gif
+++ b/lib/images/smileys/icon_doubt2.gif
Binary files differ
diff --git a/lib/images/smileys/icon_eek.gif b/lib/images/smileys/icon_eek.gif
index 5d3978106..276b01d55 100644
--- a/lib/images/smileys/icon_eek.gif
+++ b/lib/images/smileys/icon_eek.gif
Binary files differ
diff --git a/lib/images/smileys/icon_evil.gif b/lib/images/smileys/icon_evil.gif
index ab1aa8e12..d756916c9 100644
--- a/lib/images/smileys/icon_evil.gif
+++ b/lib/images/smileys/icon_evil.gif
Binary files differ
diff --git a/lib/images/smileys/icon_exclaim.gif b/lib/images/smileys/icon_exclaim.gif
index 6e50e2eec..215b32e76 100644
--- a/lib/images/smileys/icon_exclaim.gif
+++ b/lib/images/smileys/icon_exclaim.gif
Binary files differ
diff --git a/lib/images/smileys/icon_frown.gif b/lib/images/smileys/icon_frown.gif
index d2ac78c04..d46caf78f 100644
--- a/lib/images/smileys/icon_frown.gif
+++ b/lib/images/smileys/icon_frown.gif
Binary files differ
diff --git a/lib/images/smileys/icon_fun.gif b/lib/images/smileys/icon_fun.gif
index a8bb8a303..6d3c44276 100644
--- a/lib/images/smileys/icon_fun.gif
+++ b/lib/images/smileys/icon_fun.gif
Binary files differ
diff --git a/lib/images/smileys/icon_idea.gif b/lib/images/smileys/icon_idea.gif
index a40ae0d7e..41eaa0624 100644
--- a/lib/images/smileys/icon_idea.gif
+++ b/lib/images/smileys/icon_idea.gif
Binary files differ
diff --git a/lib/images/smileys/icon_kaddi.gif b/lib/images/smileys/icon_kaddi.gif
index 1410f7f1e..56344bbb0 100644
--- a/lib/images/smileys/icon_kaddi.gif
+++ b/lib/images/smileys/icon_kaddi.gif
Binary files differ
diff --git a/lib/images/smileys/icon_lol.gif b/lib/images/smileys/icon_lol.gif
index 374ba150f..d1c20c07a 100644
--- a/lib/images/smileys/icon_lol.gif
+++ b/lib/images/smileys/icon_lol.gif
Binary files differ
diff --git a/lib/images/smileys/icon_mrgreen.gif b/lib/images/smileys/icon_mrgreen.gif
index b54cd0f94..fc5d91683 100644
--- a/lib/images/smileys/icon_mrgreen.gif
+++ b/lib/images/smileys/icon_mrgreen.gif
Binary files differ
diff --git a/lib/images/smileys/icon_neutral.gif b/lib/images/smileys/icon_neutral.gif
index 4f311567e..c82a974c7 100644
--- a/lib/images/smileys/icon_neutral.gif
+++ b/lib/images/smileys/icon_neutral.gif
Binary files differ
diff --git a/lib/images/smileys/icon_question.gif b/lib/images/smileys/icon_question.gif
index 9d072265b..4e3092498 100644
--- a/lib/images/smileys/icon_question.gif
+++ b/lib/images/smileys/icon_question.gif
Binary files differ
diff --git a/lib/images/smileys/icon_razz.gif b/lib/images/smileys/icon_razz.gif
index 29da2a2fc..310655eec 100644
--- a/lib/images/smileys/icon_razz.gif
+++ b/lib/images/smileys/icon_razz.gif
Binary files differ
diff --git a/lib/images/smileys/icon_redface.gif b/lib/images/smileys/icon_redface.gif
index ad7628320..160c20f33 100644
--- a/lib/images/smileys/icon_redface.gif
+++ b/lib/images/smileys/icon_redface.gif
Binary files differ
diff --git a/lib/images/smileys/icon_rolleyes.gif b/lib/images/smileys/icon_rolleyes.gif
index d7f5f2f4b..502c5c174 100644
--- a/lib/images/smileys/icon_rolleyes.gif
+++ b/lib/images/smileys/icon_rolleyes.gif
Binary files differ
diff --git a/lib/images/smileys/icon_sad.gif b/lib/images/smileys/icon_sad.gif
index d2ac78c04..d46caf78f 100644
--- a/lib/images/smileys/icon_sad.gif
+++ b/lib/images/smileys/icon_sad.gif
Binary files differ
diff --git a/lib/images/smileys/icon_silenced.gif b/lib/images/smileys/icon_silenced.gif
index 448399b2b..5f722e04e 100644
--- a/lib/images/smileys/icon_silenced.gif
+++ b/lib/images/smileys/icon_silenced.gif
Binary files differ
diff --git a/lib/images/smileys/icon_smile.gif b/lib/images/smileys/icon_smile.gif
index 7b1f6d304..df125e2b5 100644
--- a/lib/images/smileys/icon_smile.gif
+++ b/lib/images/smileys/icon_smile.gif
Binary files differ
diff --git a/lib/images/smileys/icon_smile2.gif b/lib/images/smileys/icon_smile2.gif
index 769639d32..6b4909c81 100644
--- a/lib/images/smileys/icon_smile2.gif
+++ b/lib/images/smileys/icon_smile2.gif
Binary files differ
diff --git a/lib/images/smileys/icon_surprised.gif b/lib/images/smileys/icon_surprised.gif
index cb2142431..aaa94f1da 100644
--- a/lib/images/smileys/icon_surprised.gif
+++ b/lib/images/smileys/icon_surprised.gif
Binary files differ
diff --git a/lib/images/smileys/icon_twisted.gif b/lib/images/smileys/icon_twisted.gif
index 502fe247e..eaec19338 100644
--- a/lib/images/smileys/icon_twisted.gif
+++ b/lib/images/smileys/icon_twisted.gif
Binary files differ
diff --git a/lib/images/smileys/icon_wink.gif b/lib/images/smileys/icon_wink.gif
index d14828804..78b6ad3db 100644
--- a/lib/images/smileys/icon_wink.gif
+++ b/lib/images/smileys/icon_wink.gif
Binary files differ
diff --git a/lib/images/throbber.gif b/lib/images/throbber.gif
index d04bd3949..27178a8cf 100644
--- a/lib/images/throbber.gif
+++ b/lib/images/throbber.gif
Binary files differ
diff --git a/lib/images/toolbar/bold.png b/lib/images/toolbar/bold.png
index 1fc8a9cc4..51ddb8880 100644
--- a/lib/images/toolbar/bold.png
+++ b/lib/images/toolbar/bold.png
Binary files differ
diff --git a/lib/images/trash.png b/lib/images/trash.png
index efc97ba8f..350c5e1cf 100644
--- a/lib/images/trash.png
+++ b/lib/images/trash.png
Binary files differ
diff --git a/lib/images/up.png b/lib/images/up.png
index 27beb4445..b1eac912d 100644
--- a/lib/images/up.png
+++ b/lib/images/up.png
Binary files differ
diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php
index ea4184ca3..a6b0624bc 100644
--- a/lib/plugins/acl/admin.php
+++ b/lib/plugins/acl/admin.php
@@ -31,20 +31,6 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
var $specials = array();
/**
- * return some info
- */
- function getInfo(){
- return array(
- 'author' => 'Andreas Gohr',
- 'email' => 'andi@splitbrain.org',
- 'date' => '2011-04-16',
- 'name' => 'ACL Manager',
- 'desc' => 'Manage Page Access Control Lists',
- 'url' => 'http://dokuwiki.org/plugin:acl',
- );
- }
-
- /**
* return prompt for admin menu
*/
function getMenuText($language) {
@@ -253,19 +239,12 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
$data = $this->_get_tree($ns);
// wrap a list with the root level around the other namespaces
- $item = array( 'level' => 0, 'id' => '*', 'type' => 'd',
- 'open' =>'true', 'label' => '['.$lang['mediaroot'].']');
+ array_unshift($data, array( 'level' => 0, 'id' => '*', 'type' => 'd',
+ 'open' =>'true', 'label' => '['.$lang['mediaroot'].']'));
- echo '<ul class="acltree">';
- echo $this->_html_li_acl($item);
- echo '<div class="li">';
- echo $this->_html_list_acl($item);
- echo '</div>';
echo html_buildlist($data,'acl',
array($this,'_html_list_acl'),
array($this,'_html_li_acl'));
- echo '</li>';
- echo '</ul>';
}
@@ -547,7 +526,8 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
function _html_li_acl($item){
- return '<li class="level'.$item['level'].'">';
+ return '<li class="level' . $item['level'] . ' ' .
+ ($item['open'] ? 'open' : 'closed') . '">';
}
diff --git a/lib/plugins/acl/ajax.php b/lib/plugins/acl/ajax.php
index d91586a5d..d704fa8c9 100644
--- a/lib/plugins/acl/ajax.php
+++ b/lib/plugins/acl/ajax.php
@@ -44,13 +44,10 @@ if($ajax == 'info'){
$data = $acl->_get_tree($ns,$ns);
- foreach($data as $item){
- $item['level'] = $lvl+1;
- echo $acl->_html_li_acl($item);
- echo '<div class="li">';
- echo $acl->_html_list_acl($item);
- echo '</div>';
- echo '</li>';
+ foreach(array_keys($data) as $item){
+ $data[$item]['level'] = $lvl+1;
}
+ echo html_buildlist($data, 'acl', array($acl, '_html_list_acl'),
+ array($acl, '_html_li_acl'));
}
diff --git a/lib/plugins/acl/lang/bg/lang.php b/lib/plugins/acl/lang/bg/lang.php
index 0746e32c9..e260be918 100644
--- a/lib/plugins/acl/lang/bg/lang.php
+++ b/lib/plugins/acl/lang/bg/lang.php
@@ -21,7 +21,7 @@ $lang['p_group_ns'] = 'Членовете на групата <b clas
$lang['p_choose_id'] = 'Моля, <b>въведете потребител или група</b> в полето отгоре, за да видите или промените правата за страницата <b class="aclpage">%s</b>.';
$lang['p_choose_ns'] = 'Моля, <b>въведете потребител или група</b> в полето отгоре, за да видите или промените правата за именното пространство <b class="aclns">%s</b>.';
$lang['p_inherited'] = 'Бележка: Тези разрешения не са зададени директно, а са наследени от други групи или именни пространства.';
-$lang['p_isadmin'] = 'Бележка: Избраната група или потребител има всички права, защото е определен за суперпотребител.';
+$lang['p_isadmin'] = 'Бележка: Избраната група или потребител има всички права, защото е определен за супер потребител.';
$lang['p_include'] = 'Висши права включват по-нисшите такива. Правата за създаване, качване и изтриване са приложими само за именни пространства, но не за страници.';
$lang['current'] = 'Текущи ACL права';
$lang['where'] = 'Страница/Именно пространство';
diff --git a/lib/plugins/acl/lang/de-informal/lang.php b/lib/plugins/acl/lang/de-informal/lang.php
index e24584a55..3f4b08c2a 100644
--- a/lib/plugins/acl/lang/de-informal/lang.php
+++ b/lib/plugins/acl/lang/de-informal/lang.php
@@ -7,6 +7,7 @@
* @author Marcel Metz <marcel_metz@gmx.de>
* @author Matthias Schulte <post@lupo49.de>
* @author Christian Wichmann <nospam@zone0.de>
+ * @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['admin_acl'] = 'Zugriffskontrollsystem Management';
$lang['acl_group'] = 'Gruppe';
diff --git a/lib/plugins/acl/lang/de/lang.php b/lib/plugins/acl/lang/de/lang.php
index 3c6bf8cf0..eb23636c4 100644
--- a/lib/plugins/acl/lang/de/lang.php
+++ b/lib/plugins/acl/lang/de/lang.php
@@ -19,6 +19,8 @@
* @author Robert Bogenschneider <robog@gmx.de>
* @author Niels Lange <niels@boldencursief.nl>
* @author Christian Wichmann <nospam@zone0.de>
+ * @author Paul Lachewsky <kaeptn.haddock@gmail.com>
+ * @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['admin_acl'] = 'Zugangsverwaltung';
$lang['acl_group'] = 'Gruppe';
diff --git a/lib/plugins/acl/lang/el/lang.php b/lib/plugins/acl/lang/el/lang.php
index e2f6c35dc..e1cd26755 100644
--- a/lib/plugins/acl/lang/el/lang.php
+++ b/lib/plugins/acl/lang/el/lang.php
@@ -13,6 +13,7 @@
* @author Αθανάσιος Νταής <homunculus@wana.gr>
* @author Konstantinos Koryllos <koryllos@gmail.com>
* @author George Petsagourakis <petsagouris@gmail.com>
+ * @author Petros Vidalis <pvidalis@gmail.com>
*/
$lang['admin_acl'] = 'Διαχείριση Δικαιωμάτων Πρόσβασης';
$lang['acl_group'] = 'Ομάδα';
diff --git a/lib/plugins/acl/lang/eo/lang.php b/lib/plugins/acl/lang/eo/lang.php
index 85b262e8c..239578f57 100644
--- a/lib/plugins/acl/lang/eo/lang.php
+++ b/lib/plugins/acl/lang/eo/lang.php
@@ -10,6 +10,7 @@
* @author Erik Pedersen <erik.pedersen@shaw.ca>
* @author Robert Bogenschneider <robog@GMX.de>
* @author Robert BOGENSCHNEIDER <robog@gmx.de>
+ * @author Robert BOGENSCHNEIDER <bogi@UEA.org>
*/
$lang['admin_acl'] = 'Administrado de Alirkontrola Listo (ACL)';
$lang['acl_group'] = 'Grupo';
diff --git a/lib/plugins/acl/lang/es/lang.php b/lib/plugins/acl/lang/es/lang.php
index 096320af9..ee50a7530 100644
--- a/lib/plugins/acl/lang/es/lang.php
+++ b/lib/plugins/acl/lang/es/lang.php
@@ -20,6 +20,8 @@
* @author Victor Castelan <victorcastelan@gmail.com>
* @author Mauro Javier Giamberardino <mgiamberardino@gmail.com>
* @author emezeta <emezeta@infoprimo.com>
+ * @author Oscar Ciudad <oscar@jacho.net>
+ * @author Ruben Figols <ruben.figols@gmail.com>
*/
$lang['admin_acl'] = 'Administración de lista de control de acceso';
$lang['acl_group'] = 'Grupo';
diff --git a/lib/plugins/acl/lang/et/lang.php b/lib/plugins/acl/lang/et/lang.php
index 04ce0c08a..bc4c73a16 100644
--- a/lib/plugins/acl/lang/et/lang.php
+++ b/lib/plugins/acl/lang/et/lang.php
@@ -7,6 +7,7 @@
* @author Aari Juhanson <aari@vmg.vil.ee>
* @author Kaiko Kaur <kaiko@kultuur.edu.ee>
* @author kristian.kankainen@kuu.la
+ * @author Rivo Zängov <eraser@eraser.ee>
*/
$lang['admin_acl'] = 'Ligipääsukontrolli nimekirja haldamine';
$lang['acl_group'] = 'Grupp';
@@ -14,8 +15,14 @@ $lang['acl_user'] = 'Kasutaja';
$lang['acl_perms'] = 'Lubatud';
$lang['page'] = 'leht';
$lang['namespace'] = 'alajaotus';
+$lang['btn_select'] = 'Vali';
+$lang['who'] = 'Kasutaja/Grupp';
+$lang['perm'] = 'Õigused';
+$lang['acl_perm0'] = 'Pole';
$lang['acl_perm1'] = 'Lugemine';
$lang['acl_perm2'] = 'Toimetamine';
$lang['acl_perm4'] = 'Tekitamine';
$lang['acl_perm8'] = 'Üles laadimine';
+$lang['acl_perm16'] = 'Kustuta';
$lang['acl_new'] = 'Uue kirje lisamine';
+$lang['acl_mod'] = 'Muuda sissekannet';
diff --git a/lib/plugins/acl/lang/fi/lang.php b/lib/plugins/acl/lang/fi/lang.php
index 04074d8d4..4f145e0f6 100644
--- a/lib/plugins/acl/lang/fi/lang.php
+++ b/lib/plugins/acl/lang/fi/lang.php
@@ -5,6 +5,7 @@
* @author otto@valjakko.net
* @author Otto Vainio <otto@valjakko.net>
* @author Teemu Mattila <ghcsystems@gmail.com>
+ * @author Sami Olmari <sami@olmari.fi>
*/
$lang['admin_acl'] = 'Käyttöoikeudet (ACL)';
$lang['acl_group'] = 'Ryhmä';
diff --git a/lib/plugins/acl/lang/fr/lang.php b/lib/plugins/acl/lang/fr/lang.php
index 36323a51f..86f493b52 100644
--- a/lib/plugins/acl/lang/fr/lang.php
+++ b/lib/plugins/acl/lang/fr/lang.php
@@ -7,11 +7,10 @@
* @author Antoine Fixary <antoine.fixary@freesbee.fr>
* @author cumulus <pta-n56@myamail.com>
* @author Gwenn Gueguen <contact@demisel.net>
- * @author Guy Brand <gb@isis.u-strasbg.fr>
+ * @author Guy Brand <gb@unistra.fr>
* @author Fabien Chabreuil <fabien@integralpersonality.com>
* @author Stéphane Chamberland <stephane.chamberland@ec.gc.ca>
* @author Maurice A. LeBlanc <leblancma@cooptel.qc.ca>
- * @author gb@isis.u-strasbg.fr
* @author stephane.gully@gmail.com
* @author Guillaume Turri <guillaume.turri@gmail.com>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
@@ -21,6 +20,7 @@
* @author Florian Gaub <floriang@floriang.net>
* @author Samuel Dorsaz samuel.dorsaz@novelion.net
* @author Johan Guilbaud <guilbaud.johan@gmail.com>
+ * @author schplurtz@laposte.net
*/
$lang['admin_acl'] = 'Gestion de la liste des contrôles d\'accès (ACL)';
$lang['acl_group'] = 'Groupe';
diff --git a/lib/plugins/acl/lang/hr/help.txt b/lib/plugins/acl/lang/hr/help.txt
new file mode 100644
index 000000000..4e7cfc3c2
--- /dev/null
+++ b/lib/plugins/acl/lang/hr/help.txt
@@ -0,0 +1,11 @@
+=== Brza Pomoć: ===
+
+Na ovoj stranici možeš dodavati i brisati dozvole za imenske prostore i stranice u svom wiki-u.
+
+Lijevi prozor prikazuje sve dostupne imenske prostore i stranice.
+
+Forma iznad ti omogućuje pregled i mijenjanje dozvola odabranom korisniku ili grupi.
+
+U tablici ispod prikazana su sva trenutno postavljena pravila kontrole pristupa. Koristite je za višestruko brisanje ili mijenjanje pravila.
+
+Čitanje [[doku>acl|službena dokumentacija o ACL]] može vam pomoći potpuno razumijeti kako kontrola pristupa radi u DokuWiki. \ No newline at end of file
diff --git a/lib/plugins/acl/lang/hr/lang.php b/lib/plugins/acl/lang/hr/lang.php
index d2094b77b..8c21f1b0b 100644
--- a/lib/plugins/acl/lang/hr/lang.php
+++ b/lib/plugins/acl/lang/hr/lang.php
@@ -4,4 +4,33 @@
*
* @author Branko Rihtman <theney@gmail.com>
* @author Dražen Odobašić <dodobasic@gmail.com>
+ * @author Dejan Igrec dejan.igrec@gmail.com
*/
+$lang['admin_acl'] = 'Upravljanje listom kontrole pristupa';
+$lang['acl_group'] = 'Grupa';
+$lang['acl_user'] = 'Korisnik';
+$lang['acl_perms'] = 'Dozvole za';
+$lang['page'] = 'Stranica';
+$lang['namespace'] = 'Imenski prostor';
+$lang['btn_select'] = 'Odaberi';
+$lang['p_user_id'] = 'Korisnik <b class="acluser">%s</b> trenutno ima sljedeće dozvole na stranici <b class="aclpage">%s</b>: <i>%s</i>.';
+$lang['p_user_ns'] = 'Korisnik <b class="acluser">%s</b> trenutno ima sljedeće dozvole u imenskom prostoru <b class="aclns">%s</b>: <i>%s</i>.';
+$lang['p_group_id'] = 'Članovi grupe <b class="aclgroup">%s</b> trenutno imaju sljedeće dozvole na stranici <b class="aclpage">%s</b>: <i>%s</i>.';
+$lang['p_group_ns'] = 'Članovi grupe <b class="aclgroup">%s</b> trenutno imaju sljedeće dozvole u imenskom prostoru <b class="aclns">%s</b>: <i>%s</i>.';
+$lang['p_choose_id'] = 'Molim <b>unesti korisnika ili grupu</b> u gornju formu za pregled ili uređivanje dozvola postavljenih za stranicu <b class="aclpage">%s</b>.';
+$lang['p_choose_ns'] = 'Molim <b>unesti korisnika ili grupu</b> u gornju formu za pregled ili uređivanje dozvola postavljenih za imenski prostor <b class="aclns">%s</b>.';
+$lang['p_inherited'] = 'Napomena: Ove dozvole nisu postavljene eksplicitno već su naslijeđene od drugih grupa ili nadređenih imenskih prostora.';
+$lang['p_isadmin'] = 'Napomena: Odabrana grupa ili korisnik uvijek ima sve dozvole jer je postavljen kao superuser.';
+$lang['p_include'] = 'Više dozvole uključuju sve niže. Dozvole Kreiraj, Učitaj i Briši se primjenjuju samo na imenske prostore, ne stranice.';
+$lang['current'] = 'Trenutna ACL Pravila';
+$lang['where'] = 'Stranica/Imenski prostor';
+$lang['who'] = 'Korisnik/Grupa';
+$lang['perm'] = 'Dozvole';
+$lang['acl_perm0'] = 'Ništa';
+$lang['acl_perm1'] = 'Čitaj';
+$lang['acl_perm2'] = 'Uredi';
+$lang['acl_perm4'] = 'Kreiraj';
+$lang['acl_perm8'] = 'Učitaj';
+$lang['acl_perm16'] = 'Briši';
+$lang['acl_new'] = 'Dodaj novi Zapis';
+$lang['acl_mod'] = 'Promijeni Zapis';
diff --git a/lib/plugins/acl/lang/hu/lang.php b/lib/plugins/acl/lang/hu/lang.php
index 30401b315..255d838b6 100644
--- a/lib/plugins/acl/lang/hu/lang.php
+++ b/lib/plugins/acl/lang/hu/lang.php
@@ -7,6 +7,7 @@
* @author schilling.janos@gmail.com
* @author Szabó Dávid <szabo.david@gyumolcstarhely.hu>
* @author Sándor TIHANYI <stihanyi+dw@gmail.com>
+ * @author David Szabo <szabo.david@gyumolcstarhely.hu>
*/
$lang['admin_acl'] = 'Hozzáférési lista (ACL) kezelő';
$lang['acl_group'] = 'Csoport:';
diff --git a/lib/plugins/acl/lang/kk/lang.php b/lib/plugins/acl/lang/kk/lang.php
new file mode 100644
index 000000000..dde5b9577
--- /dev/null
+++ b/lib/plugins/acl/lang/kk/lang.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * kazakh language file
+ *
+ * @author Nurgozha Kaliaskarov astana08@gmail.com
+ */
diff --git a/lib/plugins/acl/lang/nl/lang.php b/lib/plugins/acl/lang/nl/lang.php
index f9adb5f04..686909644 100644
--- a/lib/plugins/acl/lang/nl/lang.php
+++ b/lib/plugins/acl/lang/nl/lang.php
@@ -16,6 +16,7 @@
* @author Matthias Carchon webmaster@c-mattic.be
* @author Marijn Hofstra <hofstra.m@gmail.com>
* @author Timon Van Overveldt <timonvo@gmail.com>
+ * @author Jeroen
*/
$lang['admin_acl'] = 'Toegangsrechten';
$lang['acl_group'] = 'Groep';
diff --git a/lib/plugins/acl/lang/no/lang.php b/lib/plugins/acl/lang/no/lang.php
index cd9e2edfb..587f9c2fc 100644
--- a/lib/plugins/acl/lang/no/lang.php
+++ b/lib/plugins/acl/lang/no/lang.php
@@ -15,6 +15,8 @@
* @author Lisa Ditlefsen <lisa@vervesearch.com>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
* @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca>
+ * @author Rune Rasmussen syntaxerror.no@gmail.com
+ * @author Jon Bøe <jonmagneboe@hotmail.com>
*/
$lang['admin_acl'] = 'Administrasjon av lister for adgangskontroll (ACL)';
$lang['acl_group'] = 'Gruppe';
@@ -39,7 +41,7 @@ $lang['perm'] = 'Tillatelser';
$lang['acl_perm0'] = 'Ingen';
$lang['acl_perm1'] = 'Lese';
$lang['acl_perm2'] = 'Redigere';
-$lang['acl_perm4'] = 'Lage';
+$lang['acl_perm4'] = 'Opprette';
$lang['acl_perm8'] = 'Laste opp';
$lang['acl_perm16'] = 'Slette';
$lang['acl_new'] = 'Legg til ny oppføring';
diff --git a/lib/plugins/acl/lang/pl/lang.php b/lib/plugins/acl/lang/pl/lang.php
index c954abe2a..a72b6af11 100644
--- a/lib/plugins/acl/lang/pl/lang.php
+++ b/lib/plugins/acl/lang/pl/lang.php
@@ -11,6 +11,7 @@
* @author Leszek Stachowski <shazarre@gmail.com>
* @author maros <dobrimaros@yahoo.pl>
* @author Grzegorz Widła <dzesdzes@gmail.com>
+ * @author Łukasz Chmaj <teachmeter@gmail.com>
*/
$lang['admin_acl'] = 'Zarządzanie uprawnieniami';
$lang['acl_group'] = 'Grupa';
diff --git a/lib/plugins/acl/lang/pt-br/lang.php b/lib/plugins/acl/lang/pt-br/lang.php
index 0ebcbf509..a0c997600 100644
--- a/lib/plugins/acl/lang/pt-br/lang.php
+++ b/lib/plugins/acl/lang/pt-br/lang.php
@@ -18,6 +18,7 @@
* @author Luis Dantas <luisdantas@gmail.com>
* @author Sergio Motta sergio@cisne.com.br
* @author Isaias Masiero Filho <masiero@masiero.org>
+ * @author Balaco Baco <balacobaco@imap.cc>
*/
$lang['admin_acl'] = 'Administração da Lista de Controles de Acesso';
$lang['acl_group'] = 'Grupo';
diff --git a/lib/plugins/acl/lang/ro/lang.php b/lib/plugins/acl/lang/ro/lang.php
index 296baa291..0c13d7223 100644
--- a/lib/plugins/acl/lang/ro/lang.php
+++ b/lib/plugins/acl/lang/ro/lang.php
@@ -8,6 +8,7 @@
* @author Emanuel-Emeric Andrași <n30@mandrivausers.ro>
* @author Emanuel-Emeric Andraşi <em.andrasi@mandrivausers.ro>
* @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro>
+ * @author Marius OLAR <olarmariusalex@gmail.com>
*/
$lang['admin_acl'] = 'Managementul Listei de Control a Accesului';
$lang['acl_group'] = 'Grup';
diff --git a/lib/plugins/acl/lang/sv/lang.php b/lib/plugins/acl/lang/sv/lang.php
index b5fd3b866..7f963d5e1 100644
--- a/lib/plugins/acl/lang/sv/lang.php
+++ b/lib/plugins/acl/lang/sv/lang.php
@@ -15,6 +15,7 @@
* @author Bogge Bogge <bogge@bogge.com>
* @author Peter Åström <eaustreum@gmail.com>
* @author Håkan Sandell <hakan.sandell@home.se>
+ * @author mikael@mallander.net
*/
$lang['admin_acl'] = 'Hantera behörighetslistan (ACL)';
$lang['acl_group'] = 'Grupp';
diff --git a/lib/plugins/acl/lang/zh/lang.php b/lib/plugins/acl/lang/zh/lang.php
index 581d08539..986fa769a 100644
--- a/lib/plugins/acl/lang/zh/lang.php
+++ b/lib/plugins/acl/lang/zh/lang.php
@@ -13,6 +13,7 @@
* @author caii <zhoucaiqi@gmail.com>
* @author Hiphen Lee <jacob.b.leung@gmail.com>
* @author caii, patent agent in China <zhoucaiqi@gmail.com>
+ * @author lainme993@gmail.com
*/
$lang['admin_acl'] = '访问控制列表(ACL)管理器';
$lang['acl_group'] = '组';
diff --git a/lib/plugins/acl/plugin.info.txt b/lib/plugins/acl/plugin.info.txt
new file mode 100644
index 000000000..f108a2390
--- /dev/null
+++ b/lib/plugins/acl/plugin.info.txt
@@ -0,0 +1,6 @@
+author Andreas Gohr
+email andi@splitbrain.org
+date 2011-04-16
+name ACL Manager
+desc Manage Page Access Control Lists
+url http://dokuwiki.org/plugin:acl
diff --git a/lib/plugins/acl/script.js b/lib/plugins/acl/script.js
index d5d0371a9..d912a2407 100644
--- a/lib/plugins/acl/script.js
+++ b/lib/plugins/acl/script.js
@@ -1,59 +1,69 @@
-acl = {
- init: function(){
- this.ctl = $('acl_manager');
- if(!this.ctl) return;
+/**
+ * ACL Manager AJAX enhancements
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+var dw_acl = {
+ /**
+ * Initialize the object and attach the event handlers
+ */
+ init: function () {
+ var $tree;
- var sel = $('acl__user').getElementsByTagName('select')[0];
+ //FIXME only one underscore!!
+ if (jQuery('#acl_manager').length === 0) {
+ return;
+ }
- addEvent(sel,'change',acl.userselhandler);
- addEvent($('acl__tree'),'click',acl.treehandler);
- addEvent($('acl__user').getElementsByTagName('input')[1],'click',acl.loadinfo);
+ jQuery('#acl__user select').change(dw_acl.userselhandler);
+ jQuery('#acl__user input[type=submit]').click(dw_acl.loadinfo);
+
+ $tree = jQuery('#acl__tree');
+ $tree.dw_tree({toggle_selector: 'img',
+ load_data: function (show_sublist, $clicky) {
+ // get the enclosed link and the edit form
+ var $frm = jQuery('#acl__detail form');
+
+ jQuery.post(
+ DOKU_BASE + 'lib/plugins/acl/ajax.php',
+ jQuery.extend(dw_acl.parseatt($clicky.parent().find('a')[0].search),
+ {ajax: 'tree',
+ current_ns: $frm.find('input[name=ns]').val(),
+ current_id: $frm.find('input[name=id]').val()}),
+ show_sublist,
+ 'html'
+ );
+ },
+
+ toggle_display: function ($clicky, opening) {
+ $clicky.attr('src',
+ DOKU_BASE + 'lib/images/' +
+ (opening ? 'minus' : 'plus') + '.gif');
+ }});
+ $tree.delegate('a', 'click', dw_acl.treehandler);
},
-
/**
* Handle user dropdown
+ *
+ * Hides or shows the user/group entry box depending on what was selected in the
+ * dropdown element
*/
- userselhandler: function(e){
+ userselhandler: function () {
// make entry field visible/invisible
- if(this.value == '__g__' || this.value == '__u__'){
- $('acl__user').getElementsByTagName('input')[0].style.display = ''; //acl_w
- $('acl__user').getElementsByTagName('input')[1].style.display = ''; //submit
- }else{
- $('acl__user').getElementsByTagName('input')[0].style.display = 'none';
- $('acl__user').getElementsByTagName('input')[1].style.display = 'none';
- }
-
- acl.loadinfo();
+ jQuery('#acl__user input').toggle(this.value === '__g__' ||
+ this.value === '__u__');
+ dw_acl.loadinfo();
},
/**
* Load the current permission info and edit form
- *
- * @param frm - Form element with needed data
*/
- loadinfo: function(){
- // get form
- var frm = $('acl__detail').getElementsByTagName('form')[0];
-
- // prepare an AJAX call
- var ajax = new sack(DOKU_BASE + 'lib/plugins/acl/ajax.php');
- ajax.AjaxFailedAlert = '';
- ajax.encodeURIString = false;
- if(ajax.failed) return true;
-
- // prepare data
- var data = Array();
- data[0] = ajax.encVar('ns',frm.elements['ns'].value);
- data[1] = ajax.encVar('id',frm.elements['id'].value);
- data[2] = ajax.encVar('acl_t',frm.elements['acl_t'].value);
- data[3] = ajax.encVar('acl_w',frm.elements['acl_w'].value);
- data[4] = ajax.encVar('sectok',frm.elements['sectok'].value);
- data[5] = ajax.encVar('ajax','info');
-
- ajax.elementObj = $('acl__info');
-
- ajax.runAJAX(data.join('&'));
+ loadinfo: function () {
+ jQuery('#acl__info').load(
+ DOKU_BASE + 'lib/plugins/acl/ajax.php',
+ jQuery('#acl__detail form').serialize() + '&ajax=info'
+ );
return false;
},
@@ -62,11 +72,13 @@ acl = {
*
* @todo put into global script lib?
*/
- parseatt: function(str){
- if(str[0] == '?') str = str.substr(1);
+ parseatt: function (str) {
+ if (str[0] === '?') {
+ str = str.substr(1);
+ }
var attributes = {};
var all = str.split('&');
- for(var i=0; i<all.length; i++){
+ for (var i = 0; i < all.length; i++) {
var att = all[i].split('=');
attributes[att[0]] = decodeURIComponent(att[1]);
}
@@ -74,94 +86,40 @@ acl = {
},
/**
- * htmlspecialchars equivalent
- *
- * @todo put in gloabl scripts lib?
+ * Handles clicks to the tree nodes
*/
- hsc: function(str) {
- str = str.replace(/&/g,"&amp;");
- str = str.replace(/\"/g,"&quot;");
- str = str.replace(/\'/g,"&#039;");
- str = str.replace(/</g,"&lt;");
- str = str.replace(/>/g,"&gt;");
- return str;
- },
+ treehandler: function () {
+ var $link, $frm;
+ $link = jQuery(this);
- /**
- * Open or close a subtree using AJAX
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- treetoggle: function(clicky){
- var listitem = clicky.parentNode.parentNode;
-
- // if already open, close by removing the sublist
- var sublists = listitem.getElementsByTagName('ul');
- if(sublists.length){
- listitem.removeChild(sublists[0]);
- clicky.src = DOKU_BASE+'lib/images/plus.gif';
- clicky.alt = '+';
- return false;
- }
-
- // get the enclosed link (is always the first one)
- var link = listitem.getElementsByTagName('a')[0];
-
- // prepare an AJAX call to fetch the subtree
- var ajax = new sack(DOKU_BASE + 'lib/plugins/acl/ajax.php');
- ajax.AjaxFailedAlert = '';
- ajax.encodeURIString = false;
- if(ajax.failed) return true;
-
- //prepare the new ul
- var ul = document.createElement('ul');
- listitem.appendChild(ul);
- ajax.elementObj = ul;
- ajax.setVar('ajax', 'tree');
- var frm = $('acl__detail').getElementsByTagName('form')[0];
- ajax.setVar('current_ns', encodeURIComponent(frm.elements['ns'].value));
- ajax.setVar('current_id', encodeURIComponent(frm.elements['id'].value));
- ajax.runAJAX(link.search.substr(1));
- clicky.src = DOKU_BASE+'lib/images/minus.gif';
- return false;
- },
-
- /**
- * Handles all clicks in the tree, dispatching the right action based on the
- * clicked element
- */
- treehandler: function(e){
- if(e.target.src){ // is it an image?
- acl.treetoggle(e.target);
- } else if(e.target.href){ // is it a link?
// remove highlighting
- var obj = getElementsByClass('cur',$('acl__tree'),'a');
- for(var i=0; i<obj.length; i++){
- obj[i].className = obj[i].className.replace(/ cur/,'');
- }
+ jQuery('#acl__tree a.cur').removeClass('cur');
// add new highlighting
- e.target.className += ' cur';
+ $link.addClass('cur');
// set new page to detail form
- var frm = $('acl__detail').getElementsByTagName('form')[0];
- if(e.target.className.search(/wikilink1/) > -1){
- frm.elements['ns'].value = '';
- frm.elements['id'].value = acl.hsc(acl.parseatt(e.target.search)['id']);
- }else if(e.target.className.search(/idx_dir/) > -1){
- frm.elements['ns'].value = acl.hsc(acl.parseatt(e.target.search)['ns']);
- frm.elements['id'].value = '';
+ $frm = jQuery('#acl__detail form');
+ if ($link.hasClass('wikilink1')) {
+ $frm.find('input[name=ns]').val('');
+ $frm.find('input[name=id]').val(dw_acl.parseatt($link[0].search).id);
+ } else if ($link.hasClass('idx_dir')) {
+ $frm.find('input[name=ns]').val(dw_acl.parseatt($link[0].search).ns);
+ $frm.find('input[name=id]').val('');
}
+ dw_acl.loadinfo();
- acl.loadinfo();
- }
-
- e.stopPropagation();
- e.preventDefault();
return false;
}
-
};
-addInitEvent(acl.init);
+jQuery(dw_acl.init);
+
+var acl = {
+ init: DEPRECATED_WRAP(dw_acl.init, dw_acl),
+ userselhandler: DEPRECATED_WRAP(dw_acl.userselhandler, dw_acl),
+ loadinfo: DEPRECATED_WRAP(dw_acl.loadinfo, dw_acl),
+ parseatt: DEPRECATED_WRAP(dw_acl.parseatt, dw_acl),
+ treehandler: DEPRECATED_WRAP(dw_acl.treehandler, dw_acl)
+};
diff --git a/lib/plugins/acl/style.css b/lib/plugins/acl/style.css
index 0c5a9819b..b7154aa78 100644
--- a/lib/plugins/acl/style.css
+++ b/lib/plugins/acl/style.css
@@ -22,6 +22,7 @@ div#acl_manager div#acl__tree ul {
div#acl_manager div#acl__tree li {
padding-left: 1em;
+ list-style-image: none;
}
div#acl_manager div#acl__tree ul img {
diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php
index e24f3b87b..64906171d 100644
--- a/lib/plugins/config/admin.php
+++ b/lib/plugins/config/admin.php
@@ -32,21 +32,6 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
var $_session_started = false;
var $_localised_prompts = false;
- /**
- * return some info
- */
- function getInfo(){
-
- return array(
- 'author' => 'Christopher Smith',
- 'email' => 'chris@jalakai.co.uk',
- 'date' => '2007-08-05',
- 'name' => 'Configuration Manager',
- 'desc' => "Manage Dokuwiki's Configuration Settings",
- 'url' => 'http://dokuwiki.org/plugin:config',
- );
- }
-
function getMenuSort() { return 100; }
/**
diff --git a/lib/plugins/config/lang/bg/lang.php b/lib/plugins/config/lang/bg/lang.php
index fe1c723f2..ff03fd9e2 100644
--- a/lib/plugins/config/lang/bg/lang.php
+++ b/lib/plugins/config/lang/bg/lang.php
@@ -22,7 +22,7 @@ $lang['_header_plugin'] = 'Настройки на приставки';
$lang['_header_template'] = 'Настройки на шаблони';
$lang['_header_undefined'] = 'Неопределени настройки';
$lang['_basic'] = 'Основни настройки';
-$lang['_display'] = 'Настройки на показването';
+$lang['_display'] = 'Настройки за изобразяване';
$lang['_authentication'] = 'Настройки за удостоверяване';
$lang['_anti_spam'] = 'Настройки за борба със SPAM-ма';
$lang['_editing'] = 'Настройки за редактиране';
@@ -30,8 +30,8 @@ $lang['_links'] = 'Настройки на препратките
$lang['_media'] = 'Настройки на медията';
$lang['_advanced'] = 'Допълнителни настройки';
$lang['_network'] = 'Мрежови настройки';
-$lang['_plugin_sufix'] = 'Настройки на приставки';
-$lang['_template_sufix'] = 'Настройки на шаблони';
+$lang['_plugin_sufix'] = ' - настройки на приставката';
+$lang['_template_sufix'] = ' - настройки на шаблона';
$lang['_msg_setting_undefined'] = 'Няма метаданни за настройките.';
$lang['_msg_setting_no_class'] = 'Няма клас настройки.';
$lang['_msg_setting_no_default'] = 'Няма стандартна стойност.';
@@ -41,6 +41,7 @@ $lang['lang'] = 'Език';
$lang['basedir'] = 'Главна директория (напр. <code>/dokuwiki/</code>). Оставете празно, за да бъде засечена автоматично.';
$lang['baseurl'] = 'URL адрес (напр. <code>http://www.yourserver.com</code>). Оставете празно, за да бъде засечен автоматично.';
$lang['savedir'] = 'Директория за записване на данните';
+$lang['cookiedir'] = 'Път за бисквитките. Оставите ли полето празно ще се ползва горния URL адрес.';
$lang['start'] = 'Име на началната страница';
$lang['title'] = 'Име на Wiki-то';
$lang['template'] = 'Шаблон';
@@ -49,38 +50,38 @@ $lang['fullpath'] = 'Показване на пълния път д
$lang['recent'] = 'Скорошни промени';
$lang['breadcrumbs'] = 'Брой на следите';
$lang['youarehere'] = 'Йерархични следи';
-$lang['typography'] = 'Поправяне на разместени букви';
+$lang['typography'] = 'Замяна на последователност от символи с типографски еквивалент';
$lang['htmlok'] = 'Разрешаване вграждането на HTML код';
$lang['phpok'] = 'Разрешаване вграждането на PHP код';
$lang['dformat'] = 'Формат на датата (виж. <a href="http://www.php.net/strftime">strftime</a> функцията на PHP)';
$lang['signature'] = 'Подпис';
-$lang['toptoclevel'] = 'Главно ниво за съдържанието';
-$lang['tocminheads'] = 'Минимален брой заглавия, определящ дали съдържанието е създадено';
-$lang['maxtoclevel'] = 'Максимално ниво на съдържанието';
-$lang['maxseclevel'] = 'Максимално ниво за редактиране на секция';
+$lang['toptoclevel'] = 'Главно ниво (заглавие) за съдържанието';
+$lang['tocminheads'] = 'Минимален брой заглавия, определящ дали да бъде създадено съдържание';
+$lang['maxtoclevel'] = 'Максимален брой нива (заглавия) за включване в съдържанието';
+$lang['maxseclevel'] = 'Максимален брой нива предоставяни за самостоятелно редактиране';
$lang['camelcase'] = 'Ползване на CamelCase за линкове';
$lang['deaccent'] = 'Почистване имената на страниците (на файловете)';
$lang['useheading'] = 'Ползване на първото заглавие за име на страница';
-$lang['refcheck'] = 'Проверка за препратка на медия';
+$lang['refcheck'] = 'Проверка за препратка към медия, преди да бъде изтрита';
$lang['refshow'] = 'Брой на показваните медийни препратки';
-$lang['allowdebug'] = 'Включване на debug <b>изключете, ако не е нужен!</b>';
+$lang['allowdebug'] = 'Включване на режи debug - <b>изключете, ако не е нужен!</b>';
$lang['usewordblock'] = 'Блокиране на SPAM въз основа на на списък от думи';
$lang['indexdelay'] = 'Забавяне преди индексиране (сек)';
$lang['relnofollow'] = 'Ползване на rel="nofollow" за външни препратки';
$lang['mailguard'] = 'Промяна на адресите на ел. поща (във форма непозволяваща пращането на SPAM)';
-$lang['iexssprotect'] = 'Проверяване на качените файлове за възможно зловреден JavaScript и HTML код';
+$lang['iexssprotect'] = 'Проверяване на качените файлове за вероятен зловреден JavaScript и HTML код';
$lang['showuseras'] = 'Какво да се показва за потребителя, който последно е променил страницата';
$lang['useacl'] = 'Ползване на списъци за достъп';
-$lang['autopasswd'] = 'Автоматично генериране на пароли';
+$lang['autopasswd'] = 'Автоматично генериране на пароли, на нови потребители и пращане по пощата';
$lang['authtype'] = 'Метод за удостоверяване';
$lang['passcrypt'] = 'Метод за криптиране на паролите';
$lang['defaultgroup'] = 'Стандартна група';
-$lang['superuser'] = 'Супер потребител - група или потребител с пълен достъп до всички страници и функции без значение от настройките на списъците за достъп (ACL)';
-$lang['manager'] = 'Управител - група или потребител, с достъп до определени управляващи фунции ';
+$lang['superuser'] = 'Супер потребител - група, потребител или списък със стойности разделени чрез запетая (user1,@group1,user2) с пълен достъп до всички страници и функции без значение от настройките на списъците за достъп (ACL)';
+$lang['manager'] = 'Управител - група, потребител или списък със стойности разделени чрез запетая (user1,@group1,user2) с достъп до определени управленски функции ';
$lang['profileconfirm'] = 'Потвърждаване на промени в профила с парола';
-$lang['disableactions'] = 'Изключване на DokuWiki функции';
+$lang['disableactions'] = 'Изключване функции на DokuWiki';
$lang['disableactions_check'] = 'Проверка';
-$lang['disableactions_subscription'] = 'Записване/Отписване';
+$lang['disableactions_subscription'] = 'Абониране/Отписване';
$lang['disableactions_wikicode'] = 'Преглед на кода/Експортиране на оригинална версия';
$lang['disableactions_other'] = 'Други действия (разделени със запетая)';
$lang['sneaky_index'] = 'Стандартно DokuWiki ще показва всички именни пространства в индекса. Опцията скрива тези, за които потребителят няма права за четене. Това може да доведе и до скриване на иначе достъпни подименни пространства. С определени настройки на списъците за контрол на достъпа (ACL) може да направи индекса неизползваем. ';
@@ -94,24 +95,25 @@ $lang['userewrite'] = 'Ползване на nice URL адреси';
$lang['useslash'] = 'Ползване на наклонена черта за разделител на именните пространства в URL';
$lang['usedraft'] = 'Автоматично запазване на чернова по време на редактиране';
$lang['sepchar'] = 'Разделител между думите в имената на страници';
-$lang['canonical'] = 'Ползване на напълно уеднаквени URL адреси';
+$lang['canonical'] = 'Ползване на напълно уеднаквени URL адреси (абсолютни адреси - http://server/path)';
$lang['fnencode'] = 'Метод за кодиране на не-ASCII именуваните файлове.';
$lang['autoplural'] = 'Проверяване за множествено число в препратките';
$lang['compression'] = 'Метод за компресия на attic файлове';
$lang['cachetime'] = 'Макс. период за съхраняване на кеша (сек)';
$lang['locktime'] = 'Макс. период за съхраняване на заключените файлове (сек)';
$lang['fetchsize'] = 'Максимален размер (байтове), който fetch.php може да сваля';
-$lang['notify'] = 'Пращане на съобщения за промени на тази eл. поща';
-$lang['registernotify'] = 'Пращане информация за нови потребители на тази ел. поща';
+$lang['notify'] = 'Пращане на съобщения за промени по страниците на следната eл. поща';
+$lang['registernotify'] = 'Пращане на информация за нови потребители на следната ел. поща';
$lang['mailfrom'] = 'Ел. поща, която да се ползва за автоматично изпращане на ел. писма';
$lang['mailprefix'] = 'Представка за темите (поле subject) на автоматично изпращаните ел. писма';
$lang['gzip_output'] = 'Кодиране на съдържанието с gzip за xhtml';
$lang['gdlib'] = 'Версия на GD Lib';
$lang['im_convert'] = 'Път до инструмента за трансформация на ImageMagick';
-$lang['jpg_quality'] = 'Kачество на JPG компресията (0-100)';
+$lang['jpg_quality'] = 'Качество на JPG компресията (0-100)';
$lang['subscribers'] = 'Включване на поддръжката за абониране към страници';
$lang['subscribe_time'] = 'Време след което абонаментните списъци и обобщения се изпращат (сек); Трябва да е по-малко от времето определено в recent_days.';
$lang['compress'] = 'Компактен CSS и javascript изглед';
+$lang['cssdatauri'] = 'Максимален размер, в байтове, до който изображенията посочени в .CSS файл ще бъдат вграждани в стила (stylesheet), за да се намали броя на HTTP заявките. Техниката не работи за версиите на IE преди 8! Препоръчителни стойности: <code>400</code> до <code>600</code> байта. Въведете <code>0</code> за изключване.';
$lang['hidepages'] = 'Скриване на съвпадащите страници (regular expressions)';
$lang['send404'] = 'Пращане на "HTTP 404/Page Not Found" за несъществуващи страници';
$lang['sitemap'] = 'Генериране на Google sitemap (дни)';
@@ -120,7 +122,7 @@ $lang['xsendfile'] = 'Ползване на Х-Sendfile header, за
$lang['renderer_xhtml'] = 'Представяне на основните изходни данни (xhtml) от wiki-то с';
$lang['renderer__core'] = '%s (ядрото на DokuWiki)';
$lang['renderer__plugin'] = '%s (приставка)';
-$lang['rememberme'] = 'Ползване на постоянни бисквитки за вписване (запомни ме)';
+$lang['rememberme'] = 'Ползване на постоянни бисквитки за вписване (за функцията "Запомни ме")';
$lang['rss_type'] = 'Тип на XML емисията';
$lang['rss_linkto'] = 'XML емисията препраща към';
$lang['rss_content'] = 'Какво да показват елементите на XML емисията?';
@@ -143,7 +145,7 @@ $lang['ftp____host'] = 'FTP сървър за хака safemode';
$lang['ftp____port'] = 'FTP порт за хака safemode';
$lang['ftp____user'] = 'FTP потребител за хака safemode';
$lang['ftp____pass'] = 'FTP парола за хака safemode';
-$lang['ftp____root'] = 'FTP главна директория хака safemode';
+$lang['ftp____root'] = 'FTP главна директория за хака safemode';
$lang['license_o_'] = 'Нищо не е избрано';
$lang['typography_o_0'] = 'без';
$lang['typography_o_1'] = 'с изключение на единични кавички';
@@ -179,8 +181,8 @@ $lang['xsendfile_o_2'] = 'Стандартен X-Sendfile header';
$lang['xsendfile_o_3'] = 'Специфичен Nginx X-Accel-Redirect header за пренасочване';
$lang['showuseras_o_loginname'] = 'Име за вписване';
$lang['showuseras_o_username'] = 'Пълно потребителско име';
-$lang['showuseras_o_email'] = 'Ел, поща на потребителите (променени според настройките на mailguard)';
-$lang['showuseras_o_email_link'] = 'Ел. поща на потребителите под формата на mailto: връзки';
+$lang['showuseras_o_email'] = 'Ел, поща (променени според настройките на mailguard)';
+$lang['showuseras_o_email_link'] = 'Ел. поща под формата на връзка тип mailto:';
$lang['useheading_o_0'] = 'Никога';
$lang['useheading_o_navigation'] = 'Само за навигация';
$lang['useheading_o_content'] = 'Само за съдържанието на Wiki-то';
diff --git a/lib/plugins/config/lang/de-informal/lang.php b/lib/plugins/config/lang/de-informal/lang.php
index ab7f59eac..1de388214 100644
--- a/lib/plugins/config/lang/de-informal/lang.php
+++ b/lib/plugins/config/lang/de-informal/lang.php
@@ -7,6 +7,7 @@
* @author Marcel Metz <marcel_metz@gmx.de>
* @author Matthias Schulte <post@lupo49.de>
* @author Christian Wichmann <nospam@zone0.de>
+ * @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['menu'] = 'Einstellungen';
$lang['error'] = 'Einstellungen wurden nicht aktualisiert auf Grund eines ungültigen Wertes. Bitte überprüfe deine Änderungen und versuche es erneut.<br />Die/der ungültige(n) Wert(e) werden durch eine rote Umrandung hervorgehoben.';
@@ -41,6 +42,7 @@ $lang['lang'] = 'Sprache';
$lang['basedir'] = 'Installationsverzeichnis';
$lang['baseurl'] = 'Installationspfad (URL)';
$lang['savedir'] = 'Ordner zum Speichern von Daten';
+$lang['cookiedir'] = 'Cookie Pfad. Leer lassen, um die Standard-Url zu belassen.';
$lang['start'] = 'Name der Startseite';
$lang['title'] = 'Wiki Titel';
$lang['template'] = 'Vorlage';
@@ -111,9 +113,10 @@ $lang['jpg_quality'] = 'JPEG Kompressionsqualität (0-100)';
$lang['subscribers'] = 'E-Mail-Abos zulassen';
$lang['subscribe_time'] = 'Zeit nach der Zusammenfassungs- und Änderungslisten-E-Mails verschickt werden; Dieser Wert sollte kleiner als die in recent_days konfigurierte Zeit sein.';
$lang['compress'] = 'JavaScript und Stylesheets komprimieren';
+$lang['cssdatauri'] = 'Größe in Bytes, bis zu der Bilder in css-Dateien referenziert werden können, um HTTP-Anfragen zu minimieren. Diese Technik funktioniert nicht im IE 7 und älter! <code>400</code> bis <code>600</code> Bytes sind gute Werte. Setze <code>0</code> für inaktive Funktion.';
$lang['hidepages'] = 'Seiten verstecken (Regulärer Ausdruck)';
$lang['send404'] = 'Sende "HTTP 404/Seite nicht gefunden" für nicht existierende Seiten';
-$lang['sitemap'] = 'Erzeugte Google Sitemaps (Tage)';
+$lang['sitemap'] = 'Erzeuge Google Sitemaps (Tage)';
$lang['broken_iua'] = 'Falls die Funktion ignore_user_abort auf deinem System nicht funktioniert, könnte der Such-Index nicht funktionieren. IIS+PHP/CGI ist bekannt dafür. Siehe auch <a href="http://bugs.splitbrain.org/?do=details&amp;task_id=852">Bug 852</a>.';
$lang['xsendfile'] = 'Den X-Sendfile-Header nutzen, um Dateien direkt vom Webserver ausliefern zu lassen? Dein Webserver muss dies unterstützen!';
$lang['renderer_xhtml'] = 'Standard-Renderer für die normale (XHTML) Wiki-Ausgabe.';
diff --git a/lib/plugins/config/lang/de/lang.php b/lib/plugins/config/lang/de/lang.php
index cf9dca13a..09e3f76f9 100644
--- a/lib/plugins/config/lang/de/lang.php
+++ b/lib/plugins/config/lang/de/lang.php
@@ -15,6 +15,8 @@
* @author Robert Bogenschneider <robog@gmx.de>
* @author Niels Lange <niels@boldencursief.nl>
* @author Christian Wichmann <nospam@zone0.de>
+ * @author Paul Lachewsky <kaeptn.haddock@gmail.com>
+ * @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['menu'] = 'Konfiguration';
$lang['error'] = 'Die Einstellungen wurden wegen einer fehlerhaften Eingabe nicht gespeichert.
@@ -51,6 +53,7 @@ $lang['lang'] = 'Sprache';
$lang['basedir'] = 'Installationsverzeichnis';
$lang['baseurl'] = 'Installationspfad (URL)';
$lang['savedir'] = 'Speicherverzeichnis';
+$lang['cookiedir'] = 'Cookiepfad. Frei lassen, um den gleichen Pfad wie "baseurl" zu benutzen.';
$lang['start'] = 'Startseitenname';
$lang['title'] = 'Titel des Wikis';
$lang['template'] = 'Designvorlage (Template)';
@@ -121,6 +124,13 @@ $lang['jpg_quality'] = 'JPEG Kompressionsqualität (0-100)';
$lang['subscribers'] = 'E-Mail-Abos zulassen';
$lang['subscribe_time'] = 'Zeit nach der Zusammenfassungs- und Änderungslisten-E-Mails verschickt werden; Dieser Wert sollte kleiner als die in recent_days konfigurierte Zeit sein.';
$lang['compress'] = 'JavaScript und Stylesheets komprimieren';
+$lang['cssdatauri'] = 'Oberer Grenzwert in Bytes für Dateigrössen. Im CSS referenzierte Bilddateien unter diesem Grenzwert werden direkt ins Stylesheet eingebettet um den "HTTP request header overload" zu reduzieren.
+Diese Technik funktioniert nicht im Internet Explorer 7 und älter!
+
+Empfohlene Einstellung: <code>400</code> to <code>600</code> Bytes.
+Setzen Sie die Einstellung auf <code>0</code> um die Funktion zu deaktivieren.
+
+ ';
$lang['hidepages'] = 'Seiten verstecken (Regulärer Ausdruck)';
$lang['send404'] = 'Bei nicht vorhandenen Seiten mit 404 Fehlercode antworten';
$lang['sitemap'] = 'Google Sitemap erzeugen (Tage)';
diff --git a/lib/plugins/config/lang/el/lang.php b/lib/plugins/config/lang/el/lang.php
index ed7af0ff4..9f5d121de 100644
--- a/lib/plugins/config/lang/el/lang.php
+++ b/lib/plugins/config/lang/el/lang.php
@@ -11,6 +11,7 @@
* @author Αθανάσιος Νταής <homunculus@wana.gr>
* @author Konstantinos Koryllos <koryllos@gmail.com>
* @author George Petsagourakis <petsagouris@gmail.com>
+ * @author Petros Vidalis <pvidalis@gmail.com>
*/
$lang['menu'] = 'Ρυθμίσεις';
$lang['error'] = 'Οι ρυθμίσεις σας δεν έγιναν δεκτές λόγω λανθασμένης τιμής κάποιας ρύθμισης. Διορθώστε την λάθος τιμή και προσπαθήστε ξανά.
@@ -46,6 +47,7 @@ $lang['lang'] = 'Γλώσσα';
$lang['basedir'] = 'Αρχικός Φάκελος';
$lang['baseurl'] = 'Αρχικό URL';
$lang['savedir'] = 'Φάκελος για την αποθήκευση δεδομένων';
+$lang['cookiedir'] = 'Διαδρομή cookie. Αφήστε την κενή για την χρησιμοποίηση της αρχικής URL.';
$lang['start'] = 'Ονομασία αρχικής σελίδας';
$lang['title'] = 'Τίτλος Wiki';
$lang['template'] = 'Πρότυπο προβολής';
@@ -116,6 +118,7 @@ $lang['jpg_quality'] = 'Ποιότητα συμπίεσης JPG (0-100
$lang['subscribers'] = 'Να επιτρέπεται η εγγραφή στην ενημέρωση αλλαγών σελίδας';
$lang['subscribe_time'] = 'Χρόνος μετά τον οποίο οι λίστες ειδοποιήσεων και τα συνοπτικά θα αποστέλλονται (δευτερόλεπτα). Αυτό θα πρέπει να είναι μικρότερο από τον χρόνο που έχει η ρύθμιση recent_days.';
$lang['compress'] = 'Συμπίεση αρχείων CSS και javascript';
+$lang['cssdatauri'] = 'Το μέγεθος σε bytes στο οποίο οι εικόνες που αναφέρονται σε CSS αρχεία θα πρέπει να είναι ενσωματωμένες για τη μείωση των απαιτήσεων μιας κεφαλίδας αίτησης HTTP . Αυτή η τεχνική δεν θα λειτουργήσει σε IE <8! <code> 400 </ code> με <code> 600 </ code> bytes είναι μια καλή τιμή. Ορίστε την τιμή <code> 0 </ code> για να το απενεργοποιήσετε.';
$lang['hidepages'] = 'Φίλτρο απόκρυψης σελίδων (regular expressions)';
$lang['send404'] = 'Αποστολή "HTTP 404/Page Not Found" για σελίδες που δεν υπάρχουν';
$lang['sitemap'] = 'Δημιουργία Google sitemap (ημέρες)';
diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php
index 9b7c643bf..380f2fd1d 100644
--- a/lib/plugins/config/lang/en/lang.php
+++ b/lib/plugins/config/lang/en/lang.php
@@ -58,6 +58,7 @@ $lang['lang'] = 'Interface language';
$lang['basedir'] = 'Server path (eg. <code>/dokuwiki/</code>). Leave blank for autodetection.';
$lang['baseurl'] = 'Server URL (eg. <code>http://www.yourserver.com</code>). Leave blank for autodetection.';
$lang['savedir'] = 'Directory for saving data';
+$lang['cookiedir'] = 'Cookie path. Leave blank for using baseurl.';
$lang['start'] = 'Start page name';
$lang['title'] = 'Wiki title';
$lang['template'] = 'Template';
@@ -133,6 +134,7 @@ $lang['jpg_quality'] = 'JPG compression quality (0-100)';
$lang['subscribers'] = 'Enable page subscription support';
$lang['subscribe_time'] = 'Time after which subscription lists and digests are sent (sec); This should be smaller than the time specified in recent_days.';
$lang['compress'] = 'Compact CSS and javascript output';
+$lang['cssdatauri'] = 'Size in bytes up to which images referenced in CSS files should be embedded right into the stylesheet to reduce HTTP request header overhead. This technique won\'t work in IE 7 and below! <code>400</code> to <code>600</code> bytes is a good value. Set <code>0</code> to disable.';
$lang['hidepages'] = 'Hide matching pages (regular expressions)';
$lang['send404'] = 'Send "HTTP 404/Page Not Found" for non existing pages';
$lang['sitemap'] = 'Generate Google sitemap (days)';
diff --git a/lib/plugins/config/lang/eo/lang.php b/lib/plugins/config/lang/eo/lang.php
index 8a9ee3840..ca98ca319 100644
--- a/lib/plugins/config/lang/eo/lang.php
+++ b/lib/plugins/config/lang/eo/lang.php
@@ -11,6 +11,7 @@
* @author Erik Pedersen <erik.pedersen@shaw.ca>
* @author Robert Bogenschneider <robog@GMX.de>
* @author Robert BOGENSCHNEIDER <robog@gmx.de>
+ * @author Robert BOGENSCHNEIDER <bogi@UEA.org>
*/
$lang['menu'] = 'Agordaj Difinoj';
$lang['error'] = 'La difinoj ne estas ĝisdatigitaj pro malvalida valoro: kompleze reviziu viajn ŝanĝojn kaj resubmetu ilin.
@@ -46,6 +47,7 @@ $lang['lang'] = 'Lingvo';
$lang['basedir'] = 'Baza dosierujo';
$lang['baseurl'] = 'Baza URL';
$lang['savedir'] = 'Dosierujo por konservi datenaron';
+$lang['cookiedir'] = 'KUketopado. Lasu malplena por uzi baseurl.';
$lang['start'] = 'Nomo de la hejmpaĝo';
$lang['title'] = 'Titolo de la vikio';
$lang['template'] = 'Ŝablono';
@@ -116,6 +118,8 @@ $lang['jpg_quality'] = 'Kompaktiga kvalito de JPG (0-100)';
$lang['subscribers'] = 'Ebligi subtenon de avizoj pri ŝanĝoj sur paĝoj';
$lang['subscribe_time'] = 'Tempo, post kiu abonlistoj kaj kolektaĵoj sendiĝas (sek); Tio estu pli malgranda ol la tempo indikita en recent_days.';
$lang['compress'] = 'Kompaktigi CSS-ajn kaj ĵavaskriptajn elmetojn';
+$lang['cssdatauri'] = 'Grandeco en bitokoj, ĝis kiom en CSS-dosieroj referencitaj bildoj estu enmetataj rekte en la stilfolion por malgrandigi vanan HTTP-kapan trafikon. Tiu tekniko ne funkcias en IE < 8!
+<code>400</code> ĝis <code>600</code> bitokoj estas bona grandeco. Indiku <code>0</code> por malebligi enmeton.';
$lang['hidepages'] = 'Kaŝi kongruantajn paĝojn (laŭ regulaj esprimoj)';
$lang['send404'] = 'Sendi la mesaĝon "HTTP 404/Ne Trovita Paĝo" por ne ekzistantaj paĝoj';
$lang['sitemap'] = 'Krei Guglan paĝarmapon "sitemap" (po kiom tagoj)';
diff --git a/lib/plugins/config/lang/es/lang.php b/lib/plugins/config/lang/es/lang.php
index 5355d64ad..1189a6781 100644
--- a/lib/plugins/config/lang/es/lang.php
+++ b/lib/plugins/config/lang/es/lang.php
@@ -20,6 +20,8 @@
* @author Victor Castelan <victorcastelan@gmail.com>
* @author Mauro Javier Giamberardino <mgiamberardino@gmail.com>
* @author emezeta <emezeta@infoprimo.com>
+ * @author Oscar Ciudad <oscar@jacho.net>
+ * @author Ruben Figols <ruben.figols@gmail.com>
*/
$lang['menu'] = 'Parámetros de configuración';
$lang['error'] = 'Los parámetros no han sido actualizados a causa de un valor inválido, por favor revise los cambios y re-envíe el formulario. <br /> Los valores incorrectos se mostrarán con un marco rojo alrededor.';
@@ -54,6 +56,7 @@ $lang['lang'] = 'Idioma';
$lang['basedir'] = 'Directorio de base';
$lang['baseurl'] = 'URL de base';
$lang['savedir'] = 'Directorio para guardar los datos';
+$lang['cookiedir'] = 'Ruta para las Cookie. Dejar en blanco para usar la ruta básica.';
$lang['start'] = 'Nombre de la página inicial';
$lang['title'] = 'Título del wiki';
$lang['template'] = 'Plantilla';
@@ -124,6 +127,7 @@ $lang['jpg_quality'] = 'Calidad de compresión de JPG (0-100)';
$lang['subscribers'] = 'Habilitar soporte para suscripción a páginas';
$lang['subscribe_time'] = 'Tiempo después que alguna lista de suscripción fue enviada (seg); Debe ser menor que el tiempo especificado en días recientes.';
$lang['compress'] = 'Compactar la salida de CSS y javascript';
+$lang['cssdatauri'] = 'Tamaño en bytes hasta el cual las imágenes referenciadas en archivos CSS deberían ir incrustadas en la hoja de estilos para reducir el número de cabeceras de petición HTTP. ¡Esta técnica no funcionará en IE < 8! De <code>400</code> a <code>600</code> bytes es un valor adecuado. Establezca <code>0</code> para deshabilitarlo.';
$lang['hidepages'] = 'Ocultar páginas con coincidencias (expresiones regulares)';
$lang['send404'] = 'Enviar "HTTP 404/Page Not Found" para páginas no existentes';
$lang['sitemap'] = 'Generar sitemap de Google (días)';
diff --git a/lib/plugins/config/lang/et/lang.php b/lib/plugins/config/lang/et/lang.php
index 0ffea1244..27f2e87ac 100644
--- a/lib/plugins/config/lang/et/lang.php
+++ b/lib/plugins/config/lang/et/lang.php
@@ -3,4 +3,30 @@
* Estonian language file
*
* @author kristian.kankainen@kuu.la
+ * @author Rivo Zängov <eraser@eraser.ee>
*/
+$lang['menu'] = 'Seadete haldamine';
+$lang['_configuration_manager'] = 'Seadete haldamine';
+$lang['_basic'] = 'Peamised seaded';
+$lang['_display'] = 'Näitamise seaded';
+$lang['_authentication'] = 'Audentimise seaded';
+$lang['_anti_spam'] = 'Spämmitõrje seaded';
+$lang['_editing'] = 'Muutmise seaded';
+$lang['_links'] = 'Lingi seaded';
+$lang['_media'] = 'Meedia seaded';
+$lang['_advanced'] = 'Laiendatud seaded';
+$lang['_network'] = 'Võrgu seaded';
+$lang['_plugin_sufix'] = 'Plugina seaded';
+$lang['_template_sufix'] = 'Kujunduse seaded';
+$lang['title'] = 'Wiki pealkiri';
+$lang['template'] = 'Kujundus';
+$lang['recent'] = 'Viimased muudatused';
+$lang['signature'] = 'Allkiri';
+$lang['defaultgroup'] = 'Vaikimisi grupp';
+$lang['disableactions_check'] = 'Kontrolli';
+$lang['compression_o_0'] = 'pole';
+$lang['compression_o_gz'] = 'gzip';
+$lang['compression_o_bz2'] = 'bz2';
+$lang['xsendfile_o_0'] = 'ära kasuta';
+$lang['useheading_o_0'] = 'Mitte kunagi';
+$lang['useheading_o_1'] = 'Alati';
diff --git a/lib/plugins/config/lang/fa/lang.php b/lib/plugins/config/lang/fa/lang.php
index 30c325872..42cc3ed05 100644
--- a/lib/plugins/config/lang/fa/lang.php
+++ b/lib/plugins/config/lang/fa/lang.php
@@ -103,12 +103,13 @@ $lang['fetchsize'] = 'بیشینه‌ی حجمی که فایل fetch
$lang['notify'] = 'تغییرات به این ایمیل ارسال شود';
$lang['registernotify'] = 'اطلاعات کاربران تازه وارد به این ایمیل ارسال شود';
$lang['mailfrom'] = 'آدرس ایمیلی که برای ایمیل‌های خودکار استفاده می‌شود';
-$lang['mailprefix'] = 'پیشوند عنوان رای‌نامه، برای رای‌نامه‌های خودکار';
+$lang['mailprefix'] = 'پیشوند تیتر ایمیل (جهت ایمیل های خودکار)';
$lang['gzip_output'] = 'استفاده از gzip برای xhtmlها';
$lang['gdlib'] = 'نگارش کتاب‌خانه‌ی GD';
$lang['im_convert'] = 'مسیر ابزار convert از برنامه‌ی ImageMagick';
$lang['jpg_quality'] = 'کیفیت فشرده سازی JPEG (از 0 تا 100)';
$lang['subscribers'] = 'توانایی عضویت در صفحات باشد';
+$lang['subscribe_time'] = 'زمان مورد نیاز برای ارسال خبر نامه ها (ثانیه); این مقدار می بایست کمتر زمانی باشد که در recent_days تعریف شده است.';
$lang['compress'] = 'فشرده‌سازی کد‌های CSS و JavaScript';
$lang['hidepages'] = 'مخفی کردن صفحات با فرمت زیر (از عبارات منظم استفاده شود)';
$lang['send404'] = 'ارسال «HTTP 404/Page Not Found» برای صفحاتی که وجود ندارند';
diff --git a/lib/plugins/config/lang/fi/lang.php b/lib/plugins/config/lang/fi/lang.php
index c3434c1f3..9598a0d93 100644
--- a/lib/plugins/config/lang/fi/lang.php
+++ b/lib/plugins/config/lang/fi/lang.php
@@ -5,6 +5,7 @@
* @author otto@valjakko.net
* @author Otto Vainio <otto@valjakko.net>
* @author Teemu Mattila <ghcsystems@gmail.com>
+ * @author Sami Olmari <sami@olmari.fi>
*/
$lang['menu'] = 'Asetukset';
$lang['error'] = 'Asetuksia ei päivitetty väärän arvon vuoksi. Tarkista muutokset ja lähetä sivu uudestaan.
@@ -41,6 +42,7 @@ $lang['lang'] = 'Kieli';
$lang['basedir'] = 'Perushakemisto';
$lang['baseurl'] = 'Perus URL';
$lang['savedir'] = 'Hakemisto tietojen tallennukseen.';
+$lang['cookiedir'] = 'Cookien path. Jätä tyhjäksi käyttääksesi baseurl arvoa';
$lang['start'] = 'Alkusivun nimi';
$lang['title'] = 'Wikin nimi';
$lang['template'] = 'Sivumalli';
@@ -111,6 +113,7 @@ $lang['jpg_quality'] = 'JPG pakkauslaatu (0-100)';
$lang['subscribers'] = 'Salli tuki sivujen tilaamiselle';
$lang['subscribe_time'] = 'Aika jonka jälkeen tilauslinkit ja yhteenveto lähetetään (sek). Tämän pitäisi olla pienempi, kuin recent_days aika.';
$lang['compress'] = 'Pakkaa CSS ja javascript';
+$lang['cssdatauri'] = 'Maksimikoko tavuina jossa kuvat joihin viitataan CSS-tiedostoista olisi sisällytettynä suoraan tyylitiedostoon jotta HTTP-kyselyjen kaistaa saataisiin kutistettua. Tämä tekniikka ei toimi IE versiossa aikasempi kuin 8! <code>400:sta</code> <code>600:aan</code> tavua on hyvä arvo. Aseta <code>0</code> kytkeäksesi ominaisuuden pois.';
$lang['hidepages'] = 'Piilota seuraavat sivut (säännönmukainen lauseke)';
$lang['send404'] = 'Lähetä "HTTP 404/Page Not Found" puuttuvista sivuista';
$lang['sitemap'] = 'Luo Google sitemap (päiviä)';
diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php
index 39a665da0..8f669a629 100644
--- a/lib/plugins/config/lang/fr/lang.php
+++ b/lib/plugins/config/lang/fr/lang.php
@@ -3,10 +3,9 @@
* french language file
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- * @author Guy Brand <gb@isis.u-strasbg.fr>
+ * @author Guy Brand <gb@unistra.fr>
* @author Delassaux Julien <julien@delassaux.fr>
* @author Maurice A. LeBlanc <leblancma@cooptel.qc.ca>
- * @author gb@isis.u-strasbg.fr
* @author stephane.gully@gmail.com
* @author Guillaume Turri <guillaume.turri@gmail.com>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
@@ -16,6 +15,7 @@
* @author Florian Gaub <floriang@floriang.net>
* @author Samuel Dorsaz samuel.dorsaz@novelion.net
* @author Johan Guilbaud <guilbaud.johan@gmail.com>
+ * @author schplurtz@laposte.net
*/
$lang['menu'] = 'Paramètres de configuration';
$lang['error'] = 'Paramètres non modifiés en raison d\'une valeur non valide, vérifiez vos réglages et réessayez. <br />Les valeurs erronées sont entourées d\'une bordure rouge.';
@@ -50,6 +50,7 @@ $lang['lang'] = 'Langue';
$lang['basedir'] = 'Répertoire de base (ex. : <code>/dokuwiki/</code>). Laisser vide pour une détection automatique.';
$lang['baseurl'] = 'URL de base. Laisser vide pour une détection automatique.';
$lang['savedir'] = 'Répertoire de stockage';
+$lang['cookiedir'] = 'Chemin des cookies. Laissez vide pour utiliser l\'URL de base.';
$lang['start'] = 'Nom de la page d\'accueil';
$lang['title'] = 'Titre du wiki';
$lang['template'] = 'Modèle';
@@ -120,6 +121,7 @@ $lang['jpg_quality'] = 'Qualité de la compression JPEG (0-100)';
$lang['subscribers'] = 'Activer l\'abonnement aux pages';
$lang['subscribe_time'] = 'Délai après lequel les listes d\'abonnement et résumés sont envoyés (en secondes). Devrait être plus petit que le délai précisé dans recent_days.';
$lang['compress'] = 'Compresser CSS et JavaScript';
+$lang['cssdatauri'] = 'Taille maximale en octets pour inclure dans les feuilles de styles CSS, les images qui y sont référencées. Cette technique minimise les requêtes HTTP. Pour IE, ceci ne fonctionne qu\'à partir de la version 8 ! Valeurs correctes entre <code>400</code> et <code>600</code>. <code>0</code> pour désactiver.';
$lang['hidepages'] = 'Cacher les pages correspondant à (expression régulière)';
$lang['send404'] = 'Renvoyer "HTTP 404/Page Non Trouvée" pour les pages introuvables';
$lang['sitemap'] = 'Fréquence de génération une carte Google du site (en jours)';
diff --git a/lib/plugins/config/lang/hr/lang.php b/lib/plugins/config/lang/hr/lang.php
index d2094b77b..96f1d6afe 100644
--- a/lib/plugins/config/lang/hr/lang.php
+++ b/lib/plugins/config/lang/hr/lang.php
@@ -4,4 +4,5 @@
*
* @author Branko Rihtman <theney@gmail.com>
* @author Dražen Odobašić <dodobasic@gmail.com>
+ * @author Dejan Igrec dejan.igrec@gmail.com
*/
diff --git a/lib/plugins/config/lang/hu/lang.php b/lib/plugins/config/lang/hu/lang.php
index 59cf7a8bf..f991b7c95 100644
--- a/lib/plugins/config/lang/hu/lang.php
+++ b/lib/plugins/config/lang/hu/lang.php
@@ -7,6 +7,7 @@
* @author schilling.janos@gmail.com
* @author Szabó Dávid <szabo.david@gyumolcstarhely.hu>
* @author Sándor TIHANYI <stihanyi+dw@gmail.com>
+ * @author David Szabo <szabo.david@gyumolcstarhely.hu>
*/
$lang['menu'] = 'Beállító Központ';
$lang['error'] = 'Helytelen érték miatt a módosítások nem mentődtek. Nézd át a módosításokat, és ments újra.
@@ -105,6 +106,7 @@ $lang['fetchsize'] = 'Maximális méret (bájtban), amit a fetch.php
$lang['notify'] = 'Az oldal-változásokat erre az e-mail címre küldje';
$lang['registernotify'] = 'Értesítés egy újonnan regisztrált felhasználóról erre az e-mail címre';
$lang['mailfrom'] = 'Az automatikusan küldött levelekben használt e-mail cím';
+$lang['mailprefix'] = 'Előtag az automatikus e-mailek tárgyában';
$lang['gzip_output'] = 'gzip tömörítés használata xhtml-hez (Content-Encoding)';
$lang['gdlib'] = 'GD Lib verzió';
$lang['im_convert'] = 'Útvonal az ImageMagick csomag convert parancsához';
diff --git a/lib/plugins/config/lang/kk/lang.php b/lib/plugins/config/lang/kk/lang.php
new file mode 100644
index 000000000..dde5b9577
--- /dev/null
+++ b/lib/plugins/config/lang/kk/lang.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * kazakh language file
+ *
+ * @author Nurgozha Kaliaskarov astana08@gmail.com
+ */
diff --git a/lib/plugins/config/lang/nl/lang.php b/lib/plugins/config/lang/nl/lang.php
index bf1ce46c1..f6574ee2c 100644
--- a/lib/plugins/config/lang/nl/lang.php
+++ b/lib/plugins/config/lang/nl/lang.php
@@ -13,6 +13,7 @@
* @author Matthias Carchon webmaster@c-mattic.be
* @author Marijn Hofstra <hofstra.m@gmail.com>
* @author Timon Van Overveldt <timonvo@gmail.com>
+ * @author Jeroen
*/
$lang['menu'] = 'Configuratie-instellingen';
$lang['error'] = 'De instellingen zijn niet gewijzigd wegens een incorrecte waarde, kijk je wijzigingen na en sla dan opnieuw op.<br />Je kunt de incorrecte waarde(s) herkennen aan de rode rand.';
@@ -47,6 +48,7 @@ $lang['lang'] = 'Taal';
$lang['basedir'] = 'Basisdirectory';
$lang['baseurl'] = 'Basis-URL';
$lang['savedir'] = 'Directory om data op te slaan';
+$lang['cookiedir'] = 'Cookie pad. Laat leeg om de basis URL te gebruiken.';
$lang['start'] = 'Naam startpagina';
$lang['title'] = 'Titel van de wiki';
$lang['template'] = 'Sjabloon';
diff --git a/lib/plugins/config/lang/no/lang.php b/lib/plugins/config/lang/no/lang.php
index 208d9b820..3c4890149 100644
--- a/lib/plugins/config/lang/no/lang.php
+++ b/lib/plugins/config/lang/no/lang.php
@@ -12,6 +12,8 @@
* @author Lisa Ditlefsen <lisa@vervesearch.com>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
* @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca>
+ * @author Rune Rasmussen syntaxerror.no@gmail.com
+ * @author Jon Bøe <jonmagneboe@hotmail.com>
*/
$lang['menu'] = 'Konfigurasjonsinnstillinger';
$lang['error'] = 'Innstillingene ble ikke oppdatert på grunn av en eller flere ugyldig verdier. Vennligst se gjennom endringene og prøv på nytt.
@@ -51,6 +53,7 @@ $lang['lang'] = 'Språk';
$lang['basedir'] = 'Grunnkatalog';
$lang['baseurl'] = 'Grunn-nettadresse';
$lang['savedir'] = 'Mappe for lagring av data';
+$lang['cookiedir'] = 'Sti for informasjonskapsler. La stå blankt for å bruke grunn-nettadressa.';
$lang['start'] = 'Sidenavn på forsiden';
$lang['title'] = 'Navn på Wikien';
$lang['template'] = 'Mal';
@@ -105,6 +108,7 @@ $lang['useslash'] = 'Bruk / som skilletegn mellom navnerom i URLer'
$lang['usedraft'] = 'Lagre kladd automatisk under redigering';
$lang['sepchar'] = 'Skilletegn mellom ord i sidenavn';
$lang['canonical'] = 'Bruk fulle URLer (i stedet for relative)';
+$lang['fnencode'] = 'Metode for å kode ikke-ASCII-filnavn';
$lang['autoplural'] = 'Se etter flertallsformer i lenker';
$lang['compression'] = 'Metode for komprimering av gamle filer';
$lang['cachetime'] = 'Maksimal alder på hurtiglager (sekunder)';
@@ -113,12 +117,15 @@ $lang['fetchsize'] = 'Maksimal størrelse (byter) fetch.php kan last
$lang['notify'] = 'Send meldinger om endringer denne e-postadressen';
$lang['registernotify'] = 'Send info om nylig registrerte brukere til denne e-postadressen';
$lang['mailfrom'] = 'Avsenderadresse for automatiske e-poster';
+$lang['mailprefix'] = 'Prefiks for emne i automatiske e-poster ';
$lang['gzip_output'] = 'Bruk gzip Content-Encoding for XHTML';
$lang['gdlib'] = 'Versjon av libGD';
$lang['im_convert'] = 'Sti til ImageMagicks konverteringsverktøy';
$lang['jpg_quality'] = 'JPEG-kvalitet (0-100)';
$lang['subscribers'] = 'Åpne for abonnement på endringer av en side';
+$lang['subscribe_time'] = 'Hvor lenge det skal gå mellom utsending av e-poster med endringer (i sekunder). Denne verdien bør være mindre enn verdien i recent_days.';
$lang['compress'] = 'Kompakt CSS og JavaScript';
+$lang['cssdatauri'] = 'Opp til denne størrelsen (i bytes) skal bilder som er vist til i CSS-filer kodes direkte inn i fila for å redusere antall HTTP-forespørsler. Denne teknikken fungerer ikke i IE < 8! Mellom <code>400</code> og <code>600</code> bytes er fornuftige verdier. Bruk <code>0</code> for å skru av funksjonen.';
$lang['hidepages'] = 'Skjul sider fra automatiske lister (regulære uttrykk)';
$lang['send404'] = 'Send "HTTP 404/Page Not Found" for ikke-eksisterende sider';
$lang['sitemap'] = 'Lag Google-sidekart (dager)';
@@ -144,6 +151,7 @@ $lang['proxy____port'] = 'Proxyport';
$lang['proxy____user'] = 'Brukernavn på proxyserver';
$lang['proxy____pass'] = 'Passord på proxyserver';
$lang['proxy____ssl'] = 'Bruk SSL for å koble til proxyserver';
+$lang['proxy____except'] = 'Regulært uttrykk for URLer som ikke trenger en proxy.';
$lang['safemodehack'] = 'Bruk safemode-hack';
$lang['ftp____host'] = 'FTP-server for safemode-hack';
$lang['ftp____port'] = 'FTP-port for safemode-hack';
@@ -191,3 +199,4 @@ $lang['useheading_o_0'] = 'Aldri';
$lang['useheading_o_navigation'] = 'Kun navigering';
$lang['useheading_o_content'] = 'Kun wiki-innhold';
$lang['useheading_o_1'] = 'Alltid';
+$lang['readdircache'] = 'Maksimal alder for mellomlagring av mappa med søkeindekser (sekunder)';
diff --git a/lib/plugins/config/lang/pl/lang.php b/lib/plugins/config/lang/pl/lang.php
index c051e9e13..6e94a2e3d 100644
--- a/lib/plugins/config/lang/pl/lang.php
+++ b/lib/plugins/config/lang/pl/lang.php
@@ -12,6 +12,7 @@
* @author Leszek Stachowski <shazarre@gmail.com>
* @author maros <dobrimaros@yahoo.pl>
* @author Grzegorz Widła <dzesdzes@gmail.com>
+ * @author Łukasz Chmaj <teachmeter@gmail.com>
*/
$lang['menu'] = 'Ustawienia';
$lang['error'] = 'Ustawienia nie zostały zapisane z powodu błędnych wartości, przejrzyj je i ponów próbę zapisu. <br/> Niepoprawne wartości są wyróżnione kolorem czerwonym.';
diff --git a/lib/plugins/config/lang/pt-br/lang.php b/lib/plugins/config/lang/pt-br/lang.php
index 9e5798e30..093e60ff8 100644
--- a/lib/plugins/config/lang/pt-br/lang.php
+++ b/lib/plugins/config/lang/pt-br/lang.php
@@ -15,6 +15,7 @@
* @author Luis Dantas <luisdantas@gmail.com>
* @author Sergio Motta sergio@cisne.com.br
* @author Isaias Masiero Filho <masiero@masiero.org>
+ * @author Balaco Baco <balacobaco@imap.cc>
*/
$lang['menu'] = 'Configurações do DokuWiki';
$lang['error'] = 'As configurações não foram atualizadas devido a um valor inválido. Por favor, reveja suas alterações e reenvie-as.<br />O(s) valor(es) incorreto(s) serão exibidos contornados por uma borda vermelha.';
@@ -51,6 +52,7 @@ $lang['lang'] = 'Idioma';
$lang['basedir'] = 'Diretório base';
$lang['baseurl'] = 'URL base';
$lang['savedir'] = 'Diretório para salvar os dados';
+$lang['cookiedir'] = 'Caminhos dos cookies. Deixe em branco para usar a url base.';
$lang['start'] = 'Nome da página inicial';
$lang['title'] = 'Título do wiki';
$lang['template'] = 'Modelo';
@@ -121,6 +123,7 @@ $lang['jpg_quality'] = 'Qualidade de compressão do JPG (0-100)';
$lang['subscribers'] = 'Habilitar o suporte ao monitoramento de páginas';
$lang['subscribe_time'] = 'Tempo de espera antes do envio das listas e mensagens de monitoramento (segundos); este tempo deve ser menor que o especificado no parâmetro recent_days';
$lang['compress'] = 'Compactar as saídas de CSS e JavaScript';
+$lang['cssdatauri'] = 'Tamanho máximo em bytes para o qual as imagens referenciadas em arquivos CSS devam ser incorporadas na folha de estilos (o arquivo CSS) para reduzir o custo dos pedidos HTTP. Essa técnica não funcionará na versões do IE < 8! Valores de <code>400</code> a <code>600</code> são bons. Defina o valor <code>0</code> para desativar.';
$lang['hidepages'] = 'Esconder páginas correspondentes (expressão regular)';
$lang['send404'] = 'Enviar "HTTP 404/Página não encontrada" para páginas não existentes';
$lang['sitemap'] = 'Gerar Google Sitemap (dias)';
diff --git a/lib/plugins/config/lang/pt/lang.php b/lib/plugins/config/lang/pt/lang.php
index 7f5eb9971..fe05bd281 100644
--- a/lib/plugins/config/lang/pt/lang.php
+++ b/lib/plugins/config/lang/pt/lang.php
@@ -112,6 +112,7 @@ $lang['jpg_quality'] = 'Compressão/Qualidade JPG (0-100)';
$lang['subscribers'] = 'Habilitar o suporte a subscrição de páginas ';
$lang['subscribe_time'] = 'Tempo após o qual as listas de subscrição e "digests" são enviados (seg.); Isto deve ser inferior ao tempo especificado em recent_days.';
$lang['compress'] = 'Compactar as saídas de CSS e JavaScript';
+$lang['cssdatauri'] = 'Tamanho em bytes até ao qual as imagens referenciadas em ficheiros CSS devem ser embutidas diretamente no CSS para reduzir a carga de pedidos HTTP extra. Esta técnica não funciona em IE 7 e abaixo! <code>400</code> a <code>600</code> bytes é um bom valor. Escolher <code>0</code> para desativar.';
$lang['hidepages'] = 'Esconder páginas correspondentes (expressões regulares)';
$lang['send404'] = 'Enviar "HTTP 404/Página não encontrada" para páginas não existentes';
$lang['sitemap'] = 'Gerar Sitemap Google (dias)';
diff --git a/lib/plugins/config/lang/ro/lang.php b/lib/plugins/config/lang/ro/lang.php
index 8ea923913..6b0a0e91a 100644
--- a/lib/plugins/config/lang/ro/lang.php
+++ b/lib/plugins/config/lang/ro/lang.php
@@ -8,6 +8,7 @@
* @author Emanuel-Emeric Andrași <n30@mandrivausers.ro>
* @author Emanuel-Emeric Andraşi <em.andrasi@mandrivausers.ro>
* @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro>
+ * @author Marius OLAR <olarmariusalex@gmail.com>
*/
$lang['menu'] = 'Setări de Configurare';
$lang['error'] = 'Setări nu au fost actualizate datorită unei valori incorecte; verificaţi modificările şi încercaţi din nou. <br /> Valorile incorecte vor apărea într-un chenar roşu.';
@@ -42,6 +43,7 @@ $lang['lang'] = 'Limbă';
$lang['basedir'] = 'Director bază';
$lang['baseurl'] = 'URL bază ';
$lang['savedir'] = 'Director pentru salvarea datelor';
+$lang['cookiedir'] = 'Cale Cookie. Lăsați gol pentru a utiliza baseurl.';
$lang['start'] = 'Numele paginii de start';
$lang['title'] = 'Titlul wiki';
$lang['template'] = 'Şablon';
@@ -112,6 +114,7 @@ $lang['jpg_quality'] = 'Calitatea compresiei JPG (0-100)';
$lang['subscribers'] = 'Activează suportul pentru subscrierea paginii';
$lang['subscribe_time'] = 'Timpul după care lista de abonare şi digestie sunt trimise (sec); Aceasta ar trebui să fie mai mic decât timpul specificat în recent_days.';
$lang['compress'] = 'Compactează codul CSS şi javascript produs';
+$lang['cssdatauri'] = 'Dimensiunea în octeți până la care imaginile regasite în fișierele CSS ar trebui să fie incluse direct în stylesheet pentru a reduce supraîncărcarea antetului cererii HTTP. Această tehnică nu va funcționa în IE < 8! <code>400</code> până la <code>600</code> octeți sunt suficienți. Introduceți <code>0</code> pentru a dezactiva această opțiune.';
$lang['hidepages'] = 'Ascunde paginile pereche (expresii regulate)';
$lang['send404'] = 'Trimite mesajul "HTTP 404/Page Not Found" pentru paginile inexistente';
$lang['sitemap'] = 'Generează Google sitemap (zile)';
diff --git a/lib/plugins/config/lang/sk/lang.php b/lib/plugins/config/lang/sk/lang.php
index 79f54dc4d..5a94c510e 100644
--- a/lib/plugins/config/lang/sk/lang.php
+++ b/lib/plugins/config/lang/sk/lang.php
@@ -37,9 +37,10 @@ $lang['_msg_setting_no_default'] = 'Žiadna predvolená hodnota.';
$lang['fmode'] = 'Spôsob vytvárania súborov';
$lang['dmode'] = 'Spôsob vytvárania adresárov';
$lang['lang'] = 'Jazyk';
-$lang['basedir'] = 'Základný adresár';
-$lang['baseurl'] = 'Základná URL';
+$lang['basedir'] = 'Hlavný adresár (napr. <code>/dokuwiki/</code>). Prázdna hodnota znamená použitie autodetekcie.';
+$lang['baseurl'] = 'Adresa servera (napr. <code>http://www.yourserver.com</code>). Prázdna hodnota znamená použitie autodetekcie.';
$lang['savedir'] = 'Adresár pre ukladanie dát';
+$lang['cookiedir'] = 'Cesta k cookies. Prázdna hodnota znamená použitie adresy servera.';
$lang['start'] = 'Názov štartovacej stránky';
$lang['title'] = 'Názov wiki';
$lang['template'] = 'Šablóna';
@@ -110,6 +111,7 @@ $lang['jpg_quality'] = 'Kvalita JPG kompresie (0-100)';
$lang['subscribers'] = 'Povoliť podporu informovania o zmenách stránky';
$lang['subscribe_time'] = 'Časový inteval, po uplynutí ktorého sú zasielané informácie o zmenách stránky alebo menného priestoru (sek); hodnota by mala byť menšia ako čas zadaný pri položke recent_days.';
$lang['compress'] = 'Komprimovať CSS a javascript výstup';
+$lang['cssdatauri'] = 'Veľkosť v bytoch, do ktorej by mali byť obrázky s odkazom v CSS vložené priamo do štýlu z dôvodu obmedzenia HTTP požiadaviek. Tento postup nefunguje v IE < 8! Vhodná hodnota je od <code>400</code> do <code>600</code> bytov. Hodnota <code>0</code> deaktivuje túto metódu.';
$lang['hidepages'] = 'Skryť zodpovedajúce stránky (regulárne výrazy)';
$lang['send404'] = 'Poslať "HTTP 404/Page Not Found" pre neexistujúce stránky';
$lang['sitemap'] = 'Generovať Google sitemap (dni)';
diff --git a/lib/plugins/config/lang/sv/lang.php b/lib/plugins/config/lang/sv/lang.php
index 25392057b..dfd93d37d 100644
--- a/lib/plugins/config/lang/sv/lang.php
+++ b/lib/plugins/config/lang/sv/lang.php
@@ -15,6 +15,7 @@
* @author Bogge Bogge <bogge@bogge.com>
* @author Peter Åström <eaustreum@gmail.com>
* @author Håkan Sandell <hakan.sandell@home.se>
+ * @author mikael@mallander.net
*/
$lang['menu'] = 'Hantera inställningar';
$lang['error'] = 'Inställningarna uppdaterades inte på grund av ett felaktigt värde. Titta igenom dina ändringar och försök sedan spara igen.
diff --git a/lib/plugins/config/lang/zh/lang.php b/lib/plugins/config/lang/zh/lang.php
index 0aeb977e7..7a7f0f504 100644
--- a/lib/plugins/config/lang/zh/lang.php
+++ b/lib/plugins/config/lang/zh/lang.php
@@ -13,6 +13,7 @@
* @author caii <zhoucaiqi@gmail.com>
* @author Hiphen Lee <jacob.b.leung@gmail.com>
* @author caii, patent agent in China <zhoucaiqi@gmail.com>
+ * @author lainme993@gmail.com
*/
$lang['menu'] = '配置设置';
$lang['error'] = '由于非法参数,设置没有更新。请检查您做的改动并重新提交。
@@ -49,6 +50,7 @@ $lang['lang'] = '语言';
$lang['basedir'] = '根目录';
$lang['baseurl'] = '根路径(URL)';
$lang['savedir'] = '保存数据的目录';
+$lang['cookiedir'] = 'Cookie 路径。留空以使用 baseurl。';
$lang['start'] = '开始页面的名称';
$lang['title'] = '维基站点的标题';
$lang['template'] = '模版';
@@ -120,6 +122,7 @@ $lang['subscribers'] = '启用页面订阅支持';
$lang['subscribe_time'] = '订阅列表和摘要发送的时间间隔(秒);这应当小于指定的最近更改保留时间(recent_days)。
';
$lang['compress'] = '使 CSS 和 javascript 的输出更紧密';
+$lang['cssdatauri'] = '字节数。CSS 文件引用的图片若小于该字节,则被直接嵌入样式表中来减少 HTTP 请求头的开销。这个技术在 IE 中不起作用。<code>400</code> 到 <code>600</code> 字节是不错的值。设置为 <code>0</code> 则禁用。';
$lang['hidepages'] = '隐藏匹配的界面(正则表达式)';
$lang['send404'] = '发送 "HTTP 404/页面没有找到" 错误信息给不存在的页面';
$lang['sitemap'] = '生成 Google sitemap(天)';
diff --git a/lib/plugins/config/plugin.info.txt b/lib/plugins/config/plugin.info.txt
new file mode 100644
index 000000000..ace4889b6
--- /dev/null
+++ b/lib/plugins/config/plugin.info.txt
@@ -0,0 +1,6 @@
+author Christopher Smith
+email chris@jalakai.co.uk
+date 2007-08-05
+name Configuration Manager
+desc Manage Dokuwiki's Configuration Settings
+url http://dokuwiki.org/plugin:config
diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php
index 01f15a54e..adf7d217a 100644
--- a/lib/plugins/config/settings/config.class.php
+++ b/lib/plugins/config/settings/config.class.php
@@ -100,8 +100,8 @@ if (!class_exists('configuration')) {
if ($this->locked) return false;
-# $file = eval('return '.$this->_local_file.';');
- $file = $this->_local_files[0];
+ // write back to the last file in the local config cascade
+ $file = end($this->_local_files);
// backup current file (remove any existing backup)
if (@file_exists($file) && $backup) {
@@ -341,7 +341,7 @@ if (!class_exists('setting')) {
var $_input = NULL; // only used by those classes which error check
var $_cautionList = array(
- 'basedir' => 'danger', 'baseurl' => 'danger', 'savedir' => 'danger', 'useacl' => 'danger', 'authtype' => 'danger', 'superuser' => 'danger', 'userewrite' => 'danger',
+ 'basedir' => 'danger', 'baseurl' => 'danger', 'savedir' => 'danger', 'cookiedir' => 'danger', 'useacl' => 'danger', 'authtype' => 'danger', 'superuser' => 'danger', 'userewrite' => 'danger',
'start' => 'warning', 'camelcase' => 'warning', 'deaccent' => 'warning', 'sepchar' => 'warning', 'compression' => 'warning', 'xsendfile' => 'warning', 'renderer_xhtml' => 'warning', 'fnencode' => 'warning',
'allowdebug' => 'security', 'htmlok' => 'security', 'phpok' => 'security', 'iexssprotect' => 'security', 'xmlrpc' => 'security', 'fullpath' => 'security'
);
@@ -774,8 +774,8 @@ if (!class_exists('setting_dirchoice')) {
if ($entry == '.' || $entry == '..') continue;
if ($this->_pattern && !preg_match($this->_pattern,$entry)) continue;
- $file = (is_link($this->_dir.$entry)) ? readlink($this->_dir.$entry) : $entry;
- if (is_dir($this->_dir.$file)) $list[] = $entry;
+ $file = (is_link($this->_dir.$entry)) ? readlink($this->_dir.$entry) : $this->_dir.$entry;
+ if (is_dir($file)) $list[] = $entry;
}
closedir($dh);
}
diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php
index af7e63a61..5f2c32ea7 100644
--- a/lib/plugins/config/settings/config.metadata.php
+++ b/lib/plugins/config/settings/config.metadata.php
@@ -95,6 +95,7 @@ $meta['license'] = array('license');
$meta['savedir'] = array('savedir');
$meta['basedir'] = array('string');
$meta['baseurl'] = array('string');
+$meta['cookiedir'] = array('string');
$meta['dmode'] = array('numeric','_pattern' => '/0[0-7]{3,4}/'); // only accept octal representation
$meta['fmode'] = array('numeric','_pattern' => '/0[0-7]{3,4}/'); // only accept octal representation
$meta['allowdebug'] = array('onoff');
@@ -179,6 +180,7 @@ $meta['autoplural'] = array('onoff');
$meta['mailfrom'] = array('richemail');
$meta['mailprefix'] = array('string');
$meta['compress'] = array('onoff');
+$meta['cssdatauri'] = array('numeric','_pattern' => '/^\d+$/');
$meta['gzip_output'] = array('onoff');
$meta['hidepages'] = array('string');
$meta['send404'] = array('onoff');
diff --git a/lib/plugins/info/plugin.info.txt b/lib/plugins/info/plugin.info.txt
new file mode 100644
index 000000000..2432225f1
--- /dev/null
+++ b/lib/plugins/info/plugin.info.txt
@@ -0,0 +1,6 @@
+author Andreas Gohr
+email andi@splitbrain.org
+date 2008-09-12
+name Info Plugin
+desc Displays information about various DokuWiki internals
+url http://dokuwiki.org/plugin:info
diff --git a/lib/plugins/plugin/classes/ap_download.class.php b/lib/plugins/plugin/classes/ap_download.class.php
index e3afd142a..6aab4ba3c 100644
--- a/lib/plugins/plugin/classes/ap_download.class.php
+++ b/lib/plugins/plugin/classes/ap_download.class.php
@@ -114,7 +114,7 @@ class ap_download extends ap_manage {
if ($tmp) $this->dir_delete($tmp);
if (!$this->manager->error) {
- msg(sprintf($this->lang['packageinstalled'], count($this->downloaded), (count($this->downloaded) != 1?'s':''), join(',',$this->downloaded)),1);
+ msg(sprintf($this->lang['packageinstalled'], count($this->downloaded), join(',',$this->downloaded)),1);
$this->refresh();
return true;
}
diff --git a/lib/plugins/plugin/lang/de-informal/lang.php b/lib/plugins/plugin/lang/de-informal/lang.php
index 0bd142e23..0c7fb5cdf 100644
--- a/lib/plugins/plugin/lang/de-informal/lang.php
+++ b/lib/plugins/plugin/lang/de-informal/lang.php
@@ -7,6 +7,7 @@
* @author Marcel Metz <marcel_metz@gmx.de>
* @author Matthias Schulte <post@lupo49.de>
* @author Christian Wichmann <nospam@zone0.de>
+ * @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['menu'] = 'Plugins verwalten';
$lang['download'] = 'Herunterladen und installieren einer neuen Erweiterung';
diff --git a/lib/plugins/plugin/lang/de/lang.php b/lib/plugins/plugin/lang/de/lang.php
index 6c1bd033c..db39b89d4 100644
--- a/lib/plugins/plugin/lang/de/lang.php
+++ b/lib/plugins/plugin/lang/de/lang.php
@@ -16,6 +16,8 @@
* @author Robert Bogenschneider <robog@gmx.de>
* @author Niels Lange <niels@boldencursief.nl>
* @author Christian Wichmann <nospam@zone0.de>
+ * @author Paul Lachewsky <kaeptn.haddock@gmail.com>
+ * @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['menu'] = 'Plugins verwalten';
$lang['download'] = 'Neues Plugin herunterladen und installieren';
diff --git a/lib/plugins/plugin/lang/el/lang.php b/lib/plugins/plugin/lang/el/lang.php
index d28a04ae2..bd6dc2013 100644
--- a/lib/plugins/plugin/lang/el/lang.php
+++ b/lib/plugins/plugin/lang/el/lang.php
@@ -11,6 +11,7 @@
* @author Αθανάσιος Νταής <homunculus@wana.gr>
* @author Konstantinos Koryllos <koryllos@gmail.com>
* @author George Petsagourakis <petsagouris@gmail.com>
+ * @author Petros Vidalis <pvidalis@gmail.com>
*/
$lang['menu'] = 'Διαχείριση Επεκτάσεων';
$lang['download'] = 'Κατεβάστε και εγκαταστήστε μια νέα επέκταση (plugin)';
@@ -56,3 +57,4 @@ $lang['enabled'] = 'Η επέκταση %s ενεργοποιήθ
$lang['notenabled'] = 'Η επέκταση %s δεν μπορεί να ενεργοποιηθεί. Ελέγξτε τα δικαιώματα πρόσβασης.';
$lang['disabled'] = 'Η επέκταση %s απενεργοποιήθηκε.';
$lang['notdisabled'] = 'Η επέκταση %s δεν μπορεί να απενεργοποιηθεί. Ελέγξτε τα δικαιώματα πρόσβασης.';
+$lang['packageinstalled'] = 'Το πακέτο της επέκτασης (%d επέκταση(εις): %s) εγκαστήθηκε επιτυχημένα.';
diff --git a/lib/plugins/plugin/lang/en/lang.php b/lib/plugins/plugin/lang/en/lang.php
index 437c168bd..87570a708 100644
--- a/lib/plugins/plugin/lang/en/lang.php
+++ b/lib/plugins/plugin/lang/en/lang.php
@@ -73,6 +73,6 @@ $lang['enabled'] = 'Plugin %s enabled.';
$lang['notenabled'] = 'Plugin %s could not be enabled, check file permissions.';
$lang['disabled'] = 'Plugin %s disabled.';
$lang['notdisabled'] = 'Plugin %s could not be disabled, check file permissions.';
-$lang['packageinstalled'] = 'Plugin package (%d plugin%s: %s) successfully installed.';
+$lang['packageinstalled'] = 'Plugin package (%d plugin(s): %s) successfully installed.';
//Setup VIM: ex: et ts=4 :
diff --git a/lib/plugins/plugin/lang/eo/lang.php b/lib/plugins/plugin/lang/eo/lang.php
index a70bea30c..327ee7578 100644
--- a/lib/plugins/plugin/lang/eo/lang.php
+++ b/lib/plugins/plugin/lang/eo/lang.php
@@ -11,6 +11,7 @@
* @author Erik Pedersen <erik.pedersen@shaw.ca>
* @author Robert Bogenschneider <robog@GMX.de>
* @author Robert BOGENSCHNEIDER <robog@gmx.de>
+ * @author Robert BOGENSCHNEIDER <bogi@UEA.org>
*/
$lang['menu'] = 'Administri Kromaĵojn';
$lang['download'] = 'Elŝuti kaj instali novan kromaĵon';
@@ -56,3 +57,4 @@ $lang['enabled'] = 'La kromaĵo %s estas ebligita.';
$lang['notenabled'] = 'La kromaĵo %s ne povis esti ebligita, kontrolu dosier-permesojn.';
$lang['disabled'] = 'La kromaĵo %s estas malebligita.';
$lang['notdisabled'] = 'La kromaĵo %s ne povis esti malebligita, kontrolu dosier-permesojn.';
+$lang['packageinstalled'] = 'Kromaĵa pakaĵo (%d kromaĵo(j): %s) sukcese instalitaj.';
diff --git a/lib/plugins/plugin/lang/es/lang.php b/lib/plugins/plugin/lang/es/lang.php
index 207c48d2c..53d6d63fd 100644
--- a/lib/plugins/plugin/lang/es/lang.php
+++ b/lib/plugins/plugin/lang/es/lang.php
@@ -20,6 +20,8 @@
* @author Victor Castelan <victorcastelan@gmail.com>
* @author Mauro Javier Giamberardino <mgiamberardino@gmail.com>
* @author emezeta <emezeta@infoprimo.com>
+ * @author Oscar Ciudad <oscar@jacho.net>
+ * @author Ruben Figols <ruben.figols@gmail.com>
*/
$lang['menu'] = 'Administración de Plugins';
$lang['download'] = 'Descargar e instalar un nuevo plugin';
diff --git a/lib/plugins/plugin/lang/et/lang.php b/lib/plugins/plugin/lang/et/lang.php
index 0ffea1244..088acf39b 100644
--- a/lib/plugins/plugin/lang/et/lang.php
+++ b/lib/plugins/plugin/lang/et/lang.php
@@ -3,4 +3,30 @@
* Estonian language file
*
* @author kristian.kankainen@kuu.la
+ * @author Rivo Zängov <eraser@eraser.ee>
*/
+$lang['manage'] = 'Paigaldatud pluginad';
+$lang['btn_info'] = 'info';
+$lang['btn_update'] = 'uuenda';
+$lang['btn_delete'] = 'kustuta';
+$lang['btn_settings'] = 'seaded';
+$lang['btn_download'] = 'Lae alla';
+$lang['btn_enable'] = 'Salvesta';
+$lang['url'] = 'URL';
+$lang['installed'] = 'Paigaldatud:';
+$lang['lastupdate'] = 'Viimati uuendatud:';
+$lang['source'] = 'Allikas:';
+$lang['unknown'] = 'tundmatu';
+$lang['updating'] = 'Uuendamine ...';
+$lang['update_none'] = 'Uuendusi ei leitud.';
+$lang['deleting'] = 'Kustutamine ...';
+$lang['deleted'] = 'Plugin %s on kustutatud.';
+$lang['downloading'] = 'Allalaadimine ...';
+$lang['plugin'] = 'Plugin:';
+$lang['components'] = 'Komponendid';
+$lang['name'] = 'Nimi:';
+$lang['date'] = 'Kuupäev';
+$lang['type'] = 'Tüüp:';
+$lang['desc'] = 'Kirjeldus:';
+$lang['author'] = 'Autor:';
+$lang['www'] = 'Veeb:';
diff --git a/lib/plugins/plugin/lang/fa/lang.php b/lib/plugins/plugin/lang/fa/lang.php
index 01e0a88b2..19a839660 100644
--- a/lib/plugins/plugin/lang/fa/lang.php
+++ b/lib/plugins/plugin/lang/fa/lang.php
@@ -52,4 +52,4 @@ $lang['enabled'] = 'افزونه‌ی %s فعال شد.';
$lang['notenabled'] = 'افزونه‌ی %s قابلیت فعال کردن ندارد، دسترسی‌ها را چک کنید.';
$lang['disabled'] = 'افزونه‌ی %s غیرفعال شد.';
$lang['notdisabled'] = 'افزونه‌ی %s قابلیت غیرفعال کردن ندارد، دسترسی‌ها را چک کنید.';
-$lang['packageinstalled'] = 'بسته‌ی افزوده‌ها (%d افزونه%s: %s) با موفقیت نصب شد.';
+$lang['packageinstalled'] = 'بسته افزونه (%d افزونه%s: %s) به درستی نصب شد.';
diff --git a/lib/plugins/plugin/lang/fi/lang.php b/lib/plugins/plugin/lang/fi/lang.php
index 817b4f20a..c348a2331 100644
--- a/lib/plugins/plugin/lang/fi/lang.php
+++ b/lib/plugins/plugin/lang/fi/lang.php
@@ -5,6 +5,7 @@
* @author otto@valjakko.net
* @author Otto Vainio <otto@valjakko.net>
* @author Teemu Mattila <ghcsystems@gmail.com>
+ * @author Sami Olmari <sami@olmari.fi>
*/
$lang['menu'] = 'Ylläpidä liitännäisiä';
$lang['download'] = 'Lataa ja asenna uusi liitännäinen';
@@ -50,3 +51,4 @@ $lang['enabled'] = 'Liitännäinen %s käytössä';
$lang['notenabled'] = 'Liitännäistä %s ei voitu ottaa käyttöön. Tarkista tiedostojen oikeudet.';
$lang['disabled'] = 'Liitännäinen %s pois käytössä';
$lang['notdisabled'] = 'Liitännäistä %s ei voitu ottaa pois käytöstä. Tarkista tiedostojen oikeudet.';
+$lang['packageinstalled'] = 'Pluginpaketti (%d plugin%s: %s:) asennettu onnistuneesti.';
diff --git a/lib/plugins/plugin/lang/fr/lang.php b/lib/plugins/plugin/lang/fr/lang.php
index 618e7a75b..b86c57b53 100644
--- a/lib/plugins/plugin/lang/fr/lang.php
+++ b/lib/plugins/plugin/lang/fr/lang.php
@@ -3,10 +3,9 @@
* french language file
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- * @author Guy Brand <gb@isis.u-strasbg.fr>
+ * @author Guy Brand <gb@unistra.fr>
* @author Delassaux Julien <julien@delassaux.fr>
* @author Maurice A. LeBlanc <leblancma@cooptel.qc.ca>
- * @author gb@isis.u-strasbg.fr
* @author stephane.gully@gmail.com
* @author Guillaume Turri <guillaume.turri@gmail.com>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
@@ -16,6 +15,7 @@
* @author Florian Gaub <floriang@floriang.net>
* @author Samuel Dorsaz samuel.dorsaz@novelion.net
* @author Johan Guilbaud <guilbaud.johan@gmail.com>
+ * @author schplurtz@laposte.net
*/
$lang['menu'] = 'Gestion des modules externes';
$lang['download'] = 'Télécharger et installer un nouveau module';
@@ -61,4 +61,4 @@ $lang['enabled'] = 'Module %s activé.';
$lang['notenabled'] = 'Le module %s n\'a pas pu être activé, vérifiez le fichier des permissions.';
$lang['disabled'] = 'Module %s désactivé.';
$lang['notdisabled'] = 'Le module %s n\'a pas pu être désactivé, vérifiez le fichier des permissions.';
-$lang['packageinstalled'] = 'Ensemble de modules (%d module%s: %s) installé avec succès.';
+$lang['packageinstalled'] = 'Ensemble de modules (%d module(s): %s) installé avec succès.';
diff --git a/lib/plugins/plugin/lang/hr/lang.php b/lib/plugins/plugin/lang/hr/lang.php
index d2094b77b..96f1d6afe 100644
--- a/lib/plugins/plugin/lang/hr/lang.php
+++ b/lib/plugins/plugin/lang/hr/lang.php
@@ -4,4 +4,5 @@
*
* @author Branko Rihtman <theney@gmail.com>
* @author Dražen Odobašić <dodobasic@gmail.com>
+ * @author Dejan Igrec dejan.igrec@gmail.com
*/
diff --git a/lib/plugins/plugin/lang/hu/lang.php b/lib/plugins/plugin/lang/hu/lang.php
index f2ad8c713..25c7b6322 100644
--- a/lib/plugins/plugin/lang/hu/lang.php
+++ b/lib/plugins/plugin/lang/hu/lang.php
@@ -7,6 +7,7 @@
* @author schilling.janos@gmail.com
* @author Szabó Dávid <szabo.david@gyumolcstarhely.hu>
* @author Sándor TIHANYI <stihanyi+dw@gmail.com>
+ * @author David Szabo <szabo.david@gyumolcstarhely.hu>
*/
$lang['menu'] = 'Bővítménykezelő';
$lang['download'] = 'Új bővítmény letöltése és telepítése';
diff --git a/lib/plugins/plugin/lang/kk/lang.php b/lib/plugins/plugin/lang/kk/lang.php
new file mode 100644
index 000000000..dde5b9577
--- /dev/null
+++ b/lib/plugins/plugin/lang/kk/lang.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * kazakh language file
+ *
+ * @author Nurgozha Kaliaskarov astana08@gmail.com
+ */
diff --git a/lib/plugins/plugin/lang/nl/lang.php b/lib/plugins/plugin/lang/nl/lang.php
index 66cd7c0a2..d13e46ff8 100644
--- a/lib/plugins/plugin/lang/nl/lang.php
+++ b/lib/plugins/plugin/lang/nl/lang.php
@@ -11,6 +11,7 @@
* @author Matthias Carchon webmaster@c-mattic.be
* @author Marijn Hofstra <hofstra.m@gmail.com>
* @author Timon Van Overveldt <timonvo@gmail.com>
+ * @author Jeroen
*/
$lang['menu'] = 'Plugins beheren';
$lang['download'] = 'Download en installeer een nieuwe plugin';
diff --git a/lib/plugins/plugin/lang/no/lang.php b/lib/plugins/plugin/lang/no/lang.php
index 72d9c19ba..41f6d1153 100644
--- a/lib/plugins/plugin/lang/no/lang.php
+++ b/lib/plugins/plugin/lang/no/lang.php
@@ -12,6 +12,8 @@
* @author Lisa Ditlefsen <lisa@vervesearch.com>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
* @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca>
+ * @author Rune Rasmussen syntaxerror.no@gmail.com
+ * @author Jon Bøe <jonmagneboe@hotmail.com>
*/
$lang['menu'] = 'Behandle tillegg';
$lang['download'] = 'Last ned og installer et tillegg';
@@ -57,3 +59,4 @@ $lang['enabled'] = 'Tillegget %s aktivert';
$lang['notenabled'] = 'Plugin %s kunne ikke aktiveres, sjekk filrettighetene.';
$lang['disabled'] = 'Plugin %s deaktivert';
$lang['notdisabled'] = 'Plugin %s kunne ikke deaktiveres, sjekk filrettighetene.';
+$lang['packageinstalled'] = 'Installasjonen av tilleggspakka (%d tillegg: %s) var vellykka';
diff --git a/lib/plugins/plugin/lang/pl/lang.php b/lib/plugins/plugin/lang/pl/lang.php
index d4ccc7751..f48426bf6 100644
--- a/lib/plugins/plugin/lang/pl/lang.php
+++ b/lib/plugins/plugin/lang/pl/lang.php
@@ -12,6 +12,7 @@
* @author Leszek Stachowski <shazarre@gmail.com>
* @author maros <dobrimaros@yahoo.pl>
* @author Grzegorz Widła <dzesdzes@gmail.com>
+ * @author Łukasz Chmaj <teachmeter@gmail.com>
*/
$lang['menu'] = 'Menadżer wtyczek';
$lang['download'] = 'Ściągnij i zainstaluj nową wtyczkę';
diff --git a/lib/plugins/plugin/lang/pt-br/lang.php b/lib/plugins/plugin/lang/pt-br/lang.php
index bae962730..e8b23dae9 100644
--- a/lib/plugins/plugin/lang/pt-br/lang.php
+++ b/lib/plugins/plugin/lang/pt-br/lang.php
@@ -15,6 +15,7 @@
* @author Luis Dantas <luisdantas@gmail.com>
* @author Sergio Motta sergio@cisne.com.br
* @author Isaias Masiero Filho <masiero@masiero.org>
+ * @author Balaco Baco <balacobaco@imap.cc>
*/
$lang['menu'] = 'Gerenciar Plug-ins';
$lang['download'] = 'Baixar e instalar um novo plug-in';
diff --git a/lib/plugins/plugin/lang/ro/lang.php b/lib/plugins/plugin/lang/ro/lang.php
index 5f37ed455..9c90f77a3 100644
--- a/lib/plugins/plugin/lang/ro/lang.php
+++ b/lib/plugins/plugin/lang/ro/lang.php
@@ -8,6 +8,7 @@
* @author Emanuel-Emeric Andrași <n30@mandrivausers.ro>
* @author Emanuel-Emeric Andraşi <em.andrasi@mandrivausers.ro>
* @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro>
+ * @author Marius OLAR <olarmariusalex@gmail.com>
*/
$lang['menu'] = 'Administrează plugin-uri';
$lang['download'] = 'Descarcă şi instalează un nou plugin';
@@ -53,3 +54,4 @@ $lang['enabled'] = 'Plugin %s activat.';
$lang['notenabled'] = 'Plugin-ul %s nu poate fi activat, verificaţi permisiunile fişierului.';
$lang['disabled'] = 'Plugin %s dezactivat.';
$lang['notdisabled'] = 'Plugin-ul %s nu poate fi dezactivat, verificaţi permisiunile fişierului.';
+$lang['packageinstalled'] = 'Pachet modul (%d modul(e): %s) instalat cu succes.';
diff --git a/lib/plugins/plugin/lang/sv/lang.php b/lib/plugins/plugin/lang/sv/lang.php
index 0fe03387b..5892e42b5 100644
--- a/lib/plugins/plugin/lang/sv/lang.php
+++ b/lib/plugins/plugin/lang/sv/lang.php
@@ -15,6 +15,7 @@
* @author Bogge Bogge <bogge@bogge.com>
* @author Peter Åström <eaustreum@gmail.com>
* @author Håkan Sandell <hakan.sandell@home.se>
+ * @author mikael@mallander.net
*/
$lang['menu'] = 'Hantera insticksmoduler';
$lang['download'] = 'Ladda ned och installera en ny insticksmodul';
diff --git a/lib/plugins/plugin/lang/zh/lang.php b/lib/plugins/plugin/lang/zh/lang.php
index 6fc1f4d7d..f8e0b5568 100644
--- a/lib/plugins/plugin/lang/zh/lang.php
+++ b/lib/plugins/plugin/lang/zh/lang.php
@@ -13,6 +13,7 @@
* @author caii <zhoucaiqi@gmail.com>
* @author Hiphen Lee <jacob.b.leung@gmail.com>
* @author caii, patent agent in China <zhoucaiqi@gmail.com>
+ * @author lainme993@gmail.com
*/
$lang['menu'] = '插件管理器';
$lang['download'] = '下载并安装新的插件';
diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php
index f9f6ceb65..a04e98a66 100644
--- a/lib/plugins/popularity/admin.php
+++ b/lib/plugins/popularity/admin.php
@@ -95,7 +95,7 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin {
//Print the last time the data was sent
$lastSent = $this->helper->lastSentTime();
if ( $lastSent !== 0 ){
- echo $this->getLang('lastSent') . datetime_h($lastSent);
+ echo $this->getLang('lastSent') . ' ' . datetime_h($lastSent);
}
} else {
//If we just submitted the form
diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php
index 5ce562319..af1e8a706 100644
--- a/lib/plugins/popularity/helper.php
+++ b/lib/plugins/popularity/helper.php
@@ -134,6 +134,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin {
$data['popversion'] = $this->version;
$data['language'] = $conf['lang'];
$data['now'] = time();
+ $data['popauto'] = (int) $this->isAutoSubmitEnabled();
// some config values
$data['conf_useacl'] = $conf['useacl'];
diff --git a/lib/plugins/popularity/lang/de-informal/lang.php b/lib/plugins/popularity/lang/de-informal/lang.php
index f884ed690..40e6c4343 100644
--- a/lib/plugins/popularity/lang/de-informal/lang.php
+++ b/lib/plugins/popularity/lang/de-informal/lang.php
@@ -7,6 +7,7 @@
* @author Marcel Metz <marcel_metz@gmx.de>
* @author Matthias Schulte <post@lupo49.de>
* @author Christian Wichmann <nospam@zone0.de>
+ * @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['name'] = 'Popularitätsrückmeldung (kann eine Weile dauern, bis es fertig geladen wurde)';
$lang['submit'] = 'Sende Daten';
diff --git a/lib/plugins/popularity/lang/de/intro.txt b/lib/plugins/popularity/lang/de/intro.txt
index 63b120662..dc014e029 100644
--- a/lib/plugins/popularity/lang/de/intro.txt
+++ b/lib/plugins/popularity/lang/de/intro.txt
@@ -1,6 +1,6 @@
====== Popularitäts-Feedback ======
-Dieses Werkzeug sammelt verschiedene anonyme Daten über Ihr Wiki und erlaubt es Ihnen, diese an die DokuWiki-Entwickler zurückzusenden. Diese Daten helfen den Entwicklern besser zu verstehen, wie DokuWiki eingesetzt wird und stellt sicher, dass zukünftige, die Weiterentwicklung von DokuWiki betreffende, Entscheidungen auf Basis echter Nutzerdaten getroffen werden.
+Dieses [[doku>popularity|Werkzeug]] sammelt verschiedene anonyme Daten über Ihr Wiki und erlaubt es Ihnen, diese an die DokuWiki-Entwickler zurückzusenden. Diese Daten helfen den Entwicklern besser zu verstehen, wie DokuWiki eingesetzt wird und stellt sicher, dass zukünftige, die Weiterentwicklung von DokuWiki betreffende, Entscheidungen auf Basis echter Nutzerdaten getroffen werden.
Bitte wiederholen Sie das Versenden der Daten von Zeit zu Zeit, um die Entwickler über das Wachstum Ihres Wikis auf dem Laufenden zu halten. Ihre wiederholten Dateneinsendungen werden über eine anonyme ID identifiziert.
diff --git a/lib/plugins/popularity/lang/de/lang.php b/lib/plugins/popularity/lang/de/lang.php
index 4649062f7..42bdc14d5 100644
--- a/lib/plugins/popularity/lang/de/lang.php
+++ b/lib/plugins/popularity/lang/de/lang.php
@@ -13,6 +13,8 @@
* @author Robert Bogenschneider <robog@gmx.de>
* @author Niels Lange <niels@boldencursief.nl>
* @author Christian Wichmann <nospam@zone0.de>
+ * @author Paul Lachewsky <kaeptn.haddock@gmail.com>
+ * @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['name'] = 'Popularitäts-Feedback (Eventuell längere Ladezeit)';
$lang['submit'] = 'Daten senden';
diff --git a/lib/plugins/popularity/lang/el/lang.php b/lib/plugins/popularity/lang/el/lang.php
index 41704fa06..32558b060 100644
--- a/lib/plugins/popularity/lang/el/lang.php
+++ b/lib/plugins/popularity/lang/el/lang.php
@@ -4,6 +4,7 @@
*
* @author Konstantinos Koryllos <koryllos@gmail.com>
* @author George Petsagourakis <petsagouris@gmail.com>
+ * @author Petros Vidalis <pvidalis@gmail.com>
*/
$lang['name'] = 'Αναφορά Δημοτικότητας (ίσως αργήσει λίγο να εμφανιστεί)';
$lang['submit'] = 'Αποστολή Δεδομένων';
diff --git a/lib/plugins/popularity/lang/en/intro.txt b/lib/plugins/popularity/lang/en/intro.txt
index 0812ffbe3..e1d6d940a 100644
--- a/lib/plugins/popularity/lang/en/intro.txt
+++ b/lib/plugins/popularity/lang/en/intro.txt
@@ -1,6 +1,6 @@
====== Popularity Feedback ======
-This tool gathers anonymous data about your wiki and allows you to send it back to the DokuWiki developers. This helps them to understand them how DokuWiki is used by its users and makes sure future development decisions are backed up by real world usage statistics.
+This [[doku>popularity|tool]] gathers anonymous data about your wiki and allows you to send it back to the DokuWiki developers. This helps them to understand them how DokuWiki is used by its users and makes sure future development decisions are backed up by real world usage statistics.
You are encouraged to repeat this step from time to time to keep developers informed when your wiki grows. Your repeated data sets will be identified by an anonymous ID.
diff --git a/lib/plugins/popularity/lang/en/lang.php b/lib/plugins/popularity/lang/en/lang.php
index 78a5e862c..af6797cb2 100644
--- a/lib/plugins/popularity/lang/en/lang.php
+++ b/lib/plugins/popularity/lang/en/lang.php
@@ -6,4 +6,4 @@ $lang['autosubmit'] = 'Automatically send data once a month';
$lang['submissionFailed'] = 'The data couldn\'t be sent due to the following error:';
$lang['submitDirectly'] = 'You can send the data manually by submitting the following form.';
$lang['autosubmitError'] = 'The last autosubmit failed, because of the following error: ';
-$lang['lastSent'] = 'The data has been sent ';
+$lang['lastSent'] = 'The data has been sent';
diff --git a/lib/plugins/popularity/lang/eo/lang.php b/lib/plugins/popularity/lang/eo/lang.php
index a7c124f51..2cbb6072f 100644
--- a/lib/plugins/popularity/lang/eo/lang.php
+++ b/lib/plugins/popularity/lang/eo/lang.php
@@ -9,6 +9,7 @@
* @author Erik Pedersen <erik.pedersen@shaw.ca>
* @author Robert Bogenschneider <robog@GMX.de>
* @author Robert BOGENSCHNEIDER <robog@gmx.de>
+ * @author Robert BOGENSCHNEIDER <bogi@UEA.org>
*/
$lang['name'] = 'Populareca enketo (eble la ŝargo prokrastos iomete)';
$lang['submit'] = 'Sendi datenaron';
diff --git a/lib/plugins/popularity/lang/eo/submitted.txt b/lib/plugins/popularity/lang/eo/submitted.txt
new file mode 100644
index 000000000..c2bce4e9f
--- /dev/null
+++ b/lib/plugins/popularity/lang/eo/submitted.txt
@@ -0,0 +1,3 @@
+====== Enketo pri Populareco ======
+
+La datumoj estis senditaj sukcese. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/es/lang.php b/lib/plugins/popularity/lang/es/lang.php
index 5e42cd45c..752fb7da4 100644
--- a/lib/plugins/popularity/lang/es/lang.php
+++ b/lib/plugins/popularity/lang/es/lang.php
@@ -17,6 +17,8 @@
* @author Mauro Javier Giamberardino <mgiamberardino@gmail.com>
* @author Oscar M. Lage <r0sk10@gmail.com>
* @author emezeta <emezeta@infoprimo.com>
+ * @author Oscar Ciudad <oscar@jacho.net>
+ * @author Ruben Figols <ruben.figols@gmail.com>
*/
$lang['name'] = 'Retroinformación (Feedback) plugin Popularity';
$lang['submit'] = 'Enviar datos';
diff --git a/lib/plugins/popularity/lang/et/lang.php b/lib/plugins/popularity/lang/et/lang.php
index 0ffea1244..ca1410ab0 100644
--- a/lib/plugins/popularity/lang/et/lang.php
+++ b/lib/plugins/popularity/lang/et/lang.php
@@ -3,4 +3,5 @@
* Estonian language file
*
* @author kristian.kankainen@kuu.la
+ * @author Rivo Zängov <eraser@eraser.ee>
*/
diff --git a/lib/plugins/popularity/lang/fa/lang.php b/lib/plugins/popularity/lang/fa/lang.php
index fa08efea4..70c65f1b3 100644
--- a/lib/plugins/popularity/lang/fa/lang.php
+++ b/lib/plugins/popularity/lang/fa/lang.php
@@ -10,8 +10,8 @@
*/
$lang['name'] = 'بازخورد محبوبیت (ممکن است اندکی زمان ببرد)';
$lang['submit'] = 'ارسال اطلاعات';
-$lang['autosubmit'] = 'به طور خودکار، داده‌ها را یک‌بار در ماه بفرست';
-$lang['submissionFailed'] = 'به دلیل زیر امکان ارسال داده‌ها نیست:';
-$lang['submitDirectly'] = 'با ارسال فرم زیر، می‌توانید داده‌ها را بفرستید';
-$lang['autosubmitError'] = 'به دلیل زیر، ارسال خودکار پیشین با مشکل مواجه شده بود:';
-$lang['lastSent'] = 'داده‌ها ارسال شدند';
+$lang['autosubmit'] = 'ارسال خودکار اطلاعات به صورت ماهیانه';
+$lang['submissionFailed'] = 'اطلاعات به علت بروز خطای زیر قابل ارسال نیستند:';
+$lang['submitDirectly'] = 'شما میتوانید اطلاعات را با تکمیل این فرم به صورت دستی ارسال کنید.';
+$lang['autosubmitError'] = 'آخرین ارسال خودکار با خطای مواجه شد, به علت زیر:';
+$lang['lastSent'] = 'اطلاعات ارسال شد.';
diff --git a/lib/plugins/popularity/lang/fa/submitted.txt b/lib/plugins/popularity/lang/fa/submitted.txt
new file mode 100644
index 000000000..63eec47ba
--- /dev/null
+++ b/lib/plugins/popularity/lang/fa/submitted.txt
@@ -0,0 +1,2 @@
+====== بازخورد محبوبیت ======
+اطلاعات ارسال شد. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/fi/lang.php b/lib/plugins/popularity/lang/fi/lang.php
index a73f63501..d7c230742 100644
--- a/lib/plugins/popularity/lang/fi/lang.php
+++ b/lib/plugins/popularity/lang/fi/lang.php
@@ -4,6 +4,7 @@
*
* @author Otto Vainio <otto@valjakko.net>
* @author Teemu Mattila <ghcsystems@gmail.com>
+ * @author Sami Olmari <sami@olmari.fi>
*/
$lang['name'] = 'Suosion palaute (voi kestää jonkun aikaa latautua)';
$lang['submit'] = 'Lähetä tiedot';
diff --git a/lib/plugins/popularity/lang/fr/intro.txt b/lib/plugins/popularity/lang/fr/intro.txt
index 58be61d03..041e65d69 100644
--- a/lib/plugins/popularity/lang/fr/intro.txt
+++ b/lib/plugins/popularity/lang/fr/intro.txt
@@ -1,6 +1,6 @@
====== Enquête de popularité ======
-Cet outil collecte des données anonymes concernant votre wiki et vous permet de les expédier aux développeurs de DokuWiki. Ceci leur permet de mieux comprendre comment DokuWiki est employé par ses utilisateurs et d'orienter les décisions sur les développements futurs en tenant compte des statistiques d'usage réel.
+Cet [[doku>popularity|outil]] collecte des données anonymes concernant votre wiki et vous permet de les expédier aux développeurs de DokuWiki. Ceci leur permet de mieux comprendre comment DokuWiki est employé par ses utilisateurs et d'orienter les décisions sur les développements futurs en tenant compte des statistiques d'usage réel.
Vous êtes encouragé à répéter l'opération de collecte et d'envoi des données anonymes de temps en temps afin d'informer les développeurs de la croissance de votre wiki.
diff --git a/lib/plugins/popularity/lang/fr/lang.php b/lib/plugins/popularity/lang/fr/lang.php
index 9aaf3c7d2..ae12c6683 100644
--- a/lib/plugins/popularity/lang/fr/lang.php
+++ b/lib/plugins/popularity/lang/fr/lang.php
@@ -2,8 +2,7 @@
/**
* French language file
*
- * @author gb@isis.u-strasbg.fr
- * @author Guy Brand <gb@isis.u-strasbg.fr>
+ * @author Guy Brand <gb@unistra.fr>
* @author stephane.gully@gmail.com
* @author Guillaume Turri <guillaume.turri@gmail.com>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
@@ -13,6 +12,7 @@
* @author Florian Gaub <floriang@floriang.net>
* @author Samuel Dorsaz samuel.dorsaz@novelion.net
* @author Johan Guilbaud <guilbaud.johan@gmail.com>
+ * @author schplurtz@laposte.net
*/
$lang['name'] = 'Enquête de popularité (peut nécessiter un certain temps pour être chargée)';
$lang['submit'] = 'Envoyer les données';
diff --git a/lib/plugins/popularity/lang/hr/lang.php b/lib/plugins/popularity/lang/hr/lang.php
index d2094b77b..96f1d6afe 100644
--- a/lib/plugins/popularity/lang/hr/lang.php
+++ b/lib/plugins/popularity/lang/hr/lang.php
@@ -4,4 +4,5 @@
*
* @author Branko Rihtman <theney@gmail.com>
* @author Dražen Odobašić <dodobasic@gmail.com>
+ * @author Dejan Igrec dejan.igrec@gmail.com
*/
diff --git a/lib/plugins/popularity/lang/hu/lang.php b/lib/plugins/popularity/lang/hu/lang.php
index fbd554d0d..5dcd1adf0 100644
--- a/lib/plugins/popularity/lang/hu/lang.php
+++ b/lib/plugins/popularity/lang/hu/lang.php
@@ -7,6 +7,7 @@
* @author schilling.janos@gmail.com
* @author Szabó Dávid <szabo.david@gyumolcstarhely.hu>
* @author Sándor TIHANYI <stihanyi+dw@gmail.com>
+ * @author David Szabo <szabo.david@gyumolcstarhely.hu>
*/
$lang['name'] = 'Visszajelzés a DokuWiki használatáról (sok időt vehet igénybe a betöltése)';
$lang['submit'] = 'Adatok elküldése';
diff --git a/lib/plugins/popularity/lang/kk/lang.php b/lib/plugins/popularity/lang/kk/lang.php
new file mode 100644
index 000000000..dde5b9577
--- /dev/null
+++ b/lib/plugins/popularity/lang/kk/lang.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * kazakh language file
+ *
+ * @author Nurgozha Kaliaskarov astana08@gmail.com
+ */
diff --git a/lib/plugins/popularity/lang/nl/lang.php b/lib/plugins/popularity/lang/nl/lang.php
index 0a8386f42..75c13013b 100644
--- a/lib/plugins/popularity/lang/nl/lang.php
+++ b/lib/plugins/popularity/lang/nl/lang.php
@@ -10,6 +10,7 @@
* @author Matthias Carchon webmaster@c-mattic.be
* @author Marijn Hofstra <hofstra.m@gmail.com>
* @author Timon Van Overveldt <timonvo@gmail.com>
+ * @author Jeroen
*/
$lang['name'] = 'Populariteitsfeedback (kan even duren om in te laden)';
$lang['submit'] = 'Verstuur';
diff --git a/lib/plugins/popularity/lang/no/lang.php b/lib/plugins/popularity/lang/no/lang.php
index 0f7c140ff..e283fc371 100644
--- a/lib/plugins/popularity/lang/no/lang.php
+++ b/lib/plugins/popularity/lang/no/lang.php
@@ -9,6 +9,14 @@
* @author Lisa Ditlefsen <lisa@vervesearch.com>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
* @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca>
+ * @author Rune Rasmussen syntaxerror.no@gmail.com
+ * @author Thomas Nygreen <nygreen@gmail.com>
+ * @author Jon Bøe <jonmagneboe@hotmail.com>
*/
$lang['name'] = 'Popularitetsfeedback (kan ta litt tid å laste)';
$lang['submit'] = 'Send data';
+$lang['autosubmit'] = 'Send data automatisk en gang i måneden';
+$lang['submissionFailed'] = 'Kunne ikke sende dataene på grunn av følgende feil:';
+$lang['submitDirectly'] = 'Du kan sende dataene manuelt ved å sende inn dette skjemaet.';
+$lang['autosubmitError'] = 'Den siste automatiske innsendinga feilet på grunn av følgende feil:';
+$lang['lastSent'] = 'Dataene er sendt';
diff --git a/lib/plugins/popularity/lang/no/submitted.txt b/lib/plugins/popularity/lang/no/submitted.txt
new file mode 100644
index 000000000..239676a9d
--- /dev/null
+++ b/lib/plugins/popularity/lang/no/submitted.txt
@@ -0,0 +1,3 @@
+====== Tilbakemelding om popularitet ======
+
+Innsending av dataene var vellykka. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/pl/lang.php b/lib/plugins/popularity/lang/pl/lang.php
index fbbe6dab2..d96254fd8 100644
--- a/lib/plugins/popularity/lang/pl/lang.php
+++ b/lib/plugins/popularity/lang/pl/lang.php
@@ -10,6 +10,12 @@
* @author Leszek Stachowski <shazarre@gmail.com>
* @author maros <dobrimaros@yahoo.pl>
* @author Grzegorz Widła <dzesdzes@gmail.com>
+ * @author Łukasz Chmaj <teachmeter@gmail.com>
*/
$lang['name'] = 'Informacja o popularności (ładowanie może zająć dłuższą chwilę)';
$lang['submit'] = 'Wyślij dane';
+$lang['autosubmit'] = 'Automatycznie wysyłaj dane raz na miesiąc';
+$lang['submissionFailed'] = 'Dane nie mogły być przesłane ze względu na następujące błędy:';
+$lang['submitDirectly'] = 'Możesz wysłać dane ręcznie poprzez następujący formularz:';
+$lang['autosubmitError'] = 'Ostatnie wysyłanie automatyczne nie powiodło się ze względu na następujące błędy:';
+$lang['lastSent'] = 'Dane zostały wysłane:';
diff --git a/lib/plugins/popularity/lang/pl/submitted.txt b/lib/plugins/popularity/lang/pl/submitted.txt
new file mode 100644
index 000000000..195e81388
--- /dev/null
+++ b/lib/plugins/popularity/lang/pl/submitted.txt
@@ -0,0 +1,3 @@
+====== Informacje o popularności ======
+
+Wysyłanie danych powiodło się. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/pt-br/lang.php b/lib/plugins/popularity/lang/pt-br/lang.php
index 67a3abd7e..44d811d81 100644
--- a/lib/plugins/popularity/lang/pt-br/lang.php
+++ b/lib/plugins/popularity/lang/pt-br/lang.php
@@ -14,6 +14,7 @@
* @author Luis Dantas <luisdantas@gmail.com>
* @author Sergio Motta sergio@cisne.com.br
* @author Isaias Masiero Filho <masiero@masiero.org>
+ * @author Balaco Baco <balacobaco@imap.cc>
*/
$lang['name'] = 'Retorno de popularidade (pode demorar um pouco para carregar)';
$lang['submit'] = 'Enviar dados';
diff --git a/lib/plugins/popularity/lang/ro/lang.php b/lib/plugins/popularity/lang/ro/lang.php
index 1644ea574..7f3508362 100644
--- a/lib/plugins/popularity/lang/ro/lang.php
+++ b/lib/plugins/popularity/lang/ro/lang.php
@@ -6,6 +6,7 @@
* @author Emanuel-Emeric Andrași <n30@mandrivausers.ro>
* @author Emanuel-Emeric Andraşi <em.andrasi@mandrivausers.ro>
* @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro>
+ * @author Marius OLAR <olarmariusalex@gmail.com>
*/
$lang['name'] = 'Feedback de popularitate (încărcarea poate dura mai mult)';
$lang['submit'] = 'Trimite datele';
diff --git a/lib/plugins/popularity/lang/sk/submitted.txt b/lib/plugins/popularity/lang/sk/submitted.txt
new file mode 100644
index 000000000..f99fb9fa9
--- /dev/null
+++ b/lib/plugins/popularity/lang/sk/submitted.txt
@@ -0,0 +1,3 @@
+====== Prieskum používania ======
+
+Dáta boli úspešne odoslané. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/sv/lang.php b/lib/plugins/popularity/lang/sv/lang.php
index b461a95cf..8be542e7f 100644
--- a/lib/plugins/popularity/lang/sv/lang.php
+++ b/lib/plugins/popularity/lang/sv/lang.php
@@ -12,6 +12,7 @@
* @author Bogge Bogge <bogge@bogge.com>
* @author Peter Åström <eaustreum@gmail.com>
* @author Håkan Sandell <hakan.sandell@home.se>
+ * @author mikael@mallander.net
*/
$lang['name'] = 'Popularitets-feedback (det kan ta en stund att ladda sidan)';
$lang['submit'] = 'Sänd data';
diff --git a/lib/plugins/popularity/lang/uk/submitted.txt b/lib/plugins/popularity/lang/uk/submitted.txt
new file mode 100644
index 000000000..90213858d
--- /dev/null
+++ b/lib/plugins/popularity/lang/uk/submitted.txt
@@ -0,0 +1,2 @@
+====== Відгук популярності ======
+Дані були успішно відправлені. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/zh/lang.php b/lib/plugins/popularity/lang/zh/lang.php
index a2464762d..f45aaf4ff 100644
--- a/lib/plugins/popularity/lang/zh/lang.php
+++ b/lib/plugins/popularity/lang/zh/lang.php
@@ -12,6 +12,7 @@
* @author caii <zhoucaiqi@gmail.com>
* @author Hiphen Lee <jacob.b.leung@gmail.com>
* @author caii, patent agent in China <zhoucaiqi@gmail.com>
+ * @author lainme993@gmail.com
*/
$lang['name'] = '人气反馈(载入可能需要一些时间)';
$lang['submit'] = '发送数据';
diff --git a/lib/plugins/popularity/plugin.info.txt b/lib/plugins/popularity/plugin.info.txt
index 2652bd669..16b148f41 100644
--- a/lib/plugins/popularity/plugin.info.txt
+++ b/lib/plugins/popularity/plugin.info.txt
@@ -1,7 +1,7 @@
base popularity
author Andreas Gohr
email andi@splitbrain.org
-date 2010-12-09
+date 2011-08-18
name Popularity Feedback Plugin
desc Send anonymous data about your wiki to the developers.
url http://www.dokuwiki.org/plugin:popularity
diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php
index e188e2488..2aaf1395f 100644
--- a/lib/plugins/revert/admin.php
+++ b/lib/plugins/revert/admin.php
@@ -21,20 +21,6 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin {
}
/**
- * return some info
- */
- function getInfo(){
- return array(
- 'author' => 'Andreas Gohr',
- 'email' => 'andi@splitbrain.org',
- 'date' => '2008-12-10',
- 'name' => 'Revert Manager',
- 'desc' => 'Allows you to mass revert recent edits',
- 'url' => 'http://dokuwiki.org/plugin:revert',
- );
- }
-
- /**
* access for managers
*/
function forAdminOnly(){
diff --git a/lib/plugins/revert/lang/de-informal/lang.php b/lib/plugins/revert/lang/de-informal/lang.php
index b6709d2fa..c199bb55b 100644
--- a/lib/plugins/revert/lang/de-informal/lang.php
+++ b/lib/plugins/revert/lang/de-informal/lang.php
@@ -7,6 +7,7 @@
* @author Marcel Metz <marcel_metz@gmx.de>
* @author Matthias Schulte <post@lupo49.de>
* @author Christian Wichmann <nospam@zone0.de>
+ * @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['menu'] = 'Zurückstellungsmanager';
$lang['filter'] = 'Durchsuche als Spam markierte Seiten';
diff --git a/lib/plugins/revert/lang/de/lang.php b/lib/plugins/revert/lang/de/lang.php
index 0bc8e2ce0..b430ce876 100644
--- a/lib/plugins/revert/lang/de/lang.php
+++ b/lib/plugins/revert/lang/de/lang.php
@@ -14,6 +14,8 @@
* @author Robert Bogenschneider <robog@gmx.de>
* @author Niels Lange <niels@boldencursief.nl>
* @author Christian Wichmann <nospam@zone0.de>
+ * @author Paul Lachewsky <kaeptn.haddock@gmail.com>
+ * @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['menu'] = 'Seiten wieder herstellen';
$lang['filter'] = 'Nach betroffenen Seiten suchen';
diff --git a/lib/plugins/revert/lang/el/lang.php b/lib/plugins/revert/lang/el/lang.php
index a0c3bb4ff..63454e4e9 100644
--- a/lib/plugins/revert/lang/el/lang.php
+++ b/lib/plugins/revert/lang/el/lang.php
@@ -9,6 +9,7 @@
* @author Αθανάσιος Νταής <homunculus@wana.gr>
* @author Konstantinos Koryllos <koryllos@gmail.com>
* @author George Petsagourakis <petsagouris@gmail.com>
+ * @author Petros Vidalis <pvidalis@gmail.com>
*/
$lang['menu'] = 'Αποκατάσταση κακόβουλων αλλαγών σελίδων';
$lang['filter'] = 'Αναζήτηση σελίδων που περιέχουν spam';
diff --git a/lib/plugins/revert/lang/eo/lang.php b/lib/plugins/revert/lang/eo/lang.php
index a46b0169e..8c7854847 100644
--- a/lib/plugins/revert/lang/eo/lang.php
+++ b/lib/plugins/revert/lang/eo/lang.php
@@ -11,6 +11,7 @@
* @author Erik Pedersen <erik.pedersen@shaw.ca>
* @author Robert Bogenschneider <robog@GMX.de>
* @author Robert BOGENSCHNEIDER <robog@gmx.de>
+ * @author Robert BOGENSCHNEIDER <bogi@UEA.org>
*/
$lang['menu'] = 'Administrado de restarigo';
$lang['filter'] = 'Serĉi spamecajn paĝojn';
diff --git a/lib/plugins/revert/lang/es/lang.php b/lib/plugins/revert/lang/es/lang.php
index 7e357e3db..e235015d4 100644
--- a/lib/plugins/revert/lang/es/lang.php
+++ b/lib/plugins/revert/lang/es/lang.php
@@ -18,6 +18,8 @@
* @author Victor Castelan <victorcastelan@gmail.com>
* @author Mauro Javier Giamberardino <mgiamberardino@gmail.com>
* @author emezeta <emezeta@infoprimo.com>
+ * @author Oscar Ciudad <oscar@jacho.net>
+ * @author Ruben Figols <ruben.figols@gmail.com>
*/
$lang['menu'] = 'Restaurador';
$lang['filter'] = 'Buscar páginas con spam';
diff --git a/lib/plugins/revert/lang/et/lang.php b/lib/plugins/revert/lang/et/lang.php
index 0ffea1244..ca1410ab0 100644
--- a/lib/plugins/revert/lang/et/lang.php
+++ b/lib/plugins/revert/lang/et/lang.php
@@ -3,4 +3,5 @@
* Estonian language file
*
* @author kristian.kankainen@kuu.la
+ * @author Rivo Zängov <eraser@eraser.ee>
*/
diff --git a/lib/plugins/revert/lang/fi/lang.php b/lib/plugins/revert/lang/fi/lang.php
index 26bc6b76a..fdf9bb81c 100644
--- a/lib/plugins/revert/lang/fi/lang.php
+++ b/lib/plugins/revert/lang/fi/lang.php
@@ -5,6 +5,7 @@
* @author otto@valjakko.net
* @author Otto Vainio <otto@valjakko.net>
* @author Teemu Mattila <ghcsystems@gmail.com>
+ * @author Sami Olmari <sami@olmari.fi>
*/
$lang['menu'] = 'Palautuksenhallinta';
$lang['filter'] = 'Etsi spammattyjä sivuja';
diff --git a/lib/plugins/revert/lang/fr/lang.php b/lib/plugins/revert/lang/fr/lang.php
index d6dc3ee3d..15d4d39c3 100644
--- a/lib/plugins/revert/lang/fr/lang.php
+++ b/lib/plugins/revert/lang/fr/lang.php
@@ -3,8 +3,7 @@
* french language file
* @author Delassaux Julien <julien@delassaux.fr>
* @author Maurice A. LeBlanc <leblancma@cooptel.qc.ca>
- * @author Guy Brand <gb@isis.u-strasbg.fr>
- * @author gb@isis.u-strasbg.fr
+ * @author Guy Brand <gb@unistra.fr>
* @author stephane.gully@gmail.com
* @author Guillaume Turri <guillaume.turri@gmail.com>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
@@ -14,6 +13,7 @@
* @author Florian Gaub <floriang@floriang.net>
* @author Samuel Dorsaz samuel.dorsaz@novelion.net
* @author Johan Guilbaud <guilbaud.johan@gmail.com>
+ * @author schplurtz@laposte.net
*/
$lang['menu'] = 'Gestionnaire de réversions';
$lang['filter'] = 'Trouver les pages spammées ';
diff --git a/lib/plugins/revert/lang/hr/lang.php b/lib/plugins/revert/lang/hr/lang.php
index d2094b77b..96f1d6afe 100644
--- a/lib/plugins/revert/lang/hr/lang.php
+++ b/lib/plugins/revert/lang/hr/lang.php
@@ -4,4 +4,5 @@
*
* @author Branko Rihtman <theney@gmail.com>
* @author Dražen Odobašić <dodobasic@gmail.com>
+ * @author Dejan Igrec dejan.igrec@gmail.com
*/
diff --git a/lib/plugins/revert/lang/hu/lang.php b/lib/plugins/revert/lang/hu/lang.php
index 7add3014d..058a63196 100644
--- a/lib/plugins/revert/lang/hu/lang.php
+++ b/lib/plugins/revert/lang/hu/lang.php
@@ -7,6 +7,7 @@
* @author schilling.janos@gmail.com
* @author Szabó Dávid <szabo.david@gyumolcstarhely.hu>
* @author Sándor TIHANYI <stihanyi+dw@gmail.com>
+ * @author David Szabo <szabo.david@gyumolcstarhely.hu>
*/
$lang['menu'] = 'Visszaállítás kezelő (anti-SPAM)';
$lang['filter'] = 'SPAM tartalmú oldalak keresése';
diff --git a/lib/plugins/revert/lang/kk/lang.php b/lib/plugins/revert/lang/kk/lang.php
new file mode 100644
index 000000000..dde5b9577
--- /dev/null
+++ b/lib/plugins/revert/lang/kk/lang.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * kazakh language file
+ *
+ * @author Nurgozha Kaliaskarov astana08@gmail.com
+ */
diff --git a/lib/plugins/revert/lang/nl/lang.php b/lib/plugins/revert/lang/nl/lang.php
index 21f8c2971..954bf1068 100644
--- a/lib/plugins/revert/lang/nl/lang.php
+++ b/lib/plugins/revert/lang/nl/lang.php
@@ -11,6 +11,7 @@
* @author Matthias Carchon webmaster@c-mattic.be
* @author Marijn Hofstra <hofstra.m@gmail.com>
* @author Timon Van Overveldt <timonvo@gmail.com>
+ * @author Jeroen
*/
$lang['menu'] = 'Herstelmanager';
$lang['filter'] = 'Zoek naar bekladde pagina\'s';
diff --git a/lib/plugins/revert/lang/no/lang.php b/lib/plugins/revert/lang/no/lang.php
index 262ea3fe5..2a6a2abd3 100644
--- a/lib/plugins/revert/lang/no/lang.php
+++ b/lib/plugins/revert/lang/no/lang.php
@@ -12,6 +12,8 @@
* @author Lisa Ditlefsen <lisa@vervesearch.com>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
* @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca>
+ * @author Rune Rasmussen syntaxerror.no@gmail.com
+ * @author Jon Bøe <jonmagneboe@hotmail.com>
*/
$lang['menu'] = 'Tilbakestillingsbehandler';
$lang['filter'] = 'Søk etter søppelmeldinger';
diff --git a/lib/plugins/revert/lang/pl/lang.php b/lib/plugins/revert/lang/pl/lang.php
index 8166250b4..f36dc591a 100644
--- a/lib/plugins/revert/lang/pl/lang.php
+++ b/lib/plugins/revert/lang/pl/lang.php
@@ -9,6 +9,7 @@
* @author Leszek Stachowski <shazarre@gmail.com>
* @author maros <dobrimaros@yahoo.pl>
* @author Grzegorz Widła <dzesdzes@gmail.com>
+ * @author Łukasz Chmaj <teachmeter@gmail.com>
*/
$lang['menu'] = 'Menadżer przywracania';
$lang['filter'] = 'Wyszukaj uszkodzone strony';
diff --git a/lib/plugins/revert/lang/pt-br/lang.php b/lib/plugins/revert/lang/pt-br/lang.php
index 6d8ca2de5..7bdde6675 100644
--- a/lib/plugins/revert/lang/pt-br/lang.php
+++ b/lib/plugins/revert/lang/pt-br/lang.php
@@ -15,6 +15,7 @@
* @author Luis Dantas <luisdantas@gmail.com>
* @author Sergio Motta sergio@cisne.com.br
* @author Isaias Masiero Filho <masiero@masiero.org>
+ * @author Balaco Baco <balacobaco@imap.cc>
*/
$lang['menu'] = 'Gerenciador de reversões';
$lang['filter'] = 'Procura por páginas com spam';
diff --git a/lib/plugins/revert/lang/ro/lang.php b/lib/plugins/revert/lang/ro/lang.php
index 6e534fd37..7397a1d74 100644
--- a/lib/plugins/revert/lang/ro/lang.php
+++ b/lib/plugins/revert/lang/ro/lang.php
@@ -8,6 +8,7 @@
* @author Emanuel-Emeric Andrași <n30@mandrivausers.ro>
* @author Emanuel-Emeric Andraşi <em.andrasi@mandrivausers.ro>
* @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro>
+ * @author Marius OLAR <olarmariusalex@gmail.com>
*/
$lang['menu'] = 'Manager Reveniri';
$lang['filter'] = 'Caută pagini cu posibil spam';
diff --git a/lib/plugins/revert/lang/sv/lang.php b/lib/plugins/revert/lang/sv/lang.php
index 1b6ca3374..29c6702eb 100644
--- a/lib/plugins/revert/lang/sv/lang.php
+++ b/lib/plugins/revert/lang/sv/lang.php
@@ -14,6 +14,7 @@
* @author Bogge Bogge <bogge@bogge.com>
* @author Peter Åström <eaustreum@gmail.com>
* @author Håkan Sandell <hakan.sandell@home.se>
+ * @author mikael@mallander.net
*/
$lang['menu'] = 'Hantera återställningar';
$lang['filter'] = 'Sök efter spamsidor';
diff --git a/lib/plugins/revert/lang/zh/lang.php b/lib/plugins/revert/lang/zh/lang.php
index eb8733618..c3d1639ff 100644
--- a/lib/plugins/revert/lang/zh/lang.php
+++ b/lib/plugins/revert/lang/zh/lang.php
@@ -13,6 +13,7 @@
* @author caii <zhoucaiqi@gmail.com>
* @author Hiphen Lee <jacob.b.leung@gmail.com>
* @author caii, patent agent in China <zhoucaiqi@gmail.com>
+ * @author lainme993@gmail.com
*/
$lang['menu'] = '还原管理器';
$lang['filter'] = '搜索包含垃圾信息的页面';
diff --git a/lib/plugins/revert/plugin.info.txt b/lib/plugins/revert/plugin.info.txt
new file mode 100644
index 000000000..5bb6f3413
--- /dev/null
+++ b/lib/plugins/revert/plugin.info.txt
@@ -0,0 +1,6 @@
+author Andreas Gohr
+email andi@splitbrain.org
+date 2008-12-10
+name Revert Manager
+desc Allows you to mass revert recent edits
+url http://dokuwiki.org/plugin:revert
diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php
index e40ee9b7e..8e90be093 100644
--- a/lib/plugins/usermanager/admin.php
+++ b/lib/plugins/usermanager/admin.php
@@ -51,20 +51,6 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
}
}
- /**
- * return some info
- */
- function getInfo(){
-
- return array(
- 'author' => 'Chris Smith',
- 'email' => 'chris@jalakai.co.uk',
- 'date' => '2008-09-17',
- 'name' => 'User Manager',
- 'desc' => 'Manage users '.$this->disabled,
- 'url' => 'http://dokuwiki.org/plugin:usermanager',
- );
- }
/**
* return prompt for admin menu
*/
diff --git a/lib/plugins/usermanager/lang/de-informal/lang.php b/lib/plugins/usermanager/lang/de-informal/lang.php
index 95b36c60f..63ccdd6e4 100644
--- a/lib/plugins/usermanager/lang/de-informal/lang.php
+++ b/lib/plugins/usermanager/lang/de-informal/lang.php
@@ -7,6 +7,7 @@
* @author Marcel Metz <marcel_metz@gmx.de>
* @author Matthias Schulte <post@lupo49.de>
* @author Christian Wichmann <nospam@zone0.de>
+ * @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['menu'] = 'Benutzerverwalter';
$lang['noauth'] = '(Benutzeranmeldung ist nicht verfügbar)';
diff --git a/lib/plugins/usermanager/lang/de/lang.php b/lib/plugins/usermanager/lang/de/lang.php
index 090d1d1d9..585c70a76 100644
--- a/lib/plugins/usermanager/lang/de/lang.php
+++ b/lib/plugins/usermanager/lang/de/lang.php
@@ -15,6 +15,8 @@
* @author Robert Bogenschneider <robog@gmx.de>
* @author Niels Lange <niels@boldencursief.nl>
* @author Christian Wichmann <nospam@zone0.de>
+ * @author Paul Lachewsky <kaeptn.haddock@gmail.com>
+ * @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['menu'] = 'Benutzerverwaltung';
$lang['noauth'] = '(Authentifizierungssystem nicht verfügbar)';
diff --git a/lib/plugins/usermanager/lang/el/lang.php b/lib/plugins/usermanager/lang/el/lang.php
index 8bfb1a380..4b4d95379 100644
--- a/lib/plugins/usermanager/lang/el/lang.php
+++ b/lib/plugins/usermanager/lang/el/lang.php
@@ -10,6 +10,7 @@
* @author Αθανάσιος Νταής <homunculus@wana.gr>
* @author Konstantinos Koryllos <koryllos@gmail.com>
* @author George Petsagourakis <petsagouris@gmail.com>
+ * @author Petros Vidalis <pvidalis@gmail.com>
*/
$lang['menu'] = 'Διαχείριση Χρηστών';
$lang['noauth'] = '(η είσοδος χρηστών δεν είναι δυνατή)';
diff --git a/lib/plugins/usermanager/lang/eo/lang.php b/lib/plugins/usermanager/lang/eo/lang.php
index a16b107c1..9a515dc9c 100644
--- a/lib/plugins/usermanager/lang/eo/lang.php
+++ b/lib/plugins/usermanager/lang/eo/lang.php
@@ -11,6 +11,7 @@
* @author Erik Pedersen <erik.pedersen@shaw.ca>
* @author Robert Bogenschneider <robog@GMX.de>
* @author Robert BOGENSCHNEIDER <robog@gmx.de>
+ * @author Robert BOGENSCHNEIDER <bogi@UEA.org>
*/
$lang['menu'] = 'Administrado de Uzantoj';
$lang['noauth'] = '(identiĝo de uzantoj ne disponeblas)';
diff --git a/lib/plugins/usermanager/lang/es/lang.php b/lib/plugins/usermanager/lang/es/lang.php
index 1e79c6826..804df2a4b 100644
--- a/lib/plugins/usermanager/lang/es/lang.php
+++ b/lib/plugins/usermanager/lang/es/lang.php
@@ -19,6 +19,8 @@
* @author Victor Castelan <victorcastelan@gmail.com>
* @author Mauro Javier Giamberardino <mgiamberardino@gmail.com>
* @author emezeta <emezeta@infoprimo.com>
+ * @author Oscar Ciudad <oscar@jacho.net>
+ * @author Ruben Figols <ruben.figols@gmail.com>
*/
$lang['menu'] = 'Administración de usuarios';
$lang['noauth'] = '(la autenticación de usuarios no está disponible)';
diff --git a/lib/plugins/usermanager/lang/et/lang.php b/lib/plugins/usermanager/lang/et/lang.php
index 0ffea1244..2161df918 100644
--- a/lib/plugins/usermanager/lang/et/lang.php
+++ b/lib/plugins/usermanager/lang/et/lang.php
@@ -3,4 +3,28 @@
* Estonian language file
*
* @author kristian.kankainen@kuu.la
+ * @author Rivo Zängov <eraser@eraser.ee>
*/
+$lang['menu'] = 'Kasutajate haldamine';
+$lang['user_id'] = 'Kasutaja';
+$lang['user_pass'] = 'Parool';
+$lang['user_name'] = 'Tegelik nimi';
+$lang['user_mail'] = 'E-post';
+$lang['user_groups'] = 'Grupid';
+$lang['field'] = 'Väli';
+$lang['value'] = 'Väärtus';
+$lang['add'] = 'Lisa';
+$lang['delete'] = 'Kustuta';
+$lang['delete_selected'] = 'Kustuta valitud';
+$lang['edit'] = 'Muuda';
+$lang['edit_prompt'] = 'Muuda seda kasutajat';
+$lang['modify'] = 'Salvesta muudatused';
+$lang['search'] = 'Otsi';
+$lang['search_prompt'] = 'Soorita otsing';
+$lang['filter'] = 'Filtreeri';
+$lang['update_fail'] = 'Kasutaja uuendamine ebaõnnestus';
+$lang['start'] = 'esimesed';
+$lang['prev'] = 'eelmine';
+$lang['next'] = 'järgmine';
+$lang['last'] = 'viimased';
+$lang['user_notify'] = 'Teavita kasutajat';
diff --git a/lib/plugins/usermanager/lang/fi/lang.php b/lib/plugins/usermanager/lang/fi/lang.php
index 6eeb4c3e8..1db4bd7fb 100644
--- a/lib/plugins/usermanager/lang/fi/lang.php
+++ b/lib/plugins/usermanager/lang/fi/lang.php
@@ -5,6 +5,7 @@
* @author otto@valjakko.net
* @author Otto Vainio <otto@valjakko.net>
* @author Teemu Mattila <ghcsystems@gmail.com>
+ * @author Sami Olmari <sami@olmari.fi>
*/
$lang['menu'] = 'Käyttäjähallinta';
$lang['noauth'] = '(autentikointi ei ole käytössä)';
diff --git a/lib/plugins/usermanager/lang/fr/lang.php b/lib/plugins/usermanager/lang/fr/lang.php
index 49baf9d51..875b6d1a6 100644
--- a/lib/plugins/usermanager/lang/fr/lang.php
+++ b/lib/plugins/usermanager/lang/fr/lang.php
@@ -2,10 +2,9 @@
/**
* french language file
*
- * @author Guy Brand <gb@isis.u-strasbg.fr>
+ * @author Guy Brand <gb@unistra.fr>
* @author Delassaux Julien <julien@delassaux.fr>
* @author Maurice A. LeBlanc <leblancma@cooptel.qc.ca>
- * @author gb@isis.u-strasbg.fr
* @author stephane.gully@gmail.com
* @author Guillaume Turri <guillaume.turri@gmail.com>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
@@ -15,6 +14,7 @@
* @author Florian Gaub <floriang@floriang.net>
* @author Samuel Dorsaz samuel.dorsaz@novelion.net
* @author Johan Guilbaud <guilbaud.johan@gmail.com>
+ * @author schplurtz@laposte.net
*/
$lang['menu'] = 'Gestion des utilisateurs';
$lang['noauth'] = '(authentification utilisateur non disponible)';
diff --git a/lib/plugins/usermanager/lang/hr/lang.php b/lib/plugins/usermanager/lang/hr/lang.php
index d2094b77b..96f1d6afe 100644
--- a/lib/plugins/usermanager/lang/hr/lang.php
+++ b/lib/plugins/usermanager/lang/hr/lang.php
@@ -4,4 +4,5 @@
*
* @author Branko Rihtman <theney@gmail.com>
* @author Dražen Odobašić <dodobasic@gmail.com>
+ * @author Dejan Igrec dejan.igrec@gmail.com
*/
diff --git a/lib/plugins/usermanager/lang/hu/lang.php b/lib/plugins/usermanager/lang/hu/lang.php
index c3914b24d..9b9740cb0 100644
--- a/lib/plugins/usermanager/lang/hu/lang.php
+++ b/lib/plugins/usermanager/lang/hu/lang.php
@@ -7,6 +7,7 @@
* @author schilling.janos@gmail.com
* @author Szabó Dávid <szabo.david@gyumolcstarhely.hu>
* @author Sándor TIHANYI <stihanyi+dw@gmail.com>
+ * @author David Szabo <szabo.david@gyumolcstarhely.hu>
*/
$lang['menu'] = 'Felhasználók kezelése';
$lang['noauth'] = '(A felhasználói azonosítás nem működik.)';
diff --git a/lib/plugins/usermanager/lang/kk/lang.php b/lib/plugins/usermanager/lang/kk/lang.php
new file mode 100644
index 000000000..dde5b9577
--- /dev/null
+++ b/lib/plugins/usermanager/lang/kk/lang.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * kazakh language file
+ *
+ * @author Nurgozha Kaliaskarov astana08@gmail.com
+ */
diff --git a/lib/plugins/usermanager/lang/nl/lang.php b/lib/plugins/usermanager/lang/nl/lang.php
index a6ae402d8..cac793386 100644
--- a/lib/plugins/usermanager/lang/nl/lang.php
+++ b/lib/plugins/usermanager/lang/nl/lang.php
@@ -11,6 +11,7 @@
* @author Matthias Carchon webmaster@c-mattic.be
* @author Marijn Hofstra <hofstra.m@gmail.com>
* @author Timon Van Overveldt <timonvo@gmail.com>
+ * @author Jeroen
*/
$lang['menu'] = 'Gebruikersmanager';
$lang['noauth'] = '(gebruikersauthenticatie niet beschikbaar)';
diff --git a/lib/plugins/usermanager/lang/no/lang.php b/lib/plugins/usermanager/lang/no/lang.php
index df38de1b0..668863ec2 100644
--- a/lib/plugins/usermanager/lang/no/lang.php
+++ b/lib/plugins/usermanager/lang/no/lang.php
@@ -12,6 +12,8 @@
* @author Lisa Ditlefsen <lisa@vervesearch.com>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
* @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca>
+ * @author Rune Rasmussen syntaxerror.no@gmail.com
+ * @author Jon Bøe <jonmagneboe@hotmail.com>
*/
$lang['menu'] = 'Behandle brukere';
$lang['noauth'] = '(autentisering av brukere ikke tilgjengelig)';
diff --git a/lib/plugins/usermanager/lang/pl/lang.php b/lib/plugins/usermanager/lang/pl/lang.php
index 0c4ecbcdf..7c79c5d1f 100644
--- a/lib/plugins/usermanager/lang/pl/lang.php
+++ b/lib/plugins/usermanager/lang/pl/lang.php
@@ -10,6 +10,7 @@
* @author Leszek Stachowski <shazarre@gmail.com>
* @author maros <dobrimaros@yahoo.pl>
* @author Grzegorz Widła <dzesdzes@gmail.com>
+ * @author Łukasz Chmaj <teachmeter@gmail.com>
*/
$lang['menu'] = 'Menadżer użytkowników';
$lang['noauth'] = '(uwierzytelnienie użytkownika niemożliwe)';
diff --git a/lib/plugins/usermanager/lang/pt-br/lang.php b/lib/plugins/usermanager/lang/pt-br/lang.php
index 4bc99fb0c..285231f35 100644
--- a/lib/plugins/usermanager/lang/pt-br/lang.php
+++ b/lib/plugins/usermanager/lang/pt-br/lang.php
@@ -15,6 +15,7 @@
* @author Luis Dantas <luisdantas@gmail.com>
* @author Sergio Motta sergio@cisne.com.br
* @author Isaias Masiero Filho <masiero@masiero.org>
+ * @author Balaco Baco <balacobaco@imap.cc>
*/
$lang['menu'] = 'Gerenciamento de Usuários';
$lang['noauth'] = '(o gerenciamento de usuários não está disponível)';
diff --git a/lib/plugins/usermanager/lang/ro/lang.php b/lib/plugins/usermanager/lang/ro/lang.php
index 260814aed..4c0afc896 100644
--- a/lib/plugins/usermanager/lang/ro/lang.php
+++ b/lib/plugins/usermanager/lang/ro/lang.php
@@ -8,6 +8,7 @@
* @author Emanuel-Emeric Andrași <n30@mandrivausers.ro>
* @author Emanuel-Emeric Andraşi <em.andrasi@mandrivausers.ro>
* @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro>
+ * @author Marius OLAR <olarmariusalex@gmail.com>
*/
$lang['menu'] = 'Manager Utilizatori';
$lang['noauth'] = '(autentificarea utilizatorilor nu este disponibilă)';
diff --git a/lib/plugins/usermanager/lang/sv/lang.php b/lib/plugins/usermanager/lang/sv/lang.php
index cedd30d1f..bd747927e 100644
--- a/lib/plugins/usermanager/lang/sv/lang.php
+++ b/lib/plugins/usermanager/lang/sv/lang.php
@@ -14,6 +14,7 @@
* @author Bogge Bogge <bogge@bogge.com>
* @author Peter Åström <eaustreum@gmail.com>
* @author Håkan Sandell <hakan.sandell@home.se>
+ * @author mikael@mallander.net
*/
$lang['menu'] = 'Hantera användare';
$lang['noauth'] = '(användarautentisering ej tillgänlig)';
diff --git a/lib/plugins/usermanager/lang/zh/lang.php b/lib/plugins/usermanager/lang/zh/lang.php
index 9bfa496c2..c1cb0c91a 100644
--- a/lib/plugins/usermanager/lang/zh/lang.php
+++ b/lib/plugins/usermanager/lang/zh/lang.php
@@ -12,6 +12,7 @@
* @author caii <zhoucaiqi@gmail.com>
* @author Hiphen Lee <jacob.b.leung@gmail.com>
* @author caii, patent agent in China <zhoucaiqi@gmail.com>
+ * @author lainme993@gmail.com
*/
$lang['menu'] = '用户管理器';
$lang['noauth'] = '(用户认证不可用)';
diff --git a/lib/plugins/usermanager/plugin.info.txt b/lib/plugins/usermanager/plugin.info.txt
new file mode 100644
index 000000000..7ec5fafd5
--- /dev/null
+++ b/lib/plugins/usermanager/plugin.info.txt
@@ -0,0 +1,6 @@
+author Chris Smith
+email chris@jalakai.co.uk
+date 2008-09-17
+name User Manager
+desc Manage users
+url http://dokuwiki.org/plugin:usermanager
diff --git a/lib/plugins/usermanager/script.js b/lib/plugins/usermanager/script.js
index 68d437129..de013242b 100644
--- a/lib/plugins/usermanager/script.js
+++ b/lib/plugins/usermanager/script.js
@@ -1,9 +1,8 @@
/**
* Add JavaScript confirmation to the User Delete button
*/
-function usrmgr_delconfirm(){
- if($('usrmgr__del')){
- addEvent( $('usrmgr__del'),'click',function(){ return confirm(reallyDel); } );
- }
-};
-addInitEvent(usrmgr_delconfirm);
+jQuery(function(){
+ jQuery('#usrmgr__del').click(function(){
+ return confirm(LANG.del_confirm);
+ });
+});
diff --git a/lib/scripts/ajax.js b/lib/scripts/ajax.js
deleted file mode 100644
index 44dcee999..000000000
--- a/lib/scripts/ajax.js
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * AJAX functions for the pagename quicksearch
- *
- * @license GPL2 (http://www.gnu.org/licenses/gpl.html)
- * @author Andreas Gohr <andi@splitbrain.org>
- * @author Adrian Lang <lang@cosmocode.de>
- */
-var ajax_quicksearch = {
-
- inObj: null,
- outObj: null,
- sackObj: null,
- delay: null,
-
- init: function(inID, outID) {
-
- this.inObj = $(inID);
- this.outObj = $(outID);
-
- // objects found?
- if (this.inObj === null) return;
- if (this.outObj === null) return;
-
- // prepare AJAX
- this.sackObj = new sack(DOKU_BASE + 'lib/exe/ajax.php');
- this.sackObj.AjaxFailedAlert = '';
- this.sackObj.encodeURIString = false;
- this.sackObj.onCompletion = ajax_quicksearch.onCompletion;
-
- // attach eventhandler to search field
- this.delay = new Delay(function () {
- ajax_quicksearch.clear_results();
- var value = ajax_quicksearch.inObj.value;
- if(value === ''){ return; }
- ajax_quicksearch.sackObj.runAJAX('call=qsearch&q=' + encodeURI(value));
- });
-
- addEvent(this.inObj, 'keyup', function () {
- ajax_quicksearch.clear_results();
- ajax_quicksearch.delay.start();
- });
-
- // attach eventhandler to output field
- addEvent(this.outObj, 'click', function () {
- ajax_quicksearch.outObj.style.display = 'none';
- });
- },
-
- clear_results: function(){
- ajax_quicksearch.outObj.style.display = 'none';
- ajax_quicksearch.outObj.innerHTML = '';
- },
-
- onCompletion: function() {
- var data = this.response; // 'this' is sack context
- if (data === '') { return; }
-
- var outObj = ajax_quicksearch.outObj;
-
- outObj.innerHTML = data;
- outObj.style.display = 'block';
- outObj.style['white-space'] = 'nowrap';
-
- // shorten namespaces if too long
- var width = outObj.clientWidth;
- var links = outObj.getElementsByTagName('a');
- for(var i=0; i<links.length; i++){
- // maximum allowed width:
- var max = width - links[i].offsetLeft;
- var isRTL = (document.documentElement.dir == 'rtl');
-
- if(!isRTL && links[i].offsetWidth < max) continue;
- if(isRTL && links[i].offsetLeft > 0) continue;
-
- var nsL = links[i].innerText.indexOf('(');
- var nsR = links[i].innerText.indexOf(')');
- var eli = 0;
- var runaway = 0;
-
- while( (nsR - nsL > 3) &&
- (
- (!isRTL && links[i].offsetWidth > max) ||
- (isRTL && links[i].offsetLeft < 0)
- )
- ){
- if(runaway++ > 500) return; // just in case something went wrong
-
- if(eli){
- // elipsis already inserted
- if( (eli - nsL) > (nsR - eli) ){
- // cut left
- links[i].innerText = links[i].innerText.substring(0,eli-2)+
- links[i].innerText.substring(eli);
- }else{
- // cut right
- links[i].innerText = links[i].innerText.substring(0,eli+1)+
- links[i].innerText.substring(eli+2);
- }
- }else{
- // replace middle with ellipsis
- var mid = Math.floor( nsL + ((nsR-nsL)/2) );
- links[i].innerText = links[i].innerText.substring(0,mid)+'…'+
- links[i].innerText.substring(mid+1);
- }
- eli = links[i].innerText.indexOf('…');
- nsL = links[i].innerText.indexOf('(');
- nsR = links[i].innerText.indexOf(')');
- }
- }
- }
-
-};
-
-
-addInitEvent(function(){
- ajax_quicksearch.init('qsearch__in','qsearch__out');
-});
-
diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js
new file mode 100644
index 000000000..20b408322
--- /dev/null
+++ b/lib/scripts/behaviour.js
@@ -0,0 +1,180 @@
+/**
+ * Automatic behaviours
+ *
+ * This class wraps various JavaScript functionalities that are triggered
+ * automatically whenever a certain object is in the DOM or a certain CSS
+ * class was found
+ */
+var dw_behaviour = {
+
+ init: function(){
+ dw_behaviour.focusMarker();
+ dw_behaviour.scrollToMarker();
+ dw_behaviour.removeHighlightOnClick();
+ dw_behaviour.quickSelect();
+ dw_behaviour.checkWindowsShares();
+ dw_behaviour.subscription();
+
+ dw_behaviour.revisionBoxHandler();
+ jQuery('#page__revisions input[type=checkbox]').click(
+ dw_behaviour.revisionBoxHandler
+ );
+ },
+
+ /**
+ * Looks for an element with the ID scroll__here at scrolls to it
+ */
+ scrollToMarker: function(){
+ var $obj = jQuery('#scroll__here');
+ if($obj.length) {
+ $obj[0].scrollIntoView();
+ }
+ },
+
+ /**
+ * Looks for an element with the ID focus__this at sets focus to it
+ */
+ focusMarker: function(){
+ jQuery('#focus__this').focus();
+ },
+
+ /**
+ * Remove all search highlighting when clicking on a highlighted term
+ *
+ * @FIXME would be nice to have it fade out
+ */
+ removeHighlightOnClick: function(){
+ jQuery('span.search_hit').click(
+ function(e){
+ jQuery(e.target).removeClass('search_hit');
+ }
+ );
+ },
+
+ /**
+ * Autosubmit quick select forms
+ *
+ * When a <select> tag has the class "quickselect", this script will
+ * automatically submit its parent form when the select value changes.
+ * It also hides the submit button of the form.
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+ quickSelect: function(){
+ jQuery('select.quickselect')
+ .change(function(e){ e.target.form.submit(); })
+ .closest('form').find('input[type=submit]').not('.show').hide();
+ },
+
+ /**
+ * Display error for Windows Shares on browsers other than IE
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ checkWindowsShares: function() {
+ if(!LANG.nosmblinks || typeof(document.all) !== 'undefined') {
+ // No warning requested or none necessary
+ return;
+ }
+
+ jQuery('a.windows').live('click', function(){
+ alert(LANG.nosmblinks.replace(/\\n/,"\n"));
+ });
+ },
+
+ /**
+ * Hide list subscription style if target is a page
+ *
+ * @author Adrian Lang <lang@cosmocode.de>
+ * @author Pierre Spring <pierre.spring@caillou.ch>
+ */
+ subscription: function(){
+ var $form, $list, $digest;
+
+ $form = jQuery('#subscribe__form');
+ if (0 === $form.length) return;
+
+ $list = $form.find("input[name='sub_style'][value='list']");
+ $digest = $form.find("input[name='sub_style'][value='digest']");
+
+ $form.find("input[name='sub_target']")
+ .click(
+ function () {
+ var $this = jQuery(this), show_list;
+ if (!$this.prop('checked')) {
+ return;
+ }
+
+ show_list = $this.val().match(/:$/);
+ $list.parent().dw_toggle(show_list);
+ if (!show_list && $list.prop('checked')) {
+ $digest.prop('checked', 'checked');
+ }
+ }
+ )
+ .filter(':checked')
+ .click();
+ },
+
+ /**
+ * disable multiple revisions checkboxes if two are checked
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+ revisionBoxHandler: function(){
+ var $checked = jQuery('#page__revisions input[type=checkbox]:checked');
+ var $all = jQuery('#page__revisions input[type=checkbox]');
+
+ if($checked.length < 2){
+ $all.attr('disabled',false);
+ jQuery('#page__revisions input[type=submit]').attr('disabled',true);
+ }else{
+ $all.attr('disabled',true);
+ jQuery('#page__revisions input[type=submit]').attr('disabled',false);
+ for(var i=0; i<$checked.length; i++){
+ $checked[i].disabled = false;
+ if(i>1){
+ $checked[i].checked = false;
+ }
+ }
+ }
+ }
+
+};
+
+/**
+ * Hides elements with a slide animation
+ *
+ * @param fn optional callback to run after hiding
+ * @author Adrian Lang <mail@adrianlang.de>
+ */
+jQuery.fn.dw_hide = function(fn) {
+ return this.slideUp('fast', fn);
+};
+
+/**
+ * Unhides elements with a slide animation
+ *
+ * @param fn optional callback to run after hiding
+ * @author Adrian Lang <mail@adrianlang.de>
+ */
+jQuery.fn.dw_show = function(fn) {
+ return this.slideDown('fast', fn);
+};
+
+/**
+ * Toggles visibility of an element using a slide element
+ *
+ * @param bool the current state of the element (optional)
+ */
+jQuery.fn.dw_toggle = function(bool, fn) {
+ return this.each(function() {
+ var $this = jQuery(this);
+ if (typeof bool === 'undefined') {
+ bool = $this.is(':hidden');
+ }
+ $this[bool ? "dw_show" : "dw_hide" ](fn);
+ });
+};
+
+jQuery(dw_behaviour.init);
diff --git a/lib/scripts/compatibility.js b/lib/scripts/compatibility.js
new file mode 100644
index 000000000..ea52153c5
--- /dev/null
+++ b/lib/scripts/compatibility.js
@@ -0,0 +1,414 @@
+/**
+ * Mark a JavaScript function as deprecated
+ *
+ * This will print a warning to the JavaScript console (if available) in
+ * Firebug and Chrome and a stack trace (if available) to easily locate the
+ * problematic function call.
+ *
+ * @param msg optional message to print
+ */
+function DEPRECATED(msg){
+ if(!window.console) return;
+ if(!msg) msg = '';
+
+ var func;
+ if(arguments.callee) func = arguments.callee.caller.name;
+ if(func) func = ' '+func+'()';
+ var line = 'DEPRECATED function call'+func+'. '+msg;
+
+ if(console.warn){
+ console.warn(line);
+ }else{
+ console.log(line);
+ }
+
+ if(console.trace) console.trace();
+}
+
+/**
+ * Construct a wrapper function for deprecated function names
+ *
+ * This function returns a wrapper function which just calls DEPRECATED
+ * and the new function.
+ *
+ * @param func The new function
+ * @param context Optional; The context (`this`) of the call
+ */
+function DEPRECATED_WRAP(func, context) {
+ return function () {
+ DEPRECATED();
+ return func.apply(context || this, arguments);
+ };
+}
+
+/**
+ * Handy shortcut to document.getElementById
+ *
+ * This function was taken from the prototype library
+ *
+ * @link http://prototype.conio.net/
+ */
+function $() {
+ DEPRECATED('Please use the JQuery() function instead.');
+
+ var elements = new Array();
+
+ for (var i = 0; i < arguments.length; i++) {
+ var element = arguments[i];
+ if (typeof element == 'string')
+ element = document.getElementById(element);
+
+ if (arguments.length == 1)
+ return element;
+
+ elements.push(element);
+ }
+
+ return elements;
+}
+
+
+
+
+var index = {
+ throbber_delay: dw_index.throbber_delay,
+ toggle: DEPRECATED_WRAP(dw_index.toggle, dw_index),
+ treeattach: DEPRECATED_WRAP(dw_index.treeattach, dw_index)
+};
+
+var ajax_quicksearch = {
+ init: DEPRECATED_WRAP(dw_qsearch.init, dw_qsearch),
+ clear_results: DEPRECATED_WRAP(dw_qsearch.clear_results, dw_qsearch),
+ onCompletion: DEPRECATED_WRAP(dw_qsearch.onCompletion, dw_qsearch)
+};
+
+var linkwiz = {
+ init: DEPRECATED_WRAP(dw_linkwiz.init, dw_linkwiz),
+ onEntry: DEPRECATED_WRAP(dw_linkwiz.onEntry, dw_linkwiz),
+ getResult: DEPRECATED_WRAP(dw_linkwiz.getResult, dw_linkwiz),
+ select: DEPRECATED_WRAP(dw_linkwiz.select, dw_linkwiz),
+ deselect: DEPRECATED_WRAP(dw_linkwiz.deselect, dw_linkwiz),
+ onResultClick: DEPRECATED_WRAP(dw_linkwiz.onResultClick, dw_linkwiz),
+ resultClick: DEPRECATED_WRAP(dw_linkwiz.resultClick, dw_linkwiz),
+ insertLink: DEPRECATED_WRAP(dw_linkwiz.insertLink, dw_linkwiz),
+ autocomplete: DEPRECATED_WRAP(dw_linkwiz.autocomplete, dw_linkwiz),
+ autocomplete_exec: DEPRECATED_WRAP(dw_linkwiz.autocomplete_exec, dw_linkwiz),
+ show: DEPRECATED_WRAP(dw_linkwiz.show, dw_linkwiz),
+ hide: DEPRECATED_WRAP(dw_linkwiz.hide, dw_linkwiz),
+ toggle: DEPRECATED_WRAP(dw_linkwiz.toggle, dw_linkwiz)
+};
+
+var locktimer = {
+ init: DEPRECATED_WRAP(dw_locktimer.init, dw_locktimer),
+ reset: DEPRECATED_WRAP(dw_locktimer.reset, dw_locktimer),
+ warning: DEPRECATED_WRAP(dw_locktimer.warning, dw_locktimer),
+ clear: DEPRECATED_WRAP(dw_locktimer.clear, dw_locktimer),
+ refresh: DEPRECATED_WRAP(dw_locktimer.refresh, dw_locktimer),
+ refreshed: DEPRECATED_WRAP(dw_locktimer.refreshed, dw_locktimer)
+};
+
+var media_manager = {
+ // treeattach, selectorattach, confirmattach are munched together into
+ // dw_mediamanager.init
+ attachoptions: DEPRECATED_WRAP(dw_mediamanager.attachoptions, dw_mediamanager),
+ togglekeepopen: function (event, cb) {
+ DEPRECATED('Use dw_mediamanager.toggleOption instead');
+ return dw_mediamanager.toggleOption.call(cb, 'keepopen');
+ },
+ togglehide: function (event, cb) {
+ DEPRECATED('Use dw_mediamanager.toggleOption instead');
+ return dw_mediamanager.toggleOption.call(cb, 'hide');
+ },
+ updatehide: DEPRECATED_WRAP(dw_mediamanager.updatehide, dw_mediamanager),
+ select: function (event, link) {
+ DEPRECATED('Use dw_mediamanager.select instead');
+ return dw_mediamanager.select.call(link, event);
+ },
+ initpopup: DEPRECATED_WRAP(dw_mediamanager.initpopup, dw_mediamanager),
+ insert: DEPRECATED_WRAP(dw_mediamanager.insert, dw_mediamanager),
+ list: function (event, link) {
+ DEPRECATED('Use dw_mediamanager.list instead');
+ return dw_mediamanager.list.call(link, event);
+ },
+ // toggle is handled by dw_tree
+ suggest: DEPRECATED_WRAP(dw_mediamanager.suggest, dw_mediamanager),
+ initFlashUpload: DEPRECATED_WRAP(dw_mediamanager.initFlashUpload, dw_mediamanager),
+ closePopup: function () {
+ DEPRECATED();
+ dw_mediamanager.$popup.dialog('close');
+ },
+ setalign: function (event, cb) {
+ DEPRECATED('Use dw_mediamanager.setOpt instead');
+ return dw_mediamanager.setOpt.call(this, 'align', event);
+ },
+ setlink: function (event, cb) {
+ DEPRECATED('Use dw_mediamanager.setOpt instead');
+ return dw_mediamanager.setOpt.call(this, 'link', event);
+ },
+ setsize: function (event, cb) {
+ DEPRECATED('Use dw_mediamanager.setOpt instead');
+ return dw_mediamanager.setOpt.call(this, 'size', event);
+ },
+ outSet: function (id) {
+ DEPRECATED();
+ return jQuery(id).removeClass('selected');
+ },
+ inSet: function (id) {
+ DEPRECATED();
+ return jQuery(id).addClass('selected');
+ }
+};
+
+initSizeCtl = DEPRECATED_WRAP(dw_editor.initSizeCtl);
+sizeCtl = DEPRECATED_WRAP(dw_editor.sizeCtl);
+toggleWrap = DEPRECATED_WRAP(dw_editor.toggleWrap);
+setWrap = DEPRECATED_WRAP(dw_editor.setWrap);
+
+function findPosX(object){
+ DEPRECATED('Use jQuery.position() instead');
+ return jQuery(object).position().left;
+}
+
+function findPosY(object){
+ DEPRECATED('Use jQuery.position() instead');
+ return jQuery(object).position().top;
+}
+
+function getElementsByClass(searchClass,node,tag){
+ DEPRECATED('Use jQuery() instead');
+ if(node == null) node = document;
+ if(typeof tag === 'undefined') tag = '';
+ return jQuery(node).find(tag+'.'+searchClass).toArray();
+}
+
+function prependChild(parent,element) {
+ DEPRECATED('Use jQuery.prepend() instead');
+ jQuery(parent).prepend(element);
+}
+
+function addEvent(element, type, handler) {
+ DEPRECATED('Use jQuery.bind() instead. Note that jQuery’s behaviour' +
+ ' when a handler returns false differs from addEvent’s');
+ jQuery(element).bind(type,{},function (e) {
+ // returning false in an addEvent event handler did not prevent
+ // bubbling but just canceled handlers on this node and prevented
+ // default behavior, so wrap the handler call and mimic that behavior.
+ //
+ // Refer to jQuery.event.handle().
+ var ret = handler.apply(this, Array.prototype.slice.call(arguments, 0));
+ if (typeof ret !== 'undefined') {
+ if ( ret !== false ) {
+ return ret;
+ }
+ // What jQuery does.
+ e.result = ret;
+ e.preventDefault();
+ // Not what jQuery does. This would be: event.stopPropagation();
+ // Hack it so that immediate propagation (other event handlers on
+ // this element) appears stopped without stopping the actual
+ // propagation (bubbling)
+ e.isImmediatePropagationStopped = function () { return true; };
+ }
+ });
+}
+
+function removeEvent(element, type, handler) {
+ DEPRECATED('Use jQuery.unbind() instead.');
+ jQuery(element).unbind(type,handler);
+}
+
+function addInitEvent(func) {
+ DEPRECATED('Use jQuery(<function>) instead');
+ jQuery(func);
+}
+
+
+function jsEscape(text){
+ DEPRECATED('Insert text through jQuery.text() instead of escaping on your own');
+ var re=new RegExp("\\\\","g");
+ text=text.replace(re,"\\\\");
+ re=new RegExp("'","g");
+ text=text.replace(re,"\\'");
+ re=new RegExp('"',"g");
+ text=text.replace(re,'&quot;');
+ re=new RegExp("\\\\\\\\n","g");
+ text=text.replace(re,"\\n");
+ return text;
+}
+
+/**
+ * Simple function to check if a global var is defined
+ *
+ * @author Kae Verens
+ * @link http://verens.com/archives/2005/07/25/isset-for-javascript/#comment-2835
+ */
+function isset(varname){
+ DEPRECATED("Use `typeof var !== 'undefined'` instead");
+ return(typeof(window[varname])!='undefined');
+}
+
+/**
+ * Checks if property is undefined
+ *
+ * @param {Object} prop value to check
+ * @return {Boolean} true if matched
+ * @scope public
+ * @author Ilya Lebedev <ilya@lebedev.net>
+ */
+function isUndefined (prop /* :Object */) /* :Boolean */ {
+ DEPRECATED("Use `typeof var === 'undefined'` instead");
+ return (typeof prop == 'undefined');
+}
+
+/**
+ * Checks if property is function
+ *
+ * @param {Object} prop value to check
+ * @return {Boolean} true if matched
+ * @scope public
+ * @author Ilya Lebedev <ilya@lebedev.net>
+ */
+function isFunction (prop /* :Object */) /* :Boolean */ {
+ DEPRECATED("Use `typeof var === 'function'` instead");
+ return (typeof prop == 'function');
+}
+/**
+ * Checks if property is string
+ *
+ * @param {Object} prop value to check
+ * @return {Boolean} true if matched
+ * @scope public
+ * @author Ilya Lebedev <ilya@lebedev.net>
+ */
+function isString (prop /* :Object */) /* :Boolean */ {
+ DEPRECATED("Use `typeof var === 'string'` instead");
+ return (typeof prop == 'string');
+}
+
+/**
+ * Checks if property is number
+ *
+ * @param {Object} prop value to check
+ * @return {Boolean} true if matched
+ * @scope public
+ * @author Ilya Lebedev <ilya@lebedev.net>
+ */
+function isNumber (prop /* :Object */) /* :Boolean */ {
+ DEPRECATED("Use `typeof var === 'number'` instead");
+ return (typeof prop == 'number');
+}
+
+/**
+ * Checks if property is the calculable number
+ *
+ * @param {Object} prop value to check
+ * @return {Boolean} true if matched
+ * @scope public
+ * @author Ilya Lebedev <ilya@lebedev.net>
+ */
+function isNumeric (prop /* :Object */) /* :Boolean */ {
+ DEPRECATED("Use `typeof var === 'number' && !isNaN(var) && isFinite(var)` instead");
+ return isNumber(prop)&&!isNaN(prop)&&isFinite(prop);
+}
+
+/**
+ * Checks if property is array
+ *
+ * @param {Object} prop value to check
+ * @return {Boolean} true if matched
+ * @scope public
+ * @author Ilya Lebedev <ilya@lebedev.net>
+ */
+function isArray (prop /* :Object */) /* :Boolean */ {
+ DEPRECATED("Use `var instanceof Array` instead");
+ return (prop instanceof Array);
+}
+
+/**
+ * Checks if property is regexp
+ *
+ * @param {Object} prop value to check
+ * @return {Boolean} true if matched
+ * @scope public
+ * @author Ilya Lebedev <ilya@lebedev.net>
+ */
+function isRegExp (prop /* :Object */) /* :Boolean */ {
+ DEPRECATED("Use `var instanceof RegExp` instead");
+ return (prop instanceof RegExp);
+}
+
+/**
+ * Checks if property is a boolean value
+ *
+ * @param {Object} prop value to check
+ * @return {Boolean} true if matched
+ * @scope public
+ * @author Ilya Lebedev <ilya@lebedev.net>
+ */
+function isBoolean (prop /* :Object */) /* :Boolean */ {
+ DEPRECATED("Use `typeof var === 'boolean'` instead");
+ return ('boolean' == typeof prop);
+}
+
+/**
+ * Checks if property is a scalar value (value that could be used as the hash key)
+ *
+ * @param {Object} prop value to check
+ * @return {Boolean} true if matched
+ * @scope public
+ * @author Ilya Lebedev <ilya@lebedev.net>
+ */
+function isScalar (prop /* :Object */) /* :Boolean */ {
+ DEPRECATED("Use `typeof var === 'string' || (typeof var === 'number' &&" +
+ " !isNaN(var) && isFinite(var))` instead");
+ return isNumeric(prop)||isString(prop);
+}
+
+/**
+ * Checks if property is empty
+ *
+ * @param {Object} prop value to check
+ * @return {Boolean} true if matched
+ * @scope public
+ * @author Ilya Lebedev <ilya@lebedev.net>
+ */
+function isEmpty (prop /* :Object */) /* :Boolean */ {
+ DEPRECATED();
+ var i;
+ if (isBoolean(prop)) {
+ return false;
+ } else if (isRegExp(prop) && new RegExp("").toString() == prop.toString()) {
+ return true;
+ } else if (isString(prop) || isNumber(prop)) {
+ return !prop;
+ } else if (Boolean(prop) && false != prop) {
+ for (i in prop) {
+ if(prop.hasOwnProperty(i)) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+/**
+ * Get the computed style of a node.
+ *
+ * @link https://acidmartin.wordpress.com/2008/08/26/style-get-any-css-property-value-of-an-object/
+ * @link http://svn.dojotoolkit.org/src/dojo/trunk/_base/html.js
+ */
+function gcs(node){
+ DEPRECATED('Use jQuery(node).style() instead');
+ if(node.currentStyle){
+ return node.currentStyle;
+ }else{
+ return node.ownerDocument.defaultView.getComputedStyle(node, null);
+ }
+}
+
+/**
+ * Until 2011-05-25 "Rincewind", a code intended to fix some Safari issue
+ * always declared the global _timer. plugin:sortablejs relies on _timer
+ * being declared.
+ */
+var _timer;
diff --git a/lib/scripts/cookie.js b/lib/scripts/cookie.js
index d7e6b3550..3ad67bfa4 100644
--- a/lib/scripts/cookie.js
+++ b/lib/scripts/cookie.js
@@ -1,15 +1,16 @@
/**
- * Handles the cookie used by several JavaScript functions
- *
- * Only a single cookie is written and read. You may only save
- * sime name-value pairs - no complex types!
- *
- * You should only use the getValue and setValue methods
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-DokuCookie = {
- data: Array(),
+* Handles the cookie used by several JavaScript functions
+*
+* Only a single cookie is written and read. You may only save
+* simple name-value pairs - no complex types!
+*
+* You should only use the getValue and setValue methods
+*
+* @author Andreas Gohr <andi@splitbrain.org>
+* @author Michal Rezler <m.rezler@centrum.cz>
+*/
+var DokuCookie = {
+ data: {},
name: 'DOKU_PREFS',
/**
@@ -18,21 +19,18 @@ DokuCookie = {
* @author Andreas Gohr <andi@splitbrain.org>
*/
setValue: function(key,val){
- DokuCookie.init();
- DokuCookie.data[key] = val;
-
- // prepare expire date
- var now = new Date();
- DokuCookie.fixDate(now);
- now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000); //expire in a year
+ var text = [],
+ _this = this;
+ this.init();
+ this.data[key] = val;
//save the whole data array
- var text = '';
- for(var key in DokuCookie.data){
- if (!DokuCookie.data.hasOwnProperty(key)) continue;
- text += '#'+escape(key)+'#'+DokuCookie.data[key];
- }
- DokuCookie.setCookie(DokuCookie.name,text.substr(1),now,DOKU_BASE);
+ jQuery.each(_this.data, function (key, val) {
+ if (_this.data.hasOwnProperty(key)) {
+ text.push(encodeURIComponent(key)+'#'+encodeURIComponent(val));
+ }
+ });
+ jQuery.cookie(this.name, text.join('#'), {expires: 365, path: DOKU_BASE});
},
/**
@@ -41,8 +39,8 @@ DokuCookie = {
* @author Andreas Gohr <andi@splitbrain.org>
*/
getValue: function(key){
- DokuCookie.init();
- return DokuCookie.data[key];
+ this.init();
+ return this.data[key];
},
/**
@@ -51,62 +49,16 @@ DokuCookie = {
* @author Andreas Gohr <andi@splitbrain.org>
*/
init: function(){
- if(DokuCookie.data.length) return;
- var text = DokuCookie.getCookie(DokuCookie.name);
+ var text, parts, i;
+ if(!jQuery.isEmptyObject(this.data)) {
+ return;
+ }
+ text = jQuery.cookie(this.name);
if(text){
- var parts = text.split('#');
- for(var i=0; i<parts.length; i+=2){
- DokuCookie.data[unescape(parts[i])] = unescape(parts[i+1]);
+ parts = text.split('#');
+ for(i = 0; i < parts.length; i += 2){
+ this.data[decodeURIComponent(parts[i])] = decodeURIComponent(parts[i+1]);
}
}
- },
-
- /**
- * This sets a cookie by JavaScript
- *
- * @link http://www.webreference.com/js/column8/functions.html
- */
- setCookie: function(name, value, expires, path, domain, secure) {
- var curCookie = name + "=" + escape(value) +
- ((expires) ? "; expires=" + expires.toGMTString() : "") +
- ((path) ? "; path=" + path : "") +
- ((domain) ? "; domain=" + domain : "") +
- ((secure) ? "; secure" : "");
- document.cookie = curCookie;
- },
-
- /**
- * This reads a cookie by JavaScript
- *
- * @link http://www.webreference.com/js/column8/functions.html
- */
- getCookie: function(name) {
- var dc = document.cookie;
- var prefix = name + "=";
- var begin = dc.indexOf("; " + prefix);
- if (begin == -1) {
- begin = dc.indexOf(prefix);
- if (begin !== 0){ return null; }
- } else {
- begin += 2;
- }
- var end = document.cookie.indexOf(";", begin);
- if (end == -1){
- end = dc.length;
- }
- return unescape(dc.substring(begin + prefix.length, end));
- },
-
- /**
- * This is needed for the cookie functions
- *
- * @link http://www.webreference.com/js/column8/functions.html
- */
- fixDate: function(date) {
- var base = new Date(0);
- var skew = base.getTime();
- if (skew > 0){
- date.setTime(date.getTime() - skew);
- }
}
};
diff --git a/lib/scripts/delay.js b/lib/scripts/delay.js
index 2ef9f8846..edd53def3 100644
--- a/lib/scripts/delay.js
+++ b/lib/scripts/delay.js
@@ -51,6 +51,7 @@ Delay.prototype = {
},
start: function () {
+ DEPRECATED('don\'t use the Delay object, use window.timeout with a callback instead');
this.delTimer();
var _this = this;
this.timer = timer.add(function () { _this.exec.call(_this); },
diff --git a/lib/scripts/drag.js b/lib/scripts/drag.js
index 2212fb6c1..dd252d95d 100644
--- a/lib/scripts/drag.js
+++ b/lib/scripts/drag.js
@@ -5,6 +5,7 @@
* customization, drag can be used as a javascript prototype, it is
* inheritance-aware.
*
+ * @deprecated
* @link http://nofunc.org/Drag_Drop/
*/
var drag = {
@@ -25,6 +26,7 @@ var drag = {
* @param DOMObject handle A handle on which the obj can be dragged
*/
attach: function (obj,handle) {
+ DEPRECATED('Use jQuery.draggable() instead.');
if(handle){
handle.dragobject = obj;
}else{
diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js
index a96a346dc..33a8f61b5 100644
--- a/lib/scripts/edit.js
+++ b/lib/scripts/edit.js
@@ -11,37 +11,39 @@
* Style the buttons through the toolbutton class
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @author Michal Rezler <m.rezler@centrum.cz>
*/
function createToolButton(icon,label,key,id,classname){
- var btn = document.createElement('button');
- var ico = document.createElement('img');
+ var $btn = jQuery(document.createElement('button')),
+ $ico = jQuery(document.createElement('img'));
- // preapare the basic button stuff
- btn.className = 'toolbutton';
+ // prepare the basic button stuff
+ $btn.addClass('toolbutton');
if(classname){
- btn.className += ' '+classname;
+ $btn.addClass(classname);
}
- btn.title = label;
+
+ $btn.attr('title', label);
if(key){
- btn.title += ' ['+key.toUpperCase()+']';
- btn.accessKey = key;
+ $btn.attr('title', label + ' ['+key.toUpperCase()+']')
+ .attr('accessKey', key);
}
// set IDs if given
if(id){
- btn.id = id;
- ico.id = id+'_ico';
+ $btn.attr('id', id);
+ $ico.attr('id', id+'_ico');
}
// create the icon and add it to the button
- if(icon.substr(0,1) == '/'){
- ico.src = icon;
- }else{
- ico.src = DOKU_BASE+'lib/images/toolbar/'+icon;
+ if(icon.substr(0,1) !== '/'){
+ icon = DOKU_BASE + 'lib/images/toolbar/' + icon;
}
- btn.appendChild(ico);
+ $ico.attr('src', icon);
+ $btn.append($ico);
- return btn;
+ // we have to return a DOM object (for compatibility reasons)
+ return $btn[0];
}
/**
@@ -59,56 +61,51 @@ function createToolButton(icon,label,key,id,classname){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function createPicker(id,props,edid){
- var icobase = props['icobase'];
- var list = props['list'];
-
// create the wrapping div
- var picker = document.createElement('div');
- picker.className = 'picker';
+ var $picker = jQuery(document.createElement('div'));
+
+ $picker.addClass('picker a11y');
if(props['class']){
- picker.className += ' '+props['class'];
+ $picker.addClass(props['class']);
}
- picker.id = id;
- picker.style.position = 'absolute';
- picker.style.marginLeft = '-10000px'; // no display:none, to keep access keys working
- picker.style.marginTop = '-10000px';
- for(var key in list){
- if (!list.hasOwnProperty(key)) continue;
+ $picker.attr('id', id).css('position', 'absolute');
+
+ function $makebutton(title) {
+ var $btn = jQuery(document.createElement('button'))
+ .addClass('pickerbutton').attr('title', title)
+ .bind('click', bind(pickerInsert, title, edid))
+ .appendTo($picker);
+ return $btn;
+ }
+
+ jQuery.each(props.list, function (key, item) {
+ if (!props.list.hasOwnProperty(key)) {
+ return;
+ }
if(isNaN(key)){
- // associative array -> treat as image/value pairs
- var btn = document.createElement('button');
- btn.className = 'pickerbutton';
- var ico = document.createElement('img');
- if(list[key].substr(0,1) == '/'){
- ico.src = list[key];
- }else{
- ico.src = DOKU_BASE+'lib/images/'+icobase+'/'+list[key];
+ // associative array -> treat as text => image pairs
+ if (item.substr(0,1) !== '/') {
+ item = DOKU_BASE+'lib/images/'+props.icobase+'/'+item;
}
- btn.title = key;
- btn.appendChild(ico);
- addEvent(btn,'click',bind(pickerInsert,key,edid));
- picker.appendChild(btn);
- }else if(isString(list[key])){
+ jQuery(document.createElement('img'))
+ .attr('src', item)
+ .appendTo($makebutton(key));
+ }else if (typeof item == 'string'){
// a list of text -> treat as text picker
- var btn = document.createElement('button');
- btn.className = 'pickerbutton';
- var txt = document.createTextNode(list[key]);
- btn.title = list[key];
- btn.appendChild(txt);
- addEvent(btn,'click',bind(pickerInsert,list[key],edid));
- picker.appendChild(btn);
+ $makebutton(item).text(item);
}else{
// a list of lists -> treat it as subtoolbar
- initToolbar(picker,edid,list);
- break; // all buttons handled already
+ initToolbar($picker,edid,props.list);
+ return false; // all buttons handled already
}
- }
- var body = document.getElementsByTagName('body')[0];
- body.appendChild(picker);
- return picker;
+ });
+ jQuery('body').append($picker);
+
+ // we have to return a DOM object (for compatibility reasons)
+ return $picker[0];
}
/**
@@ -130,131 +127,41 @@ function pickerInsert(text,edid){
* @return boolean If button should be appended
* @author Gabriel Birke <birke@d-scribe.de>
*/
-function addBtnActionSignature(btn, props, edid) {
- if(typeof(SIG) != 'undefined' && SIG != ''){
- addEvent(btn,'click',bind(insertAtCarret,edid,SIG));
+function addBtnActionSignature($btn, props, edid) {
+ if(typeof SIG != 'undefined' && SIG != ''){
+ $btn.bind('click', bind(insertAtCarret,edid,SIG));
return true;
}
return false;
}
/**
- * Make intended formattings easier to handle
- *
- * Listens to all key inputs and handle indentions
- * of lists and code blocks
- *
- * Currently handles space, backspce and enter presses
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @fixme handle tabs
- */
-function keyHandler(e){
- if(e.keyCode != 13 &&
- e.keyCode != 8 &&
- e.keyCode != 32) return;
- var field = e.target;
- var selection = getSelection(field);
- if(selection.getLength()) return; //there was text selected, keep standard behavior
- var search = "\n"+field.value.substr(0,selection.start);
- var linestart = Math.max(search.lastIndexOf("\n"),
- search.lastIndexOf("\r")); //IE workaround
- search = search.substr(linestart);
-
-
- if(e.keyCode == 13){ // Enter
- // keep current indention for lists and code
- var match = search.match(/(\n +([\*-] ?)?)/);
- if(match){
- var scroll = field.scrollHeight;
- var match2 = search.match(/^\n +[\*-]\s*$/);
- // Cancel list if the last item is empty (i. e. two times enter)
- if (match2 && field.value.substr(selection.start).match(/^($|\r?\n)/)) {
- field.value = field.value.substr(0, linestart) + "\n" +
- field.value.substr(selection.start);
- selection.start = linestart + 1;
- selection.end = linestart + 1;
- setSelection(selection);
- } else {
- insertAtCarret(field.id,match[1]);
- }
- field.scrollTop += (field.scrollHeight - scroll);
- e.preventDefault(); // prevent enter key
- return false;
- }
- }else if(e.keyCode == 8){ // Backspace
- // unindent lists
- var match = search.match(/(\n +)([*-] ?)$/);
- if(match){
- var spaces = match[1].length-1;
-
- if(spaces > 3){ // unindent one level
- field.value = field.value.substr(0,linestart)+
- field.value.substr(linestart+2);
- selection.start = selection.start - 2;
- selection.end = selection.start;
- }else{ // delete list point
- field.value = field.value.substr(0,linestart)+
- field.value.substr(selection.start);
- selection.start = linestart;
- selection.end = linestart;
- }
- setSelection(selection);
- e.preventDefault(); // prevent backspace
- return false;
- }
- }else if(e.keyCode == 32){ // Space
- // intend list item
- var match = search.match(/(\n +)([*-] )$/);
- if(match){
- field.value = field.value.substr(0,linestart)+' '+
- field.value.substr(linestart);
- selection.start = selection.start + 2;
- selection.end = selection.start;
- setSelection(selection);
- e.preventDefault(); // prevent space
- return false;
- }
- }
-}
-
-//FIXME consolidate somewhere else
-addInitEvent(function(){
- var field = $('wiki__text');
- if(!field) return;
- // in Firefox, keypress doesn't send the correct keycodes,
- // in Opera, the default of keydown can't be prevented
- if (is_opera) {
- addEvent(field,'keypress',keyHandler);
- } else {
- addEvent(field,'keydown',keyHandler);
- }
-});
-
-/**
* Determine the current section level while editing
*
* @author Andreas Gohr <gohr@cosmocode.de>
*/
function currentHeadlineLevel(textboxId){
- var field = $(textboxId);
- var selection = getSelection(field);
- var search = "\n"+field.value.substr(0,selection.start);
- var lasthl = search.lastIndexOf("\n==");
- if(lasthl == -1 && field.form.prefix){
+ var field = jQuery('#' + textboxId)[0],
+ s = false,
+ opts = [field.value.substr(0,getSelection(field).start)];
+ if (field.form.prefix) {
// we need to look in prefix context
- search = field.form.prefix.value;
- lasthl = search.lastIndexOf("\n==");
+ opts.push(field.form.prefix.value);
}
- search = search.substr(lasthl+1,6);
- if(search == '======') return 1;
- if(search.substr(0,5) == '=====') return 2;
- if(search.substr(0,4) == '====') return 3;
- if(search.substr(0,3) == '===') return 4;
- if(search.substr(0,2) == '==') return 5;
-
- return 0;
+ jQuery.each(opts, function (_, opt) {
+ // Check whether there is a headline in the given string
+ var str = "\n" + opt,
+ lasthl = str.lastIndexOf("\n==");
+ if (lasthl !== -1) {
+ s = str.substr(lasthl+1,6);
+ return false;
+ }
+ });
+ if (s === false) {
+ return 0;
+ }
+ return 7 - s.match(/^={2,6}/)[0].length;
}
@@ -267,23 +174,23 @@ window.textChanged = false;
* Delete the draft before leaving the page
*/
function deleteDraft() {
- if (is_opera) return;
- if (window.keepDraft) return;
+ if (is_opera || window.keepDraft) {
+ return;
+ }
- // remove a possibly saved draft using ajax
- var dwform = $('dw__editform');
- if(dwform){
- var params = 'call=draftdel';
- params += '&id='+encodeURIComponent(dwform.elements.id.value);
-
- var sackobj = new sack(DOKU_BASE + 'lib/exe/ajax.php');
- // this needs to be synchronous and GET to not be aborted upon page unload
- sackobj.asynchronous = false;
- sackobj.method = 'GET';
- sackobj.AjaxFailedAlert = '';
- sackobj.encodeURIString = false;
- sackobj.runAJAX(params);
+ var $dwform = jQuery('#dw__editform');
+
+ if($dwform.length === 0) {
+ return;
}
+
+ // remove a possibly saved draft using ajax
+ jQuery.post(DOKU_BASE + 'lib/exe/ajax.php',
+ {
+ call: 'draftdel',
+ id: $dwform.find('input[name=id]').val()
+ }
+ );
}
/**
@@ -292,28 +199,33 @@ function deleteDraft() {
*
* Sets focus to the editbox as well
*/
-addInitEvent(function (){
- var editform = $('dw__editform');
- if (!editform) return;
+jQuery(function () {
+ var $editform = jQuery('#dw__editform');
+ if ($editform.length == 0) {
+ return;
+ }
- var edit_text = $('wiki__text');
- if(edit_text) {
- if(edit_text.readOnly) return;
+ var $edit_text = jQuery('#wiki__text');
+ if ($edit_text.length > 0) {
+ if($edit_text.attr('readOnly')) {
+ return;
+ }
// set focus and place cursor at the start
- var sel = getSelection(edit_text);
+ var sel = getSelection($edit_text[0]);
sel.start = 0;
sel.end = 0;
setSelection(sel);
- edit_text.focus();
+ $edit_text.focus();
}
- var checkfunc = function(){
- window.textChanged = true; //global var
+ var checkfunc = function() {
+ textChanged = true; //global var
summaryCheck();
};
- addEvent(editform, 'change', checkfunc);
- addEvent(editform, 'keydown', checkfunc);
+
+ $editform.change(checkfunc);
+ $editform.keydown(checkfunc);
window.onbeforeunload = function(){
if(window.textChanged) {
@@ -323,20 +235,25 @@ addInitEvent(function (){
window.onunload = deleteDraft;
// reset change memory var on submit
- addEvent($('edbtn__save'), 'click', function(){
- window.onbeforeunload = '';
- window.textChanged = false;
- });
- addEvent($('edbtn__preview'), 'click', function(){
- window.onbeforeunload = '';
- window.textChanged = false;
- window.keepDraft = true; // needed to keep draft on page unload
- });
+ jQuery('#edbtn__save').click(
+ function() {
+ window.onbeforeunload = '';
+ textChanged = false;
+ }
+ );
+ jQuery('#edbtn__preview').click(
+ function() {
+ window.onbeforeunload = '';
+ textChanged = false;
+ window.keepDraft = true; // needed to keep draft on page unload
+ }
+ );
- var summary = $('edit__summary');
- addEvent(summary, 'change', summaryCheck);
- addEvent(summary, 'keyup', summaryCheck);
- if (window.textChanged) summaryCheck();
+ var $summary = jQuery('#edit__summary');
+ $summary.change(summaryCheck);
+ $summary.keyup(summaryCheck);
+
+ if (textChanged) summaryCheck();
});
/**
@@ -345,11 +262,7 @@ addInitEvent(function (){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function summaryCheck(){
- var sum = document.getElementById('edit__summary');
- if(sum.value === ''){
- sum.className='missing';
- }else{
- sum.className='edit';
- }
+ var $sum = jQuery('#edit__summary'),
+ missing = $sum.val() === '';
+ $sum.toggleClass('missing', missing).toggleClass('edit', !missing);
}
-
diff --git a/lib/scripts/editor.js b/lib/scripts/editor.js
new file mode 100644
index 000000000..2009ce6af
--- /dev/null
+++ b/lib/scripts/editor.js
@@ -0,0 +1,204 @@
+/**
+ * The DokuWiki editor features
+ *
+ * These are the advanced features of the editor. It does NOT contain any
+ * code for the toolbar buttons and it functions. See toolbar.js for that.
+ */
+
+var dw_editor = {
+
+ /**
+ * initialize the default editor functionality
+ *
+ * All other functions can also be called separately for non-default
+ * textareas
+ */
+ init: function(){
+ var $editor = jQuery('#wiki__text');
+ if($editor.length === 0) {
+ return;
+ }
+
+ dw_editor.initSizeCtl('#size__ctl',$editor);
+
+ if($editor.attr('readOnly')) {
+ return;
+ }
+
+ // in Firefox, keypress doesn't send the correct keycodes,
+ // in Opera, the default of keydown can't be prevented
+ if (jQuery.browser.opera) {
+ $editor.keypress(dw_editor.keyHandler);
+ } else {
+ $editor.keydown(dw_editor.keyHandler);
+ }
+
+ },
+
+ /**
+ * Add the edit window size and wrap controls
+ *
+ * Initial values are read from cookie if it exists
+ *
+ * @param selector ctlarea the div to place the controls
+ * @param selector editor the textarea to control
+ */
+ initSizeCtl: function(ctlarea,editor){
+ var $ctl = jQuery(ctlarea),
+ $textarea = jQuery(editor);
+
+ if($ctl.length === 0 || $textarea.length === 0) {
+ return;
+ }
+
+ $textarea.css('height', DokuCookie.getValue('sizeCtl') || '300px');
+
+ var wrp = DokuCookie.getValue('wrapCtl');
+ if(wrp){
+ dw_editor.setWrap($textarea[0], wrp);
+ } // else use default value
+
+ jQuery.each([
+ ['larger', function(){dw_editor.sizeCtl(editor,100);}],
+ ['smaller', function(){dw_editor.sizeCtl(editor,-100);}],
+ ['wrap', function(){dw_editor.toggleWrap(editor);}],
+ ], function (_, img) {
+ jQuery(document.createElement('img'))
+ .attr('src', DOKU_BASE+'lib/images/' + img[0] + '.gif')
+ .click(img[1])
+ .appendTo($ctl);
+ });
+ },
+
+ /**
+ * This sets the vertical size of the editbox and adjusts the cookie
+ *
+ * @param selector editor the textarea to control
+ * @param int val the relative value to resize in pixel
+ */
+ sizeCtl: function(editor,val){
+ var $textarea = jQuery(editor),
+ height = parseInt($textarea.css('height')) + val;
+ $textarea.css('height', height+'px');
+ DokuCookie.setValue('sizeCtl',$textarea.css('height'));
+ },
+
+ /**
+ * Toggle the wrapping mode of the editor textarea and adjusts the
+ * cookie
+ *
+ * @param selector editor the textarea to control
+ */
+ toggleWrap: function(editor){
+ var $textarea = jQuery(editor),
+ wrap = $textarea.attr('wrap');
+ dw_editor.setWrap($textarea[0],
+ (wrap && wrap.toLowerCase() == 'off') ? 'soft' : 'off');
+ DokuCookie.setValue('wrapCtl',$textarea.attr('wrap'));
+ },
+
+ /**
+ * Set the wrapping mode of a textarea
+ *
+ * @author Fluffy Convict <fluffyconvict@hotmail.com>
+ * @author <shutdown@flashmail.com>
+ * @link http://news.hping.org/comp.lang.javascript.archive/12265.html
+ * @link https://bugzilla.mozilla.org/show_bug.cgi?id=41464
+ * @param DomObject textarea
+ * @param string wrapAttrValue
+ */
+ setWrap: function(textarea, wrapAttrValue){
+ textarea.setAttribute('wrap', wrapAttrValue);
+
+ // Fix display for mozilla
+ var parNod = textarea.parentNode;
+ var nxtSib = textarea.nextSibling;
+ parNod.removeChild(textarea);
+ parNod.insertBefore(textarea, nxtSib);
+ },
+
+ /**
+ * Make intended formattings easier to handle
+ *
+ * Listens to all key inputs and handle indentions
+ * of lists and code blocks
+ *
+ * Currently handles space, backspce and enter presses
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @fixme handle tabs
+ * @param event e - the key press event object
+ */
+ keyHandler: function(e){
+ if([8, 13, 32].indexOf(e.keyCode) === -1) {
+ return;
+ }
+ var selection = getSelection(this);
+ if(selection.getLength() > 0) {
+ return; //there was text selected, keep standard behavior
+ }
+ var search = "\n"+this.value.substr(0,selection.start);
+ var linestart = Math.max(search.lastIndexOf("\n"),
+ search.lastIndexOf("\r")); //IE workaround
+ search = search.substr(linestart);
+
+ if(e.keyCode == 13){ // Enter
+ // keep current indention for lists and code
+ var match = search.match(/(\n +([\*-] ?)?)/);
+ if(match){
+ var scroll = this.scrollHeight;
+ var match2 = search.match(/^\n +[\*-]\s*$/);
+ // Cancel list if the last item is empty (i. e. two times enter)
+ if (match2 && this.value.substr(selection.start).match(/^($|\r?\n)/)) {
+ this.value = this.value.substr(0, linestart) + "\n" +
+ this.value.substr(selection.start);
+ selection.start = linestart + 1;
+ selection.end = linestart + 1;
+ setSelection(selection);
+ } else {
+ insertAtCarret(this.id,match[1]);
+ }
+ this.scrollTop += (this.scrollHeight - scroll);
+ e.preventDefault(); // prevent enter key
+ return false;
+ }
+ }else if(e.keyCode == 8){ // Backspace
+ // unindent lists
+ var match = search.match(/(\n +)([*-] ?)$/);
+ if(match){
+ var spaces = match[1].length-1;
+
+ if(spaces > 3){ // unindent one level
+ this.value = this.value.substr(0,linestart)+
+ this.value.substr(linestart+2);
+ selection.start = selection.start - 2;
+ selection.end = selection.start;
+ }else{ // delete list point
+ this.value = this.value.substr(0,linestart)+
+ this.value.substr(selection.start);
+ selection.start = linestart;
+ selection.end = linestart;
+ }
+ setSelection(selection);
+ e.preventDefault(); // prevent backspace
+ return false;
+ }
+ }else if(e.keyCode == 32){ // Space
+ // intend list item
+ var match = search.match(/(\n +)([*-] )$/);
+ if(match){
+ this.value = this.value.substr(0,linestart)+' '+
+ this.value.substr(linestart);
+ selection.start = selection.start + 2;
+ selection.end = selection.start;
+ setSelection(selection);
+ e.preventDefault(); // prevent space
+ return false;
+ }
+ }
+ }
+
+
+};
+
+jQuery(dw_editor.init);
diff --git a/lib/scripts/events.js b/lib/scripts/events.js
deleted file mode 100644
index a1fcac718..000000000
--- a/lib/scripts/events.js
+++ /dev/null
@@ -1,181 +0,0 @@
-// written by Dean Edwards, 2005
-// with input from Tino Zijdel
-
-// http://dean.edwards.name/weblog/2005/10/add-event/
-
-function addEvent(element, type, handler) {
- // assign each event handler a unique ID
- if (!handler.$$guid) handler.$$guid = addEvent.guid++;
- // create a hash table of event types for the element
- if (!element.events) element.events = {};
- // create a hash table of event handlers for each element/event pair
- var handlers = element.events[type];
- if (!handlers) {
- handlers = element.events[type] = {};
- // store the existing event handler (if there is one)
- if (element["on" + type]) {
- handlers[0] = element["on" + type];
- }
- }
- // store the event handler in the hash table
- handlers[handler.$$guid] = handler;
- // assign a global event handler to do all the work
- element["on" + type] = handleEvent;
-};
-// a counter used to create unique IDs
-addEvent.guid = 1;
-
-function removeEvent(element, type, handler) {
- // delete the event handler from the hash table
- if (element.events && element.events[type]) {
- delete element.events[type][handler.$$guid];
- }
-};
-
-function handleEvent(event) {
- var returnValue = true;
- // grab the event object (IE uses a global event object)
- event = event || fixEvent(window.event, this);
- // get a reference to the hash table of event handlers
- var handlers = this.events[event.type];
- // execute each event handler
- for (var i in handlers) {
- if (!handlers.hasOwnProperty(i)) continue;
- if (handlers[i].call(this, event) === false) {
- returnValue = false;
- }
- }
- return returnValue;
-};
-
-function fixEvent(event, _this) {
- // add W3C standard event methods
- event.preventDefault = fixEvent.preventDefault;
- event.stopPropagation = fixEvent.stopPropagation;
- // fix target
- event.target = event.srcElement;
- event.currentTarget = _this;
- // fix coords
- var base = (document.documentElement.scrollTop?document.documentElement:document.body);
- event.pageX = (typeof event.pageX !== 'undefined') ? event.pageX : event.clientX + base.scrollLeft;
- event.pageY = (typeof event.pageY !== 'undefined') ? event.pageY : event.clientY + base.scrollTop;
-
- return event;
-};
-fixEvent.preventDefault = function() {
- this.returnValue = false;
-};
-fixEvent.stopPropagation = function() {
- this.cancelBubble = true;
-};
-
-
-/**
- * Pseudo event handler to be fired after the DOM was parsed or
- * on window load at last.
- *
- * @author based upon some code by Dean Edwards
- * @author Dean Edwards
- * @link http://dean.edwards.name/weblog/2006/06/again/
- */
-window.fireoninit = function() {
- // quit if this function has already been called
- if (arguments.callee.done) return;
- // flag this function so we don't do the same thing twice
- arguments.callee.done = true;
- // kill the timer
- if (_timer) {
- clearInterval(_timer);
- _timer = null;
- }
-
- if (typeof window.oninit == 'function') {
- window.oninit();
- }
-};
-
-/**
- * Run the fireoninit function as soon as possible after
- * the DOM was loaded, using different methods for different
- * Browsers
- *
- * @author Dean Edwards
- * @link http://dean.edwards.name/weblog/2006/06/again/
- */
- // for Mozilla
- if (document.addEventListener) {
- document.addEventListener("DOMContentLoaded", window.fireoninit, null);
- }
-
- // for Internet Explorer (using conditional comments)
- /*@cc_on
- @if (@_win32)
- document.write("<scr" + "ipt id=\"__ie_init\" defer=\"true\" src=\"//:\"><\/script>");
- var script = document.getElementById("__ie_init");
- script.onreadystatechange = function() {
- if (this.readyState == "complete") {
- window.fireoninit(); // call the onload handler
- }
- };
- @end @*/
-
- // for Safari
- if (/WebKit/i.test(navigator.userAgent)) { // sniff
- var _timer = setInterval(function() {
- if (/loaded|complete/.test(document.readyState)) {
- window.fireoninit(); // call the onload handler
- }
- }, 10);
- }
-
- // for other browsers
- window.onload = window.fireoninit;
-
-
-/**
- * This is a pseudo Event that will be fired by the fireoninit
- * function above.
- *
- * Use addInitEvent to bind to this event!
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @see fireoninit()
- */
-window.oninit = function(){};
-
-/**
- * Bind a function to the window.init pseudo event
- *
- * @author Simon Willison
- * @see http://simon.incutio.com/archive/2004/05/26/addLoadEvent
- */
-function addInitEvent(func) {
- var oldoninit = window.oninit;
- if (typeof window.oninit != 'function') {
- window.oninit = func;
- } else {
- window.oninit = function() {
- oldoninit();
- func();
- };
- }
-}
-
-/**
- * Bind variables to a function call creating a closure
- *
- * Use this to circumvent variable scope problems when creating closures
- * inside a loop
- *
- * @author Adrian Lang <lang@cosmocode.de>
- * @link http://www.cosmocode.de/en/blog/gohr/2009-10/15-javascript-fixing-the-closure-scope-in-loops
- * @param functionref fnc - the function to be called
- * @param mixed - any arguments to be passed to the function
- * @returns functionref
- */
-function bind (fnc) {
- var args = Array.prototype.slice.call(arguments, 1);
- return function() {
- return fnc.apply(this, args);
- };
-}
diff --git a/lib/scripts/fileuploader.js b/lib/scripts/fileuploader.js
new file mode 100644
index 000000000..e75b8d3a5
--- /dev/null
+++ b/lib/scripts/fileuploader.js
@@ -0,0 +1,1247 @@
+/**
+ * http://github.com/valums/file-uploader
+ *
+ * Multiple file upload component with progress-bar, drag-and-drop.
+ * © 2010 Andrew Valums ( andrew(at)valums.com )
+ *
+ * Licensed under GNU GPL 2 or later and GNU LGPL 2 or later, see license.txt.
+ */
+
+//
+// Helper functions
+//
+
+var qq = qq || {};
+
+/**
+ * Adds all missing properties from second obj to first obj
+ */
+qq.extend = function(first, second){
+ for (var prop in second){
+ first[prop] = second[prop];
+ }
+};
+
+/**
+ * Searches for a given element in the array, returns -1 if it is not present.
+ * @param {Number} [from] The index at which to begin the search
+ */
+qq.indexOf = function(arr, elt, from){
+ if (arr.indexOf) return arr.indexOf(elt, from);
+
+ from = from || 0;
+ var len = arr.length;
+
+ if (from < 0) from += len;
+
+ for (; from < len; from++){
+ if (from in arr && arr[from] === elt){
+ return from;
+ }
+ }
+ return -1;
+};
+
+qq.getUniqueId = (function(){
+ var id = 0;
+ return function(){ return id++; };
+})();
+
+//
+// Events
+
+qq.attach = function(element, type, fn){
+ if (element.addEventListener){
+ element.addEventListener(type, fn, false);
+ } else if (element.attachEvent){
+ element.attachEvent('on' + type, fn);
+ }
+};
+qq.detach = function(element, type, fn){
+ if (element.removeEventListener){
+ element.removeEventListener(type, fn, false);
+ } else if (element.attachEvent){
+ element.detachEvent('on' + type, fn);
+ }
+};
+
+qq.preventDefault = function(e){
+ if (e.preventDefault){
+ e.preventDefault();
+ } else{
+ e.returnValue = false;
+ }
+};
+
+//
+// Node manipulations
+
+/**
+ * Insert node a before node b.
+ */
+qq.insertBefore = function(a, b){
+ b.parentNode.insertBefore(a, b);
+};
+qq.remove = function(element){
+ element.parentNode.removeChild(element);
+};
+
+qq.contains = function(parent, descendant){
+ // compareposition returns false in this case
+ if (parent == descendant) return true;
+
+ if (parent.contains){
+ return parent.contains(descendant);
+ } else {
+ return !!(descendant.compareDocumentPosition(parent) & 8);
+ }
+};
+
+/**
+ * Creates and returns element from html string
+ * Uses innerHTML to create an element
+ */
+qq.toElement = (function(){
+ var div = document.createElement('div');
+ return function(html){
+ div.innerHTML = html;
+ var element = div.firstChild;
+ div.removeChild(element);
+ return element;
+ };
+})();
+
+//
+// Node properties and attributes
+
+/**
+ * Sets styles for an element.
+ * Fixes opacity in IE6-8.
+ */
+qq.css = function(element, styles){
+ if (styles.opacity != null){
+ if (typeof element.style.opacity != 'string' && typeof(element.filters) != 'undefined'){
+ styles.filter = 'alpha(opacity=' + Math.round(100 * styles.opacity) + ')';
+ }
+ }
+ qq.extend(element.style, styles);
+};
+qq.hasClass = function(element, name){
+ var re = new RegExp('(^| )' + name + '( |$)');
+ return re.test(element.className);
+};
+qq.addClass = function(element, name){
+ if (!qq.hasClass(element, name)){
+ element.className += ' ' + name;
+ }
+};
+qq.removeClass = function(element, name){
+ var re = new RegExp('(^| )' + name + '( |$)');
+ element.className = element.className.replace(re, ' ').replace(/^\s+|\s+$/g, "");
+};
+qq.setText = function(element, text){
+ element.innerText = text;
+ element.textContent = text;
+};
+
+//
+// Selecting elements
+
+qq.children = function(element){
+ var children = [],
+ child = element.firstChild;
+
+ while (child){
+ if (child.nodeType == 1){
+ children.push(child);
+ }
+ child = child.nextSibling;
+ }
+
+ return children;
+};
+
+qq.getByClass = function(element, className){
+ if (element.querySelectorAll){
+ return element.querySelectorAll('.' + className);
+ }
+
+ var result = [];
+ var candidates = element.getElementsByTagName("*");
+ var len = candidates.length;
+
+ for (var i = 0; i < len; i++){
+ if (qq.hasClass(candidates[i], className)){
+ result.push(candidates[i]);
+ }
+ }
+ return result;
+};
+
+/**
+ * obj2url() takes a json-object as argument and generates
+ * a querystring. pretty much like jQuery.param()
+ *
+ * how to use:
+ *
+ * `qq.obj2url({a:'b',c:'d'},'http://any.url/upload?otherParam=value');`
+ *
+ * will result in:
+ *
+ * `http://any.url/upload?otherParam=value&a=b&c=d`
+ *
+ * @param Object JSON-Object
+ * @param String current querystring-part
+ * @return String encoded querystring
+ */
+qq.obj2url = function(obj, temp, prefixDone){
+ var uristrings = [],
+ prefix = '&',
+ add = function(nextObj, i){
+ var nextTemp = temp
+ ? (/\[\]$/.test(temp)) // prevent double-encoding
+ ? temp
+ : temp+'['+i+']'
+ : i;
+ if ((nextTemp != 'undefined') && (i != 'undefined')) {
+ uristrings.push(
+ (typeof nextObj === 'object')
+ ? qq.obj2url(nextObj, nextTemp, true)
+ : (Object.prototype.toString.call(nextObj) === '[object Function]')
+ ? encodeURIComponent(nextTemp) + '=' + encodeURIComponent(nextObj())
+ : encodeURIComponent(nextTemp) + '=' + encodeURIComponent(nextObj)
+ );
+ }
+ };
+
+ if (!prefixDone && temp) {
+ prefix = (/\?/.test(temp)) ? (/\?$/.test(temp)) ? '' : '&' : '?';
+ uristrings.push(temp);
+ uristrings.push(qq.obj2url(obj));
+ } else if ((Object.prototype.toString.call(obj) === '[object Array]') && (typeof obj != 'undefined') ) {
+ // we wont use a for-in-loop on an array (performance)
+ for (var i = 0, len = obj.length; i < len; ++i){
+ add(obj[i], i);
+ }
+ } else if ((typeof obj != 'undefined') && (obj !== null) && (typeof obj === "object")){
+ // for anything else but a scalar, we will use for-in-loop
+ for (var i in obj){
+ add(obj[i], i);
+ }
+ } else {
+ uristrings.push(encodeURIComponent(temp) + '=' + encodeURIComponent(obj));
+ }
+
+ return uristrings.join(prefix)
+ .replace(/^&/, '')
+ .replace(/%20/g, '+');
+};
+
+//
+//
+// Uploader Classes
+//
+//
+
+var qq = qq || {};
+
+/**
+ * Creates upload button, validates upload, but doesn't create file list or dd.
+ */
+qq.FileUploaderBasic = function(o){
+ this._options = {
+ // set to true to see the server response
+ debug: false,
+ action: '/server/upload',
+ params: {},
+ button: null,
+ multiple: true,
+ maxConnections: 3,
+ // validation
+ allowedExtensions: [],
+ sizeLimit: 0,
+ minSizeLimit: 0,
+ // events
+ // return false to cancel submit
+ onSubmit: function(id, fileName){},
+ onProgress: function(id, fileName, loaded, total){},
+ onComplete: function(id, fileName, responseJSON){},
+ onCancel: function(id, fileName){},
+ // messages
+ messages: {
+ typeError: "{file} has invalid extension. Only {extensions} are allowed.",
+ sizeError: "{file} is too large, maximum file size is {sizeLimit}.",
+ minSizeError: "{file} is too small, minimum file size is {minSizeLimit}.",
+ emptyError: "{file} is empty, please select files again without it.",
+ onLeave: "The files are being uploaded, if you leave now the upload will be cancelled."
+ },
+ showMessage: function(message){
+ alert(message);
+ }
+ };
+ qq.extend(this._options, o);
+
+ // number of files being uploaded
+ this._filesInProgress = 0;
+ this._handler = this._createUploadHandler();
+
+ if (this._options.button){
+ this._button = this._createUploadButton(this._options.button);
+ }
+
+ this._preventLeaveInProgress();
+};
+
+qq.FileUploaderBasic.prototype = {
+ setParams: function(params){
+ this._options.params = params;
+ },
+ getInProgress: function(){
+ return this._filesInProgress;
+ },
+ _createUploadButton: function(element){
+ var self = this;
+
+ return new qq.UploadButton({
+ element: element,
+ multiple: this._options.multiple && qq.UploadHandlerXhr.isSupported(),
+ onChange: function(input){
+ self._onInputChange(input);
+ }
+ });
+ },
+ _createUploadHandler: function(){
+ var self = this,
+ handlerClass;
+
+ if(qq.UploadHandlerXhr.isSupported()){
+ handlerClass = 'UploadHandlerXhr';
+ } else {
+ handlerClass = 'UploadHandlerForm';
+ }
+
+ var handler = new qq[handlerClass]({
+ debug: this._options.debug,
+ action: this._options.action,
+ maxConnections: this._options.maxConnections,
+ onProgress: function(id, fileName, loaded, total){
+ self._onProgress(id, fileName, loaded, total);
+ self._options.onProgress(id, fileName, loaded, total);
+ },
+ onComplete: function(id, fileName, result){
+ self._onComplete(id, fileName, result);
+ self._options.onComplete(id, fileName, result);
+ },
+ onCancel: function(id, fileName){
+ self._onCancel(id, fileName);
+ self._options.onCancel(id, fileName);
+ }
+ });
+
+ return handler;
+ },
+ _preventLeaveInProgress: function(){
+ var self = this;
+
+ qq.attach(window, 'beforeunload', function(e){
+ if (!self._filesInProgress){return;}
+
+ var e = e || window.event;
+ // for ie, ff
+ e.returnValue = self._options.messages.onLeave;
+ // for webkit
+ return self._options.messages.onLeave;
+ });
+ },
+ _onSubmit: function(id, fileName){
+ this._filesInProgress++;
+ },
+ _onProgress: function(id, fileName, loaded, total){
+ },
+ _onComplete: function(id, fileName, result){
+ this._filesInProgress--;
+ if (result.error){
+ this._options.showMessage(result.error);
+ }
+ },
+ _onCancel: function(id, fileName){
+ this._filesInProgress--;
+ },
+ _onInputChange: function(input){
+ if (this._handler instanceof qq.UploadHandlerXhr){
+ this._uploadFileList(input.files);
+ } else {
+ if (this._validateFile(input)){
+ this._uploadFile(input);
+ }
+ }
+ this._button.reset();
+ },
+ _uploadFileList: function(files){
+ for (var i=0; i<files.length; i++){
+ if ( !this._validateFile(files[i])){
+ return;
+ }
+ }
+
+ for (var i=0; i<files.length; i++){
+ this._uploadFile(files[i]);
+ }
+ },
+ _uploadFile: function(fileContainer){
+ var id = this._handler.add(fileContainer);
+ var fileName = this._handler.getName(id);
+
+ if (this._options.onSubmit(id, fileName) !== false){
+ this._onSubmit(id, fileName);
+ this._handler.upload(id, this._options.params);
+ }
+ },
+ _validateFile: function(file){
+ var name, size;
+
+ if (file.value){
+ // it is a file input
+ // get input value and remove path to normalize
+ name = file.value.replace(/.*(\/|\\)/, "");
+ } else {
+ // fix missing properties in Safari
+ name = file.fileName != null ? file.fileName : file.name;
+ size = file.fileSize != null ? file.fileSize : file.size;
+ }
+
+ if (! this._isAllowedExtension(name)){
+ this._error('typeError', name);
+ return false;
+
+ } else if (size === 0){
+ this._error('emptyError', name);
+ return false;
+
+ } else if (size && this._options.sizeLimit && size > this._options.sizeLimit){
+ this._error('sizeError', name);
+ return false;
+
+ } else if (size && size < this._options.minSizeLimit){
+ this._error('minSizeError', name);
+ return false;
+ }
+
+ return true;
+ },
+ _error: function(code, fileName){
+ var message = this._options.messages[code];
+ function r(name, replacement){ message = message.replace(name, replacement); }
+
+ r('{file}', this._formatFileName(fileName));
+ r('{extensions}', this._options.allowedExtensions.join(', '));
+ r('{sizeLimit}', this._formatSize(this._options.sizeLimit));
+ r('{minSizeLimit}', this._formatSize(this._options.minSizeLimit));
+
+ this._options.showMessage(message);
+ },
+ _formatFileName: function(name){
+ if (name.length > 33){
+ name = name.slice(0, 19) + '...' + name.slice(-13);
+ }
+ return name;
+ },
+ _isAllowedExtension: function(fileName){
+ var ext = (-1 !== fileName.indexOf('.')) ? fileName.replace(/.*[.]/, '').toLowerCase() : '';
+ var allowed = this._options.allowedExtensions;
+
+ if (!allowed.length){return true;}
+
+ for (var i=0; i<allowed.length; i++){
+ if (allowed[i].toLowerCase() == ext){ return true;}
+ }
+
+ return false;
+ },
+ _formatSize: function(bytes){
+ var i = -1;
+ do {
+ bytes = bytes / 1024;
+ i++;
+ } while (bytes > 99);
+
+ return Math.max(bytes, 0.1).toFixed(1) + ['kB', 'MB', 'GB', 'TB', 'PB', 'EB'][i];
+ }
+};
+
+
+/**
+ * Class that creates upload widget with drag-and-drop and file list
+ * @inherits qq.FileUploaderBasic
+ */
+qq.FileUploader = function(o){
+ // call parent constructor
+ qq.FileUploaderBasic.apply(this, arguments);
+
+ // additional options
+ qq.extend(this._options, {
+ element: null,
+ // if set, will be used instead of qq-upload-list in template
+ listElement: null,
+
+ template: '<div class="qq-uploader">' +
+ '<div class="qq-upload-drop-area"><span>Drop files here to upload</span></div>' +
+ '<div class="qq-upload-button">Upload a file</div>' +
+ '<ul class="qq-upload-list"></ul>' +
+ '</div>',
+
+ // template for one item in file list
+ fileTemplate: '<li>' +
+ '<span class="qq-upload-file"></span>' +
+ '<span class="qq-upload-spinner"></span>' +
+ '<span class="qq-upload-size"></span>' +
+ '<a class="qq-upload-cancel" href="#">Cancel</a>' +
+ '<span class="qq-upload-failed-text">Failed</span>' +
+ '</li>',
+
+ classes: {
+ // used to get elements from templates
+ button: 'qq-upload-button',
+ drop: 'qq-upload-drop-area',
+ dropActive: 'qq-upload-drop-area-active',
+ list: 'qq-upload-list',
+
+ file: 'qq-upload-file',
+ spinner: 'qq-upload-spinner',
+ size: 'qq-upload-size',
+ cancel: 'qq-upload-cancel',
+
+ // added to list item when upload completes
+ // used in css to hide progress spinner
+ success: 'qq-upload-success',
+ fail: 'qq-upload-fail'
+ }
+ });
+ // overwrite options with user supplied
+ qq.extend(this._options, o);
+
+ this._element = this._options.element;
+ this._element.innerHTML = this._options.template;
+ this._listElement = this._options.listElement || this._find(this._element, 'list');
+
+ this._classes = this._options.classes;
+
+ this._button = this._createUploadButton(this._find(this._element, 'button'));
+
+ this._bindCancelEvent();
+ this._setupDragDrop();
+};
+
+// inherit from Basic Uploader
+qq.extend(qq.FileUploader.prototype, qq.FileUploaderBasic.prototype);
+
+qq.extend(qq.FileUploader.prototype, {
+ /**
+ * Gets one of the elements listed in this._options.classes
+ **/
+ _find: function(parent, type){
+ var element = qq.getByClass(parent, this._options.classes[type])[0];
+ if (!element){
+ throw new Error('element not found ' + type);
+ }
+
+ return element;
+ },
+ _setupDragDrop: function(){
+ var self = this,
+ dropArea = this._find(this._element, 'drop');
+
+ var dz = new qq.UploadDropZone({
+ element: dropArea,
+ onEnter: function(e){
+ qq.addClass(dropArea, self._classes.dropActive);
+ e.stopPropagation();
+ },
+ onLeave: function(e){
+ e.stopPropagation();
+ },
+ onLeaveNotDescendants: function(e){
+ qq.removeClass(dropArea, self._classes.dropActive);
+ },
+ onDrop: function(e){
+ dropArea.style.display = 'none';
+ qq.removeClass(dropArea, self._classes.dropActive);
+ self._uploadFileList(e.dataTransfer.files);
+ }
+ });
+
+ dropArea.style.display = 'none';
+
+ qq.attach(document, 'dragenter', function(e){
+ if (!dz._isValidFileDrag(e)) return;
+
+ dropArea.style.display = 'block';
+ });
+ qq.attach(document, 'dragleave', function(e){
+ if (!dz._isValidFileDrag(e)) return;
+
+ var relatedTarget = document.elementFromPoint(e.clientX, e.clientY);
+ // only fire when leaving document out
+ if ( ! relatedTarget || relatedTarget.nodeName == "HTML"){
+ dropArea.style.display = 'none';
+ }
+ });
+ },
+ _onSubmit: function(id, fileName){
+ qq.FileUploaderBasic.prototype._onSubmit.apply(this, arguments);
+ this._addToList(id, fileName);
+ },
+ _onProgress: function(id, fileName, loaded, total){
+ qq.FileUploaderBasic.prototype._onProgress.apply(this, arguments);
+
+ var item = this._getItemByFileId(id);
+ var size = this._find(item, 'size');
+ size.style.display = 'inline';
+
+ var text;
+ if (loaded != total){
+ text = Math.round(loaded / total * 100) + '% from ' + this._formatSize(total);
+ } else {
+ text = this._formatSize(total);
+ }
+
+ qq.setText(size, text);
+ },
+ _onComplete: function(id, fileName, result){
+ qq.FileUploaderBasic.prototype._onComplete.apply(this, arguments);
+
+ // mark completed
+ var item = this._getItemByFileId(id);
+ qq.remove(this._find(item, 'cancel'));
+ qq.remove(this._find(item, 'spinner'));
+
+ if (result.success){
+ qq.addClass(item, this._classes.success);
+ } else {
+ qq.addClass(item, this._classes.fail);
+ }
+ },
+ _addToList: function(id, fileName){
+ var item = qq.toElement(this._options.fileTemplate);
+ item.qqFileId = id;
+
+ var fileElement = this._find(item, 'file');
+ qq.setText(fileElement, this._formatFileName(fileName));
+ this._find(item, 'size').style.display = 'none';
+
+ this._listElement.appendChild(item);
+ },
+ _getItemByFileId: function(id){
+ var item = this._listElement.firstChild;
+
+ // there can't be txt nodes in dynamically created list
+ // and we can use nextSibling
+ while (item){
+ if (item.qqFileId == id) return item;
+ item = item.nextSibling;
+ }
+ },
+ /**
+ * delegate click event for cancel link
+ **/
+ _bindCancelEvent: function(){
+ var self = this,
+ list = this._listElement;
+
+ qq.attach(list, 'click', function(e){
+ e = e || window.event;
+ var target = e.target || e.srcElement;
+
+ if (qq.hasClass(target, self._classes.cancel)){
+ qq.preventDefault(e);
+
+ var item = target.parentNode;
+ self._handler.cancel(item.qqFileId);
+ qq.remove(item);
+ }
+ });
+ }
+});
+
+qq.UploadDropZone = function(o){
+ this._options = {
+ element: null,
+ onEnter: function(e){},
+ onLeave: function(e){},
+ // is not fired when leaving element by hovering descendants
+ onLeaveNotDescendants: function(e){},
+ onDrop: function(e){}
+ };
+ qq.extend(this._options, o);
+
+ this._element = this._options.element;
+
+ this._disableDropOutside();
+ this._attachEvents();
+};
+
+qq.UploadDropZone.prototype = {
+ _disableDropOutside: function(e){
+ // run only once for all instances
+ if (!qq.UploadDropZone.dropOutsideDisabled ){
+
+ qq.attach(document, 'dragover', function(e){
+ if (e.dataTransfer){
+ e.dataTransfer.dropEffect = 'none';
+ e.preventDefault();
+ }
+ });
+
+ qq.UploadDropZone.dropOutsideDisabled = true;
+ }
+ },
+ _attachEvents: function(){
+ var self = this;
+
+ qq.attach(self._element, 'dragover', function(e){
+ if (!self._isValidFileDrag(e)) return;
+
+ var effect = e.dataTransfer.effectAllowed;
+ if (effect == 'move' || effect == 'linkMove'){
+ e.dataTransfer.dropEffect = 'move'; // for FF (only move allowed)
+ } else {
+ e.dataTransfer.dropEffect = 'copy'; // for Chrome
+ }
+
+ e.stopPropagation();
+ e.preventDefault();
+ });
+
+ qq.attach(self._element, 'dragenter', function(e){
+ if (!self._isValidFileDrag(e)) return;
+
+ self._options.onEnter(e);
+ });
+
+ qq.attach(self._element, 'dragleave', function(e){
+ if (!self._isValidFileDrag(e)) return;
+
+ self._options.onLeave(e);
+
+ var relatedTarget = document.elementFromPoint(e.clientX, e.clientY);
+ // do not fire when moving a mouse over a descendant
+ if (qq.contains(this, relatedTarget)) return;
+
+ self._options.onLeaveNotDescendants(e);
+ });
+
+ qq.attach(self._element, 'drop', function(e){
+ if (!self._isValidFileDrag(e)) return;
+
+ e.preventDefault();
+ self._options.onDrop(e);
+ });
+ },
+ _isValidFileDrag: function(e){
+ var dt = e.dataTransfer,
+ // do not check dt.types.contains in webkit, because it crashes safari 4
+ isWebkit = navigator.userAgent.indexOf("AppleWebKit") > -1;
+
+ // dt.effectAllowed is none in Safari 5
+ // dt.types.contains check is for firefox
+ return dt && dt.effectAllowed != 'none' &&
+ (dt.files || (!isWebkit && dt.types.contains && dt.types.contains('Files')));
+
+ }
+};
+
+qq.UploadButton = function(o){
+ this._options = {
+ element: null,
+ // if set to true adds multiple attribute to file input
+ multiple: false,
+ // name attribute of file input
+ name: 'file',
+ onChange: function(input){},
+ hoverClass: 'qq-upload-button-hover',
+ focusClass: 'qq-upload-button-focus'
+ };
+
+ qq.extend(this._options, o);
+
+ this._element = this._options.element;
+
+ // make button suitable container for input
+ qq.css(this._element, {
+ position: 'relative',
+ overflow: 'hidden',
+ // Make sure browse button is in the right side
+ // in Internet Explorer
+ direction: 'ltr'
+ });
+
+ this._input = this._createInput();
+};
+
+qq.UploadButton.prototype = {
+ /* returns file input element */
+ getInput: function(){
+ return this._input;
+ },
+ /* cleans/recreates the file input */
+ reset: function(){
+ if (this._input.parentNode){
+ qq.remove(this._input);
+ }
+
+ qq.removeClass(this._element, this._options.focusClass);
+ this._input = this._createInput();
+ },
+ _createInput: function(){
+ var input = document.createElement("input");
+
+ if (this._options.multiple){
+ input.setAttribute("multiple", "multiple");
+ }
+
+ input.setAttribute("type", "file");
+ input.setAttribute("name", this._options.name);
+
+ qq.css(input, {
+ position: 'absolute',
+ // in Opera only 'browse' button
+ // is clickable and it is located at
+ // the right side of the input
+ right: 0,
+ top: 0,
+ fontFamily: 'Arial',
+ // 4 persons reported this, the max values that worked for them were 243, 236, 236, 118
+ fontSize: '118px',
+ margin: 0,
+ padding: 0,
+ cursor: 'pointer',
+ opacity: 0
+ });
+
+ this._element.appendChild(input);
+
+ var self = this;
+ qq.attach(input, 'change', function(){
+ self._options.onChange(input);
+ });
+
+ qq.attach(input, 'mouseover', function(){
+ qq.addClass(self._element, self._options.hoverClass);
+ });
+ qq.attach(input, 'mouseout', function(){
+ qq.removeClass(self._element, self._options.hoverClass);
+ });
+ qq.attach(input, 'focus', function(){
+ qq.addClass(self._element, self._options.focusClass);
+ });
+ qq.attach(input, 'blur', function(){
+ qq.removeClass(self._element, self._options.focusClass);
+ });
+
+ // IE and Opera, unfortunately have 2 tab stops on file input
+ // which is unacceptable in our case, disable keyboard access
+ if (window.attachEvent){
+ // it is IE or Opera
+ input.setAttribute('tabIndex', "-1");
+ }
+
+ return input;
+ }
+};
+
+/**
+ * Class for uploading files, uploading itself is handled by child classes
+ */
+qq.UploadHandlerAbstract = function(o){
+ this._options = {
+ debug: false,
+ action: '/upload.php',
+ // maximum number of concurrent uploads
+ maxConnections: 999,
+ onProgress: function(id, fileName, loaded, total){},
+ onComplete: function(id, fileName, response){},
+ onCancel: function(id, fileName){}
+ };
+ qq.extend(this._options, o);
+
+ this._queue = [];
+ // params for files in queue
+ this._params = [];
+};
+qq.UploadHandlerAbstract.prototype = {
+ log: function(str){
+ if (this._options.debug && window.console) console.log('[uploader] ' + str);
+ },
+ /**
+ * Adds file or file input to the queue
+ * @returns id
+ **/
+ add: function(file){},
+ /**
+ * Sends the file identified by id and additional query params to the server
+ */
+ upload: function(id, params){
+ var len = this._queue.push(id);
+
+ var copy = {};
+ qq.extend(copy, params);
+ this._params[id] = copy;
+
+ // if too many active uploads, wait...
+ if (len <= this._options.maxConnections){
+ this._upload(id, this._params[id]);
+ }
+ },
+ /**
+ * Cancels file upload by id
+ */
+ cancel: function(id){
+ this._cancel(id);
+ this._dequeue(id);
+ },
+ /**
+ * Cancells all uploads
+ */
+ cancelAll: function(){
+ for (var i=0; i<this._queue.length; i++){
+ this._cancel(this._queue[i]);
+ }
+ this._queue = [];
+ },
+ /**
+ * Returns name of the file identified by id
+ */
+ getName: function(id){},
+ /**
+ * Returns size of the file identified by id
+ */
+ getSize: function(id){},
+ /**
+ * Returns id of files being uploaded or
+ * waiting for their turn
+ */
+ getQueue: function(){
+ return this._queue;
+ },
+ /**
+ * Actual upload method
+ */
+ _upload: function(id){},
+ /**
+ * Actual cancel method
+ */
+ _cancel: function(id){},
+ /**
+ * Removes element from queue, starts upload of next
+ */
+ _dequeue: function(id){
+ var i = qq.indexOf(this._queue, id);
+ this._queue.splice(i, 1);
+
+ var max = this._options.maxConnections;
+
+ if (this._queue.length >= max && i < max){
+ var nextId = this._queue[max-1];
+ this._upload(nextId, this._params[nextId]);
+ }
+ }
+};
+
+/**
+ * Class for uploading files using form and iframe
+ * @inherits qq.UploadHandlerAbstract
+ */
+qq.UploadHandlerForm = function(o){
+ qq.UploadHandlerAbstract.apply(this, arguments);
+
+ this._inputs = {};
+};
+// @inherits qq.UploadHandlerAbstract
+qq.extend(qq.UploadHandlerForm.prototype, qq.UploadHandlerAbstract.prototype);
+
+qq.extend(qq.UploadHandlerForm.prototype, {
+ add: function(fileInput){
+ fileInput.setAttribute('name', 'qqfile');
+ var id = 'qq-upload-handler-iframe' + qq.getUniqueId();
+
+ this._inputs[id] = fileInput;
+
+ // remove file input from DOM
+ if (fileInput.parentNode){
+ qq.remove(fileInput);
+ }
+
+ return id;
+ },
+ getName: function(id){
+ // get input value and remove path to normalize
+ return this._inputs[id].value.replace(/.*(\/|\\)/, "");
+ },
+ _cancel: function(id){
+ this._options.onCancel(id, this.getName(id));
+
+ delete this._inputs[id];
+
+ var iframe = document.getElementById(id);
+ if (iframe){
+ // to cancel request set src to something else
+ // we use src="javascript:false;" because it doesn't
+ // trigger ie6 prompt on https
+ iframe.setAttribute('src', 'javascript:false;');
+
+ qq.remove(iframe);
+ }
+ },
+ _upload: function(id, params){
+ var input = this._inputs[id];
+
+ if (!input){
+ throw new Error('file with passed id was not added, or already uploaded or cancelled');
+ }
+
+ var fileName = this.getName(id);
+
+ var iframe = this._createIframe(id);
+ var form = this._createForm(iframe, params);
+ form.appendChild(input);
+
+ var self = this;
+ this._attachLoadEvent(iframe, function(){
+ self.log('iframe loaded');
+
+ var response = self._getIframeContentJSON(iframe);
+
+ self._options.onComplete(id, fileName, response);
+ self._dequeue(id);
+
+ delete self._inputs[id];
+ // timeout added to fix busy state in FF3.6
+ setTimeout(function(){
+ qq.remove(iframe);
+ }, 1);
+ });
+
+ form.submit();
+ qq.remove(form);
+
+ return id;
+ },
+ _attachLoadEvent: function(iframe, callback){
+ qq.attach(iframe, 'load', function(){
+ // when we remove iframe from dom
+ // the request stops, but in IE load
+ // event fires
+ if (!iframe.parentNode){
+ return;
+ }
+
+ // fixing Opera 10.53
+ if (iframe.contentDocument &&
+ iframe.contentDocument.body &&
+ iframe.contentDocument.body.innerHTML == "false"){
+ // In Opera event is fired second time
+ // when body.innerHTML changed from false
+ // to server response approx. after 1 sec
+ // when we upload file with iframe
+ return;
+ }
+
+ callback();
+ });
+ },
+ /**
+ * Returns json object received by iframe from server.
+ */
+ _getIframeContentJSON: function(iframe){
+ // iframe.contentWindow.document - for IE<7
+ var doc = iframe.contentDocument ? iframe.contentDocument: iframe.contentWindow.document,
+ response;
+
+ this.log("converting iframe's innerHTML to JSON");
+ this.log("innerHTML = " + doc.body.innerHTML);
+
+ try {
+ response = eval("(" + doc.body.innerHTML + ")");
+ } catch(err){
+ response = {};
+ }
+
+ return response;
+ },
+ /**
+ * Creates iframe with unique name
+ */
+ _createIframe: function(id){
+ // We can't use following code as the name attribute
+ // won't be properly registered in IE6, and new window
+ // on form submit will open
+ // var iframe = document.createElement('iframe');
+ // iframe.setAttribute('name', id);
+
+ var iframe = qq.toElement('<iframe src="javascript:false;" name="' + id + '" />');
+ // src="javascript:false;" removes ie6 prompt on https
+
+ iframe.setAttribute('id', id);
+
+ iframe.style.display = 'none';
+ document.body.appendChild(iframe);
+
+ return iframe;
+ },
+ /**
+ * Creates form, that will be submitted to iframe
+ */
+ _createForm: function(iframe, params){
+ // We can't use the following code in IE6
+ // var form = document.createElement('form');
+ // form.setAttribute('method', 'post');
+ // form.setAttribute('enctype', 'multipart/form-data');
+ // Because in this case file won't be attached to request
+ var form = qq.toElement('<form method="post" enctype="multipart/form-data"></form>');
+
+ var queryString = qq.obj2url(params, this._options.action);
+
+ form.setAttribute('action', queryString);
+ form.setAttribute('target', iframe.name);
+ form.style.display = 'none';
+ document.body.appendChild(form);
+
+ return form;
+ }
+});
+
+/**
+ * Class for uploading files using xhr
+ * @inherits qq.UploadHandlerAbstract
+ */
+qq.UploadHandlerXhr = function(o){
+ qq.UploadHandlerAbstract.apply(this, arguments);
+
+ this._files = [];
+ this._xhrs = [];
+
+ // current loaded size in bytes for each file
+ this._loaded = [];
+};
+
+// static method
+qq.UploadHandlerXhr.isSupported = function(){
+ var input = document.createElement('input');
+ input.type = 'file';
+
+ return (
+ 'multiple' in input &&
+ typeof File != "undefined" &&
+ typeof (new XMLHttpRequest()).upload != "undefined" );
+};
+
+// @inherits qq.UploadHandlerAbstract
+qq.extend(qq.UploadHandlerXhr.prototype, qq.UploadHandlerAbstract.prototype);
+
+qq.extend(qq.UploadHandlerXhr.prototype, {
+ /**
+ * Adds file to the queue
+ * Returns id to use with upload, cancel
+ **/
+ add: function(file){
+ if (!(file instanceof File)){
+ throw new Error('Passed obj in not a File (in qq.UploadHandlerXhr)');
+ }
+
+ return this._files.push(file) - 1;
+ },
+ getName: function(id){
+ var file = this._files[id];
+ // fix missing name in Safari 4
+ return file.fileName != null ? file.fileName : file.name;
+ },
+ getSize: function(id){
+ var file = this._files[id];
+ return file.fileSize != null ? file.fileSize : file.size;
+ },
+ /**
+ * Returns uploaded bytes for file identified by id
+ */
+ getLoaded: function(id){
+ return this._loaded[id] || 0;
+ },
+ /**
+ * Sends the file identified by id and additional query params to the server
+ * @param {Object} params name-value string pairs
+ */
+ _upload: function(id, params){
+ var file = this._files[id],
+ name = this.getName(id),
+ size = this.getSize(id);
+
+ this._loaded[id] = 0;
+
+ var xhr = this._xhrs[id] = new XMLHttpRequest();
+ var self = this;
+
+ xhr.upload.onprogress = function(e){
+ if (e.lengthComputable){
+ self._loaded[id] = e.loaded;
+ self._options.onProgress(id, name, e.loaded, e.total);
+ }
+ };
+
+ xhr.onreadystatechange = function(){
+ if (xhr.readyState == 4){
+ self._onComplete(id, xhr);
+ }
+ };
+
+ // build query string
+ params = params || {};
+ params['qqfile'] = name;
+ var queryString = qq.obj2url(params, this._options.action);
+
+ xhr.open("POST", queryString, true);
+ xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+ xhr.setRequestHeader("X-File-Name", encodeURIComponent(name));
+ xhr.setRequestHeader("Content-Type", "application/octet-stream");
+ xhr.send(file);
+ },
+ _onComplete: function(id, xhr){
+ // the request was aborted/cancelled
+ if (!this._files[id]) return;
+
+ var name = this.getName(id);
+ var size = this.getSize(id);
+
+ this._options.onProgress(id, name, size, size);
+
+ if (xhr.status == 200){
+ this.log("xhr - server response received");
+ this.log("responseText = " + xhr.responseText);
+
+ var response;
+
+ try {
+ response = eval("(" + xhr.responseText + ")");
+ } catch(err){
+ response = {};
+ }
+
+ this._options.onComplete(id, name, response);
+
+ } else {
+ this._options.onComplete(id, name, {});
+ }
+
+ this._files[id] = null;
+ this._xhrs[id] = null;
+ this._dequeue(id);
+ },
+ _cancel: function(id){
+ this._options.onCancel(id, this.getName(id));
+
+ this._files[id] = null;
+
+ if (this._xhrs[id]){
+ this._xhrs[id].abort();
+ this._xhrs[id] = null;
+ }
+ }
+}); \ No newline at end of file
diff --git a/lib/scripts/fileuploaderextended.js b/lib/scripts/fileuploaderextended.js
new file mode 100644
index 000000000..f92bdbc49
--- /dev/null
+++ b/lib/scripts/fileuploaderextended.js
@@ -0,0 +1,342 @@
+qq.extend(qq.FileUploader.prototype, {
+ _createUploadHandler: function(){
+ var self = this,
+ handlerClass;
+
+ if(qq.UploadHandlerXhr.isSupported()){
+ handlerClass = 'UploadHandlerXhr';
+ //handlerClass = 'UploadHandlerForm';
+ } else {
+ handlerClass = 'UploadHandlerForm';
+ }
+
+ var handler = new qq[handlerClass]({
+ debug: this._options.debug,
+ action: this._options.action,
+ maxConnections: this._options.maxConnections,
+ onProgress: function(id, fileName, loaded, total){
+ self._onProgress(id, fileName, loaded, total);
+ self._options.onProgress(id, fileName, loaded, total);
+ },
+ onComplete: function(id, fileName, result){
+ self._onComplete(id, fileName, result);
+ self._options.onComplete(id, fileName, result);
+ },
+ onCancel: function(id, fileName){
+ self._onCancel(id, fileName);
+ self._options.onCancel(id, fileName);
+ },
+ onUpload: function(){
+ self._onUpload();
+ }
+ });
+
+ return handler;
+ },
+
+ _onUpload: function(){
+ this._handler.uploadAll(this._options.params);
+ },
+
+ _uploadFile: function(fileContainer){
+ var id = this._handler.add(fileContainer);
+ var fileName = this._handler.getName(id);
+
+ if (this._options.onSubmit(id, fileName) !== false){
+ this._onSubmit(id, fileName);
+ }
+ },
+
+ _addToList: function(id, fileName){
+ var item = qq.toElement(this._options.fileTemplate);
+ item.qqFileId = id;
+
+ var fileElement = this._find(item, 'file');
+ qq.setText(fileElement, fileName);
+ this._find(item, 'size').style.display = 'none';
+
+ var nameElement = this._find(item, 'nameInput');
+ fileName = fileName.toLowerCase();
+ fileName = fileName.replace(/([^a-z0-9_\.\-]+)/g, '_');
+ nameElement.value = fileName;
+ nameElement.id = 'mediamanager__upload_item'+id;
+
+ this._listElement.appendChild(item);
+ }
+
+});
+
+qq.FileUploaderExtended = function(o){
+ // call parent constructor
+ qq.FileUploaderBasic.apply(this, arguments);
+
+ qq.extend(this._options, {
+ element: null,
+ // if set, will be used instead of qq-upload-list in template
+ listElement: null,
+
+ template: '<div class="qq-uploader">' +
+ '<div class="qq-upload-drop-area"><span>' + LANG.media_drop + '</span></div>' +
+ '<div class="qq-upload-button">' + LANG.media_select + '</div>' +
+ '<ul class="qq-upload-list"></ul>' +
+ '<div class="qq-action-container">' +
+ ' <input class="qq-upload-action button" type="submit" value="' + LANG.media_upload_btn + '" id="mediamanager__upload_button">' +
+ ' <label class="qq-overwrite-check"><input type="checkbox" value="1" name="ow" class="dw__ow"> <span>' + LANG.media_overwrt + '</span></label>' +
+ '</div>' +
+ '</div>',
+
+ // template for one item in file list
+ fileTemplate: '<li>' +
+ '<span class="qq-upload-file hidden"></span>' +
+ ' <input class="qq-upload-name-input edit" type="text" value="" />' +
+ ' <span class="qq-upload-spinner hidden"></span>' +
+ ' <span class="qq-upload-size"></span>' +
+ ' <a class="qq-upload-cancel" href="#">' + LANG.media_cancel + '</a>' +
+ ' <span class="qq-upload-failed-text error">Failed</span>' +
+ '</li>',
+
+ classes: {
+ // used to get elements from templates
+ button: 'qq-upload-button',
+ drop: 'qq-upload-drop-area',
+ dropActive: 'qq-upload-drop-area-active',
+ list: 'qq-upload-list',
+ nameInput: 'qq-upload-name-input',
+ overwriteInput: 'qq-overwrite-check',
+ uploadButton: 'qq-upload-action',
+ file: 'qq-upload-file',
+
+ spinner: 'qq-upload-spinner',
+ size: 'qq-upload-size',
+ cancel: 'qq-upload-cancel',
+
+ // added to list item when upload completes
+ // used in css to hide progress spinner
+ success: 'qq-upload-success',
+ fail: 'qq-upload-fail',
+ failedText: 'qq-upload-failed-text'
+ }
+ });
+
+ qq.extend(this._options, o);
+
+ this._element = this._options.element;
+ this._element.innerHTML = this._options.template;
+ this._listElement = this._options.listElement || this._find(this._element, 'list');
+
+ this._classes = this._options.classes;
+
+ this._button = this._createUploadButton(this._find(this._element, 'button'));
+
+ this._bindCancelEvent();
+ this._bindUploadEvent();
+ this._setupDragDrop();
+};
+
+qq.extend(qq.FileUploaderExtended.prototype, qq.FileUploader.prototype);
+
+qq.extend(qq.FileUploaderExtended.prototype, {
+ _bindUploadEvent: function(){
+ var self = this,
+ list = this._listElement;
+
+ qq.attach(document.getElementById('mediamanager__upload_button'), 'click', function(e){
+ e = e || window.event;
+ var target = e.target || e.srcElement;
+ qq.preventDefault(e);
+ self._handler._options.onUpload();
+
+ jQuery(".qq-upload-name-input").each(function (i) {
+ jQuery(this).attr('disabled', 'disabled');
+ });
+ });
+ },
+
+ _onComplete: function(id, fileName, result){
+ this._filesInProgress--;
+
+ // mark completed
+ var item = this._getItemByFileId(id);
+ qq.remove(this._find(item, 'cancel'));
+ qq.remove(this._find(item, 'spinner'));
+
+ var nameInput = this._find(item, 'nameInput');
+ var fileElement = this._find(item, 'file');
+ qq.setText(fileElement, nameInput.value);
+ qq.removeClass(fileElement, 'hidden');
+ qq.remove(nameInput);
+ jQuery('.qq-upload-button, #mediamanager__upload_button').remove();
+ jQuery('.dw__ow').parent().hide();
+ jQuery('.qq-upload-drop-area').remove();
+
+ if (result.success){
+ qq.addClass(item, this._classes.success);
+ $link = '<a href="' + result.link + '" name="h_:' + result.id + '" class="select">' + nameInput.value + '</a>';
+ jQuery(fileElement).html($link);
+
+ } else {
+ qq.addClass(item, this._classes.fail);
+ var fail = this._find(item, 'failedText');
+ if (result.error) qq.setText(fail, result.error);
+ }
+
+ if (document.getElementById('media__content') && !document.getElementById('mediamanager__done_form')) {
+ var action = document.location.href;
+ var i = action.indexOf('?');
+ if (i) action = action.substr(0, i);
+ var button = '<form method="post" action="' + action + '" id="mediamanager__done_form"><div>';
+ button += '<input type="hidden" value="' + result.ns + '" name="ns">';
+ button += '<input class="button" type="submit" value="' + LANG.media_done_btn + '"></div></form>';
+ jQuery('#mediamanager__uploader').append(button);
+ }
+ }
+
+});
+
+qq.extend(qq.UploadHandlerForm.prototype, {
+ uploadAll: function(params){
+ this._uploadAll(params);
+ },
+
+ getName: function(id){
+ var file = this._inputs[id];
+ var name = document.getElementById('mediamanager__upload_item'+id);
+ if (name != null) {
+ return name.value;
+ } else {
+ if (file != null) {
+ // get input value and remove path to normalize
+ return file.value.replace(/.*(\/|\\)/, "");
+ } else {
+ return null;
+ }
+ }
+ },
+
+ _uploadAll: function(params){
+ jQuery(".qq-upload-spinner").each(function (i) {
+ jQuery(this).removeClass('hidden');
+ });
+ for (key in this._inputs) {
+ this.upload(key, params);
+ }
+
+ },
+
+ _upload: function(id, params){
+ var input = this._inputs[id];
+
+ if (!input){
+ throw new Error('file with passed id was not added, or already uploaded or cancelled');
+ }
+
+ var fileName = this.getName(id);
+
+ var iframe = this._createIframe(id);
+ var form = this._createForm(iframe, params);
+ form.appendChild(input);
+
+ var nameInput = qq.toElement('<input name="mediaid" value="' + fileName + '" type="text">');
+ form.appendChild(nameInput);
+
+ var checked = jQuery('.dw__ow').attr('checked');
+ var owCheckbox = jQuery('.dw__ow').clone();
+ owCheckbox.attr('checked', checked);
+ jQuery(form).append(owCheckbox);
+
+ var self = this;
+ this._attachLoadEvent(iframe, function(){
+ self.log('iframe loaded');
+
+ var response = self._getIframeContentJSON(iframe);
+
+ self._options.onComplete(id, fileName, response);
+ self._dequeue(id);
+
+ delete self._inputs[id];
+ // timeout added to fix busy state in FF3.6
+ setTimeout(function(){
+ qq.remove(iframe);
+ }, 1);
+ });
+
+ form.submit();
+ qq.remove(form);
+
+ return id;
+ }
+});
+
+qq.extend(qq.UploadHandlerXhr.prototype, {
+ uploadAll: function(params){
+ this._uploadAll(params);
+ },
+
+ getName: function(id){
+ var file = this._files[id];
+ var name = document.getElementById('mediamanager__upload_item'+id);
+ if (name != null) {
+ return name.value;
+ } else {
+ if (file != null) {
+ // fix missing name in Safari 4
+ return file.fileName != null ? file.fileName : file.name;
+ } else {
+ return null;
+ }
+ }
+ },
+
+ getSize: function(id){
+ var file = this._files[id];
+ if (file == null) return null;
+ return file.fileSize != null ? file.fileSize : file.size;
+ },
+
+ _upload: function(id, params){
+ var file = this._files[id],
+ name = this.getName(id),
+ size = this.getSize(id);
+ if (name == null || size == null) return;
+
+ this._loaded[id] = 0;
+
+ var xhr = this._xhrs[id] = new XMLHttpRequest();
+ var self = this;
+
+ xhr.upload.onprogress = function(e){
+ if (e.lengthComputable){
+ self._loaded[id] = e.loaded;
+ self._options.onProgress(id, name, e.loaded, e.total);
+ }
+ };
+
+ xhr.onreadystatechange = function(){
+ if (xhr.readyState == 4){
+ self._onComplete(id, xhr);
+ }
+ };
+
+ // build query string
+ params = params || {};
+ params['qqfile'] = name;
+ params['ow'] = jQuery('.dw__ow').attr('checked');
+ var queryString = qq.obj2url(params, this._options.action);
+
+ xhr.open("POST", queryString, true);
+ xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+ xhr.setRequestHeader("X-File-Name", encodeURIComponent(name));
+ xhr.setRequestHeader("Content-Type", "application/octet-stream");
+ xhr.send(file);
+ },
+
+ _uploadAll: function(params){
+ jQuery(".qq-upload-spinner").each(function (i) {
+ jQuery(this).removeClass('hidden');
+ });
+ for (key in this._files) {
+ this.upload(key, params);
+ }
+
+ }
+});
diff --git a/lib/scripts/helpers.js b/lib/scripts/helpers.js
index 129964d29..d6f36967d 100644
--- a/lib/scripts/helpers.js
+++ b/lib/scripts/helpers.js
@@ -1,134 +1,11 @@
/**
- * Differrent helper functions
- *
- * @author Ilya Lebedev <ilya@lebedev.net>
- * @license LGPL
- */
-//-----------------------------------------------------------------------------
-// Variable/property checks
-//-----------------------------------------------------------------------------
-/**
- * Checks if property is undefined
- *
- * @param {Object} prop value to check
- * @return {Boolean} true if matched
- * @scope public
- */
-function isUndefined (prop /* :Object */) /* :Boolean */ {
- return (typeof prop == 'undefined');
-}
-/**
- * Checks if property is function
- *
- * @param {Object} prop value to check
- * @return {Boolean} true if matched
- * @scope public
- */
-function isFunction (prop /* :Object */) /* :Boolean */ {
- return (typeof prop == 'function');
-}
-/**
- * Checks if property is string
- *
- * @param {Object} prop value to check
- * @return {Boolean} true if matched
- * @scope public
- */
-function isString (prop /* :Object */) /* :Boolean */ {
- return (typeof prop == 'string');
-}
-/**
- * Checks if property is number
- *
- * @param {Object} prop value to check
- * @return {Boolean} true if matched
- * @scope public
- */
-function isNumber (prop /* :Object */) /* :Boolean */ {
- return (typeof prop == 'number');
-}
-/**
- * Checks if property is the calculable number
- *
- * @param {Object} prop value to check
- * @return {Boolean} true if matched
- * @scope public
+ * Various helper functions
*/
-function isNumeric (prop /* :Object */) /* :Boolean */ {
- return isNumber(prop)&&!isNaN(prop)&&isFinite(prop);
-}
-/**
- * Checks if property is array
- *
- * @param {Object} prop value to check
- * @return {Boolean} true if matched
- * @scope public
- */
-function isArray (prop /* :Object */) /* :Boolean */ {
- return (prop instanceof Array);
-}
-/**
- * Checks if property is regexp
- *
- * @param {Object} prop value to check
- * @return {Boolean} true if matched
- * @scope public
- */
-function isRegExp (prop /* :Object */) /* :Boolean */ {
- return (prop instanceof RegExp);
-}
-/**
- * Checks if property is a boolean value
- *
- * @param {Object} prop value to check
- * @return {Boolean} true if matched
- * @scope public
- */
-function isBoolean (prop /* :Object */) /* :Boolean */ {
- return ('boolean' == typeof prop);
-}
-/**
- * Checks if property is a scalar value (value that could be used as the hash key)
- *
- * @param {Object} prop value to check
- * @return {Boolean} true if matched
- * @scope public
- */
-function isScalar (prop /* :Object */) /* :Boolean */ {
- return isNumeric(prop)||isString(prop);
-}
-/**
- * Checks if property is empty
- *
- * @param {Object} prop value to check
- * @return {Boolean} true if matched
- * @scope public
- */
-function isEmpty (prop /* :Object */) /* :Boolean */ {
- if (isBoolean(prop)) return false;
- if (isRegExp(prop) && new RegExp("").toString() == prop.toString()) return true;
- if (isString(prop) || isNumber(prop)) return !prop;
- if (Boolean(prop)&&false != prop) {
- for (var i in prop) if(prop.hasOwnProperty(i)) return false;
- }
- return true;
-}
-
-/**
- * Checks if property is derived from prototype, applies method if it is not exists
- *
- * @param string property name
- * @return bool true if prototyped
- * @access public
- */
-if ('undefined' == typeof Object.hasOwnProperty) {
- Object.prototype.hasOwnProperty = function (prop) {
- return !('undefined' == typeof this[prop] || this.constructor && this.constructor.prototype[prop] && this[prop] === this.constructor.prototype[prop]);
- };
-}
/**
* Very simplistic Flash plugin check, probably works for Flash 8 and higher only
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
*/
function hasFlash(version){
var ver = 0;
@@ -136,11 +13,58 @@ function hasFlash(version){
if(navigator.plugins != null && navigator.plugins.length > 0){
ver = navigator.plugins["Shockwave Flash"].description.split(' ')[2].split('.')[0];
}else{
- var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
- ver = axo.GetVariable("$version").split(' ')[1].split(',')[0];
+ ver = (new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))
+ .GetVariable("$version").split(' ')[1].split(',')[0];
}
}catch(e){ }
- if(ver >= version) return true;
- return false;
+ return ver >= version;
+}
+
+/**
+ * A PHP-style substr_replace
+ *
+ * Supports negative start and length and omitting length, but not
+ * str and replace arrays.
+ * See http://php.net/substr-replace for further documentation.
+ */
+function substr_replace(str, replace, start, length) {
+ var a2, b1;
+ a2 = (start < 0 ? str.length : 0) + start;
+ if (typeof length === 'undefined') {
+ length = str.length - a2;
+ } else if (length < 0 && start < 0 && length <= start) {
+ length = 0;
+ }
+ b1 = (length < 0 ? str.length : a2) + length;
+ return str.substring(0, a2) + replace + str.substring(b1);
+}
+
+/**
+ * Bind variables to a function call creating a closure
+ *
+ * Use this to circumvent variable scope problems when creating closures
+ * inside a loop
+ *
+ * @author Adrian Lang <lang@cosmocode.de>
+ * @link http://www.cosmocode.de/en/blog/gohr/2009-10/15-javascript-fixing-the-closure-scope-in-loops
+ * @param functionref fnc - the function to be called
+ * @param mixed - any arguments to be passed to the function
+ * @returns functionref
+ */
+function bind(fnc/*, ... */) {
+ var Aps = Array.prototype.slice,
+ // Store passed arguments in this scope.
+ // Since arguments is no Array nor has an own slice method,
+ // we have to apply the slice method from the Array.prototype
+ static_args = Aps.call(arguments, 1);
+
+ // Return a function evaluating the passed function with the
+ // given args and optional arguments passed on invocation.
+ return function (/* ... */) {
+ // Same here, but we use Array.prototype.slice solely for
+ // converting arguments to an Array.
+ return fnc.apply(this,
+ static_args.concat(Aps.call(arguments, 0)));
+ };
}
diff --git a/lib/scripts/index.js b/lib/scripts/index.js
index 9c7943d0c..4b67a0b12 100644
--- a/lib/scripts/index.js
+++ b/lib/scripts/index.js
@@ -1,115 +1,16 @@
-/**
- * Javascript for index view
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-
-var index = {
-
- /**
- * Delay in ms before showing the throbber.
- * Used to skip the throbber for fast AJAX calls.
- */
- throbber_delay: 500,
-
- /**
- * Attach event handlers to all "folders" below the given element
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- treeattach: function(obj){
- if(!obj) return;
-
- var items = getElementsByClass('idx_dir',obj,'a');
- for(var i=0; i<items.length; i++){
- var elem = items[i];
-
- // attach action to make the link clickable by AJAX
- addEvent(elem,'click',function(e){ return index.toggle(e,this); });
-
- // get the listitem the elem belongs to
- var listitem = elem.parentNode;
- while (listitem.tagName != 'LI') {
- listitem = listitem.parentNode;
- }
- //when there are uls under this listitem mark this listitem as opened
- if (listitem.getElementsByTagName('ul').length) {
- listitem.open = true;
- }
- }
- },
-
- /**
- * Open or close a subtree using AJAX
- * The contents of subtrees are "cached" untill the page is reloaded.
- * A "loading" indicator is shown only when the AJAX call is slow.
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @author Ben Coburn <btcoburn@silicodon.net>
- */
- toggle: function(e,clicky){
- var listitem = clicky.parentNode.parentNode;
-
- listitem.open = !listitem.open;
- // listitem.open represents now the action to be done
-
- // if already open, close by removing the sublist
- var sublists = listitem.getElementsByTagName('ul');
- if(!listitem.open){
- if (sublists.length) {
- sublists[0].style.display='none';
- }
- listitem.className='closed';
- e.preventDefault();
- return false;
- }
-
- // just show if already loaded
- if(sublists.length && listitem.open){
- sublists[0].style.display='';
- listitem.className='open';
- e.preventDefault();
- return false;
- }
-
- // prepare an AJAX call to fetch the subtree
- var ajax = new sack(DOKU_BASE + 'lib/exe/ajax.php');
- ajax.AjaxFailedAlert = '';
- ajax.encodeURIString = false;
- if(ajax.failed) return true;
-
- //prepare the new ul
- var ul = document.createElement('ul');
- ul.className = 'idx';
- timeout = window.setTimeout(function(){
- // show the throbber as needed
- if (listitem.open) {
- ul.innerHTML = '<li><img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="loading..." title="loading..." /></li>';
- listitem.appendChild(ul);
- listitem.className='open';
- }
- }, this.throbber_delay);
- ajax.elementObj = ul;
- ajax.afterCompletion = function(){
- window.clearTimeout(timeout);
- index.treeattach(ul);
- if (listitem.className!='open') {
- if (!listitem.open) {
- ul.style.display='none';
- }
- listitem.appendChild(ul);
- if (listitem.open) {
- listitem.className='open';
- }
- }
- };
- ajax.runAJAX(clicky.search.substr(1)+'&call=index');
- e.preventDefault();
- return false;
+var dw_index = jQuery('#index__tree').dw_tree({deferInit: true,
+ load_data: function (show_sublist, $clicky) {
+ jQuery.post(
+ DOKU_BASE + 'lib/exe/ajax.php',
+ $clicky[0].search.substr(1) + '&call=index',
+ show_sublist, 'html'
+ );
}
-};
+});
+jQuery(function () {
+ var $tree = jQuery('#index__tree');
+ dw_index.$obj = $tree;
-addInitEvent(function(){
- index.treeattach($('index__tree'));
+ dw_index.init();
});
diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png
new file mode 100644
index 000000000..5b5dab2ab
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png
Binary files differ
diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_75_ffffff_40x100.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_75_ffffff_40x100.png
new file mode 100644
index 000000000..ac8b229af
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_75_ffffff_40x100.png
Binary files differ
diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100644
index 000000000..ad3d6346e
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png
Binary files differ
diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_65_ffffff_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_65_ffffff_1x400.png
new file mode 100644
index 000000000..42ccba269
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_65_ffffff_1x400.png
Binary files differ
diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_dadada_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_dadada_1x400.png
new file mode 100644
index 000000000..5a46b47cb
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_dadada_1x400.png
Binary files differ
diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png
new file mode 100644
index 000000000..86c2baa65
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png
Binary files differ
diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png
new file mode 100644
index 000000000..4443fdc1a
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png
Binary files differ
diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png
new file mode 100644
index 000000000..7c9fa6c6e
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png
Binary files differ
diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_222222_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_222222_256x240.png
new file mode 100644
index 000000000..b273ff111
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_222222_256x240.png
Binary files differ
diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_2e83ff_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_2e83ff_256x240.png
new file mode 100644
index 000000000..09d1cdc85
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_2e83ff_256x240.png
Binary files differ
diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_454545_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_454545_256x240.png
new file mode 100644
index 000000000..59bd45b90
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_454545_256x240.png
Binary files differ
diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_888888_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_888888_256x240.png
new file mode 100644
index 000000000..6d02426c1
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_888888_256x240.png
Binary files differ
diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_cd0a0a_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_cd0a0a_256x240.png
new file mode 100644
index 000000000..2ab019b73
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_cd0a0a_256x240.png
Binary files differ
diff --git a/lib/scripts/jquery/jquery-ui-theme/smoothness.css b/lib/scripts/jquery/jquery-ui-theme/smoothness.css
new file mode 100644
index 000000000..910d24b95
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui-theme/smoothness.css
@@ -0,0 +1,568 @@
+/*
+ * jQuery UI CSS Framework 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+
+/*
+ * jQuery UI CSS Framework 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-size: 1.1em; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-size: 1em; }
+.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
+.ui-widget-content a { color: #222222; }
+.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
+.ui-widget-header a { color: #222222; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
+.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
+.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
+ * jQuery UI Resizable 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizable#theming
+ */
+.ui-resizable { position: relative;}
+.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
+.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
+.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
+.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
+.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
+.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
+.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
+.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
+.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
+ * jQuery UI Selectable 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectable#theming
+ */
+.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
+/*
+ * jQuery UI Accordion 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion#theming
+ */
+/* IE/Win - Fix animation bug - #4615 */
+.ui-accordion { width: 100%; }
+.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
+.ui-accordion .ui-accordion-li-fix { display: inline; }
+.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
+.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
+.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
+.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
+.ui-accordion .ui-accordion-content-active { display: block; }
+/*
+ * jQuery UI Autocomplete 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete#theming
+ */
+.ui-autocomplete { position: absolute; cursor: default; }
+
+/* workarounds */
+* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
+
+/*
+ * jQuery UI Menu 1.8.16
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+.ui-menu {
+ list-style:none;
+ padding: 2px;
+ margin: 0;
+ display:block;
+ float: left;
+}
+.ui-menu .ui-menu {
+ margin-top: -3px;
+}
+.ui-menu .ui-menu-item {
+ margin:0;
+ padding: 0;
+ zoom: 1;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.ui-menu .ui-menu-item a {
+ text-decoration:none;
+ display:block;
+ padding:.2em .4em;
+ line-height:1.5;
+ zoom:1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-menu .ui-menu-item a.ui-state-active {
+ font-weight: normal;
+ margin: -1px;
+}
+/*
+ * jQuery UI Button 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
+
+/*button text element */
+.ui-button .ui-button-text { display: block; line-height: 1.4; }
+.ui-button-text-only .ui-button-text { padding: .4em 1em; }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+input.ui-button { padding: .4em 1em; }
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+/*
+ * jQuery UI Dialog 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
+.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+/*
+ * jQuery UI Slider 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
+ * jQuery UI Tabs 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs#theming
+ */
+.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
+.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
+.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
+.ui-tabs .ui-tabs-hide { display: none !important; }
+/*
+ * jQuery UI Datepicker 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker#theming
+ */
+.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+ display: none; /*sorry for IE5*/
+ display/**/: block; /*sorry for IE5*/
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+}/*
+ * jQuery UI Progressbar 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
+.ui-progressbar { height:2em; text-align: left; }
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file
diff --git a/lib/scripts/jquery/jquery-ui.js b/lib/scripts/jquery/jquery-ui.js
new file mode 100644
index 000000000..cd515f361
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui.js
@@ -0,0 +1,11767 @@
+/*!
+ * jQuery UI 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI
+ */
+(function( $, undefined ) {
+
+// prevent duplicate loading
+// this is only a problem because we proxy existing functions
+// and we don't want to double proxy them
+$.ui = $.ui || {};
+if ( $.ui.version ) {
+ return;
+}
+
+$.extend( $.ui, {
+ version: "1.8.16",
+
+ keyCode: {
+ ALT: 18,
+ BACKSPACE: 8,
+ CAPS_LOCK: 20,
+ COMMA: 188,
+ COMMAND: 91,
+ COMMAND_LEFT: 91, // COMMAND
+ COMMAND_RIGHT: 93,
+ CONTROL: 17,
+ DELETE: 46,
+ DOWN: 40,
+ END: 35,
+ ENTER: 13,
+ ESCAPE: 27,
+ HOME: 36,
+ INSERT: 45,
+ LEFT: 37,
+ MENU: 93, // COMMAND_RIGHT
+ NUMPAD_ADD: 107,
+ NUMPAD_DECIMAL: 110,
+ NUMPAD_DIVIDE: 111,
+ NUMPAD_ENTER: 108,
+ NUMPAD_MULTIPLY: 106,
+ NUMPAD_SUBTRACT: 109,
+ PAGE_DOWN: 34,
+ PAGE_UP: 33,
+ PERIOD: 190,
+ RIGHT: 39,
+ SHIFT: 16,
+ SPACE: 32,
+ TAB: 9,
+ UP: 38,
+ WINDOWS: 91 // COMMAND
+ }
+});
+
+// plugins
+$.fn.extend({
+ propAttr: $.fn.prop || $.fn.attr,
+
+ _focus: $.fn.focus,
+ focus: function( delay, fn ) {
+ return typeof delay === "number" ?
+ this.each(function() {
+ var elem = this;
+ setTimeout(function() {
+ $( elem ).focus();
+ if ( fn ) {
+ fn.call( elem );
+ }
+ }, delay );
+ }) :
+ this._focus.apply( this, arguments );
+ },
+
+ scrollParent: function() {
+ var scrollParent;
+ if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
+ scrollParent = this.parents().filter(function() {
+ return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+ }).eq(0);
+ } else {
+ scrollParent = this.parents().filter(function() {
+ return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+ }).eq(0);
+ }
+
+ return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
+ },
+
+ zIndex: function( zIndex ) {
+ if ( zIndex !== undefined ) {
+ return this.css( "zIndex", zIndex );
+ }
+
+ if ( this.length ) {
+ var elem = $( this[ 0 ] ), position, value;
+ while ( elem.length && elem[ 0 ] !== document ) {
+ // Ignore z-index if position is set to a value where z-index is ignored by the browser
+ // This makes behavior of this function consistent across browsers
+ // WebKit always returns auto if the element is positioned
+ position = elem.css( "position" );
+ if ( position === "absolute" || position === "relative" || position === "fixed" ) {
+ // IE returns 0 when zIndex is not specified
+ // other browsers return a string
+ // we ignore the case of nested elements with an explicit value of 0
+ // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
+ value = parseInt( elem.css( "zIndex" ), 10 );
+ if ( !isNaN( value ) && value !== 0 ) {
+ return value;
+ }
+ }
+ elem = elem.parent();
+ }
+ }
+
+ return 0;
+ },
+
+ disableSelection: function() {
+ return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
+ ".ui-disableSelection", function( event ) {
+ event.preventDefault();
+ });
+ },
+
+ enableSelection: function() {
+ return this.unbind( ".ui-disableSelection" );
+ }
+});
+
+$.each( [ "Width", "Height" ], function( i, name ) {
+ var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
+ type = name.toLowerCase(),
+ orig = {
+ innerWidth: $.fn.innerWidth,
+ innerHeight: $.fn.innerHeight,
+ outerWidth: $.fn.outerWidth,
+ outerHeight: $.fn.outerHeight
+ };
+
+ function reduce( elem, size, border, margin ) {
+ $.each( side, function() {
+ size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
+ if ( border ) {
+ size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
+ }
+ if ( margin ) {
+ size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
+ }
+ });
+ return size;
+ }
+
+ $.fn[ "inner" + name ] = function( size ) {
+ if ( size === undefined ) {
+ return orig[ "inner" + name ].call( this );
+ }
+
+ return this.each(function() {
+ $( this ).css( type, reduce( this, size ) + "px" );
+ });
+ };
+
+ $.fn[ "outer" + name] = function( size, margin ) {
+ if ( typeof size !== "number" ) {
+ return orig[ "outer" + name ].call( this, size );
+ }
+
+ return this.each(function() {
+ $( this).css( type, reduce( this, size, true, margin ) + "px" );
+ });
+ };
+});
+
+// selectors
+function focusable( element, isTabIndexNotNaN ) {
+ var nodeName = element.nodeName.toLowerCase();
+ if ( "area" === nodeName ) {
+ var map = element.parentNode,
+ mapName = map.name,
+ img;
+ if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
+ return false;
+ }
+ img = $( "img[usemap=#" + mapName + "]" )[0];
+ return !!img && visible( img );
+ }
+ return ( /input|select|textarea|button|object/.test( nodeName )
+ ? !element.disabled
+ : "a" == nodeName
+ ? element.href || isTabIndexNotNaN
+ : isTabIndexNotNaN)
+ // the element and all of its ancestors must be visible
+ && visible( element );
+}
+
+function visible( element ) {
+ return !$( element ).parents().andSelf().filter(function() {
+ return $.curCSS( this, "visibility" ) === "hidden" ||
+ $.expr.filters.hidden( this );
+ }).length;
+}
+
+$.extend( $.expr[ ":" ], {
+ data: function( elem, i, match ) {
+ return !!$.data( elem, match[ 3 ] );
+ },
+
+ focusable: function( element ) {
+ return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
+ },
+
+ tabbable: function( element ) {
+ var tabIndex = $.attr( element, "tabindex" ),
+ isTabIndexNaN = isNaN( tabIndex );
+ return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
+ }
+});
+
+// support
+$(function() {
+ var body = document.body,
+ div = body.appendChild( div = document.createElement( "div" ) );
+
+ $.extend( div.style, {
+ minHeight: "100px",
+ height: "auto",
+ padding: 0,
+ borderWidth: 0
+ });
+
+ $.support.minHeight = div.offsetHeight === 100;
+ $.support.selectstart = "onselectstart" in div;
+
+ // set display to none to avoid a layout bug in IE
+ // http://dev.jquery.com/ticket/4014
+ body.removeChild( div ).style.display = "none";
+});
+
+
+
+
+
+// deprecated
+$.extend( $.ui, {
+ // $.ui.plugin is deprecated. Use the proxy pattern instead.
+ plugin: {
+ add: function( module, option, set ) {
+ var proto = $.ui[ module ].prototype;
+ for ( var i in set ) {
+ proto.plugins[ i ] = proto.plugins[ i ] || [];
+ proto.plugins[ i ].push( [ option, set[ i ] ] );
+ }
+ },
+ call: function( instance, name, args ) {
+ var set = instance.plugins[ name ];
+ if ( !set || !instance.element[ 0 ].parentNode ) {
+ return;
+ }
+
+ for ( var i = 0; i < set.length; i++ ) {
+ if ( instance.options[ set[ i ][ 0 ] ] ) {
+ set[ i ][ 1 ].apply( instance.element, args );
+ }
+ }
+ }
+ },
+
+ // will be deprecated when we switch to jQuery 1.4 - use jQuery.contains()
+ contains: function( a, b ) {
+ return document.compareDocumentPosition ?
+ a.compareDocumentPosition( b ) & 16 :
+ a !== b && a.contains( b );
+ },
+
+ // only used by resizable
+ hasScroll: function( el, a ) {
+
+ //If overflow is hidden, the element might have extra content, but the user wants to hide it
+ if ( $( el ).css( "overflow" ) === "hidden") {
+ return false;
+ }
+
+ var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
+ has = false;
+
+ if ( el[ scroll ] > 0 ) {
+ return true;
+ }
+
+ // TODO: determine which cases actually cause this to happen
+ // if the element doesn't have the scroll set, see if it's possible to
+ // set the scroll
+ el[ scroll ] = 1;
+ has = ( el[ scroll ] > 0 );
+ el[ scroll ] = 0;
+ return has;
+ },
+
+ // these are odd functions, fix the API or move into individual plugins
+ isOverAxis: function( x, reference, size ) {
+ //Determines when x coordinate is over "b" element axis
+ return ( x > reference ) && ( x < ( reference + size ) );
+ },
+ isOver: function( y, x, top, left, height, width ) {
+ //Determines when x, y coordinates is over "b" element
+ return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
+ }
+});
+
+})( jQuery );
+/*!
+ * jQuery UI Widget 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+(function( $, undefined ) {
+
+// jQuery 1.4+
+if ( $.cleanData ) {
+ var _cleanData = $.cleanData;
+ $.cleanData = function( elems ) {
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+ try {
+ $( elem ).triggerHandler( "remove" );
+ // http://bugs.jquery.com/ticket/8235
+ } catch( e ) {}
+ }
+ _cleanData( elems );
+ };
+} else {
+ var _remove = $.fn.remove;
+ $.fn.remove = function( selector, keepData ) {
+ return this.each(function() {
+ if ( !keepData ) {
+ if ( !selector || $.filter( selector, [ this ] ).length ) {
+ $( "*", this ).add( [ this ] ).each(function() {
+ try {
+ $( this ).triggerHandler( "remove" );
+ // http://bugs.jquery.com/ticket/8235
+ } catch( e ) {}
+ });
+ }
+ }
+ return _remove.call( $(this), selector, keepData );
+ });
+ };
+}
+
+$.widget = function( name, base, prototype ) {
+ var namespace = name.split( "." )[ 0 ],
+ fullName;
+ name = name.split( "." )[ 1 ];
+ fullName = namespace + "-" + name;
+
+ if ( !prototype ) {
+ prototype = base;
+ base = $.Widget;
+ }
+
+ // create selector for plugin
+ $.expr[ ":" ][ fullName ] = function( elem ) {
+ return !!$.data( elem, name );
+ };
+
+ $[ namespace ] = $[ namespace ] || {};
+ $[ namespace ][ name ] = function( options, element ) {
+ // allow instantiation without initializing for simple inheritance
+ if ( arguments.length ) {
+ this._createWidget( options, element );
+ }
+ };
+
+ var basePrototype = new base();
+ // we need to make the options hash a property directly on the new instance
+ // otherwise we'll modify the options hash on the prototype that we're
+ // inheriting from
+// $.each( basePrototype, function( key, val ) {
+// if ( $.isPlainObject(val) ) {
+// basePrototype[ key ] = $.extend( {}, val );
+// }
+// });
+ basePrototype.options = $.extend( true, {}, basePrototype.options );
+ $[ namespace ][ name ].prototype = $.extend( true, basePrototype, {
+ namespace: namespace,
+ widgetName: name,
+ widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,
+ widgetBaseClass: fullName
+ }, prototype );
+
+ $.widget.bridge( name, $[ namespace ][ name ] );
+};
+
+$.widget.bridge = function( name, object ) {
+ $.fn[ name ] = function( options ) {
+ var isMethodCall = typeof options === "string",
+ args = Array.prototype.slice.call( arguments, 1 ),
+ returnValue = this;
+
+ // allow multiple hashes to be passed on init
+ options = !isMethodCall && args.length ?
+ $.extend.apply( null, [ true, options ].concat(args) ) :
+ options;
+
+ // prevent calls to internal methods
+ if ( isMethodCall && options.charAt( 0 ) === "_" ) {
+ return returnValue;
+ }
+
+ if ( isMethodCall ) {
+ this.each(function() {
+ var instance = $.data( this, name ),
+ methodValue = instance && $.isFunction( instance[options] ) ?
+ instance[ options ].apply( instance, args ) :
+ instance;
+ // TODO: add this back in 1.9 and use $.error() (see #5972)
+// if ( !instance ) {
+// throw "cannot call methods on " + name + " prior to initialization; " +
+// "attempted to call method '" + options + "'";
+// }
+// if ( !$.isFunction( instance[options] ) ) {
+// throw "no such method '" + options + "' for " + name + " widget instance";
+// }
+// var methodValue = instance[ options ].apply( instance, args );
+ if ( methodValue !== instance && methodValue !== undefined ) {
+ returnValue = methodValue;
+ return false;
+ }
+ });
+ } else {
+ this.each(function() {
+ var instance = $.data( this, name );
+ if ( instance ) {
+ instance.option( options || {} )._init();
+ } else {
+ $.data( this, name, new object( options, this ) );
+ }
+ });
+ }
+
+ return returnValue;
+ };
+};
+
+$.Widget = function( options, element ) {
+ // allow instantiation without initializing for simple inheritance
+ if ( arguments.length ) {
+ this._createWidget( options, element );
+ }
+};
+
+$.Widget.prototype = {
+ widgetName: "widget",
+ widgetEventPrefix: "",
+ options: {
+ disabled: false
+ },
+ _createWidget: function( options, element ) {
+ // $.widget.bridge stores the plugin instance, but we do it anyway
+ // so that it's stored even before the _create function runs
+ $.data( element, this.widgetName, this );
+ this.element = $( element );
+ this.options = $.extend( true, {},
+ this.options,
+ this._getCreateOptions(),
+ options );
+
+ var self = this;
+ this.element.bind( "remove." + this.widgetName, function() {
+ self.destroy();
+ });
+
+ this._create();
+ this._trigger( "create" );
+ this._init();
+ },
+ _getCreateOptions: function() {
+ return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
+ },
+ _create: function() {},
+ _init: function() {},
+
+ destroy: function() {
+ this.element
+ .unbind( "." + this.widgetName )
+ .removeData( this.widgetName );
+ this.widget()
+ .unbind( "." + this.widgetName )
+ .removeAttr( "aria-disabled" )
+ .removeClass(
+ this.widgetBaseClass + "-disabled " +
+ "ui-state-disabled" );
+ },
+
+ widget: function() {
+ return this.element;
+ },
+
+ option: function( key, value ) {
+ var options = key;
+
+ if ( arguments.length === 0 ) {
+ // don't return a reference to the internal hash
+ return $.extend( {}, this.options );
+ }
+
+ if (typeof key === "string" ) {
+ if ( value === undefined ) {
+ return this.options[ key ];
+ }
+ options = {};
+ options[ key ] = value;
+ }
+
+ this._setOptions( options );
+
+ return this;
+ },
+ _setOptions: function( options ) {
+ var self = this;
+ $.each( options, function( key, value ) {
+ self._setOption( key, value );
+ });
+
+ return this;
+ },
+ _setOption: function( key, value ) {
+ this.options[ key ] = value;
+
+ if ( key === "disabled" ) {
+ this.widget()
+ [ value ? "addClass" : "removeClass"](
+ this.widgetBaseClass + "-disabled" + " " +
+ "ui-state-disabled" )
+ .attr( "aria-disabled", value );
+ }
+
+ return this;
+ },
+
+ enable: function() {
+ return this._setOption( "disabled", false );
+ },
+ disable: function() {
+ return this._setOption( "disabled", true );
+ },
+
+ _trigger: function( type, event, data ) {
+ var callback = this.options[ type ];
+
+ event = $.Event( event );
+ event.type = ( type === this.widgetEventPrefix ?
+ type :
+ this.widgetEventPrefix + type ).toLowerCase();
+ data = data || {};
+
+ // 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() );
+ }
+};
+
+})( jQuery );
+/*!
+ * jQuery UI Mouse 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Mouse
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+var mouseHandled = false;
+$( document ).mouseup( function( e ) {
+ mouseHandled = false;
+});
+
+$.widget("ui.mouse", {
+ options: {
+ cancel: ':input,option',
+ distance: 1,
+ delay: 0
+ },
+ _mouseInit: function() {
+ var self = this;
+
+ this.element
+ .bind('mousedown.'+this.widgetName, function(event) {
+ return self._mouseDown(event);
+ })
+ .bind('click.'+this.widgetName, function(event) {
+ if (true === $.data(event.target, self.widgetName + '.preventClickEvent')) {
+ $.removeData(event.target, self.widgetName + '.preventClickEvent');
+ event.stopImmediatePropagation();
+ return false;
+ }
+ });
+
+ this.started = false;
+ },
+
+ // TODO: make sure destroying one instance of mouse doesn't mess with
+ // other instances of mouse
+ _mouseDestroy: function() {
+ this.element.unbind('.'+this.widgetName);
+ },
+
+ _mouseDown: function(event) {
+ // don't let more than one widget handle mouseStart
+ if( mouseHandled ) { return };
+
+ // we may have missed mouseup (out of window)
+ (this._mouseStarted && this._mouseUp(event));
+
+ this._mouseDownEvent = event;
+
+ var self = this,
+ btnIsLeft = (event.which == 1),
+ // event.target.nodeName works around a bug in IE 8 with
+ // disabled inputs (#7620)
+ elIsCancel = (typeof this.options.cancel == "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
+ if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
+ return true;
+ }
+
+ this.mouseDelayMet = !this.options.delay;
+ if (!this.mouseDelayMet) {
+ this._mouseDelayTimer = setTimeout(function() {
+ self.mouseDelayMet = true;
+ }, this.options.delay);
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted = (this._mouseStart(event) !== false);
+ if (!this._mouseStarted) {
+ event.preventDefault();
+ return true;
+ }
+ }
+
+ // Click event may never have fired (Gecko & Opera)
+ if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) {
+ $.removeData(event.target, this.widgetName + '.preventClickEvent');
+ }
+
+ // these delegates are required to keep context
+ this._mouseMoveDelegate = function(event) {
+ return self._mouseMove(event);
+ };
+ this._mouseUpDelegate = function(event) {
+ return self._mouseUp(event);
+ };
+ $(document)
+ .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ event.preventDefault();
+
+ mouseHandled = true;
+ return true;
+ },
+
+ _mouseMove: function(event) {
+ // IE mouseup check - mouseup happened when mouse was out of window
+ if ($.browser.msie && !(document.documentMode >= 9) && !event.button) {
+ return this._mouseUp(event);
+ }
+
+ if (this._mouseStarted) {
+ this._mouseDrag(event);
+ return event.preventDefault();
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted =
+ (this._mouseStart(this._mouseDownEvent, event) !== false);
+ (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
+ }
+
+ return !this._mouseStarted;
+ },
+
+ _mouseUp: function(event) {
+ $(document)
+ .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ if (this._mouseStarted) {
+ this._mouseStarted = false;
+
+ if (event.target == this._mouseDownEvent.target) {
+ $.data(event.target, this.widgetName + '.preventClickEvent', true);
+ }
+
+ this._mouseStop(event);
+ }
+
+ return false;
+ },
+
+ _mouseDistanceMet: function(event) {
+ return (Math.max(
+ Math.abs(this._mouseDownEvent.pageX - event.pageX),
+ Math.abs(this._mouseDownEvent.pageY - event.pageY)
+ ) >= this.options.distance
+ );
+ },
+
+ _mouseDelayMet: function(event) {
+ return this.mouseDelayMet;
+ },
+
+ // These are placeholder methods, to be overriden by extending plugin
+ _mouseStart: function(event) {},
+ _mouseDrag: function(event) {},
+ _mouseStop: function(event) {},
+ _mouseCapture: function(event) { return true; }
+});
+
+})(jQuery);
+/*
+ * jQuery UI Draggable 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Draggables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+$.widget("ui.draggable", $.ui.mouse, {
+ widgetEventPrefix: "drag",
+ options: {
+ addClasses: true,
+ appendTo: "parent",
+ axis: false,
+ connectToSortable: false,
+ containment: false,
+ cursor: "auto",
+ cursorAt: false,
+ grid: false,
+ handle: false,
+ helper: "original",
+ iframeFix: false,
+ opacity: false,
+ refreshPositions: false,
+ revert: false,
+ revertDuration: 500,
+ scope: "default",
+ scroll: true,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ snap: false,
+ snapMode: "both",
+ snapTolerance: 20,
+ stack: false,
+ zIndex: false
+ },
+ _create: function() {
+
+ if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position")))
+ this.element[0].style.position = 'relative';
+
+ (this.options.addClasses && this.element.addClass("ui-draggable"));
+ (this.options.disabled && this.element.addClass("ui-draggable-disabled"));
+
+ this._mouseInit();
+
+ },
+
+ destroy: function() {
+ if(!this.element.data('draggable')) return;
+ this.element
+ .removeData("draggable")
+ .unbind(".draggable")
+ .removeClass("ui-draggable"
+ + " ui-draggable-dragging"
+ + " ui-draggable-disabled");
+ this._mouseDestroy();
+
+ return this;
+ },
+
+ _mouseCapture: function(event) {
+
+ var o = this.options;
+
+ // among others, prevent a drag on a resizable-handle
+ if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle'))
+ return false;
+
+ //Quit if we're not on a valid handle
+ this.handle = this._getHandle(event);
+ if (!this.handle)
+ return false;
+
+ if ( o.iframeFix ) {
+ $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
+ $('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
+ .css({
+ width: this.offsetWidth+"px", height: this.offsetHeight+"px",
+ position: "absolute", opacity: "0.001", zIndex: 1000
+ })
+ .css($(this).offset())
+ .appendTo("body");
+ });
+ }
+
+ return true;
+
+ },
+
+ _mouseStart: function(event) {
+
+ var o = this.options;
+
+ //Create and append the visible helper
+ this.helper = this._createHelper(event);
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ //If ddmanager is used for droppables, set the global draggable
+ if($.ui.ddmanager)
+ $.ui.ddmanager.current = this;
+
+ /*
+ * - Position generation -
+ * This block generates everything position related - it's the core of draggables.
+ */
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Store the helper's css position
+ this.cssPosition = this.helper.css("position");
+ this.scrollParent = this.helper.scrollParent();
+
+ //The element's absolute position on the page minus margins
+ this.offset = this.positionAbs = this.element.offset();
+ this.offset = {
+ top: this.offset.top - this.margins.top,
+ left: this.offset.left - this.margins.left
+ };
+
+ $.extend(this.offset, {
+ click: { //Where the click happened, relative to the element
+ left: event.pageX - this.offset.left,
+ top: event.pageY - this.offset.top
+ },
+ parent: this._getParentOffset(),
+ relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+ });
+
+ //Generate the original position
+ this.originalPosition = this.position = this._generatePosition(event);
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+ (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
+
+ //Set a containment if given in the options
+ if(o.containment)
+ this._setContainment();
+
+ //Trigger event + callbacks
+ if(this._trigger("start", event) === false) {
+ this._clear();
+ return false;
+ }
+
+ //Recache the helper size
+ this._cacheHelperProportions();
+
+ //Prepare the droppable offsets
+ if ($.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(this, event);
+
+ this.helper.addClass("ui-draggable-dragging");
+ this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+
+ //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
+ if ( $.ui.ddmanager ) $.ui.ddmanager.dragStart(this, event);
+
+ return true;
+ },
+
+ _mouseDrag: function(event, noPropagation) {
+
+ //Compute the helpers position
+ this.position = this._generatePosition(event);
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ //Call plugins and callbacks and use the resulting position if something is returned
+ if (!noPropagation) {
+ var ui = this._uiHash();
+ if(this._trigger('drag', event, ui) === false) {
+ this._mouseUp({});
+ return false;
+ }
+ this.position = ui.position;
+ }
+
+ if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
+ if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
+ if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+
+ //If we are using droppables, inform the manager about the drop
+ var dropped = false;
+ if ($.ui.ddmanager && !this.options.dropBehaviour)
+ dropped = $.ui.ddmanager.drop(this, event);
+
+ //if a drop comes from outside (a sortable)
+ if(this.dropped) {
+ dropped = this.dropped;
+ this.dropped = false;
+ }
+
+ //if the original element is removed, don't bother to continue if helper is set to "original"
+ if((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original")
+ return false;
+
+ if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
+ var self = this;
+ $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
+ if(self._trigger("stop", event) !== false) {
+ self._clear();
+ }
+ });
+ } else {
+ if(this._trigger("stop", event) !== false) {
+ this._clear();
+ }
+ }
+
+ return false;
+ },
+
+ _mouseUp: function(event) {
+ if (this.options.iframeFix === true) {
+ $("div.ui-draggable-iframeFix").each(function() {
+ this.parentNode.removeChild(this);
+ }); //Remove frame helpers
+ }
+
+ //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
+ if( $.ui.ddmanager ) $.ui.ddmanager.dragStop(this, event);
+
+ return $.ui.mouse.prototype._mouseUp.call(this, event);
+ },
+
+ cancel: function() {
+
+ if(this.helper.is(".ui-draggable-dragging")) {
+ this._mouseUp({});
+ } else {
+ this._clear();
+ }
+
+ return this;
+
+ },
+
+ _getHandle: function(event) {
+
+ var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
+ $(this.options.handle, this.element)
+ .find("*")
+ .andSelf()
+ .each(function() {
+ if(this == event.target) handle = true;
+ });
+
+ return handle;
+
+ },
+
+ _createHelper: function(event) {
+
+ var o = this.options;
+ var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element);
+
+ if(!helper.parents('body').length)
+ helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
+
+ if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position")))
+ helper.css("position", "absolute");
+
+ return helper;
+
+ },
+
+ _adjustOffsetFromHelper: function(obj) {
+ if (typeof obj == 'string') {
+ obj = obj.split(' ');
+ }
+ if ($.isArray(obj)) {
+ obj = {left: +obj[0], top: +obj[1] || 0};
+ }
+ if ('left' in obj) {
+ this.offset.click.left = obj.left + this.margins.left;
+ }
+ if ('right' in obj) {
+ this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ }
+ if ('top' in obj) {
+ this.offset.click.top = obj.top + this.margins.top;
+ }
+ if ('bottom' in obj) {
+ this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+ }
+ },
+
+ _getParentOffset: function() {
+
+ //Get the offsetParent and cache its position
+ this.offsetParent = this.helper.offsetParent();
+ var po = this.offsetParent.offset();
+
+ // This is a special case where we need to modify a offset calculated on start, since the following happened:
+ // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+ // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+ if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
+ po.left += this.scrollParent.scrollLeft();
+ po.top += this.scrollParent.scrollTop();
+ }
+
+ if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
+ || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
+ po = { top: 0, left: 0 };
+
+ return {
+ top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+ left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+ };
+
+ },
+
+ _getRelativeOffset: function() {
+
+ if(this.cssPosition == "relative") {
+ var p = this.element.position();
+ return {
+ top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+ left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+ };
+ } else {
+ return { top: 0, left: 0 };
+ }
+
+ },
+
+ _cacheMargins: function() {
+ this.margins = {
+ left: (parseInt(this.element.css("marginLeft"),10) || 0),
+ top: (parseInt(this.element.css("marginTop"),10) || 0),
+ right: (parseInt(this.element.css("marginRight"),10) || 0),
+ bottom: (parseInt(this.element.css("marginBottom"),10) || 0)
+ };
+ },
+
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ };
+ },
+
+ _setContainment: function() {
+
+ var o = this.options;
+ if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
+ if(o.containment == 'document' || o.containment == 'window') this.containment = [
+ o.containment == 'document' ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
+ o.containment == 'document' ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top,
+ (o.containment == 'document' ? 0 : $(window).scrollLeft()) + $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
+ (o.containment == 'document' ? 0 : $(window).scrollTop()) + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+ ];
+
+ if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
+ var c = $(o.containment);
+ var ce = c[0]; if(!ce) return;
+ var co = c.offset();
+ var over = ($(ce).css("overflow") != 'hidden');
+
+ this.containment = [
+ (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0),
+ (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0),
+ (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right,
+ (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom
+ ];
+ this.relative_container = c;
+
+ } else if(o.containment.constructor == Array) {
+ this.containment = o.containment;
+ }
+
+ },
+
+ _convertPositionTo: function(d, pos) {
+
+ if(!pos) pos = this.position;
+ var mod = d == "absolute" ? 1 : -1;
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ return {
+ top: (
+ pos.top // The absolute mouse position
+ + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
+ - ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+ ),
+ left: (
+ pos.left // The absolute mouse position
+ + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
+ - ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+ )
+ };
+
+ },
+
+ _generatePosition: function(event) {
+
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+ var pageX = event.pageX;
+ var pageY = event.pageY;
+
+ /*
+ * - Position constraining -
+ * Constrain the position to a mix of grid, containment.
+ */
+
+ if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+ var containment;
+ if(this.containment) {
+ if (this.relative_container){
+ var co = this.relative_container.offset();
+ containment = [ this.containment[0] + co.left,
+ this.containment[1] + co.top,
+ this.containment[2] + co.left,
+ this.containment[3] + co.top ];
+ }
+ else {
+ containment = this.containment;
+ }
+
+ if(event.pageX - this.offset.click.left < containment[0]) pageX = containment[0] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top < containment[1]) pageY = containment[1] + this.offset.click.top;
+ if(event.pageX - this.offset.click.left > containment[2]) pageX = containment[2] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top > containment[3]) pageY = containment[3] + this.offset.click.top;
+ }
+
+ if(o.grid) {
+ //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
+ var top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
+ pageY = containment ? (!(top - this.offset.click.top < containment[1] || top - this.offset.click.top > containment[3]) ? top : (!(top - this.offset.click.top < containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+ var left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
+ pageX = containment ? (!(left - this.offset.click.left < containment[0] || left - this.offset.click.left > containment[2]) ? left : (!(left - this.offset.click.left < containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+ }
+
+ }
+
+ return {
+ top: (
+ pageY // The absolute mouse position
+ - this.offset.click.top // Click offset (relative to the element)
+ - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
+ - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
+ + ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+ ),
+ left: (
+ pageX // The absolute mouse position
+ - this.offset.click.left // Click offset (relative to the element)
+ - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
+ - this.offset.parent.left // The offsetParent's offset without borders (offset + border)
+ + ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+ )
+ };
+
+ },
+
+ _clear: function() {
+ this.helper.removeClass("ui-draggable-dragging");
+ if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove();
+ //if($.ui.ddmanager) $.ui.ddmanager.current = null;
+ this.helper = null;
+ this.cancelHelperRemoval = false;
+ },
+
+ // From now on bulk stuff - mainly helpers
+
+ _trigger: function(type, event, ui) {
+ ui = ui || this._uiHash();
+ $.ui.plugin.call(this, type, [event, ui]);
+ if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
+ return $.Widget.prototype._trigger.call(this, type, event, ui);
+ },
+
+ plugins: {},
+
+ _uiHash: function(event) {
+ return {
+ helper: this.helper,
+ position: this.position,
+ originalPosition: this.originalPosition,
+ offset: this.positionAbs
+ };
+ }
+
+});
+
+$.extend($.ui.draggable, {
+ version: "1.8.16"
+});
+
+$.ui.plugin.add("draggable", "connectToSortable", {
+ start: function(event, ui) {
+
+ var inst = $(this).data("draggable"), o = inst.options,
+ uiSortable = $.extend({}, ui, { item: inst.element });
+ inst.sortables = [];
+ $(o.connectToSortable).each(function() {
+ var sortable = $.data(this, 'sortable');
+ if (sortable && !sortable.options.disabled) {
+ inst.sortables.push({
+ instance: sortable,
+ shouldRevert: sortable.options.revert
+ });
+ sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
+ sortable._trigger("activate", event, uiSortable);
+ }
+ });
+
+ },
+ stop: function(event, ui) {
+
+ //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
+ var inst = $(this).data("draggable"),
+ uiSortable = $.extend({}, ui, { item: inst.element });
+
+ $.each(inst.sortables, function() {
+ if(this.instance.isOver) {
+
+ this.instance.isOver = 0;
+
+ inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
+ this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
+
+ //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid'
+ if(this.shouldRevert) this.instance.options.revert = true;
+
+ //Trigger the stop of the sortable
+ this.instance._mouseStop(event);
+
+ this.instance.options.helper = this.instance.options._helper;
+
+ //If the helper has been the original item, restore properties in the sortable
+ if(inst.options.helper == 'original')
+ this.instance.currentItem.css({ top: 'auto', left: 'auto' });
+
+ } else {
+ this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
+ this.instance._trigger("deactivate", event, uiSortable);
+ }
+
+ });
+
+ },
+ drag: function(event, ui) {
+
+ var inst = $(this).data("draggable"), self = this;
+
+ var checkPos = function(o) {
+ var dyClick = this.offset.click.top, dxClick = this.offset.click.left;
+ var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left;
+ var itemHeight = o.height, itemWidth = o.width;
+ var itemTop = o.top, itemLeft = o.left;
+
+ return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth);
+ };
+
+ $.each(inst.sortables, function(i) {
+
+ //Copy over some variables to allow calling the sortable's native _intersectsWith
+ this.instance.positionAbs = inst.positionAbs;
+ this.instance.helperProportions = inst.helperProportions;
+ this.instance.offset.click = inst.offset.click;
+
+ if(this.instance._intersectsWith(this.instance.containerCache)) {
+
+ //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
+ if(!this.instance.isOver) {
+
+ this.instance.isOver = 1;
+ //Now we fake the start of dragging for the sortable instance,
+ //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
+ //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
+ this.instance.currentItem = $(self).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true);
+ this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
+ this.instance.options.helper = function() { return ui.helper[0]; };
+
+ event.target = this.instance.currentItem[0];
+ this.instance._mouseCapture(event, true);
+ this.instance._mouseStart(event, true, true);
+
+ //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
+ this.instance.offset.click.top = inst.offset.click.top;
+ this.instance.offset.click.left = inst.offset.click.left;
+ this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
+ this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
+
+ inst._trigger("toSortable", event);
+ inst.dropped = this.instance.element; //draggable revert needs that
+ //hack so receive/update callbacks work (mostly)
+ inst.currentItem = inst.element;
+ this.instance.fromOutside = inst;
+
+ }
+
+ //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
+ if(this.instance.currentItem) this.instance._mouseDrag(event);
+
+ } else {
+
+ //If it doesn't intersect with the sortable, and it intersected before,
+ //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
+ if(this.instance.isOver) {
+
+ this.instance.isOver = 0;
+ this.instance.cancelHelperRemoval = true;
+
+ //Prevent reverting on this forced stop
+ this.instance.options.revert = false;
+
+ // The out event needs to be triggered independently
+ this.instance._trigger('out', event, this.instance._uiHash(this.instance));
+
+ this.instance._mouseStop(event, true);
+ this.instance.options.helper = this.instance.options._helper;
+
+ //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
+ this.instance.currentItem.remove();
+ if(this.instance.placeholder) this.instance.placeholder.remove();
+
+ inst._trigger("fromSortable", event);
+ inst.dropped = false; //draggable revert needs that
+ }
+
+ };
+
+ });
+
+ }
+});
+
+$.ui.plugin.add("draggable", "cursor", {
+ start: function(event, ui) {
+ var t = $('body'), o = $(this).data('draggable').options;
+ if (t.css("cursor")) o._cursor = t.css("cursor");
+ t.css("cursor", o.cursor);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data('draggable').options;
+ if (o._cursor) $('body').css("cursor", o._cursor);
+ }
+});
+
+$.ui.plugin.add("draggable", "opacity", {
+ start: function(event, ui) {
+ var t = $(ui.helper), o = $(this).data('draggable').options;
+ if(t.css("opacity")) o._opacity = t.css("opacity");
+ t.css('opacity', o.opacity);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data('draggable').options;
+ if(o._opacity) $(ui.helper).css('opacity', o._opacity);
+ }
+});
+
+$.ui.plugin.add("draggable", "scroll", {
+ start: function(event, ui) {
+ var i = $(this).data("draggable");
+ if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset();
+ },
+ drag: function(event, ui) {
+
+ var i = $(this).data("draggable"), o = i.options, scrolled = false;
+
+ if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') {
+
+ if(!o.axis || o.axis != 'x') {
+ if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
+ i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
+ else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity)
+ i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
+ }
+
+ if(!o.axis || o.axis != 'y') {
+ if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
+ i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
+ else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity)
+ i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
+ }
+
+ } else {
+
+ if(!o.axis || o.axis != 'x') {
+ if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+ else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+ }
+
+ if(!o.axis || o.axis != 'y') {
+ if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+ else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+ }
+
+ }
+
+ if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(i, event);
+
+ }
+});
+
+$.ui.plugin.add("draggable", "snap", {
+ start: function(event, ui) {
+
+ var i = $(this).data("draggable"), o = i.options;
+ i.snapElements = [];
+
+ $(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() {
+ var $t = $(this); var $o = $t.offset();
+ if(this != i.element[0]) i.snapElements.push({
+ item: this,
+ width: $t.outerWidth(), height: $t.outerHeight(),
+ top: $o.top, left: $o.left
+ });
+ });
+
+ },
+ drag: function(event, ui) {
+
+ var inst = $(this).data("draggable"), o = inst.options;
+ var d = o.snapTolerance;
+
+ var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
+ y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
+
+ for (var i = inst.snapElements.length - 1; i >= 0; i--){
+
+ var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width,
+ t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
+
+ //Yes, I know, this is insane ;)
+ if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
+ if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+ inst.snapElements[i].snapping = false;
+ continue;
+ }
+
+ if(o.snapMode != 'inner') {
+ var ts = Math.abs(t - y2) <= d;
+ var bs = Math.abs(b - y1) <= d;
+ var ls = Math.abs(l - x2) <= d;
+ var rs = Math.abs(r - x1) <= d;
+ if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+ if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
+ if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
+ if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
+ }
+
+ var first = (ts || bs || ls || rs);
+
+ if(o.snapMode != 'outer') {
+ var ts = Math.abs(t - y1) <= d;
+ var bs = Math.abs(b - y2) <= d;
+ var ls = Math.abs(l - x1) <= d;
+ var rs = Math.abs(r - x2) <= d;
+ if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
+ if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+ if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
+ if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
+ }
+
+ if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))
+ (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+ inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
+
+ };
+
+ }
+});
+
+$.ui.plugin.add("draggable", "stack", {
+ start: function(event, ui) {
+
+ var o = $(this).data("draggable").options;
+
+ var group = $.makeArray($(o.stack)).sort(function(a,b) {
+ return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
+ });
+ if (!group.length) { return; }
+
+ var min = parseInt(group[0].style.zIndex) || 0;
+ $(group).each(function(i) {
+ this.style.zIndex = min + i;
+ });
+
+ this[0].style.zIndex = min + group.length;
+
+ }
+});
+
+$.ui.plugin.add("draggable", "zIndex", {
+ start: function(event, ui) {
+ var t = $(ui.helper), o = $(this).data("draggable").options;
+ if(t.css("zIndex")) o._zIndex = t.css("zIndex");
+ t.css('zIndex', o.zIndex);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data("draggable").options;
+ if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex);
+ }
+});
+
+})(jQuery);
+/*
+ * jQuery UI Droppable 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Droppables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ * jquery.ui.mouse.js
+ * jquery.ui.draggable.js
+ */
+(function( $, undefined ) {
+
+$.widget("ui.droppable", {
+ widgetEventPrefix: "drop",
+ options: {
+ accept: '*',
+ activeClass: false,
+ addClasses: true,
+ greedy: false,
+ hoverClass: false,
+ scope: 'default',
+ tolerance: 'intersect'
+ },
+ _create: function() {
+
+ var o = this.options, accept = o.accept;
+ this.isover = 0; this.isout = 1;
+
+ this.accept = $.isFunction(accept) ? accept : function(d) {
+ return d.is(accept);
+ };
+
+ //Store the droppable's proportions
+ this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
+
+ // Add the reference and positions to the manager
+ $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
+ $.ui.ddmanager.droppables[o.scope].push(this);
+
+ (o.addClasses && this.element.addClass("ui-droppable"));
+
+ },
+
+ destroy: function() {
+ var drop = $.ui.ddmanager.droppables[this.options.scope];
+ for ( var i = 0; i < drop.length; i++ )
+ if ( drop[i] == this )
+ drop.splice(i, 1);
+
+ this.element
+ .removeClass("ui-droppable ui-droppable-disabled")
+ .removeData("droppable")
+ .unbind(".droppable");
+
+ return this;
+ },
+
+ _setOption: function(key, value) {
+
+ if(key == 'accept') {
+ this.accept = $.isFunction(value) ? value : function(d) {
+ return d.is(value);
+ };
+ }
+ $.Widget.prototype._setOption.apply(this, arguments);
+ },
+
+ _activate: function(event) {
+ var draggable = $.ui.ddmanager.current;
+ if(this.options.activeClass) this.element.addClass(this.options.activeClass);
+ (draggable && this._trigger('activate', event, this.ui(draggable)));
+ },
+
+ _deactivate: function(event) {
+ var draggable = $.ui.ddmanager.current;
+ if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
+ (draggable && this._trigger('deactivate', event, this.ui(draggable)));
+ },
+
+ _over: function(event) {
+
+ var draggable = $.ui.ddmanager.current;
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
+
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.hoverClass) this.element.addClass(this.options.hoverClass);
+ this._trigger('over', event, this.ui(draggable));
+ }
+
+ },
+
+ _out: function(event) {
+
+ var draggable = $.ui.ddmanager.current;
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
+
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
+ this._trigger('out', event, this.ui(draggable));
+ }
+
+ },
+
+ _drop: function(event,custom) {
+
+ var draggable = custom || $.ui.ddmanager.current;
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element
+
+ var childrenIntersection = false;
+ this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() {
+ var inst = $.data(this, 'droppable');
+ if(
+ inst.options.greedy
+ && !inst.options.disabled
+ && inst.options.scope == draggable.options.scope
+ && inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element))
+ && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
+ ) { childrenIntersection = true; return false; }
+ });
+ if(childrenIntersection) return false;
+
+ if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
+ if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
+ this._trigger('drop', event, this.ui(draggable));
+ return this.element;
+ }
+
+ return false;
+
+ },
+
+ ui: function(c) {
+ return {
+ draggable: (c.currentItem || c.element),
+ helper: c.helper,
+ position: c.position,
+ offset: c.positionAbs
+ };
+ }
+
+});
+
+$.extend($.ui.droppable, {
+ version: "1.8.16"
+});
+
+$.ui.intersect = function(draggable, droppable, toleranceMode) {
+
+ if (!droppable.offset) return false;
+
+ var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
+ y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
+ var l = droppable.offset.left, r = l + droppable.proportions.width,
+ t = droppable.offset.top, b = t + droppable.proportions.height;
+
+ switch (toleranceMode) {
+ case 'fit':
+ return (l <= x1 && x2 <= r
+ && t <= y1 && y2 <= b);
+ break;
+ case 'intersect':
+ return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
+ && x2 - (draggable.helperProportions.width / 2) < r // Left Half
+ && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half
+ && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
+ break;
+ case 'pointer':
+ var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left),
+ draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top),
+ isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width);
+ return isOver;
+ break;
+ case 'touch':
+ return (
+ (y1 >= t && y1 <= b) || // Top edge touching
+ (y2 >= t && y2 <= b) || // Bottom edge touching
+ (y1 < t && y2 > b) // Surrounded vertically
+ ) && (
+ (x1 >= l && x1 <= r) || // Left edge touching
+ (x2 >= l && x2 <= r) || // Right edge touching
+ (x1 < l && x2 > r) // Surrounded horizontally
+ );
+ break;
+ default:
+ return false;
+ break;
+ }
+
+};
+
+/*
+ This manager tracks offsets of draggables and droppables
+*/
+$.ui.ddmanager = {
+ current: null,
+ droppables: { 'default': [] },
+ prepareOffsets: function(t, event) {
+
+ var m = $.ui.ddmanager.droppables[t.options.scope] || [];
+ var type = event ? event.type : null; // workaround for #2317
+ var list = (t.currentItem || t.element).find(":data(droppable)").andSelf();
+
+ droppablesLoop: for (var i = 0; i < m.length; i++) {
+
+ if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted
+ for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item
+ m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
+
+ if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
+
+ m[i].offset = m[i].element.offset();
+ m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
+
+ }
+
+ },
+ drop: function(draggable, event) {
+
+ var dropped = false;
+ $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
+
+ if(!this.options) return;
+ if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
+ dropped = dropped || this._drop.call(this, event);
+
+ if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ this.isout = 1; this.isover = 0;
+ this._deactivate.call(this, event);
+ }
+
+ });
+ return dropped;
+
+ },
+ dragStart: function( draggable, event ) {
+ //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
+ draggable.element.parents( ":not(body,html)" ).bind( "scroll.droppable", function() {
+ if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
+ });
+ },
+ drag: function(draggable, event) {
+
+ //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
+ if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
+
+ //Run through all droppables and check their positions based on specific tolerance options
+ $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
+
+ if(this.options.disabled || this.greedyChild || !this.visible) return;
+ var intersects = $.ui.intersect(draggable, this, this.options.tolerance);
+
+ var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null);
+ if(!c) return;
+
+ var parentInstance;
+ if (this.options.greedy) {
+ var parent = this.element.parents(':data(droppable):eq(0)');
+ if (parent.length) {
+ parentInstance = $.data(parent[0], 'droppable');
+ parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
+ }
+ }
+
+ // we just moved into a greedy child
+ if (parentInstance && c == 'isover') {
+ parentInstance['isover'] = 0;
+ parentInstance['isout'] = 1;
+ parentInstance._out.call(parentInstance, event);
+ }
+
+ this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0;
+ this[c == "isover" ? "_over" : "_out"].call(this, event);
+
+ // we just moved out of a greedy child
+ if (parentInstance && c == 'isout') {
+ parentInstance['isout'] = 0;
+ parentInstance['isover'] = 1;
+ parentInstance._over.call(parentInstance, event);
+ }
+ });
+
+ },
+ dragStop: function( draggable, event ) {
+ draggable.element.parents( ":not(body,html)" ).unbind( "scroll.droppable" );
+ //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
+ if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
+ }
+};
+
+})(jQuery);
+/*
+ * jQuery UI Resizable 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+$.widget("ui.resizable", $.ui.mouse, {
+ widgetEventPrefix: "resize",
+ options: {
+ alsoResize: false,
+ animate: false,
+ animateDuration: "slow",
+ animateEasing: "swing",
+ aspectRatio: false,
+ autoHide: false,
+ containment: false,
+ ghost: false,
+ grid: false,
+ handles: "e,s,se",
+ helper: false,
+ maxHeight: null,
+ maxWidth: null,
+ minHeight: 10,
+ minWidth: 10,
+ zIndex: 1000
+ },
+ _create: function() {
+
+ var self = this, o = this.options;
+ this.element.addClass("ui-resizable");
+
+ $.extend(this, {
+ _aspectRatio: !!(o.aspectRatio),
+ aspectRatio: o.aspectRatio,
+ originalElement: this.element,
+ _proportionallyResizeElements: [],
+ _helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null
+ });
+
+ //Wrap the element if it cannot hold child nodes
+ if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
+
+ //Opera fix for relative positioning
+ if (/relative/.test(this.element.css('position')) && $.browser.opera)
+ this.element.css({ position: 'relative', top: 'auto', left: 'auto' });
+
+ //Create a wrapper element and set the wrapper to the new current internal element
+ this.element.wrap(
+ $('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({
+ position: this.element.css('position'),
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight(),
+ top: this.element.css('top'),
+ left: this.element.css('left')
+ })
+ );
+
+ //Overwrite the original this.element
+ this.element = this.element.parent().data(
+ "resizable", this.element.data('resizable')
+ );
+
+ this.elementIsWrapper = true;
+
+ //Move margins to the wrapper
+ this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
+ this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
+
+ //Prevent Safari textarea resize
+ this.originalResizeStyle = this.originalElement.css('resize');
+ this.originalElement.css('resize', 'none');
+
+ //Push the actual element to our proportionallyResize internal array
+ this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' }));
+
+ // avoid IE jump (hard set the margin)
+ this.originalElement.css({ margin: this.originalElement.css('margin') });
+
+ // fix handlers offset
+ this._proportionallyResize();
+
+ }
+
+ this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' });
+ if(this.handles.constructor == String) {
+
+ if(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw';
+ var n = this.handles.split(","); this.handles = {};
+
+ for(var i = 0; i < n.length; i++) {
+
+ var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle;
+ var axis = $('<div class="ui-resizable-handle ' + hname + '"></div>');
+
+ // increase zIndex of sw, se, ne, nw axis
+ //TODO : this modifies original option
+ if(/sw|se|ne|nw/.test(handle)) axis.css({ zIndex: ++o.zIndex });
+
+ //TODO : What's going on here?
+ if ('se' == handle) {
+ axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se');
+ };
+
+ //Insert into internal handles object and append to element
+ this.handles[handle] = '.ui-resizable-'+handle;
+ this.element.append(axis);
+ }
+
+ }
+
+ this._renderAxis = function(target) {
+
+ target = target || this.element;
+
+ for(var i in this.handles) {
+
+ if(this.handles[i].constructor == String)
+ this.handles[i] = $(this.handles[i], this.element).show();
+
+ //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
+ if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
+
+ var axis = $(this.handles[i], this.element), padWrapper = 0;
+
+ //Checking the correct pad and border
+ padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
+
+ //The padding type i have to apply...
+ var padPos = [ 'padding',
+ /ne|nw|n/.test(i) ? 'Top' :
+ /se|sw|s/.test(i) ? 'Bottom' :
+ /^e$/.test(i) ? 'Right' : 'Left' ].join("");
+
+ target.css(padPos, padWrapper);
+
+ this._proportionallyResize();
+
+ }
+
+ //TODO: What's that good for? There's not anything to be executed left
+ if(!$(this.handles[i]).length)
+ continue;
+
+ }
+ };
+
+ //TODO: make renderAxis a prototype function
+ this._renderAxis(this.element);
+
+ this._handles = $('.ui-resizable-handle', this.element)
+ .disableSelection();
+
+ //Matching axis name
+ this._handles.mouseover(function() {
+ if (!self.resizing) {
+ if (this.className)
+ var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
+ //Axis, default = se
+ self.axis = axis && axis[1] ? axis[1] : 'se';
+ }
+ });
+
+ //If we want to auto hide the elements
+ if (o.autoHide) {
+ this._handles.hide();
+ $(this.element)
+ .addClass("ui-resizable-autohide")
+ .hover(function() {
+ if (o.disabled) return;
+ $(this).removeClass("ui-resizable-autohide");
+ self._handles.show();
+ },
+ function(){
+ if (o.disabled) return;
+ if (!self.resizing) {
+ $(this).addClass("ui-resizable-autohide");
+ self._handles.hide();
+ }
+ });
+ }
+
+ //Initialize the mouse interaction
+ this._mouseInit();
+
+ },
+
+ destroy: function() {
+
+ this._mouseDestroy();
+
+ var _destroy = function(exp) {
+ $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
+ .removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
+ };
+
+ //TODO: Unwrap at same DOM position
+ if (this.elementIsWrapper) {
+ _destroy(this.element);
+ var wrapper = this.element;
+ wrapper.after(
+ this.originalElement.css({
+ position: wrapper.css('position'),
+ width: wrapper.outerWidth(),
+ height: wrapper.outerHeight(),
+ top: wrapper.css('top'),
+ left: wrapper.css('left')
+ })
+ ).remove();
+ }
+
+ this.originalElement.css('resize', this.originalResizeStyle);
+ _destroy(this.originalElement);
+
+ return this;
+ },
+
+ _mouseCapture: function(event) {
+ var handle = false;
+ for (var i in this.handles) {
+ if ($(this.handles[i])[0] == event.target) {
+ handle = true;
+ }
+ }
+
+ return !this.options.disabled && handle;
+ },
+
+ _mouseStart: function(event) {
+
+ var o = this.options, iniPos = this.element.position(), el = this.element;
+
+ this.resizing = true;
+ this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };
+
+ // bugfix for http://dev.jquery.com/ticket/1749
+ if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) {
+ el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left });
+ }
+
+ //Opera fixing relative position
+ if ($.browser.opera && (/relative/).test(el.css('position')))
+ el.css({ position: 'relative', top: 'auto', left: 'auto' });
+
+ this._renderProxy();
+
+ var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
+
+ if (o.containment) {
+ curleft += $(o.containment).scrollLeft() || 0;
+ curtop += $(o.containment).scrollTop() || 0;
+ }
+
+ //Store needed variables
+ this.offset = this.helper.offset();
+ this.position = { left: curleft, top: curtop };
+ this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+ this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+ this.originalPosition = { left: curleft, top: curtop };
+ this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
+ this.originalMousePosition = { left: event.pageX, top: event.pageY };
+
+ //Aspect Ratio
+ this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
+
+ var cursor = $('.ui-resizable-' + this.axis).css('cursor');
+ $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor);
+
+ el.addClass("ui-resizable-resizing");
+ this._propagate("start", event);
+ return true;
+ },
+
+ _mouseDrag: function(event) {
+
+ //Increase performance, avoid regex
+ var el = this.helper, o = this.options, props = {},
+ self = this, smp = this.originalMousePosition, a = this.axis;
+
+ var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;
+ var trigger = this._change[a];
+ if (!trigger) return false;
+
+ // Calculate the attrs that will be change
+ var data = trigger.apply(this, [event, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff;
+
+ // Put this in the mouseDrag handler since the user can start pressing shift while resizing
+ this._updateVirtualBoundaries(event.shiftKey);
+ if (this._aspectRatio || event.shiftKey)
+ data = this._updateRatio(data, event);
+
+ data = this._respectSize(data, event);
+
+ // plugins callbacks need to be called first
+ this._propagate("resize", event);
+
+ el.css({
+ top: this.position.top + "px", left: this.position.left + "px",
+ width: this.size.width + "px", height: this.size.height + "px"
+ });
+
+ if (!this._helper && this._proportionallyResizeElements.length)
+ this._proportionallyResize();
+
+ this._updateCache(data);
+
+ // calling the user callback at the end
+ this._trigger('resize', event, this.ui());
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+
+ this.resizing = false;
+ var o = this.options, self = this;
+
+ if(this._helper) {
+ var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+ soffsetw = ista ? 0 : self.sizeDiff.width;
+
+ var s = { width: (self.helper.width() - soffsetw), height: (self.helper.height() - soffseth) },
+ left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
+ top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
+
+ if (!o.animate)
+ this.element.css($.extend(s, { top: top, left: left }));
+
+ self.helper.height(self.size.height);
+ self.helper.width(self.size.width);
+
+ if (this._helper && !o.animate) this._proportionallyResize();
+ }
+
+ $('body').css('cursor', 'auto');
+
+ this.element.removeClass("ui-resizable-resizing");
+
+ this._propagate("stop", event);
+
+ if (this._helper) this.helper.remove();
+ return false;
+
+ },
+
+ _updateVirtualBoundaries: function(forceAspectRatio) {
+ var o = this.options, pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b;
+
+ b = {
+ minWidth: isNumber(o.minWidth) ? o.minWidth : 0,
+ maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,
+ minHeight: isNumber(o.minHeight) ? o.minHeight : 0,
+ maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity
+ };
+
+ if(this._aspectRatio || forceAspectRatio) {
+ // We want to create an enclosing box whose aspect ration is the requested one
+ // First, compute the "projected" size for each dimension based on the aspect ratio and other dimension
+ pMinWidth = b.minHeight * this.aspectRatio;
+ pMinHeight = b.minWidth / this.aspectRatio;
+ pMaxWidth = b.maxHeight * this.aspectRatio;
+ pMaxHeight = b.maxWidth / this.aspectRatio;
+
+ if(pMinWidth > b.minWidth) b.minWidth = pMinWidth;
+ if(pMinHeight > b.minHeight) b.minHeight = pMinHeight;
+ if(pMaxWidth < b.maxWidth) b.maxWidth = pMaxWidth;
+ if(pMaxHeight < b.maxHeight) b.maxHeight = pMaxHeight;
+ }
+ this._vBoundaries = b;
+ },
+
+ _updateCache: function(data) {
+ var o = this.options;
+ this.offset = this.helper.offset();
+ if (isNumber(data.left)) this.position.left = data.left;
+ if (isNumber(data.top)) this.position.top = data.top;
+ if (isNumber(data.height)) this.size.height = data.height;
+ if (isNumber(data.width)) this.size.width = data.width;
+ },
+
+ _updateRatio: function(data, event) {
+
+ var o = this.options, cpos = this.position, csize = this.size, a = this.axis;
+
+ if (isNumber(data.height)) data.width = (data.height * this.aspectRatio);
+ else if (isNumber(data.width)) data.height = (data.width / this.aspectRatio);
+
+ if (a == 'sw') {
+ data.left = cpos.left + (csize.width - data.width);
+ data.top = null;
+ }
+ if (a == 'nw') {
+ data.top = cpos.top + (csize.height - data.height);
+ data.left = cpos.left + (csize.width - data.width);
+ }
+
+ return data;
+ },
+
+ _respectSize: function(data, event) {
+
+ var el = this.helper, o = this._vBoundaries, pRatio = this._aspectRatio || event.shiftKey, a = this.axis,
+ ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
+ isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height);
+
+ if (isminw) data.width = o.minWidth;
+ if (isminh) data.height = o.minHeight;
+ if (ismaxw) data.width = o.maxWidth;
+ if (ismaxh) data.height = o.maxHeight;
+
+ var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height;
+ var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
+
+ if (isminw && cw) data.left = dw - o.minWidth;
+ if (ismaxw && cw) data.left = dw - o.maxWidth;
+ if (isminh && ch) data.top = dh - o.minHeight;
+ if (ismaxh && ch) data.top = dh - o.maxHeight;
+
+ // fixing jump error on top/left - bug #2330
+ var isNotwh = !data.width && !data.height;
+ if (isNotwh && !data.left && data.top) data.top = null;
+ else if (isNotwh && !data.top && data.left) data.left = null;
+
+ return data;
+ },
+
+ _proportionallyResize: function() {
+
+ var o = this.options;
+ if (!this._proportionallyResizeElements.length) return;
+ var element = this.helper || this.element;
+
+ for (var i=0; i < this._proportionallyResizeElements.length; i++) {
+
+ var prel = this._proportionallyResizeElements[i];
+
+ if (!this.borderDif) {
+ var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
+ p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];
+
+ this.borderDif = $.map(b, function(v, i) {
+ var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
+ return border + padding;
+ });
+ }
+
+ if ($.browser.msie && !(!($(element).is(':hidden') || $(element).parents(':hidden').length)))
+ continue;
+
+ prel.css({
+ height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
+ width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
+ });
+
+ };
+
+ },
+
+ _renderProxy: function() {
+
+ var el = this.element, o = this.options;
+ this.elementOffset = el.offset();
+
+ if(this._helper) {
+
+ this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
+
+ // fix ie6 offset TODO: This seems broken
+ var ie6 = $.browser.msie && $.browser.version < 7, ie6offset = (ie6 ? 1 : 0),
+ pxyoffset = ( ie6 ? 2 : -1 );
+
+ this.helper.addClass(this._helper).css({
+ width: this.element.outerWidth() + pxyoffset,
+ height: this.element.outerHeight() + pxyoffset,
+ position: 'absolute',
+ left: this.elementOffset.left - ie6offset +'px',
+ top: this.elementOffset.top - ie6offset +'px',
+ zIndex: ++o.zIndex //TODO: Don't modify option
+ });
+
+ this.helper
+ .appendTo("body")
+ .disableSelection();
+
+ } else {
+ this.helper = this.element;
+ }
+
+ },
+
+ _change: {
+ e: function(event, dx, dy) {
+ return { width: this.originalSize.width + dx };
+ },
+ w: function(event, dx, dy) {
+ var o = this.options, cs = this.originalSize, sp = this.originalPosition;
+ return { left: sp.left + dx, width: cs.width - dx };
+ },
+ n: function(event, dx, dy) {
+ var o = this.options, cs = this.originalSize, sp = this.originalPosition;
+ return { top: sp.top + dy, height: cs.height - dy };
+ },
+ s: function(event, dx, dy) {
+ return { height: this.originalSize.height + dy };
+ },
+ se: function(event, dx, dy) {
+ return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+ },
+ sw: function(event, dx, dy) {
+ return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+ },
+ ne: function(event, dx, dy) {
+ return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+ },
+ nw: function(event, dx, dy) {
+ return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+ }
+ },
+
+ _propagate: function(n, event) {
+ $.ui.plugin.call(this, n, [event, this.ui()]);
+ (n != "resize" && this._trigger(n, event, this.ui()));
+ },
+
+ plugins: {},
+
+ ui: function() {
+ return {
+ originalElement: this.originalElement,
+ element: this.element,
+ helper: this.helper,
+ position: this.position,
+ size: this.size,
+ originalSize: this.originalSize,
+ originalPosition: this.originalPosition
+ };
+ }
+
+});
+
+$.extend($.ui.resizable, {
+ version: "1.8.16"
+});
+
+/*
+ * Resizable Extensions
+ */
+
+$.ui.plugin.add("resizable", "alsoResize", {
+
+ start: function (event, ui) {
+ var self = $(this).data("resizable"), o = self.options;
+
+ var _store = function (exp) {
+ $(exp).each(function() {
+ var el = $(this);
+ el.data("resizable-alsoresize", {
+ width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
+ left: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10),
+ position: el.css('position') // to reset Opera on stop()
+ });
+ });
+ };
+
+ if (typeof(o.alsoResize) == 'object' && !o.alsoResize.parentNode) {
+ if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
+ else { $.each(o.alsoResize, function (exp) { _store(exp); }); }
+ }else{
+ _store(o.alsoResize);
+ }
+ },
+
+ resize: function (event, ui) {
+ var self = $(this).data("resizable"), o = self.options, os = self.originalSize, op = self.originalPosition;
+
+ var delta = {
+ height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0,
+ top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0
+ },
+
+ _alsoResize = function (exp, c) {
+ $(exp).each(function() {
+ var el = $(this), start = $(this).data("resizable-alsoresize"), style = {},
+ css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ['width', 'height'] : ['width', 'height', 'top', 'left'];
+
+ $.each(css, function (i, prop) {
+ var sum = (start[prop]||0) + (delta[prop]||0);
+ if (sum && sum >= 0)
+ style[prop] = sum || null;
+ });
+
+ // Opera fixing relative position
+ if ($.browser.opera && /relative/.test(el.css('position'))) {
+ self._revertToRelativePosition = true;
+ el.css({ position: 'absolute', top: 'auto', left: 'auto' });
+ }
+
+ el.css(style);
+ });
+ };
+
+ if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
+ $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });
+ }else{
+ _alsoResize(o.alsoResize);
+ }
+ },
+
+ stop: function (event, ui) {
+ var self = $(this).data("resizable"), o = self.options;
+
+ var _reset = function (exp) {
+ $(exp).each(function() {
+ var el = $(this);
+ // reset position for Opera - no need to verify it was changed
+ el.css({ position: el.data("resizable-alsoresize").position });
+ });
+ };
+
+ if (self._revertToRelativePosition) {
+ self._revertToRelativePosition = false;
+ if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
+ $.each(o.alsoResize, function (exp) { _reset(exp); });
+ }else{
+ _reset(o.alsoResize);
+ }
+ }
+
+ $(this).removeData("resizable-alsoresize");
+ }
+});
+
+$.ui.plugin.add("resizable", "animate", {
+
+ stop: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options;
+
+ var pr = self._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+ soffsetw = ista ? 0 : self.sizeDiff.width;
+
+ var style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
+ left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
+ top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
+
+ self.element.animate(
+ $.extend(style, top && left ? { top: top, left: left } : {}), {
+ duration: o.animateDuration,
+ easing: o.animateEasing,
+ step: function() {
+
+ var data = {
+ width: parseInt(self.element.css('width'), 10),
+ height: parseInt(self.element.css('height'), 10),
+ top: parseInt(self.element.css('top'), 10),
+ left: parseInt(self.element.css('left'), 10)
+ };
+
+ if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height });
+
+ // propagating resize, and updating values for each animation step
+ self._updateCache(data);
+ self._propagate("resize", event);
+
+ }
+ }
+ );
+ }
+
+});
+
+$.ui.plugin.add("resizable", "containment", {
+
+ start: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options, el = self.element;
+ var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
+ if (!ce) return;
+
+ self.containerElement = $(ce);
+
+ if (/document/.test(oc) || oc == document) {
+ self.containerOffset = { left: 0, top: 0 };
+ self.containerPosition = { left: 0, top: 0 };
+
+ self.parentData = {
+ element: $(document), left: 0, top: 0,
+ width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
+ };
+ }
+
+ // i'm a node, so compute top, left, right, bottom
+ else {
+ var element = $(ce), p = [];
+ $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
+
+ self.containerOffset = element.offset();
+ self.containerPosition = element.position();
+ self.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
+
+ var co = self.containerOffset, ch = self.containerSize.height, cw = self.containerSize.width,
+ width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
+
+ self.parentData = {
+ element: ce, left: co.left, top: co.top, width: width, height: height
+ };
+ }
+ },
+
+ resize: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options,
+ ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,
+ pRatio = self._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
+
+ if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co;
+
+ if (cp.left < (self._helper ? co.left : 0)) {
+ self.size.width = self.size.width + (self._helper ? (self.position.left - co.left) : (self.position.left - cop.left));
+ if (pRatio) self.size.height = self.size.width / o.aspectRatio;
+ self.position.left = o.helper ? co.left : 0;
+ }
+
+ if (cp.top < (self._helper ? co.top : 0)) {
+ self.size.height = self.size.height + (self._helper ? (self.position.top - co.top) : self.position.top);
+ if (pRatio) self.size.width = self.size.height * o.aspectRatio;
+ self.position.top = self._helper ? co.top : 0;
+ }
+
+ self.offset.left = self.parentData.left+self.position.left;
+ self.offset.top = self.parentData.top+self.position.top;
+
+ var woset = Math.abs( (self._helper ? self.offset.left - cop.left : (self.offset.left - cop.left)) + self.sizeDiff.width ),
+ hoset = Math.abs( (self._helper ? self.offset.top - cop.top : (self.offset.top - co.top)) + self.sizeDiff.height );
+
+ var isParent = self.containerElement.get(0) == self.element.parent().get(0),
+ isOffsetRelative = /relative|absolute/.test(self.containerElement.css('position'));
+
+ if(isParent && isOffsetRelative) woset -= self.parentData.left;
+
+ if (woset + self.size.width >= self.parentData.width) {
+ self.size.width = self.parentData.width - woset;
+ if (pRatio) self.size.height = self.size.width / self.aspectRatio;
+ }
+
+ if (hoset + self.size.height >= self.parentData.height) {
+ self.size.height = self.parentData.height - hoset;
+ if (pRatio) self.size.width = self.size.height * self.aspectRatio;
+ }
+ },
+
+ stop: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options, cp = self.position,
+ co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement;
+
+ var helper = $(self.helper), ho = helper.offset(), w = helper.outerWidth() - self.sizeDiff.width, h = helper.outerHeight() - self.sizeDiff.height;
+
+ if (self._helper && !o.animate && (/relative/).test(ce.css('position')))
+ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+
+ if (self._helper && !o.animate && (/static/).test(ce.css('position')))
+ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+
+ }
+});
+
+$.ui.plugin.add("resizable", "ghost", {
+
+ start: function(event, ui) {
+
+ var self = $(this).data("resizable"), o = self.options, cs = self.size;
+
+ self.ghost = self.originalElement.clone();
+ self.ghost
+ .css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
+ .addClass('ui-resizable-ghost')
+ .addClass(typeof o.ghost == 'string' ? o.ghost : '');
+
+ self.ghost.appendTo(self.helper);
+
+ },
+
+ resize: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options;
+ if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width });
+ },
+
+ stop: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options;
+ if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0));
+ }
+
+});
+
+$.ui.plugin.add("resizable", "grid", {
+
+ resize: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options, cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || event.shiftKey;
+ o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
+ var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
+
+ if (/^(se|s|e)$/.test(a)) {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ }
+ else if (/^(ne)$/.test(a)) {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ self.position.top = op.top - oy;
+ }
+ else if (/^(sw)$/.test(a)) {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ self.position.left = op.left - ox;
+ }
+ else {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ self.position.top = op.top - oy;
+ self.position.left = op.left - ox;
+ }
+ }
+
+});
+
+var num = function(v) {
+ return parseInt(v, 10) || 0;
+};
+
+var isNumber = function(value) {
+ return !isNaN(parseInt(value, 10));
+};
+
+})(jQuery);
+/*
+ * jQuery UI Selectable 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+$.widget("ui.selectable", $.ui.mouse, {
+ options: {
+ appendTo: 'body',
+ autoRefresh: true,
+ distance: 0,
+ filter: '*',
+ tolerance: 'touch'
+ },
+ _create: function() {
+ var self = this;
+
+ this.element.addClass("ui-selectable");
+
+ this.dragged = false;
+
+ // cache selectee children based on filter
+ var selectees;
+ this.refresh = function() {
+ selectees = $(self.options.filter, self.element[0]);
+ selectees.each(function() {
+ var $this = $(this);
+ var pos = $this.offset();
+ $.data(this, "selectable-item", {
+ element: this,
+ $element: $this,
+ left: pos.left,
+ top: pos.top,
+ right: pos.left + $this.outerWidth(),
+ bottom: pos.top + $this.outerHeight(),
+ startselected: false,
+ selected: $this.hasClass('ui-selected'),
+ selecting: $this.hasClass('ui-selecting'),
+ unselecting: $this.hasClass('ui-unselecting')
+ });
+ });
+ };
+ this.refresh();
+
+ this.selectees = selectees.addClass("ui-selectee");
+
+ this._mouseInit();
+
+ this.helper = $("<div class='ui-selectable-helper'></div>");
+ },
+
+ destroy: function() {
+ this.selectees
+ .removeClass("ui-selectee")
+ .removeData("selectable-item");
+ this.element
+ .removeClass("ui-selectable ui-selectable-disabled")
+ .removeData("selectable")
+ .unbind(".selectable");
+ this._mouseDestroy();
+
+ return this;
+ },
+
+ _mouseStart: function(event) {
+ var self = this;
+
+ this.opos = [event.pageX, event.pageY];
+
+ if (this.options.disabled)
+ return;
+
+ var options = this.options;
+
+ this.selectees = $(options.filter, this.element[0]);
+
+ this._trigger("start", event);
+
+ $(options.appendTo).append(this.helper);
+ // position helper (lasso)
+ this.helper.css({
+ "left": event.clientX,
+ "top": event.clientY,
+ "width": 0,
+ "height": 0
+ });
+
+ if (options.autoRefresh) {
+ this.refresh();
+ }
+
+ this.selectees.filter('.ui-selected').each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.startselected = true;
+ if (!event.metaKey) {
+ selectee.$element.removeClass('ui-selected');
+ selectee.selected = false;
+ selectee.$element.addClass('ui-unselecting');
+ selectee.unselecting = true;
+ // selectable UNSELECTING callback
+ self._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ });
+
+ $(event.target).parents().andSelf().each(function() {
+ var selectee = $.data(this, "selectable-item");
+ if (selectee) {
+ var doSelect = !event.metaKey || !selectee.$element.hasClass('ui-selected');
+ selectee.$element
+ .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
+ .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
+ selectee.unselecting = !doSelect;
+ selectee.selecting = doSelect;
+ selectee.selected = doSelect;
+ // selectable (UN)SELECTING callback
+ if (doSelect) {
+ self._trigger("selecting", event, {
+ selecting: selectee.element
+ });
+ } else {
+ self._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ return false;
+ }
+ });
+
+ },
+
+ _mouseDrag: function(event) {
+ var self = this;
+ this.dragged = true;
+
+ if (this.options.disabled)
+ return;
+
+ var options = this.options;
+
+ var x1 = this.opos[0], y1 = this.opos[1], x2 = event.pageX, y2 = event.pageY;
+ if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; }
+ if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; }
+ this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
+
+ this.selectees.each(function() {
+ var selectee = $.data(this, "selectable-item");
+ //prevent helper from being selected if appendTo: selectable
+ if (!selectee || selectee.element == self.element[0])
+ return;
+ var hit = false;
+ if (options.tolerance == 'touch') {
+ hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
+ } else if (options.tolerance == 'fit') {
+ hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
+ }
+
+ if (hit) {
+ // SELECT
+ if (selectee.selected) {
+ selectee.$element.removeClass('ui-selected');
+ selectee.selected = false;
+ }
+ if (selectee.unselecting) {
+ selectee.$element.removeClass('ui-unselecting');
+ selectee.unselecting = false;
+ }
+ if (!selectee.selecting) {
+ selectee.$element.addClass('ui-selecting');
+ selectee.selecting = true;
+ // selectable SELECTING callback
+ self._trigger("selecting", event, {
+ selecting: selectee.element
+ });
+ }
+ } else {
+ // UNSELECT
+ if (selectee.selecting) {
+ if (event.metaKey && selectee.startselected) {
+ selectee.$element.removeClass('ui-selecting');
+ selectee.selecting = false;
+ selectee.$element.addClass('ui-selected');
+ selectee.selected = true;
+ } else {
+ selectee.$element.removeClass('ui-selecting');
+ selectee.selecting = false;
+ if (selectee.startselected) {
+ selectee.$element.addClass('ui-unselecting');
+ selectee.unselecting = true;
+ }
+ // selectable UNSELECTING callback
+ self._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ }
+ if (selectee.selected) {
+ if (!event.metaKey && !selectee.startselected) {
+ selectee.$element.removeClass('ui-selected');
+ selectee.selected = false;
+
+ selectee.$element.addClass('ui-unselecting');
+ selectee.unselecting = true;
+ // selectable UNSELECTING callback
+ self._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ }
+ }
+ });
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+ var self = this;
+
+ this.dragged = false;
+
+ var options = this.options;
+
+ $('.ui-unselecting', this.element[0]).each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.$element.removeClass('ui-unselecting');
+ selectee.unselecting = false;
+ selectee.startselected = false;
+ self._trigger("unselected", event, {
+ unselected: selectee.element
+ });
+ });
+ $('.ui-selecting', this.element[0]).each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.$element.removeClass('ui-selecting').addClass('ui-selected');
+ selectee.selecting = false;
+ selectee.selected = true;
+ selectee.startselected = true;
+ self._trigger("selected", event, {
+ selected: selectee.element
+ });
+ });
+ this._trigger("stop", event);
+
+ this.helper.remove();
+
+ return false;
+ }
+
+});
+
+$.extend($.ui.selectable, {
+ version: "1.8.16"
+});
+
+})(jQuery);
+/*
+ * jQuery UI Sortable 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Sortables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+$.widget("ui.sortable", $.ui.mouse, {
+ widgetEventPrefix: "sort",
+ options: {
+ appendTo: "parent",
+ axis: false,
+ connectWith: false,
+ containment: false,
+ cursor: 'auto',
+ cursorAt: false,
+ dropOnEmpty: true,
+ forcePlaceholderSize: false,
+ forceHelperSize: false,
+ grid: false,
+ handle: false,
+ helper: "original",
+ items: '> *',
+ opacity: false,
+ placeholder: false,
+ revert: false,
+ scroll: true,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ scope: "default",
+ tolerance: "intersect",
+ zIndex: 1000
+ },
+ _create: function() {
+
+ var o = this.options;
+ this.containerCache = {};
+ this.element.addClass("ui-sortable");
+
+ //Get the items
+ this.refresh();
+
+ //Let's determine if the items are being displayed horizontally
+ this.floating = this.items.length ? o.axis === 'x' || (/left|right/).test(this.items[0].item.css('float')) || (/inline|table-cell/).test(this.items[0].item.css('display')) : false;
+
+ //Let's determine the parent's offset
+ this.offset = this.element.offset();
+
+ //Initialize mouse events for interaction
+ this._mouseInit();
+
+ },
+
+ destroy: function() {
+ this.element
+ .removeClass("ui-sortable ui-sortable-disabled")
+ .removeData("sortable")
+ .unbind(".sortable");
+ this._mouseDestroy();
+
+ for ( var i = this.items.length - 1; i >= 0; i-- )
+ this.items[i].item.removeData("sortable-item");
+
+ return this;
+ },
+
+ _setOption: function(key, value){
+ if ( key === "disabled" ) {
+ this.options[ key ] = value;
+
+ this.widget()
+ [ value ? "addClass" : "removeClass"]( "ui-sortable-disabled" );
+ } else {
+ // Don't call widget base _setOption for disable as it adds ui-state-disabled class
+ $.Widget.prototype._setOption.apply(this, arguments);
+ }
+ },
+
+ _mouseCapture: function(event, overrideHandle) {
+
+ if (this.reverting) {
+ return false;
+ }
+
+ if(this.options.disabled || this.options.type == 'static') return false;
+
+ //We have to refresh the items data once first
+ this._refreshItems(event);
+
+ //Find out if the clicked node (or one of its parents) is a actual item in this.items
+ var currentItem = null, self = this, nodes = $(event.target).parents().each(function() {
+ if($.data(this, 'sortable-item') == self) {
+ currentItem = $(this);
+ return false;
+ }
+ });
+ if($.data(event.target, 'sortable-item') == self) currentItem = $(event.target);
+
+ if(!currentItem) return false;
+ if(this.options.handle && !overrideHandle) {
+ var validHandle = false;
+
+ $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; });
+ if(!validHandle) return false;
+ }
+
+ this.currentItem = currentItem;
+ this._removeCurrentsFromItems();
+ return true;
+
+ },
+
+ _mouseStart: function(event, overrideHandle, noActivation) {
+
+ var o = this.options, self = this;
+ this.currentContainer = this;
+
+ //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
+ this.refreshPositions();
+
+ //Create and append the visible helper
+ this.helper = this._createHelper(event);
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ /*
+ * - Position generation -
+ * This block generates everything position related - it's the core of draggables.
+ */
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Get the next scrolling parent
+ this.scrollParent = this.helper.scrollParent();
+
+ //The element's absolute position on the page minus margins
+ this.offset = this.currentItem.offset();
+ this.offset = {
+ top: this.offset.top - this.margins.top,
+ left: this.offset.left - this.margins.left
+ };
+
+ // Only after we got the offset, we can change the helper's position to absolute
+ // TODO: Still need to figure out a way to make relative sorting possible
+ this.helper.css("position", "absolute");
+ this.cssPosition = this.helper.css("position");
+
+ $.extend(this.offset, {
+ click: { //Where the click happened, relative to the element
+ left: event.pageX - this.offset.left,
+ top: event.pageY - this.offset.top
+ },
+ parent: this._getParentOffset(),
+ relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+ });
+
+ //Generate the original position
+ this.originalPosition = this._generatePosition(event);
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+ (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
+
+ //Cache the former DOM position
+ this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
+
+ //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
+ if(this.helper[0] != this.currentItem[0]) {
+ this.currentItem.hide();
+ }
+
+ //Create the placeholder
+ this._createPlaceholder();
+
+ //Set a containment if given in the options
+ if(o.containment)
+ this._setContainment();
+
+ if(o.cursor) { // cursor option
+ if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor");
+ $('body').css("cursor", o.cursor);
+ }
+
+ if(o.opacity) { // opacity option
+ if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity");
+ this.helper.css("opacity", o.opacity);
+ }
+
+ if(o.zIndex) { // zIndex option
+ if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex");
+ this.helper.css("zIndex", o.zIndex);
+ }
+
+ //Prepare scrolling
+ if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML')
+ this.overflowOffset = this.scrollParent.offset();
+
+ //Call callbacks
+ this._trigger("start", event, this._uiHash());
+
+ //Recache the helper size
+ if(!this._preserveHelperProportions)
+ this._cacheHelperProportions();
+
+
+ //Post 'activate' events to possible containers
+ if(!noActivation) {
+ for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, self._uiHash(this)); }
+ }
+
+ //Prepare possible droppables
+ if($.ui.ddmanager)
+ $.ui.ddmanager.current = this;
+
+ if ($.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(this, event);
+
+ this.dragging = true;
+
+ this.helper.addClass("ui-sortable-helper");
+ this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+ return true;
+
+ },
+
+ _mouseDrag: function(event) {
+
+ //Compute the helpers position
+ this.position = this._generatePosition(event);
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ if (!this.lastPositionAbs) {
+ this.lastPositionAbs = this.positionAbs;
+ }
+
+ //Do scrolling
+ if(this.options.scroll) {
+ var o = this.options, scrolled = false;
+ if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
+
+ if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
+ this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
+ else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)
+ this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
+
+ if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
+ this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
+ else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)
+ this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
+
+ } else {
+
+ if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+ else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+
+ if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+ else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+
+ }
+
+ if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(this, event);
+ }
+
+ //Regenerate the absolute position used for position checks
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ //Set the helper position
+ if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
+ if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
+
+ //Rearrange
+ for (var i = this.items.length - 1; i >= 0; i--) {
+
+ //Cache variables and intersection, continue if no intersection
+ var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
+ if (!intersection) continue;
+
+ if(itemElement != this.currentItem[0] //cannot intersect with itself
+ && this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
+ && !$.ui.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
+ && (this.options.type == 'semi-dynamic' ? !$.ui.contains(this.element[0], itemElement) : true)
+ //&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container
+ ) {
+
+ this.direction = intersection == 1 ? "down" : "up";
+
+ if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) {
+ this._rearrange(event, item);
+ } else {
+ break;
+ }
+
+ this._trigger("change", event, this._uiHash());
+ break;
+ }
+ }
+
+ //Post events to containers
+ this._contactContainers(event);
+
+ //Interconnect with droppables
+ if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
+
+ //Call callbacks
+ this._trigger('sort', event, this._uiHash());
+
+ this.lastPositionAbs = this.positionAbs;
+ return false;
+
+ },
+
+ _mouseStop: function(event, noPropagation) {
+
+ if(!event) return;
+
+ //If we are using droppables, inform the manager about the drop
+ if ($.ui.ddmanager && !this.options.dropBehaviour)
+ $.ui.ddmanager.drop(this, event);
+
+ if(this.options.revert) {
+ var self = this;
+ var cur = self.placeholder.offset();
+
+ self.reverting = true;
+
+ $(this.helper).animate({
+ left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
+ top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
+ }, parseInt(this.options.revert, 10) || 500, function() {
+ self._clear(event);
+ });
+ } else {
+ this._clear(event, noPropagation);
+ }
+
+ return false;
+
+ },
+
+ cancel: function() {
+
+ var self = this;
+
+ if(this.dragging) {
+
+ this._mouseUp({ target: null });
+
+ if(this.options.helper == "original")
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+ else
+ this.currentItem.show();
+
+ //Post deactivating events to containers
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ this.containers[i]._trigger("deactivate", null, self._uiHash(this));
+ if(this.containers[i].containerCache.over) {
+ this.containers[i]._trigger("out", null, self._uiHash(this));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ }
+
+ if (this.placeholder) {
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+ if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
+
+ $.extend(this, {
+ helper: null,
+ dragging: false,
+ reverting: false,
+ _noFinalSort: null
+ });
+
+ if(this.domPosition.prev) {
+ $(this.domPosition.prev).after(this.currentItem);
+ } else {
+ $(this.domPosition.parent).prepend(this.currentItem);
+ }
+ }
+
+ return this;
+
+ },
+
+ serialize: function(o) {
+
+ var items = this._getItemsAsjQuery(o && o.connected);
+ var str = []; o = o || {};
+
+ $(items).each(function() {
+ var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
+ if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
+ });
+
+ if(!str.length && o.key) {
+ str.push(o.key + '=');
+ }
+
+ return str.join('&');
+
+ },
+
+ toArray: function(o) {
+
+ var items = this._getItemsAsjQuery(o && o.connected);
+ var ret = []; o = o || {};
+
+ items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); });
+ return ret;
+
+ },
+
+ /* Be careful with the following core functions */
+ _intersectsWith: function(item) {
+
+ var x1 = this.positionAbs.left,
+ x2 = x1 + this.helperProportions.width,
+ y1 = this.positionAbs.top,
+ y2 = y1 + this.helperProportions.height;
+
+ var l = item.left,
+ r = l + item.width,
+ t = item.top,
+ b = t + item.height;
+
+ var dyClick = this.offset.click.top,
+ dxClick = this.offset.click.left;
+
+ var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
+
+ if( this.options.tolerance == "pointer"
+ || this.options.forcePointerForContainers
+ || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
+ ) {
+ return isOverElement;
+ } else {
+
+ return (l < x1 + (this.helperProportions.width / 2) // Right Half
+ && x2 - (this.helperProportions.width / 2) < r // Left Half
+ && t < y1 + (this.helperProportions.height / 2) // Bottom Half
+ && y2 - (this.helperProportions.height / 2) < b ); // Top Half
+
+ }
+ },
+
+ _intersectsWithPointer: function(item) {
+
+ var isOverElementHeight = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
+ isOverElementWidth = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
+ isOverElement = isOverElementHeight && isOverElementWidth,
+ verticalDirection = this._getDragVerticalDirection(),
+ horizontalDirection = this._getDragHorizontalDirection();
+
+ if (!isOverElement)
+ return false;
+
+ return this.floating ?
+ ( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 )
+ : ( verticalDirection && (verticalDirection == "down" ? 2 : 1) );
+
+ },
+
+ _intersectsWithSides: function(item) {
+
+ var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
+ isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
+ verticalDirection = this._getDragVerticalDirection(),
+ horizontalDirection = this._getDragHorizontalDirection();
+
+ if (this.floating && horizontalDirection) {
+ return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf));
+ } else {
+ return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf));
+ }
+
+ },
+
+ _getDragVerticalDirection: function() {
+ var delta = this.positionAbs.top - this.lastPositionAbs.top;
+ return delta != 0 && (delta > 0 ? "down" : "up");
+ },
+
+ _getDragHorizontalDirection: function() {
+ var delta = this.positionAbs.left - this.lastPositionAbs.left;
+ return delta != 0 && (delta > 0 ? "right" : "left");
+ },
+
+ refresh: function(event) {
+ this._refreshItems(event);
+ this.refreshPositions();
+ return this;
+ },
+
+ _connectWith: function() {
+ var options = this.options;
+ return options.connectWith.constructor == String
+ ? [options.connectWith]
+ : options.connectWith;
+ },
+
+ _getItemsAsjQuery: function(connected) {
+
+ var self = this;
+ var items = [];
+ var queries = [];
+ var connectWith = this._connectWith();
+
+ if(connectWith && connected) {
+ for (var i = connectWith.length - 1; i >= 0; i--){
+ var cur = $(connectWith[i]);
+ for (var j = cur.length - 1; j >= 0; j--){
+ var inst = $.data(cur[j], 'sortable');
+ if(inst && inst != this && !inst.options.disabled) {
+ queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), inst]);
+ }
+ };
+ };
+ }
+
+ queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), this]);
+
+ for (var i = queries.length - 1; i >= 0; i--){
+ queries[i][0].each(function() {
+ items.push(this);
+ });
+ };
+
+ return $(items);
+
+ },
+
+ _removeCurrentsFromItems: function() {
+
+ var list = this.currentItem.find(":data(sortable-item)");
+
+ for (var i=0; i < this.items.length; i++) {
+
+ for (var j=0; j < list.length; j++) {
+ if(list[j] == this.items[i].item[0])
+ this.items.splice(i,1);
+ };
+
+ };
+
+ },
+
+ _refreshItems: function(event) {
+
+ this.items = [];
+ this.containers = [this];
+ var items = this.items;
+ var self = this;
+ var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]];
+ var connectWith = this._connectWith();
+
+ if(connectWith) {
+ for (var i = connectWith.length - 1; i >= 0; i--){
+ var cur = $(connectWith[i]);
+ for (var j = cur.length - 1; j >= 0; j--){
+ var inst = $.data(cur[j], 'sortable');
+ if(inst && inst != this && !inst.options.disabled) {
+ queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
+ this.containers.push(inst);
+ }
+ };
+ };
+ }
+
+ for (var i = queries.length - 1; i >= 0; i--) {
+ var targetData = queries[i][1];
+ var _queries = queries[i][0];
+
+ for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) {
+ var item = $(_queries[j]);
+
+ item.data('sortable-item', targetData); // Data for target checking (mouse manager)
+
+ items.push({
+ item: item,
+ instance: targetData,
+ width: 0, height: 0,
+ left: 0, top: 0
+ });
+ };
+ };
+
+ },
+
+ refreshPositions: function(fast) {
+
+ //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
+ if(this.offsetParent && this.helper) {
+ this.offset.parent = this._getParentOffset();
+ }
+
+ for (var i = this.items.length - 1; i >= 0; i--){
+ var item = this.items[i];
+
+ //We ignore calculating positions of all connected containers when we're not over them
+ if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0])
+ continue;
+
+ var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
+
+ if (!fast) {
+ item.width = t.outerWidth();
+ item.height = t.outerHeight();
+ }
+
+ var p = t.offset();
+ item.left = p.left;
+ item.top = p.top;
+ };
+
+ if(this.options.custom && this.options.custom.refreshContainers) {
+ this.options.custom.refreshContainers.call(this);
+ } else {
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ var p = this.containers[i].element.offset();
+ this.containers[i].containerCache.left = p.left;
+ this.containers[i].containerCache.top = p.top;
+ this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
+ this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
+ };
+ }
+
+ return this;
+ },
+
+ _createPlaceholder: function(that) {
+
+ var self = that || this, o = self.options;
+
+ if(!o.placeholder || o.placeholder.constructor == String) {
+ var className = o.placeholder;
+ o.placeholder = {
+ element: function() {
+
+ var el = $(document.createElement(self.currentItem[0].nodeName))
+ .addClass(className || self.currentItem[0].className+" ui-sortable-placeholder")
+ .removeClass("ui-sortable-helper")[0];
+
+ if(!className)
+ el.style.visibility = "hidden";
+
+ return el;
+ },
+ update: function(container, p) {
+
+ // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
+ // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
+ if(className && !o.forcePlaceholderSize) return;
+
+ //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
+ if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); };
+ if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); };
+ }
+ };
+ }
+
+ //Create the placeholder
+ self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem));
+
+ //Append it after the actual current item
+ self.currentItem.after(self.placeholder);
+
+ //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
+ o.placeholder.update(self, self.placeholder);
+
+ },
+
+ _contactContainers: function(event) {
+
+ // get innermost container that intersects with item
+ var innermostContainer = null, innermostIndex = null;
+
+
+ for (var i = this.containers.length - 1; i >= 0; i--){
+
+ // never consider a container that's located within the item itself
+ if($.ui.contains(this.currentItem[0], this.containers[i].element[0]))
+ continue;
+
+ if(this._intersectsWith(this.containers[i].containerCache)) {
+
+ // if we've already found a container and it's more "inner" than this, then continue
+ if(innermostContainer && $.ui.contains(this.containers[i].element[0], innermostContainer.element[0]))
+ continue;
+
+ innermostContainer = this.containers[i];
+ innermostIndex = i;
+
+ } else {
+ // container doesn't intersect. trigger "out" event if necessary
+ if(this.containers[i].containerCache.over) {
+ this.containers[i]._trigger("out", event, this._uiHash(this));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ }
+
+ // if no intersecting containers found, return
+ if(!innermostContainer) return;
+
+ // move the item into the container if it's not there already
+ if(this.containers.length === 1) {
+ this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
+ this.containers[innermostIndex].containerCache.over = 1;
+ } else if(this.currentContainer != this.containers[innermostIndex]) {
+
+ //When entering a new container, we will find the item with the least distance and append our item near it
+ var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[innermostIndex].floating ? 'left' : 'top'];
+ for (var j = this.items.length - 1; j >= 0; j--) {
+ if(!$.ui.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue;
+ var cur = this.items[j][this.containers[innermostIndex].floating ? 'left' : 'top'];
+ if(Math.abs(cur - base) < dist) {
+ dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
+ }
+ }
+
+ if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
+ return;
+
+ this.currentContainer = this.containers[innermostIndex];
+ itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
+ this._trigger("change", event, this._uiHash());
+ this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
+
+ //Update the placeholder
+ this.options.placeholder.update(this.currentContainer, this.placeholder);
+
+ this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
+ this.containers[innermostIndex].containerCache.over = 1;
+ }
+
+
+ },
+
+ _createHelper: function(event) {
+
+ var o = this.options;
+ var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem);
+
+ if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already
+ $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
+
+ if(helper[0] == this.currentItem[0])
+ this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
+
+ if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width());
+ if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height());
+
+ return helper;
+
+ },
+
+ _adjustOffsetFromHelper: function(obj) {
+ if (typeof obj == 'string') {
+ obj = obj.split(' ');
+ }
+ if ($.isArray(obj)) {
+ obj = {left: +obj[0], top: +obj[1] || 0};
+ }
+ if ('left' in obj) {
+ this.offset.click.left = obj.left + this.margins.left;
+ }
+ if ('right' in obj) {
+ this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ }
+ if ('top' in obj) {
+ this.offset.click.top = obj.top + this.margins.top;
+ }
+ if ('bottom' in obj) {
+ this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+ }
+ },
+
+ _getParentOffset: function() {
+
+
+ //Get the offsetParent and cache its position
+ this.offsetParent = this.helper.offsetParent();
+ var po = this.offsetParent.offset();
+
+ // This is a special case where we need to modify a offset calculated on start, since the following happened:
+ // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+ // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+ if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
+ po.left += this.scrollParent.scrollLeft();
+ po.top += this.scrollParent.scrollTop();
+ }
+
+ if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
+ || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
+ po = { top: 0, left: 0 };
+
+ return {
+ top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+ left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+ };
+
+ },
+
+ _getRelativeOffset: function() {
+
+ if(this.cssPosition == "relative") {
+ var p = this.currentItem.position();
+ return {
+ top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+ left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+ };
+ } else {
+ return { top: 0, left: 0 };
+ }
+
+ },
+
+ _cacheMargins: function() {
+ this.margins = {
+ left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
+ top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
+ };
+ },
+
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ };
+ },
+
+ _setContainment: function() {
+
+ var o = this.options;
+ if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
+ if(o.containment == 'document' || o.containment == 'window') this.containment = [
+ 0 - this.offset.relative.left - this.offset.parent.left,
+ 0 - this.offset.relative.top - this.offset.parent.top,
+ $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
+ ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+ ];
+
+ if(!(/^(document|window|parent)$/).test(o.containment)) {
+ var ce = $(o.containment)[0];
+ var co = $(o.containment).offset();
+ var over = ($(ce).css("overflow") != 'hidden');
+
+ this.containment = [
+ co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
+ co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
+ co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
+ co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
+ ];
+ }
+
+ },
+
+ _convertPositionTo: function(d, pos) {
+
+ if(!pos) pos = this.position;
+ var mod = d == "absolute" ? 1 : -1;
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ return {
+ top: (
+ pos.top // The absolute mouse position
+ + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+ ),
+ left: (
+ pos.left // The absolute mouse position
+ + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+ )
+ };
+
+ },
+
+ _generatePosition: function(event) {
+
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ // This is another very weird special case that only happens for relative elements:
+ // 1. If the css position is relative
+ // 2. and the scroll parent is the document or similar to the offset parent
+ // we have to refresh the relative offset during the scroll so there are no jumps
+ if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
+ this.offset.relative = this._getRelativeOffset();
+ }
+
+ var pageX = event.pageX;
+ var pageY = event.pageY;
+
+ /*
+ * - Position constraining -
+ * Constrain the position to a mix of grid, containment.
+ */
+
+ if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+
+ if(this.containment) {
+ if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
+ if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
+ }
+
+ if(o.grid) {
+ var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
+ pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+ var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
+ pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+ }
+
+ }
+
+ return {
+ top: (
+ pageY // The absolute mouse position
+ - this.offset.click.top // Click offset (relative to the element)
+ - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
+ - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+ ),
+ left: (
+ pageX // The absolute mouse position
+ - this.offset.click.left // Click offset (relative to the element)
+ - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
+ - this.offset.parent.left // The offsetParent's offset without borders (offset + border)
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+ )
+ };
+
+ },
+
+ _rearrange: function(event, i, a, hardRefresh) {
+
+ a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
+
+ //Various things done here to improve the performance:
+ // 1. we create a setTimeout, that calls refreshPositions
+ // 2. on the instance, we have a counter variable, that get's higher after every append
+ // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
+ // 4. this lets only the last addition to the timeout stack through
+ this.counter = this.counter ? ++this.counter : 1;
+ var self = this, counter = this.counter;
+
+ window.setTimeout(function() {
+ if(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
+ },0);
+
+ },
+
+ _clear: function(event, noPropagation) {
+
+ this.reverting = false;
+ // We delay all events that have to be triggered to after the point where the placeholder has been removed and
+ // everything else normalized again
+ var delayedTriggers = [], self = this;
+
+ // We first have to update the dom position of the actual currentItem
+ // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
+ if(!this._noFinalSort && this.currentItem.parent().length) this.placeholder.before(this.currentItem);
+ this._noFinalSort = null;
+
+ if(this.helper[0] == this.currentItem[0]) {
+ for(var i in this._storedCSS) {
+ if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = '';
+ }
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+ } else {
+ this.currentItem.show();
+ }
+
+ if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
+ if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
+ if(!$.ui.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
+ if(!noPropagation) delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ if($.ui.contains(this.containers[i].element[0], this.currentItem[0]) && !noPropagation) {
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ }
+ };
+ };
+
+ //Post events to containers
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ if(this.containers[i].containerCache.over) {
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ //Do what was originally in plugins
+ if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor
+ if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset opacity
+ if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index
+
+ this.dragging = false;
+ if(this.cancelHelperRemoval) {
+ if(!noPropagation) {
+ this._trigger("beforeStop", event, this._uiHash());
+ for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
+ this._trigger("stop", event, this._uiHash());
+ }
+ return false;
+ }
+
+ if(!noPropagation) this._trigger("beforeStop", event, this._uiHash());
+
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+
+ if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null;
+
+ if(!noPropagation) {
+ for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
+ this._trigger("stop", event, this._uiHash());
+ }
+
+ this.fromOutside = false;
+ return true;
+
+ },
+
+ _trigger: function() {
+ if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
+ this.cancel();
+ }
+ },
+
+ _uiHash: function(inst) {
+ var self = inst || this;
+ return {
+ helper: self.helper,
+ placeholder: self.placeholder || $([]),
+ position: self.position,
+ originalPosition: self.originalPosition,
+ offset: self.positionAbs,
+ item: self.currentItem,
+ sender: inst ? inst.element : null
+ };
+ }
+
+});
+
+$.extend($.ui.sortable, {
+ version: "1.8.16"
+});
+
+})(jQuery);
+/*
+ * jQuery UI Effects 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/
+ */
+;jQuery.effects || (function($, undefined) {
+
+$.effects = {};
+
+
+
+/******************************************************************************/
+/****************************** COLOR ANIMATIONS ******************************/
+/******************************************************************************/
+
+// override the animation for color styles
+$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor',
+ 'borderRightColor', 'borderTopColor', 'borderColor', 'color', 'outlineColor'],
+function(i, attr) {
+ $.fx.step[attr] = function(fx) {
+ if (!fx.colorInit) {
+ fx.start = getColor(fx.elem, attr);
+ fx.end = getRGB(fx.end);
+ fx.colorInit = true;
+ }
+
+ fx.elem.style[attr] = 'rgb(' +
+ Math.max(Math.min(parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0], 10), 255), 0) + ',' +
+ Math.max(Math.min(parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1], 10), 255), 0) + ',' +
+ Math.max(Math.min(parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2], 10), 255), 0) + ')';
+ };
+});
+
+// Color Conversion functions from highlightFade
+// By Blair Mitchelmore
+// http://jquery.offput.ca/highlightFade/
+
+// Parse strings looking for color tuples [255,255,255]
+function getRGB(color) {
+ var result;
+
+ // Check if we're already dealing with an array of colors
+ if ( color && color.constructor == Array && color.length == 3 )
+ return color;
+
+ // Look for rgb(num,num,num)
+ if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
+ return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)];
+
+ // Look for rgb(num%,num%,num%)
+ if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
+ return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
+
+ // Look for #a0b1c2
+ if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
+ return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
+
+ // Look for #fff
+ if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
+ return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
+
+ // Look for rgba(0, 0, 0, 0) == transparent in Safari 3
+ if (result = /rgba\(0, 0, 0, 0\)/.exec(color))
+ return colors['transparent'];
+
+ // Otherwise, we're most likely dealing with a named color
+ return colors[$.trim(color).toLowerCase()];
+}
+
+function getColor(elem, attr) {
+ var color;
+
+ do {
+ color = $.curCSS(elem, attr);
+
+ // Keep going until we find an element that has color, or we hit the body
+ if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") )
+ break;
+
+ attr = "backgroundColor";
+ } while ( elem = elem.parentNode );
+
+ return getRGB(color);
+};
+
+// Some named colors to work with
+// From Interface by Stefan Petre
+// http://interface.eyecon.ro/
+
+var colors = {
+ aqua:[0,255,255],
+ azure:[240,255,255],
+ beige:[245,245,220],
+ black:[0,0,0],
+ blue:[0,0,255],
+ brown:[165,42,42],
+ cyan:[0,255,255],
+ darkblue:[0,0,139],
+ darkcyan:[0,139,139],
+ darkgrey:[169,169,169],
+ darkgreen:[0,100,0],
+ darkkhaki:[189,183,107],
+ darkmagenta:[139,0,139],
+ darkolivegreen:[85,107,47],
+ darkorange:[255,140,0],
+ darkorchid:[153,50,204],
+ darkred:[139,0,0],
+ darksalmon:[233,150,122],
+ darkviolet:[148,0,211],
+ fuchsia:[255,0,255],
+ gold:[255,215,0],
+ green:[0,128,0],
+ indigo:[75,0,130],
+ khaki:[240,230,140],
+ lightblue:[173,216,230],
+ lightcyan:[224,255,255],
+ lightgreen:[144,238,144],
+ lightgrey:[211,211,211],
+ lightpink:[255,182,193],
+ lightyellow:[255,255,224],
+ lime:[0,255,0],
+ magenta:[255,0,255],
+ maroon:[128,0,0],
+ navy:[0,0,128],
+ olive:[128,128,0],
+ orange:[255,165,0],
+ pink:[255,192,203],
+ purple:[128,0,128],
+ violet:[128,0,128],
+ red:[255,0,0],
+ silver:[192,192,192],
+ white:[255,255,255],
+ yellow:[255,255,0],
+ transparent: [255,255,255]
+};
+
+
+
+/******************************************************************************/
+/****************************** CLASS ANIMATIONS ******************************/
+/******************************************************************************/
+
+var classAnimationActions = ['add', 'remove', 'toggle'],
+ shorthandStyles = {
+ border: 1,
+ borderBottom: 1,
+ borderColor: 1,
+ borderLeft: 1,
+ borderRight: 1,
+ borderTop: 1,
+ borderWidth: 1,
+ margin: 1,
+ padding: 1
+ };
+
+function getElementStyles() {
+ var style = document.defaultView
+ ? document.defaultView.getComputedStyle(this, null)
+ : this.currentStyle,
+ newStyle = {},
+ key,
+ camelCase;
+
+ // webkit enumerates style porperties
+ if (style && style.length && style[0] && style[style[0]]) {
+ var len = style.length;
+ while (len--) {
+ key = style[len];
+ if (typeof style[key] == 'string') {
+ camelCase = key.replace(/\-(\w)/g, function(all, letter){
+ return letter.toUpperCase();
+ });
+ newStyle[camelCase] = style[key];
+ }
+ }
+ } else {
+ for (key in style) {
+ if (typeof style[key] === 'string') {
+ newStyle[key] = style[key];
+ }
+ }
+ }
+
+ return newStyle;
+}
+
+function filterStyles(styles) {
+ var name, value;
+ for (name in styles) {
+ value = styles[name];
+ if (
+ // ignore null and undefined values
+ value == null ||
+ // ignore functions (when does this occur?)
+ $.isFunction(value) ||
+ // shorthand styles that need to be expanded
+ name in shorthandStyles ||
+ // ignore scrollbars (break in IE)
+ (/scrollbar/).test(name) ||
+
+ // only colors or values that can be converted to numbers
+ (!(/color/i).test(name) && isNaN(parseFloat(value)))
+ ) {
+ delete styles[name];
+ }
+ }
+
+ return styles;
+}
+
+function styleDifference(oldStyle, newStyle) {
+ var diff = { _: 0 }, // http://dev.jquery.com/ticket/5459
+ name;
+
+ for (name in newStyle) {
+ if (oldStyle[name] != newStyle[name]) {
+ diff[name] = newStyle[name];
+ }
+ }
+
+ return diff;
+}
+
+$.effects.animateClass = function(value, duration, easing, callback) {
+ if ($.isFunction(easing)) {
+ callback = easing;
+ easing = null;
+ }
+
+ return this.queue(function() {
+ var that = $(this),
+ originalStyleAttr = that.attr('style') || ' ',
+ originalStyle = filterStyles(getElementStyles.call(this)),
+ newStyle,
+ className = that.attr('class');
+
+ $.each(classAnimationActions, function(i, action) {
+ if (value[action]) {
+ that[action + 'Class'](value[action]);
+ }
+ });
+ newStyle = filterStyles(getElementStyles.call(this));
+ that.attr('class', className);
+
+ that.animate(styleDifference(originalStyle, newStyle), {
+ queue: false,
+ duration: duration,
+ easing: easing,
+ complete: function() {
+ $.each(classAnimationActions, function(i, action) {
+ if (value[action]) { that[action + 'Class'](value[action]); }
+ });
+ // work around bug in IE by clearing the cssText before setting it
+ if (typeof that.attr('style') == 'object') {
+ that.attr('style').cssText = '';
+ that.attr('style').cssText = originalStyleAttr;
+ } else {
+ that.attr('style', originalStyleAttr);
+ }
+ if (callback) { callback.apply(this, arguments); }
+ $.dequeue( this );
+ }
+ });
+ });
+};
+
+$.fn.extend({
+ _addClass: $.fn.addClass,
+ addClass: function(classNames, speed, easing, callback) {
+ return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);
+ },
+
+ _removeClass: $.fn.removeClass,
+ removeClass: function(classNames,speed,easing,callback) {
+ return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);
+ },
+
+ _toggleClass: $.fn.toggleClass,
+ toggleClass: function(classNames, force, speed, easing, callback) {
+ if ( typeof force == "boolean" || force === undefined ) {
+ if ( !speed ) {
+ // without speed parameter;
+ return this._toggleClass(classNames, force);
+ } else {
+ return $.effects.animateClass.apply(this, [(force?{add:classNames}:{remove:classNames}),speed,easing,callback]);
+ }
+ } else {
+ // without switch parameter;
+ return $.effects.animateClass.apply(this, [{ toggle: classNames },force,speed,easing]);
+ }
+ },
+
+ switchClass: function(remove,add,speed,easing,callback) {
+ return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]);
+ }
+});
+
+
+
+/******************************************************************************/
+/*********************************** EFFECTS **********************************/
+/******************************************************************************/
+
+$.extend($.effects, {
+ version: "1.8.16",
+
+ // Saves a set of properties in a data storage
+ save: function(element, set) {
+ for(var i=0; i < set.length; i++) {
+ if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]);
+ }
+ },
+
+ // Restores a set of previously saved properties from a data storage
+ restore: function(element, set) {
+ for(var i=0; i < set.length; i++) {
+ if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i]));
+ }
+ },
+
+ setMode: function(el, mode) {
+ if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle
+ return mode;
+ },
+
+ getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value
+ // this should be a little more flexible in the future to handle a string & hash
+ var y, x;
+ switch (origin[0]) {
+ case 'top': y = 0; break;
+ case 'middle': y = 0.5; break;
+ case 'bottom': y = 1; break;
+ default: y = origin[0] / original.height;
+ };
+ switch (origin[1]) {
+ case 'left': x = 0; break;
+ case 'center': x = 0.5; break;
+ case 'right': x = 1; break;
+ default: x = origin[1] / original.width;
+ };
+ return {x: x, y: y};
+ },
+
+ // Wraps the element around a wrapper that copies position properties
+ createWrapper: function(element) {
+
+ // if the element is already wrapped, return it
+ if (element.parent().is('.ui-effects-wrapper')) {
+ return element.parent();
+ }
+
+ // wrap the element
+ var props = {
+ width: element.outerWidth(true),
+ height: element.outerHeight(true),
+ 'float': element.css('float')
+ },
+ wrapper = $('<div></div>')
+ .addClass('ui-effects-wrapper')
+ .css({
+ fontSize: '100%',
+ background: 'transparent',
+ border: 'none',
+ margin: 0,
+ padding: 0
+ }),
+ active = document.activeElement;
+
+ element.wrap(wrapper);
+
+ // Fixes #7595 - Elements lose focus when wrapped.
+ if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
+ $( active ).focus();
+ }
+
+ wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element
+
+ // transfer positioning properties to the wrapper
+ if (element.css('position') == 'static') {
+ wrapper.css({ position: 'relative' });
+ element.css({ position: 'relative' });
+ } else {
+ $.extend(props, {
+ position: element.css('position'),
+ zIndex: element.css('z-index')
+ });
+ $.each(['top', 'left', 'bottom', 'right'], function(i, pos) {
+ props[pos] = element.css(pos);
+ if (isNaN(parseInt(props[pos], 10))) {
+ props[pos] = 'auto';
+ }
+ });
+ element.css({position: 'relative', top: 0, left: 0, right: 'auto', bottom: 'auto' });
+ }
+
+ return wrapper.css(props).show();
+ },
+
+ removeWrapper: function(element) {
+ var parent,
+ active = document.activeElement;
+
+ if (element.parent().is('.ui-effects-wrapper')) {
+ parent = element.parent().replaceWith(element);
+ // Fixes #7595 - Elements lose focus when wrapped.
+ if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
+ $( active ).focus();
+ }
+ return parent;
+ }
+
+ return element;
+ },
+
+ setTransition: function(element, list, factor, value) {
+ value = value || {};
+ $.each(list, function(i, x){
+ unit = element.cssUnit(x);
+ if (unit[0] > 0) value[x] = unit[0] * factor + unit[1];
+ });
+ return value;
+ }
+});
+
+
+function _normalizeArguments(effect, options, speed, callback) {
+ // shift params for method overloading
+ if (typeof effect == 'object') {
+ callback = options;
+ speed = null;
+ options = effect;
+ effect = options.effect;
+ }
+ if ($.isFunction(options)) {
+ callback = options;
+ speed = null;
+ options = {};
+ }
+ if (typeof options == 'number' || $.fx.speeds[options]) {
+ callback = speed;
+ speed = options;
+ options = {};
+ }
+ if ($.isFunction(speed)) {
+ callback = speed;
+ speed = null;
+ }
+
+ options = options || {};
+
+ speed = speed || options.duration;
+ speed = $.fx.off ? 0 : typeof speed == 'number'
+ ? speed : speed in $.fx.speeds ? $.fx.speeds[speed] : $.fx.speeds._default;
+
+ callback = callback || options.complete;
+
+ return [effect, options, speed, callback];
+}
+
+function standardSpeed( speed ) {
+ // valid standard speeds
+ if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
+ return true;
+ }
+
+ // invalid strings - treat as "normal" speed
+ if ( typeof speed === "string" && !$.effects[ speed ] ) {
+ return true;
+ }
+
+ return false;
+}
+
+$.fn.extend({
+ effect: function(effect, options, speed, callback) {
+ var args = _normalizeArguments.apply(this, arguments),
+ // TODO: make effects take actual parameters instead of a hash
+ args2 = {
+ options: args[1],
+ duration: args[2],
+ callback: args[3]
+ },
+ mode = args2.options.mode,
+ effectMethod = $.effects[effect];
+
+ if ( $.fx.off || !effectMethod ) {
+ // delegate to the original method (e.g., .show()) if possible
+ if ( mode ) {
+ return this[ mode ]( args2.duration, args2.callback );
+ } else {
+ return this.each(function() {
+ if ( args2.callback ) {
+ args2.callback.call( this );
+ }
+ });
+ }
+ }
+
+ return effectMethod.call(this, args2);
+ },
+
+ _show: $.fn.show,
+ show: function(speed) {
+ if ( standardSpeed( speed ) ) {
+ return this._show.apply(this, arguments);
+ } else {
+ var args = _normalizeArguments.apply(this, arguments);
+ args[1].mode = 'show';
+ return this.effect.apply(this, args);
+ }
+ },
+
+ _hide: $.fn.hide,
+ hide: function(speed) {
+ if ( standardSpeed( speed ) ) {
+ return this._hide.apply(this, arguments);
+ } else {
+ var args = _normalizeArguments.apply(this, arguments);
+ args[1].mode = 'hide';
+ return this.effect.apply(this, args);
+ }
+ },
+
+ // jQuery core overloads toggle and creates _toggle
+ __toggle: $.fn.toggle,
+ toggle: function(speed) {
+ if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) {
+ return this.__toggle.apply(this, arguments);
+ } else {
+ var args = _normalizeArguments.apply(this, arguments);
+ args[1].mode = 'toggle';
+ return this.effect.apply(this, args);
+ }
+ },
+
+ // helper functions
+ cssUnit: function(key) {
+ var style = this.css(key), val = [];
+ $.each( ['em','px','%','pt'], function(i, unit){
+ if(style.indexOf(unit) > 0)
+ val = [parseFloat(style), unit];
+ });
+ return val;
+ }
+});
+
+
+
+/******************************************************************************/
+/*********************************** EASING ***********************************/
+/******************************************************************************/
+
+/*
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
+ *
+ * Uses the built in easing capabilities added In jQuery 1.1
+ * to offer multiple easing options
+ *
+ * TERMS OF USE - jQuery Easing
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright 2008 George McGinley Smith
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
+ * or promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+*/
+
+// t: current time, b: begInnIng value, c: change In value, d: duration
+$.easing.jswing = $.easing.swing;
+
+$.extend($.easing,
+{
+ def: 'easeOutQuad',
+ swing: function (x, t, b, c, d) {
+ //alert($.easing.default);
+ return $.easing[$.easing.def](x, t, b, c, d);
+ },
+ easeInQuad: function (x, t, b, c, d) {
+ return c*(t/=d)*t + b;
+ },
+ easeOutQuad: function (x, t, b, c, d) {
+ return -c *(t/=d)*(t-2) + b;
+ },
+ easeInOutQuad: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t + b;
+ return -c/2 * ((--t)*(t-2) - 1) + b;
+ },
+ easeInCubic: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t + b;
+ },
+ easeOutCubic: function (x, t, b, c, d) {
+ return c*((t=t/d-1)*t*t + 1) + b;
+ },
+ easeInOutCubic: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t + b;
+ return c/2*((t-=2)*t*t + 2) + b;
+ },
+ easeInQuart: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t*t + b;
+ },
+ easeOutQuart: function (x, t, b, c, d) {
+ return -c * ((t=t/d-1)*t*t*t - 1) + b;
+ },
+ easeInOutQuart: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
+ return -c/2 * ((t-=2)*t*t*t - 2) + b;
+ },
+ easeInQuint: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t*t*t + b;
+ },
+ easeOutQuint: function (x, t, b, c, d) {
+ return c*((t=t/d-1)*t*t*t*t + 1) + b;
+ },
+ easeInOutQuint: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
+ return c/2*((t-=2)*t*t*t*t + 2) + b;
+ },
+ easeInSine: function (x, t, b, c, d) {
+ return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
+ },
+ easeOutSine: function (x, t, b, c, d) {
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
+ },
+ easeInOutSine: function (x, t, b, c, d) {
+ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
+ },
+ easeInExpo: function (x, t, b, c, d) {
+ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
+ },
+ easeOutExpo: function (x, t, b, c, d) {
+ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
+ },
+ easeInOutExpo: function (x, t, b, c, d) {
+ if (t==0) return b;
+ if (t==d) return b+c;
+ if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
+ return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
+ },
+ easeInCirc: function (x, t, b, c, d) {
+ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
+ },
+ easeOutCirc: function (x, t, b, c, d) {
+ return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
+ },
+ easeInOutCirc: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
+ return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
+ },
+ easeInElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+ },
+ easeOutElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
+ },
+ easeInOutElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+ return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
+ },
+ easeInBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ return c*(t/=d)*t*((s+1)*t - s) + b;
+ },
+ easeOutBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
+ },
+ easeInOutBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
+ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
+ },
+ easeInBounce: function (x, t, b, c, d) {
+ return c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b;
+ },
+ easeOutBounce: function (x, t, b, c, d) {
+ if ((t/=d) < (1/2.75)) {
+ return c*(7.5625*t*t) + b;
+ } else if (t < (2/2.75)) {
+ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
+ } else if (t < (2.5/2.75)) {
+ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
+ } else {
+ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
+ }
+ },
+ easeInOutBounce: function (x, t, b, c, d) {
+ if (t < d/2) return $.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
+ return $.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
+ }
+});
+
+/*
+ *
+ * TERMS OF USE - EASING EQUATIONS
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright 2001 Robert Penner
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
+ * or promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+})(jQuery);
+/*
+ * jQuery UI Effects Blind 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Blind
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function( $, undefined ) {
+
+$.effects.blind = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','bottom','left','right'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+ var direction = o.options.direction || 'vertical'; // Default direction
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+ var ref = (direction == 'vertical') ? 'height' : 'width';
+ var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width();
+ if(mode == 'show') wrapper.css(ref, 0); // Shift
+
+ // Animation
+ var animation = {};
+ animation[ref] = mode == 'show' ? distance : 0;
+
+ // Animate
+ wrapper.animate(animation, o.duration, o.options.easing, function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
+ el.dequeue();
+ });
+
+ });
+
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Bounce 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Bounce
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function( $, undefined ) {
+
+$.effects.bounce = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','bottom','left','right'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+ var direction = o.options.direction || 'up'; // Default direction
+ var distance = o.options.distance || 20; // Default distance
+ var times = o.options.times || 5; // Default # of times
+ var speed = o.duration || 250; // Default speed per bounce
+ if (/show|hide/.test(mode)) props.push('opacity'); // Avoid touching opacity to prevent clearType and PNG issues in IE
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ $.effects.createWrapper(el); // Create Wrapper
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+ var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 3 : el.outerWidth({margin:true}) / 3);
+ if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
+ if (mode == 'hide') distance = distance / (times * 2);
+ if (mode != 'hide') times--;
+
+ // Animate
+ if (mode == 'show') { // Show Bounce
+ var animation = {opacity: 1};
+ animation[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
+ el.animate(animation, speed / 2, o.options.easing);
+ distance = distance / 2;
+ times--;
+ };
+ for (var i = 0; i < times; i++) { // Bounces
+ var animation1 = {}, animation2 = {};
+ animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
+ animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
+ el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing);
+ distance = (mode == 'hide') ? distance * 2 : distance / 2;
+ };
+ if (mode == 'hide') { // Last Bounce
+ var animation = {opacity: 0};
+ animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
+ el.animate(animation, speed / 2, o.options.easing, function(){
+ el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ });
+ } else {
+ var animation1 = {}, animation2 = {};
+ animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
+ animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
+ el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing, function(){
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ });
+ };
+ el.queue('fx', function() { el.dequeue(); });
+ el.dequeue();
+ });
+
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Clip 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Clip
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function( $, undefined ) {
+
+$.effects.clip = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','bottom','left','right','height','width'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+ var direction = o.options.direction || 'vertical'; // Default direction
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+ var animate = el[0].tagName == 'IMG' ? wrapper : el;
+ var ref = {
+ size: (direction == 'vertical') ? 'height' : 'width',
+ position: (direction == 'vertical') ? 'top' : 'left'
+ };
+ var distance = (direction == 'vertical') ? animate.height() : animate.width();
+ if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift
+
+ // Animation
+ var animation = {};
+ animation[ref.size] = mode == 'show' ? distance : 0;
+ animation[ref.position] = mode == 'show' ? 0 : distance / 2;
+
+ // Animate
+ animate.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
+ el.dequeue();
+ }});
+
+ });
+
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Drop 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Drop
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function( $, undefined ) {
+
+$.effects.drop = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','bottom','left','right','opacity'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+ var direction = o.options.direction || 'left'; // Default Direction
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ $.effects.createWrapper(el); // Create Wrapper
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+ var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 2 : el.outerWidth({margin:true}) / 2);
+ if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
+
+ // Animation
+ var animation = {opacity: mode == 'show' ? 1 : 0};
+ animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
+
+ // Animate
+ el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ el.dequeue();
+ }});
+
+ });
+
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Explode 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Explode
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function( $, undefined ) {
+
+$.effects.explode = function(o) {
+
+ return this.queue(function() {
+
+ var rows = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
+ var cells = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
+
+ o.options.mode = o.options.mode == 'toggle' ? ($(this).is(':visible') ? 'hide' : 'show') : o.options.mode;
+ var el = $(this).show().css('visibility', 'hidden');
+ var offset = el.offset();
+
+ //Substract the margins - not fixing the problem yet.
+ offset.top -= parseInt(el.css("marginTop"),10) || 0;
+ offset.left -= parseInt(el.css("marginLeft"),10) || 0;
+
+ var width = el.outerWidth(true);
+ var height = el.outerHeight(true);
+
+ for(var i=0;i<rows;i++) { // =
+ for(var j=0;j<cells;j++) { // ||
+ el
+ .clone()
+ .appendTo('body')
+ .wrap('<div></div>')
+ .css({
+ position: 'absolute',
+ visibility: 'visible',
+ left: -j*(width/cells),
+ top: -i*(height/rows)
+ })
+ .parent()
+ .addClass('ui-effects-explode')
+ .css({
+ position: 'absolute',
+ overflow: 'hidden',
+ width: width/cells,
+ height: height/rows,
+ left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? (j-Math.floor(cells/2))*(width/cells) : 0),
+ top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? (i-Math.floor(rows/2))*(height/rows) : 0),
+ opacity: o.options.mode == 'show' ? 0 : 1
+ }).animate({
+ left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? 0 : (j-Math.floor(cells/2))*(width/cells)),
+ top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? 0 : (i-Math.floor(rows/2))*(height/rows)),
+ opacity: o.options.mode == 'show' ? 1 : 0
+ }, o.duration || 500);
+ }
+ }
+
+ // Set a timeout, to call the callback approx. when the other animations have finished
+ setTimeout(function() {
+
+ o.options.mode == 'show' ? el.css({ visibility: 'visible' }) : el.css({ visibility: 'visible' }).hide();
+ if(o.callback) o.callback.apply(el[0]); // Callback
+ el.dequeue();
+
+ $('div.ui-effects-explode').remove();
+
+ }, o.duration || 500);
+
+
+ });
+
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Fade 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Fade
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function( $, undefined ) {
+
+$.effects.fade = function(o) {
+ return this.queue(function() {
+ var elem = $(this),
+ mode = $.effects.setMode(elem, o.options.mode || 'hide');
+
+ elem.animate({ opacity: mode }, {
+ queue: false,
+ duration: o.duration,
+ easing: o.options.easing,
+ complete: function() {
+ (o.callback && o.callback.apply(this, arguments));
+ elem.dequeue();
+ }
+ });
+ });
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Fold 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Fold
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function( $, undefined ) {
+
+$.effects.fold = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','bottom','left','right'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+ var size = o.options.size || 15; // Default fold size
+ var horizFirst = !(!o.options.horizFirst); // Ensure a boolean value
+ var duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2;
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+ var widthFirst = ((mode == 'show') != horizFirst);
+ var ref = widthFirst ? ['width', 'height'] : ['height', 'width'];
+ var distance = widthFirst ? [wrapper.width(), wrapper.height()] : [wrapper.height(), wrapper.width()];
+ var percent = /([0-9]+)%/.exec(size);
+ if(percent) size = parseInt(percent[1],10) / 100 * distance[mode == 'hide' ? 0 : 1];
+ if(mode == 'show') wrapper.css(horizFirst ? {height: 0, width: size} : {height: size, width: 0}); // Shift
+
+ // Animation
+ var animation1 = {}, animation2 = {};
+ animation1[ref[0]] = mode == 'show' ? distance[0] : size;
+ animation2[ref[1]] = mode == 'show' ? distance[1] : 0;
+
+ // Animate
+ wrapper.animate(animation1, duration, o.options.easing)
+ .animate(animation2, duration, o.options.easing, function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
+ el.dequeue();
+ });
+
+ });
+
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Highlight 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Highlight
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function( $, undefined ) {
+
+$.effects.highlight = function(o) {
+ return this.queue(function() {
+ var elem = $(this),
+ props = ['backgroundImage', 'backgroundColor', 'opacity'],
+ mode = $.effects.setMode(elem, o.options.mode || 'show'),
+ animation = {
+ backgroundColor: elem.css('backgroundColor')
+ };
+
+ if (mode == 'hide') {
+ animation.opacity = 0;
+ }
+
+ $.effects.save(elem, props);
+ elem
+ .show()
+ .css({
+ backgroundImage: 'none',
+ backgroundColor: o.options.color || '#ffff99'
+ })
+ .animate(animation, {
+ queue: false,
+ duration: o.duration,
+ easing: o.options.easing,
+ complete: function() {
+ (mode == 'hide' && elem.hide());
+ $.effects.restore(elem, props);
+ (mode == 'show' && !$.support.opacity && this.style.removeAttribute('filter'));
+ (o.callback && o.callback.apply(this, arguments));
+ elem.dequeue();
+ }
+ });
+ });
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Pulsate 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Pulsate
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function( $, undefined ) {
+
+$.effects.pulsate = function(o) {
+ return this.queue(function() {
+ var elem = $(this),
+ mode = $.effects.setMode(elem, o.options.mode || 'show');
+ times = ((o.options.times || 5) * 2) - 1;
+ duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2,
+ isVisible = elem.is(':visible'),
+ animateTo = 0;
+
+ if (!isVisible) {
+ elem.css('opacity', 0).show();
+ animateTo = 1;
+ }
+
+ if ((mode == 'hide' && isVisible) || (mode == 'show' && !isVisible)) {
+ times--;
+ }
+
+ for (var i = 0; i < times; i++) {
+ elem.animate({ opacity: animateTo }, duration, o.options.easing);
+ animateTo = (animateTo + 1) % 2;
+ }
+
+ elem.animate({ opacity: animateTo }, duration, o.options.easing, function() {
+ if (animateTo == 0) {
+ elem.hide();
+ }
+ (o.callback && o.callback.apply(this, arguments));
+ });
+
+ elem
+ .queue('fx', function() { elem.dequeue(); })
+ .dequeue();
+ });
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Scale 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Scale
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function( $, undefined ) {
+
+$.effects.puff = function(o) {
+ return this.queue(function() {
+ var elem = $(this),
+ mode = $.effects.setMode(elem, o.options.mode || 'hide'),
+ percent = parseInt(o.options.percent, 10) || 150,
+ factor = percent / 100,
+ original = { height: elem.height(), width: elem.width() };
+
+ $.extend(o.options, {
+ fade: true,
+ mode: mode,
+ percent: mode == 'hide' ? percent : 100,
+ from: mode == 'hide'
+ ? original
+ : {
+ height: original.height * factor,
+ width: original.width * factor
+ }
+ });
+
+ elem.effect('scale', o.options, o.duration, o.callback);
+ elem.dequeue();
+ });
+};
+
+$.effects.scale = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this);
+
+ // Set options
+ var options = $.extend(true, {}, o.options);
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+ var percent = parseInt(o.options.percent,10) || (parseInt(o.options.percent,10) == 0 ? 0 : (mode == 'hide' ? 0 : 100)); // Set default scaling percent
+ var direction = o.options.direction || 'both'; // Set default axis
+ var origin = o.options.origin; // The origin of the scaling
+ if (mode != 'effect') { // Set default origin and restore for show/hide
+ options.origin = origin || ['middle','center'];
+ options.restore = true;
+ }
+ var original = {height: el.height(), width: el.width()}; // Save original
+ el.from = o.options.from || (mode == 'show' ? {height: 0, width: 0} : original); // Default from state
+
+ // Adjust
+ var factor = { // Set scaling factor
+ y: direction != 'horizontal' ? (percent / 100) : 1,
+ x: direction != 'vertical' ? (percent / 100) : 1
+ };
+ el.to = {height: original.height * factor.y, width: original.width * factor.x}; // Set to state
+
+ if (o.options.fade) { // Fade option to support puff
+ if (mode == 'show') {el.from.opacity = 0; el.to.opacity = 1;};
+ if (mode == 'hide') {el.from.opacity = 1; el.to.opacity = 0;};
+ };
+
+ // Animation
+ options.from = el.from; options.to = el.to; options.mode = mode;
+
+ // Animate
+ el.effect('size', options, o.duration, o.callback);
+ el.dequeue();
+ });
+
+};
+
+$.effects.size = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','bottom','left','right','width','height','overflow','opacity'];
+ var props1 = ['position','top','bottom','left','right','overflow','opacity']; // Always restore
+ var props2 = ['width','height','overflow']; // Copy for children
+ var cProps = ['fontSize'];
+ var vProps = ['borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'];
+ var hProps = ['borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+ var restore = o.options.restore || false; // Default restore
+ var scale = o.options.scale || 'both'; // Default scale mode
+ var origin = o.options.origin; // The origin of the sizing
+ var original = {height: el.height(), width: el.width()}; // Save original
+ el.from = o.options.from || original; // Default from state
+ el.to = o.options.to || original; // Default to state
+ // Adjust
+ if (origin) { // Calculate baseline shifts
+ var baseline = $.effects.getBaseline(origin, original);
+ el.from.top = (original.height - el.from.height) * baseline.y;
+ el.from.left = (original.width - el.from.width) * baseline.x;
+ el.to.top = (original.height - el.to.height) * baseline.y;
+ el.to.left = (original.width - el.to.width) * baseline.x;
+ };
+ var factor = { // Set scaling factor
+ from: {y: el.from.height / original.height, x: el.from.width / original.width},
+ to: {y: el.to.height / original.height, x: el.to.width / original.width}
+ };
+ if (scale == 'box' || scale == 'both') { // Scale the css box
+ if (factor.from.y != factor.to.y) { // Vertical props scaling
+ props = props.concat(vProps);
+ el.from = $.effects.setTransition(el, vProps, factor.from.y, el.from);
+ el.to = $.effects.setTransition(el, vProps, factor.to.y, el.to);
+ };
+ if (factor.from.x != factor.to.x) { // Horizontal props scaling
+ props = props.concat(hProps);
+ el.from = $.effects.setTransition(el, hProps, factor.from.x, el.from);
+ el.to = $.effects.setTransition(el, hProps, factor.to.x, el.to);
+ };
+ };
+ if (scale == 'content' || scale == 'both') { // Scale the content
+ if (factor.from.y != factor.to.y) { // Vertical props scaling
+ props = props.concat(cProps);
+ el.from = $.effects.setTransition(el, cProps, factor.from.y, el.from);
+ el.to = $.effects.setTransition(el, cProps, factor.to.y, el.to);
+ };
+ };
+ $.effects.save(el, restore ? props : props1); el.show(); // Save & Show
+ $.effects.createWrapper(el); // Create Wrapper
+ el.css('overflow','hidden').css(el.from); // Shift
+
+ // Animate
+ if (scale == 'content' || scale == 'both') { // Scale the children
+ vProps = vProps.concat(['marginTop','marginBottom']).concat(cProps); // Add margins/font-size
+ hProps = hProps.concat(['marginLeft','marginRight']); // Add margins
+ props2 = props.concat(vProps).concat(hProps); // Concat
+ el.find("*[width]").each(function(){
+ child = $(this);
+ if (restore) $.effects.save(child, props2);
+ var c_original = {height: child.height(), width: child.width()}; // Save original
+ child.from = {height: c_original.height * factor.from.y, width: c_original.width * factor.from.x};
+ child.to = {height: c_original.height * factor.to.y, width: c_original.width * factor.to.x};
+ if (factor.from.y != factor.to.y) { // Vertical props scaling
+ child.from = $.effects.setTransition(child, vProps, factor.from.y, child.from);
+ child.to = $.effects.setTransition(child, vProps, factor.to.y, child.to);
+ };
+ if (factor.from.x != factor.to.x) { // Horizontal props scaling
+ child.from = $.effects.setTransition(child, hProps, factor.from.x, child.from);
+ child.to = $.effects.setTransition(child, hProps, factor.to.x, child.to);
+ };
+ child.css(child.from); // Shift children
+ child.animate(child.to, o.duration, o.options.easing, function(){
+ if (restore) $.effects.restore(child, props2); // Restore children
+ }); // Animate children
+ });
+ };
+
+ // Animate
+ el.animate(el.to, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+ if (el.to.opacity === 0) {
+ el.css('opacity', el.from.opacity);
+ }
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, restore ? props : props1); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ el.dequeue();
+ }});
+
+ });
+
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Shake 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Shake
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function( $, undefined ) {
+
+$.effects.shake = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','bottom','left','right'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+ var direction = o.options.direction || 'left'; // Default direction
+ var distance = o.options.distance || 20; // Default distance
+ var times = o.options.times || 3; // Default # of times
+ var speed = o.duration || o.options.duration || 140; // Default speed per shake
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ $.effects.createWrapper(el); // Create Wrapper
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+
+ // Animation
+ var animation = {}, animation1 = {}, animation2 = {};
+ animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
+ animation1[ref] = (motion == 'pos' ? '+=' : '-=') + distance * 2;
+ animation2[ref] = (motion == 'pos' ? '-=' : '+=') + distance * 2;
+
+ // Animate
+ el.animate(animation, speed, o.options.easing);
+ for (var i = 1; i < times; i++) { // Shakes
+ el.animate(animation1, speed, o.options.easing).animate(animation2, speed, o.options.easing);
+ };
+ el.animate(animation1, speed, o.options.easing).
+ animate(animation, speed / 2, o.options.easing, function(){ // Last shake
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ });
+ el.queue('fx', function() { el.dequeue(); });
+ el.dequeue();
+ });
+
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Slide 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Slide
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function( $, undefined ) {
+
+$.effects.slide = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','bottom','left','right'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
+ var direction = o.options.direction || 'left'; // Default Direction
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+ var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) : el.outerWidth({margin:true}));
+ if (mode == 'show') el.css(ref, motion == 'pos' ? (isNaN(distance) ? "-" + distance : -distance) : distance); // Shift
+
+ // Animation
+ var animation = {};
+ animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
+
+ // Animate
+ el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ el.dequeue();
+ }});
+
+ });
+
+};
+
+})(jQuery);
+/*
+ * jQuery UI Effects Transfer 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Transfer
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function( $, undefined ) {
+
+$.effects.transfer = function(o) {
+ return this.queue(function() {
+ var elem = $(this),
+ target = $(o.options.to),
+ endPosition = target.offset(),
+ animation = {
+ top: endPosition.top,
+ left: endPosition.left,
+ height: target.innerHeight(),
+ width: target.innerWidth()
+ },
+ startPosition = elem.offset(),
+ transfer = $('<div class="ui-effects-transfer"></div>')
+ .appendTo(document.body)
+ .addClass(o.options.className)
+ .css({
+ top: startPosition.top,
+ left: startPosition.left,
+ height: elem.innerHeight(),
+ width: elem.innerWidth(),
+ position: 'absolute'
+ })
+ .animate(animation, o.duration, o.options.easing, function() {
+ transfer.remove();
+ (o.callback && o.callback.apply(elem[0], arguments));
+ elem.dequeue();
+ });
+ });
+};
+
+})(jQuery);
+/*
+ * jQuery UI Accordion 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+$.widget( "ui.accordion", {
+ options: {
+ active: 0,
+ animated: "slide",
+ autoHeight: true,
+ clearStyle: false,
+ collapsible: false,
+ event: "click",
+ fillSpace: false,
+ header: "> li > :first-child,> :not(li):even",
+ icons: {
+ header: "ui-icon-triangle-1-e",
+ headerSelected: "ui-icon-triangle-1-s"
+ },
+ navigation: false,
+ navigationFilter: function() {
+ return this.href.toLowerCase() === location.href.toLowerCase();
+ }
+ },
+
+ _create: function() {
+ var self = this,
+ options = self.options;
+
+ self.running = 0;
+
+ self.element
+ .addClass( "ui-accordion ui-widget ui-helper-reset" )
+ // in lack of child-selectors in CSS
+ // we need to mark top-LIs in a UL-accordion for some IE-fix
+ .children( "li" )
+ .addClass( "ui-accordion-li-fix" );
+
+ self.headers = self.element.find( options.header )
+ .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" )
+ .bind( "mouseenter.accordion", function() {
+ if ( options.disabled ) {
+ return;
+ }
+ $( this ).addClass( "ui-state-hover" );
+ })
+ .bind( "mouseleave.accordion", function() {
+ if ( options.disabled ) {
+ return;
+ }
+ $( this ).removeClass( "ui-state-hover" );
+ })
+ .bind( "focus.accordion", function() {
+ if ( options.disabled ) {
+ return;
+ }
+ $( this ).addClass( "ui-state-focus" );
+ })
+ .bind( "blur.accordion", function() {
+ if ( options.disabled ) {
+ return;
+ }
+ $( this ).removeClass( "ui-state-focus" );
+ });
+
+ self.headers.next()
+ .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" );
+
+ if ( options.navigation ) {
+ var current = self.element.find( "a" ).filter( options.navigationFilter ).eq( 0 );
+ if ( current.length ) {
+ var header = current.closest( ".ui-accordion-header" );
+ if ( header.length ) {
+ // anchor within header
+ self.active = header;
+ } else {
+ // anchor within content
+ self.active = current.closest( ".ui-accordion-content" ).prev();
+ }
+ }
+ }
+
+ self.active = self._findActive( self.active || options.active )
+ .addClass( "ui-state-default ui-state-active" )
+ .toggleClass( "ui-corner-all" )
+ .toggleClass( "ui-corner-top" );
+ self.active.next().addClass( "ui-accordion-content-active" );
+
+ self._createIcons();
+ self.resize();
+
+ // ARIA
+ self.element.attr( "role", "tablist" );
+
+ self.headers
+ .attr( "role", "tab" )
+ .bind( "keydown.accordion", function( event ) {
+ return self._keydown( event );
+ })
+ .next()
+ .attr( "role", "tabpanel" );
+
+ self.headers
+ .not( self.active || "" )
+ .attr({
+ "aria-expanded": "false",
+ "aria-selected": "false",
+ tabIndex: -1
+ })
+ .next()
+ .hide();
+
+ // make sure at least one header is in the tab order
+ if ( !self.active.length ) {
+ self.headers.eq( 0 ).attr( "tabIndex", 0 );
+ } else {
+ self.active
+ .attr({
+ "aria-expanded": "true",
+ "aria-selected": "true",
+ tabIndex: 0
+ });
+ }
+
+ // only need links in tab order for Safari
+ if ( !$.browser.safari ) {
+ self.headers.find( "a" ).attr( "tabIndex", -1 );
+ }
+
+ if ( options.event ) {
+ self.headers.bind( options.event.split(" ").join(".accordion ") + ".accordion", function(event) {
+ self._clickHandler.call( self, event, this );
+ event.preventDefault();
+ });
+ }
+ },
+
+ _createIcons: function() {
+ var options = this.options;
+ if ( options.icons ) {
+ $( "<span></span>" )
+ .addClass( "ui-icon " + options.icons.header )
+ .prependTo( this.headers );
+ this.active.children( ".ui-icon" )
+ .toggleClass(options.icons.header)
+ .toggleClass(options.icons.headerSelected);
+ this.element.addClass( "ui-accordion-icons" );
+ }
+ },
+
+ _destroyIcons: function() {
+ this.headers.children( ".ui-icon" ).remove();
+ this.element.removeClass( "ui-accordion-icons" );
+ },
+
+ destroy: function() {
+ var options = this.options;
+
+ this.element
+ .removeClass( "ui-accordion ui-widget ui-helper-reset" )
+ .removeAttr( "role" );
+
+ this.headers
+ .unbind( ".accordion" )
+ .removeClass( "ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
+ .removeAttr( "role" )
+ .removeAttr( "aria-expanded" )
+ .removeAttr( "aria-selected" )
+ .removeAttr( "tabIndex" );
+
+ this.headers.find( "a" ).removeAttr( "tabIndex" );
+ this._destroyIcons();
+ var contents = this.headers.next()
+ .css( "display", "" )
+ .removeAttr( "role" )
+ .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled" );
+ if ( options.autoHeight || options.fillHeight ) {
+ contents.css( "height", "" );
+ }
+
+ return $.Widget.prototype.destroy.call( this );
+ },
+
+ _setOption: function( key, value ) {
+ $.Widget.prototype._setOption.apply( this, arguments );
+
+ if ( key == "active" ) {
+ this.activate( value );
+ }
+ if ( key == "icons" ) {
+ this._destroyIcons();
+ if ( value ) {
+ this._createIcons();
+ }
+ }
+ // #5332 - opacity doesn't cascade to positioned elements in IE
+ // so we need to add the disabled class to the headers and panels
+ if ( key == "disabled" ) {
+ this.headers.add(this.headers.next())
+ [ value ? "addClass" : "removeClass" ](
+ "ui-accordion-disabled ui-state-disabled" );
+ }
+ },
+
+ _keydown: function( event ) {
+ if ( this.options.disabled || event.altKey || event.ctrlKey ) {
+ return;
+ }
+
+ var keyCode = $.ui.keyCode,
+ length = this.headers.length,
+ currentIndex = this.headers.index( event.target ),
+ toFocus = false;
+
+ switch ( event.keyCode ) {
+ case keyCode.RIGHT:
+ case keyCode.DOWN:
+ toFocus = this.headers[ ( currentIndex + 1 ) % length ];
+ break;
+ case keyCode.LEFT:
+ case keyCode.UP:
+ toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
+ break;
+ case keyCode.SPACE:
+ case keyCode.ENTER:
+ this._clickHandler( { target: event.target }, event.target );
+ event.preventDefault();
+ }
+
+ if ( toFocus ) {
+ $( event.target ).attr( "tabIndex", -1 );
+ $( toFocus ).attr( "tabIndex", 0 );
+ toFocus.focus();
+ return false;
+ }
+
+ return true;
+ },
+
+ resize: function() {
+ var options = this.options,
+ maxHeight;
+
+ if ( options.fillSpace ) {
+ if ( $.browser.msie ) {
+ var defOverflow = this.element.parent().css( "overflow" );
+ this.element.parent().css( "overflow", "hidden");
+ }
+ maxHeight = this.element.parent().height();
+ if ($.browser.msie) {
+ this.element.parent().css( "overflow", defOverflow );
+ }
+
+ this.headers.each(function() {
+ maxHeight -= $( this ).outerHeight( true );
+ });
+
+ this.headers.next()
+ .each(function() {
+ $( this ).height( Math.max( 0, maxHeight -
+ $( this ).innerHeight() + $( this ).height() ) );
+ })
+ .css( "overflow", "auto" );
+ } else if ( options.autoHeight ) {
+ maxHeight = 0;
+ this.headers.next()
+ .each(function() {
+ maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
+ })
+ .height( maxHeight );
+ }
+
+ return this;
+ },
+
+ activate: function( index ) {
+ // TODO this gets called on init, changing the option without an explicit call for that
+ this.options.active = index;
+ // call clickHandler with custom event
+ var active = this._findActive( index )[ 0 ];
+ this._clickHandler( { target: active }, active );
+
+ return this;
+ },
+
+ _findActive: function( selector ) {
+ return selector
+ ? typeof selector === "number"
+ ? this.headers.filter( ":eq(" + selector + ")" )
+ : this.headers.not( this.headers.not( selector ) )
+ : selector === false
+ ? $( [] )
+ : this.headers.filter( ":eq(0)" );
+ },
+
+ // TODO isn't event.target enough? why the separate target argument?
+ _clickHandler: function( event, target ) {
+ var options = this.options;
+ if ( options.disabled ) {
+ return;
+ }
+
+ // called only when using activate(false) to close all parts programmatically
+ if ( !event.target ) {
+ if ( !options.collapsible ) {
+ return;
+ }
+ this.active
+ .removeClass( "ui-state-active ui-corner-top" )
+ .addClass( "ui-state-default ui-corner-all" )
+ .children( ".ui-icon" )
+ .removeClass( options.icons.headerSelected )
+ .addClass( options.icons.header );
+ this.active.next().addClass( "ui-accordion-content-active" );
+ var toHide = this.active.next(),
+ data = {
+ options: options,
+ newHeader: $( [] ),
+ oldHeader: options.active,
+ newContent: $( [] ),
+ oldContent: toHide
+ },
+ toShow = ( this.active = $( [] ) );
+ this._toggle( toShow, toHide, data );
+ return;
+ }
+
+ // get the click target
+ var clicked = $( event.currentTarget || target ),
+ clickedIsActive = clicked[0] === this.active[0];
+
+ // TODO the option is changed, is that correct?
+ // TODO if it is correct, shouldn't that happen after determining that the click is valid?
+ options.active = options.collapsible && clickedIsActive ?
+ false :
+ this.headers.index( clicked );
+
+ // if animations are still active, or the active header is the target, ignore click
+ if ( this.running || ( !options.collapsible && clickedIsActive ) ) {
+ return;
+ }
+
+ // find elements to show and hide
+ var active = this.active,
+ toShow = clicked.next(),
+ toHide = this.active.next(),
+ data = {
+ options: options,
+ newHeader: clickedIsActive && options.collapsible ? $([]) : clicked,
+ oldHeader: this.active,
+ newContent: clickedIsActive && options.collapsible ? $([]) : toShow,
+ oldContent: toHide
+ },
+ down = this.headers.index( this.active[0] ) > this.headers.index( clicked[0] );
+
+ // when the call to ._toggle() comes after the class changes
+ // it causes a very odd bug in IE 8 (see #6720)
+ this.active = clickedIsActive ? $([]) : clicked;
+ this._toggle( toShow, toHide, data, clickedIsActive, down );
+
+ // switch classes
+ active
+ .removeClass( "ui-state-active ui-corner-top" )
+ .addClass( "ui-state-default ui-corner-all" )
+ .children( ".ui-icon" )
+ .removeClass( options.icons.headerSelected )
+ .addClass( options.icons.header );
+ if ( !clickedIsActive ) {
+ clicked
+ .removeClass( "ui-state-default ui-corner-all" )
+ .addClass( "ui-state-active ui-corner-top" )
+ .children( ".ui-icon" )
+ .removeClass( options.icons.header )
+ .addClass( options.icons.headerSelected );
+ clicked
+ .next()
+ .addClass( "ui-accordion-content-active" );
+ }
+
+ return;
+ },
+
+ _toggle: function( toShow, toHide, data, clickedIsActive, down ) {
+ var self = this,
+ options = self.options;
+
+ self.toShow = toShow;
+ self.toHide = toHide;
+ self.data = data;
+
+ var complete = function() {
+ if ( !self ) {
+ return;
+ }
+ return self._completed.apply( self, arguments );
+ };
+
+ // trigger changestart event
+ self._trigger( "changestart", null, self.data );
+
+ // count elements to animate
+ self.running = toHide.size() === 0 ? toShow.size() : toHide.size();
+
+ if ( options.animated ) {
+ var animOptions = {};
+
+ if ( options.collapsible && clickedIsActive ) {
+ animOptions = {
+ toShow: $( [] ),
+ toHide: toHide,
+ complete: complete,
+ down: down,
+ autoHeight: options.autoHeight || options.fillSpace
+ };
+ } else {
+ animOptions = {
+ toShow: toShow,
+ toHide: toHide,
+ complete: complete,
+ down: down,
+ autoHeight: options.autoHeight || options.fillSpace
+ };
+ }
+
+ if ( !options.proxied ) {
+ options.proxied = options.animated;
+ }
+
+ if ( !options.proxiedDuration ) {
+ options.proxiedDuration = options.duration;
+ }
+
+ options.animated = $.isFunction( options.proxied ) ?
+ options.proxied( animOptions ) :
+ options.proxied;
+
+ options.duration = $.isFunction( options.proxiedDuration ) ?
+ options.proxiedDuration( animOptions ) :
+ options.proxiedDuration;
+
+ var animations = $.ui.accordion.animations,
+ duration = options.duration,
+ easing = options.animated;
+
+ if ( easing && !animations[ easing ] && !$.easing[ easing ] ) {
+ easing = "slide";
+ }
+ if ( !animations[ easing ] ) {
+ animations[ easing ] = function( options ) {
+ this.slide( options, {
+ easing: easing,
+ duration: duration || 700
+ });
+ };
+ }
+
+ animations[ easing ]( animOptions );
+ } else {
+ if ( options.collapsible && clickedIsActive ) {
+ toShow.toggle();
+ } else {
+ toHide.hide();
+ toShow.show();
+ }
+
+ complete( true );
+ }
+
+ // TODO assert that the blur and focus triggers are really necessary, remove otherwise
+ toHide.prev()
+ .attr({
+ "aria-expanded": "false",
+ "aria-selected": "false",
+ tabIndex: -1
+ })
+ .blur();
+ toShow.prev()
+ .attr({
+ "aria-expanded": "true",
+ "aria-selected": "true",
+ tabIndex: 0
+ })
+ .focus();
+ },
+
+ _completed: function( cancel ) {
+ this.running = cancel ? 0 : --this.running;
+ if ( this.running ) {
+ return;
+ }
+
+ if ( this.options.clearStyle ) {
+ this.toShow.add( this.toHide ).css({
+ height: "",
+ overflow: ""
+ });
+ }
+
+ // other classes are removed before the animation; this one needs to stay until completed
+ this.toHide.removeClass( "ui-accordion-content-active" );
+ // Work around for rendering bug in IE (#5421)
+ if ( this.toHide.length ) {
+ this.toHide.parent()[0].className = this.toHide.parent()[0].className;
+ }
+
+ this._trigger( "change", null, this.data );
+ }
+});
+
+$.extend( $.ui.accordion, {
+ version: "1.8.16",
+ animations: {
+ slide: function( options, additions ) {
+ options = $.extend({
+ easing: "swing",
+ duration: 300
+ }, options, additions );
+ if ( !options.toHide.size() ) {
+ options.toShow.animate({
+ height: "show",
+ paddingTop: "show",
+ paddingBottom: "show"
+ }, options );
+ return;
+ }
+ if ( !options.toShow.size() ) {
+ options.toHide.animate({
+ height: "hide",
+ paddingTop: "hide",
+ paddingBottom: "hide"
+ }, options );
+ return;
+ }
+ var overflow = options.toShow.css( "overflow" ),
+ percentDone = 0,
+ showProps = {},
+ hideProps = {},
+ fxAttrs = [ "height", "paddingTop", "paddingBottom" ],
+ originalWidth;
+ // fix width before calculating height of hidden element
+ var s = options.toShow;
+ originalWidth = s[0].style.width;
+ s.width( 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.end - settings.start === 0 ) ? 0 :
+ ( settings.now - settings.start ) / ( settings.end - settings.start );
+ }
+
+ options.toShow[ 0 ].style[ settings.prop ] =
+ ( percentDone * showProps[ settings.prop ].value )
+ + showProps[ settings.prop ].unit;
+ },
+ duration: options.duration,
+ easing: options.easing,
+ complete: function() {
+ if ( !options.autoHeight ) {
+ options.toShow.css( "height", "" );
+ }
+ options.toShow.css({
+ width: originalWidth,
+ overflow: overflow
+ });
+ options.complete();
+ }
+ });
+ },
+ bounceslide: function( options ) {
+ this.slide( options, {
+ easing: options.down ? "easeOutBounce" : "swing",
+ duration: options.down ? 1000 : 200
+ });
+ }
+ }
+});
+
+})( jQuery );
+/*
+ * jQuery UI Autocomplete 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ * jquery.ui.position.js
+ */
+(function( $, undefined ) {
+
+// used to prevent race conditions with remote data sources
+var requestIndex = 0;
+
+$.widget( "ui.autocomplete", {
+ options: {
+ appendTo: "body",
+ autoFocus: false,
+ delay: 300,
+ minLength: 1,
+ position: {
+ my: "left top",
+ at: "left bottom",
+ collision: "none"
+ },
+ source: null
+ },
+
+ pending: 0,
+
+ _create: function() {
+ var self = this,
+ doc = this.element[ 0 ].ownerDocument,
+ suppressKeyPress;
+
+ this.element
+ .addClass( "ui-autocomplete-input" )
+ .attr( "autocomplete", "off" )
+ // TODO verify these actually work as intended
+ .attr({
+ role: "textbox",
+ "aria-autocomplete": "list",
+ "aria-haspopup": "true"
+ })
+ .bind( "keydown.autocomplete", function( event ) {
+ if ( self.options.disabled || self.element.propAttr( "readOnly" ) ) {
+ return;
+ }
+
+ suppressKeyPress = false;
+ var keyCode = $.ui.keyCode;
+ switch( event.keyCode ) {
+ case keyCode.PAGE_UP:
+ self._move( "previousPage", event );
+ break;
+ case keyCode.PAGE_DOWN:
+ self._move( "nextPage", event );
+ break;
+ case keyCode.UP:
+ self._move( "previous", event );
+ // prevent moving cursor to beginning of text field in some browsers
+ event.preventDefault();
+ break;
+ case keyCode.DOWN:
+ self._move( "next", event );
+ // prevent moving cursor to end of text field in some browsers
+ event.preventDefault();
+ break;
+ case keyCode.ENTER:
+ case keyCode.NUMPAD_ENTER:
+ // when menu is open and has focus
+ if ( self.menu.active ) {
+ // #6055 - Opera still allows the keypress to occur
+ // which causes forms to submit
+ suppressKeyPress = true;
+ event.preventDefault();
+ }
+ //passthrough - ENTER and TAB both select the current element
+ case keyCode.TAB:
+ if ( !self.menu.active ) {
+ return;
+ }
+ self.menu.select( event );
+ break;
+ case keyCode.ESCAPE:
+ self.element.val( self.term );
+ self.close( event );
+ break;
+ default:
+ // keypress is triggered before the input value is changed
+ clearTimeout( self.searching );
+ self.searching = setTimeout(function() {
+ // only search if the value has changed
+ if ( self.term != self.element.val() ) {
+ self.selectedItem = null;
+ self.search( null, event );
+ }
+ }, self.options.delay );
+ break;
+ }
+ })
+ .bind( "keypress.autocomplete", function( event ) {
+ if ( suppressKeyPress ) {
+ suppressKeyPress = false;
+ event.preventDefault();
+ }
+ })
+ .bind( "focus.autocomplete", function() {
+ if ( self.options.disabled ) {
+ return;
+ }
+
+ self.selectedItem = null;
+ self.previous = self.element.val();
+ })
+ .bind( "blur.autocomplete", function( event ) {
+ if ( self.options.disabled ) {
+ return;
+ }
+
+ clearTimeout( self.searching );
+ // clicks on the menu (or a button to trigger a search) will cause a blur event
+ self.closing = setTimeout(function() {
+ self.close( event );
+ self._change( event );
+ }, 150 );
+ });
+ this._initSource();
+ this.response = function() {
+ return self._response.apply( self, arguments );
+ };
+ this.menu = $( "<ul></ul>" )
+ .addClass( "ui-autocomplete" )
+ .appendTo( $( this.options.appendTo || "body", doc )[0] )
+ // prevent the close-on-blur in case of a "slow" click on the menu (long mousedown)
+ .mousedown(function( event ) {
+ // clicking on the scrollbar causes focus to shift to the body
+ // but we can't detect a mouseup or a click immediately afterward
+ // so we have to track the next mousedown and close the menu if
+ // the user clicks somewhere outside of the autocomplete
+ var menuElement = self.menu.element[ 0 ];
+ if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
+ setTimeout(function() {
+ $( document ).one( 'mousedown', function( event ) {
+ if ( event.target !== self.element[ 0 ] &&
+ event.target !== menuElement &&
+ !$.ui.contains( menuElement, event.target ) ) {
+ self.close();
+ }
+ });
+ }, 1 );
+ }
+
+ // use another timeout to make sure the blur-event-handler on the input was already triggered
+ setTimeout(function() {
+ clearTimeout( self.closing );
+ }, 13);
+ })
+ .menu({
+ focus: function( event, ui ) {
+ var item = ui.item.data( "item.autocomplete" );
+ if ( false !== self._trigger( "focus", event, { item: item } ) ) {
+ // use value to match what will end up in the input, if it was a key event
+ if ( /^key/.test(event.originalEvent.type) ) {
+ self.element.val( item.value );
+ }
+ }
+ },
+ selected: function( event, ui ) {
+ var item = ui.item.data( "item.autocomplete" ),
+ previous = self.previous;
+
+ // only trigger when focus was lost (click on menu)
+ if ( self.element[0] !== doc.activeElement ) {
+ self.element.focus();
+ self.previous = previous;
+ // #6109 - IE triggers two focus events and the second
+ // is asynchronous, so we need to reset the previous
+ // term synchronously and asynchronously :-(
+ setTimeout(function() {
+ self.previous = previous;
+ self.selectedItem = item;
+ }, 1);
+ }
+
+ if ( false !== self._trigger( "select", event, { item: item } ) ) {
+ self.element.val( item.value );
+ }
+ // reset the term after the select event
+ // this allows custom select handling to work properly
+ self.term = self.element.val();
+
+ self.close( event );
+ self.selectedItem = item;
+ },
+ blur: function( event, ui ) {
+ // don't set the value of the text field if it's already correct
+ // this prevents moving the cursor unnecessarily
+ if ( self.menu.element.is(":visible") &&
+ ( self.element.val() !== self.term ) ) {
+ self.element.val( self.term );
+ }
+ }
+ })
+ .zIndex( this.element.zIndex() + 1 )
+ // workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781
+ .css({ top: 0, left: 0 })
+ .hide()
+ .data( "menu" );
+ if ( $.fn.bgiframe ) {
+ this.menu.element.bgiframe();
+ }
+ },
+
+ destroy: function() {
+ this.element
+ .removeClass( "ui-autocomplete-input" )
+ .removeAttr( "autocomplete" )
+ .removeAttr( "role" )
+ .removeAttr( "aria-autocomplete" )
+ .removeAttr( "aria-haspopup" );
+ this.menu.element.remove();
+ $.Widget.prototype.destroy.call( this );
+ },
+
+ _setOption: function( key, value ) {
+ $.Widget.prototype._setOption.apply( this, arguments );
+ if ( key === "source" ) {
+ this._initSource();
+ }
+ if ( key === "appendTo" ) {
+ this.menu.element.appendTo( $( value || "body", this.element[0].ownerDocument )[0] )
+ }
+ if ( key === "disabled" && value && this.xhr ) {
+ this.xhr.abort();
+ }
+ },
+
+ _initSource: function() {
+ var self = this,
+ array,
+ url;
+ if ( $.isArray(this.options.source) ) {
+ array = this.options.source;
+ this.source = function( request, response ) {
+ response( $.ui.autocomplete.filter(array, request.term) );
+ };
+ } else if ( typeof this.options.source === "string" ) {
+ url = this.options.source;
+ this.source = function( request, response ) {
+ if ( self.xhr ) {
+ self.xhr.abort();
+ }
+ self.xhr = $.ajax({
+ url: url,
+ data: request,
+ dataType: "json",
+ autocompleteRequest: ++requestIndex,
+ success: function( data, status ) {
+ if ( this.autocompleteRequest === requestIndex ) {
+ response( data );
+ }
+ },
+ error: function() {
+ if ( this.autocompleteRequest === requestIndex ) {
+ response( [] );
+ }
+ }
+ });
+ };
+ } else {
+ this.source = this.options.source;
+ }
+ },
+
+ search: function( value, event ) {
+ value = value != null ? value : this.element.val();
+
+ // always save the actual value, not the one passed as an argument
+ this.term = this.element.val();
+
+ if ( value.length < this.options.minLength ) {
+ return this.close( event );
+ }
+
+ clearTimeout( this.closing );
+ if ( this._trigger( "search", event ) === false ) {
+ return;
+ }
+
+ return this._search( value );
+ },
+
+ _search: function( value ) {
+ this.pending++;
+ this.element.addClass( "ui-autocomplete-loading" );
+
+ this.source( { term: value }, this.response );
+ },
+
+ _response: function( content ) {
+ if ( !this.options.disabled && content && content.length ) {
+ content = this._normalize( content );
+ this._suggest( content );
+ this._trigger( "open" );
+ } else {
+ this.close();
+ }
+ this.pending--;
+ if ( !this.pending ) {
+ this.element.removeClass( "ui-autocomplete-loading" );
+ }
+ },
+
+ close: function( event ) {
+ clearTimeout( this.closing );
+ if ( this.menu.element.is(":visible") ) {
+ this.menu.element.hide();
+ this.menu.deactivate();
+ this._trigger( "close", event );
+ }
+ },
+
+ _change: function( event ) {
+ if ( this.previous !== this.element.val() ) {
+ this._trigger( "change", event, { item: this.selectedItem } );
+ }
+ },
+
+ _normalize: function( items ) {
+ // assume all items have the right format when the first item is complete
+ if ( items.length && items[0].label && items[0].value ) {
+ return items;
+ }
+ return $.map( items, function(item) {
+ if ( typeof item === "string" ) {
+ return {
+ label: item,
+ value: item
+ };
+ }
+ return $.extend({
+ label: item.label || item.value,
+ value: item.value || item.label
+ }, item );
+ });
+ },
+
+ _suggest: function( items ) {
+ var ul = this.menu.element
+ .empty()
+ .zIndex( this.element.zIndex() + 1 );
+ this._renderMenu( ul, items );
+ // TODO refresh should check if the active item is still in the dom, removing the need for a manual deactivate
+ this.menu.deactivate();
+ this.menu.refresh();
+
+ // size and position menu
+ ul.show();
+ this._resizeMenu();
+ ul.position( $.extend({
+ of: this.element
+ }, this.options.position ));
+
+ if ( this.options.autoFocus ) {
+ this.menu.next( new $.Event("mouseover") );
+ }
+ },
+
+ _resizeMenu: function() {
+ var ul = this.menu.element;
+ ul.outerWidth( Math.max(
+ ul.width( "" ).outerWidth(),
+ this.element.outerWidth()
+ ) );
+ },
+
+ _renderMenu: function( ul, items ) {
+ var self = this;
+ $.each( items, function( index, item ) {
+ self._renderItem( ul, item );
+ });
+ },
+
+ _renderItem: function( ul, item) {
+ return $( "<li></li>" )
+ .data( "item.autocomplete", item )
+ .append( $( "<a></a>" ).text( item.label ) )
+ .appendTo( ul );
+ },
+
+ _move: function( direction, event ) {
+ if ( !this.menu.element.is(":visible") ) {
+ this.search( null, event );
+ return;
+ }
+ if ( this.menu.first() && /^previous/.test(direction) ||
+ this.menu.last() && /^next/.test(direction) ) {
+ this.element.val( this.term );
+ this.menu.deactivate();
+ return;
+ }
+ this.menu[ direction ]( event );
+ },
+
+ widget: function() {
+ return this.menu.element;
+ }
+});
+
+$.extend( $.ui.autocomplete, {
+ escapeRegex: function( value ) {
+ return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
+ },
+ filter: function(array, term) {
+ var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
+ return $.grep( array, function(value) {
+ return matcher.test( value.label || value.value || value );
+ });
+ }
+});
+
+}( jQuery ));
+
+/*
+ * jQuery UI Menu (not officially released)
+ *
+ * This widget isn't yet finished and the API is subject to change. We plan to finish
+ * it for the next release. You're welcome to give it a try anyway and give us feedback,
+ * as long as you're okay with migrating your code later on. We can help with that, too.
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ */
+(function($) {
+
+$.widget("ui.menu", {
+ _create: function() {
+ var self = this;
+ this.element
+ .addClass("ui-menu ui-widget ui-widget-content ui-corner-all")
+ .attr({
+ role: "listbox",
+ "aria-activedescendant": "ui-active-menuitem"
+ })
+ .click(function( event ) {
+ if ( !$( event.target ).closest( ".ui-menu-item a" ).length ) {
+ return;
+ }
+ // temporary
+ event.preventDefault();
+ self.select( event );
+ });
+ this.refresh();
+ },
+
+ refresh: function() {
+ var self = this;
+
+ // don't refresh list items that are already adapted
+ var items = this.element.children("li:not(.ui-menu-item):has(a)")
+ .addClass("ui-menu-item")
+ .attr("role", "menuitem");
+
+ items.children("a")
+ .addClass("ui-corner-all")
+ .attr("tabindex", -1)
+ // mouseenter doesn't work with event delegation
+ .mouseenter(function( event ) {
+ self.activate( event, $(this).parent() );
+ })
+ .mouseleave(function() {
+ self.deactivate();
+ });
+ },
+
+ activate: function( event, item ) {
+ this.deactivate();
+ if (this.hasScroll()) {
+ var offset = item.offset().top - this.element.offset().top,
+ scroll = this.element.scrollTop(),
+ elementHeight = this.element.height();
+ if (offset < 0) {
+ this.element.scrollTop( scroll + offset);
+ } else if (offset >= elementHeight) {
+ this.element.scrollTop( scroll + offset - elementHeight + item.height());
+ }
+ }
+ this.active = item.eq(0)
+ .children("a")
+ .addClass("ui-state-hover")
+ .attr("id", "ui-active-menuitem")
+ .end();
+ this._trigger("focus", event, { item: item });
+ },
+
+ deactivate: function() {
+ if (!this.active) { return; }
+
+ this.active.children("a")
+ .removeClass("ui-state-hover")
+ .removeAttr("id");
+ this._trigger("blur");
+ this.active = null;
+ },
+
+ next: function(event) {
+ this.move("next", ".ui-menu-item:first", event);
+ },
+
+ previous: function(event) {
+ this.move("prev", ".ui-menu-item:last", event);
+ },
+
+ first: function() {
+ return this.active && !this.active.prevAll(".ui-menu-item").length;
+ },
+
+ last: function() {
+ return this.active && !this.active.nextAll(".ui-menu-item").length;
+ },
+
+ move: function(direction, edge, event) {
+ if (!this.active) {
+ this.activate(event, this.element.children(edge));
+ return;
+ }
+ var next = this.active[direction + "All"](".ui-menu-item").eq(0);
+ if (next.length) {
+ this.activate(event, next);
+ } else {
+ this.activate(event, this.element.children(edge));
+ }
+ },
+
+ // TODO merge with previousPage
+ nextPage: function(event) {
+ if (this.hasScroll()) {
+ // TODO merge with no-scroll-else
+ if (!this.active || this.last()) {
+ this.activate(event, this.element.children(".ui-menu-item:first"));
+ return;
+ }
+ var base = this.active.offset().top,
+ height = this.element.height(),
+ result = this.element.children(".ui-menu-item").filter(function() {
+ var close = $(this).offset().top - base - height + $(this).height();
+ // TODO improve approximation
+ return close < 10 && close > -10;
+ });
+
+ // TODO try to catch this earlier when scrollTop indicates the last page anyway
+ if (!result.length) {
+ result = this.element.children(".ui-menu-item:last");
+ }
+ this.activate(event, result);
+ } else {
+ this.activate(event, this.element.children(".ui-menu-item")
+ .filter(!this.active || this.last() ? ":first" : ":last"));
+ }
+ },
+
+ // TODO merge with nextPage
+ previousPage: function(event) {
+ if (this.hasScroll()) {
+ // TODO merge with no-scroll-else
+ if (!this.active || this.first()) {
+ this.activate(event, this.element.children(".ui-menu-item:last"));
+ return;
+ }
+
+ var base = this.active.offset().top,
+ height = this.element.height();
+ result = this.element.children(".ui-menu-item").filter(function() {
+ var close = $(this).offset().top - base + height - $(this).height();
+ // TODO improve approximation
+ return close < 10 && close > -10;
+ });
+
+ // TODO try to catch this earlier when scrollTop indicates the last page anyway
+ if (!result.length) {
+ result = this.element.children(".ui-menu-item:first");
+ }
+ this.activate(event, result);
+ } else {
+ this.activate(event, this.element.children(".ui-menu-item")
+ .filter(!this.active || this.first() ? ":last" : ":first"));
+ }
+ },
+
+ hasScroll: function() {
+ return this.element.height() < this.element[ $.fn.prop ? "prop" : "attr" ]("scrollHeight");
+ },
+
+ select: function( event ) {
+ this._trigger("selected", event, { item: this.active });
+ }
+});
+
+}(jQuery));
+/*
+ * jQuery UI Button 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+var lastActive, startXPos, startYPos, clickDragged,
+ baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
+ stateClasses = "ui-state-hover ui-state-active ",
+ typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
+ formResetHandler = function() {
+ var buttons = $( this ).find( ":ui-button" );
+ setTimeout(function() {
+ buttons.button( "refresh" );
+ }, 1 );
+ },
+ radioGroup = function( radio ) {
+ var name = radio.name,
+ form = radio.form,
+ radios = $( [] );
+ if ( name ) {
+ if ( form ) {
+ radios = $( form ).find( "[name='" + name + "']" );
+ } else {
+ radios = $( "[name='" + name + "']", radio.ownerDocument )
+ .filter(function() {
+ return !this.form;
+ });
+ }
+ }
+ return radios;
+ };
+
+$.widget( "ui.button", {
+ options: {
+ disabled: null,
+ text: true,
+ label: null,
+ icons: {
+ primary: null,
+ secondary: null
+ }
+ },
+ _create: function() {
+ this.element.closest( "form" )
+ .unbind( "reset.button" )
+ .bind( "reset.button", formResetHandler );
+
+ if ( typeof this.options.disabled !== "boolean" ) {
+ this.options.disabled = this.element.propAttr( "disabled" );
+ }
+
+ this._determineButtonType();
+ this.hasTitle = !!this.buttonElement.attr( "title" );
+
+ var self = this,
+ options = this.options,
+ toggleButton = this.type === "checkbox" || this.type === "radio",
+ hoverClass = "ui-state-hover" + ( !toggleButton ? " ui-state-active" : "" ),
+ focusClass = "ui-state-focus";
+
+ if ( options.label === null ) {
+ options.label = this.buttonElement.html();
+ }
+
+ if ( this.element.is( ":disabled" ) ) {
+ options.disabled = true;
+ }
+
+ this.buttonElement
+ .addClass( baseClasses )
+ .attr( "role", "button" )
+ .bind( "mouseenter.button", function() {
+ if ( options.disabled ) {
+ return;
+ }
+ $( this ).addClass( "ui-state-hover" );
+ if ( this === lastActive ) {
+ $( this ).addClass( "ui-state-active" );
+ }
+ })
+ .bind( "mouseleave.button", function() {
+ if ( options.disabled ) {
+ return;
+ }
+ $( this ).removeClass( hoverClass );
+ })
+ .bind( "click.button", function( event ) {
+ if ( options.disabled ) {
+ event.preventDefault();
+ event.stopImmediatePropagation();
+ }
+ });
+
+ this.element
+ .bind( "focus.button", function() {
+ // no need to check disabled, focus won't be triggered anyway
+ self.buttonElement.addClass( focusClass );
+ })
+ .bind( "blur.button", function() {
+ self.buttonElement.removeClass( focusClass );
+ });
+
+ if ( toggleButton ) {
+ this.element.bind( "change.button", function() {
+ if ( clickDragged ) {
+ return;
+ }
+ self.refresh();
+ });
+ // if mouse moves between mousedown and mouseup (drag) set clickDragged flag
+ // prevents issue where button state changes but checkbox/radio checked state
+ // does not in Firefox (see ticket #6970)
+ this.buttonElement
+ .bind( "mousedown.button", function( event ) {
+ if ( options.disabled ) {
+ return;
+ }
+ clickDragged = false;
+ startXPos = event.pageX;
+ startYPos = event.pageY;
+ })
+ .bind( "mouseup.button", function( event ) {
+ if ( options.disabled ) {
+ return;
+ }
+ if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
+ clickDragged = true;
+ }
+ });
+ }
+
+ if ( this.type === "checkbox" ) {
+ this.buttonElement.bind( "click.button", function() {
+ if ( options.disabled || clickDragged ) {
+ return false;
+ }
+ $( this ).toggleClass( "ui-state-active" );
+ self.buttonElement.attr( "aria-pressed", self.element[0].checked );
+ });
+ } else if ( this.type === "radio" ) {
+ this.buttonElement.bind( "click.button", function() {
+ if ( options.disabled || clickDragged ) {
+ return false;
+ }
+ $( this ).addClass( "ui-state-active" );
+ self.buttonElement.attr( "aria-pressed", "true" );
+
+ var radio = self.element[ 0 ];
+ radioGroup( radio )
+ .not( radio )
+ .map(function() {
+ return $( this ).button( "widget" )[ 0 ];
+ })
+ .removeClass( "ui-state-active" )
+ .attr( "aria-pressed", "false" );
+ });
+ } else {
+ this.buttonElement
+ .bind( "mousedown.button", function() {
+ if ( options.disabled ) {
+ return false;
+ }
+ $( this ).addClass( "ui-state-active" );
+ lastActive = this;
+ $( document ).one( "mouseup", function() {
+ lastActive = null;
+ });
+ })
+ .bind( "mouseup.button", function() {
+ if ( options.disabled ) {
+ return false;
+ }
+ $( this ).removeClass( "ui-state-active" );
+ })
+ .bind( "keydown.button", function(event) {
+ if ( options.disabled ) {
+ return false;
+ }
+ if ( event.keyCode == $.ui.keyCode.SPACE || event.keyCode == $.ui.keyCode.ENTER ) {
+ $( this ).addClass( "ui-state-active" );
+ }
+ })
+ .bind( "keyup.button", function() {
+ $( this ).removeClass( "ui-state-active" );
+ });
+
+ if ( this.buttonElement.is("a") ) {
+ this.buttonElement.keyup(function(event) {
+ if ( event.keyCode === $.ui.keyCode.SPACE ) {
+ // TODO pass through original event correctly (just as 2nd argument doesn't work)
+ $( this ).click();
+ }
+ });
+ }
+ }
+
+ // TODO: pull out $.Widget's handling for the disabled option into
+ // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
+ // be overridden by individual plugins
+ this._setOption( "disabled", options.disabled );
+ this._resetButton();
+ },
+
+ _determineButtonType: function() {
+
+ if ( this.element.is(":checkbox") ) {
+ this.type = "checkbox";
+ } else if ( this.element.is(":radio") ) {
+ this.type = "radio";
+ } else if ( this.element.is("input") ) {
+ this.type = "input";
+ } else {
+ this.type = "button";
+ }
+
+ if ( this.type === "checkbox" || this.type === "radio" ) {
+ // we don't search against the document in case the element
+ // is disconnected from the DOM
+ var ancestor = this.element.parents().filter(":last"),
+ labelSelector = "label[for='" + this.element.attr("id") + "']";
+ this.buttonElement = ancestor.find( labelSelector );
+ if ( !this.buttonElement.length ) {
+ ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
+ this.buttonElement = ancestor.filter( labelSelector );
+ if ( !this.buttonElement.length ) {
+ this.buttonElement = ancestor.find( labelSelector );
+ }
+ }
+ this.element.addClass( "ui-helper-hidden-accessible" );
+
+ var checked = this.element.is( ":checked" );
+ if ( checked ) {
+ this.buttonElement.addClass( "ui-state-active" );
+ }
+ this.buttonElement.attr( "aria-pressed", checked );
+ } else {
+ this.buttonElement = this.element;
+ }
+ },
+
+ widget: function() {
+ return this.buttonElement;
+ },
+
+ destroy: function() {
+ this.element
+ .removeClass( "ui-helper-hidden-accessible" );
+ this.buttonElement
+ .removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
+ .removeAttr( "role" )
+ .removeAttr( "aria-pressed" )
+ .html( this.buttonElement.find(".ui-button-text").html() );
+
+ if ( !this.hasTitle ) {
+ this.buttonElement.removeAttr( "title" );
+ }
+
+ $.Widget.prototype.destroy.call( this );
+ },
+
+ _setOption: function( key, value ) {
+ $.Widget.prototype._setOption.apply( this, arguments );
+ if ( key === "disabled" ) {
+ if ( value ) {
+ this.element.propAttr( "disabled", true );
+ } else {
+ this.element.propAttr( "disabled", false );
+ }
+ return;
+ }
+ this._resetButton();
+ },
+
+ refresh: function() {
+ var isDisabled = this.element.is( ":disabled" );
+ if ( isDisabled !== this.options.disabled ) {
+ this._setOption( "disabled", isDisabled );
+ }
+ if ( this.type === "radio" ) {
+ radioGroup( this.element[0] ).each(function() {
+ if ( $( this ).is( ":checked" ) ) {
+ $( this ).button( "widget" )
+ .addClass( "ui-state-active" )
+ .attr( "aria-pressed", "true" );
+ } else {
+ $( this ).button( "widget" )
+ .removeClass( "ui-state-active" )
+ .attr( "aria-pressed", "false" );
+ }
+ });
+ } else if ( this.type === "checkbox" ) {
+ if ( this.element.is( ":checked" ) ) {
+ this.buttonElement
+ .addClass( "ui-state-active" )
+ .attr( "aria-pressed", "true" );
+ } else {
+ this.buttonElement
+ .removeClass( "ui-state-active" )
+ .attr( "aria-pressed", "false" );
+ }
+ }
+ },
+
+ _resetButton: function() {
+ if ( this.type === "input" ) {
+ if ( this.options.label ) {
+ this.element.val( this.options.label );
+ }
+ return;
+ }
+ var buttonElement = this.buttonElement.removeClass( typeClasses ),
+ buttonText = $( "<span></span>" )
+ .addClass( "ui-button-text" )
+ .html( this.options.label )
+ .appendTo( buttonElement.empty() )
+ .text(),
+ icons = this.options.icons,
+ multipleIcons = icons.primary && icons.secondary,
+ buttonClasses = [];
+
+ if ( icons.primary || icons.secondary ) {
+ if ( this.options.text ) {
+ buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
+ }
+
+ if ( icons.primary ) {
+ buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
+ }
+
+ if ( icons.secondary ) {
+ buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
+ }
+
+ if ( !this.options.text ) {
+ buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
+
+ if ( !this.hasTitle ) {
+ buttonElement.attr( "title", buttonText );
+ }
+ }
+ } else {
+ buttonClasses.push( "ui-button-text-only" );
+ }
+ buttonElement.addClass( buttonClasses.join( " " ) );
+ }
+});
+
+$.widget( "ui.buttonset", {
+ options: {
+ items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)"
+ },
+
+ _create: function() {
+ this.element.addClass( "ui-buttonset" );
+ },
+
+ _init: function() {
+ this.refresh();
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "disabled" ) {
+ this.buttons.button( "option", key, value );
+ }
+
+ $.Widget.prototype._setOption.apply( this, arguments );
+ },
+
+ refresh: function() {
+ var ltr = this.element.css( "direction" ) === "ltr";
+
+ this.buttons = this.element.find( this.options.items )
+ .filter( ":ui-button" )
+ .button( "refresh" )
+ .end()
+ .not( ":ui-button" )
+ .button()
+ .end()
+ .map(function() {
+ return $( this ).button( "widget" )[ 0 ];
+ })
+ .removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
+ .filter( ":first" )
+ .addClass( ltr ? "ui-corner-left" : "ui-corner-right" )
+ .end()
+ .filter( ":last" )
+ .addClass( ltr ? "ui-corner-right" : "ui-corner-left" )
+ .end()
+ .end();
+ },
+
+ destroy: function() {
+ this.element.removeClass( "ui-buttonset" );
+ this.buttons
+ .map(function() {
+ return $( this ).button( "widget" )[ 0 ];
+ })
+ .removeClass( "ui-corner-left ui-corner-right" )
+ .end()
+ .button( "destroy" );
+
+ $.Widget.prototype.destroy.call( this );
+ }
+});
+
+}( jQuery ) );
+/*
+ * jQuery UI Datepicker 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker
+ *
+ * Depends:
+ * jquery.ui.core.js
+ */
+(function( $, undefined ) {
+
+$.extend($.ui, { datepicker: { version: "1.8.16" } });
+
+var PROP_NAME = 'datepicker';
+var dpuuid = new Date().getTime();
+var instActive;
+
+/* Date picker manager.
+ Use the singleton instance of this class, $.datepicker, to interact with the date picker.
+ Settings for (groups of) date pickers are maintained in an instance object,
+ allowing multiple different settings on the same page. */
+
+function Datepicker() {
+ this.debug = false; // Change this to true to start debugging
+ this._curInst = null; // The current instance in use
+ this._keyEvent = false; // If the last event was a key event
+ this._disabledInputs = []; // List of date picker inputs that have been disabled
+ this._datepickerShowing = false; // True if the popup picker is showing , false if not
+ this._inDialog = false; // True if showing within a "dialog", false if not
+ this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
+ this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class
+ this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
+ this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
+ this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
+ this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class
+ this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
+ this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
+ this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class
+ this.regional = []; // Available regional settings, indexed by language code
+ this.regional[''] = { // Default regional settings
+ closeText: 'Done', // Display text for close link
+ prevText: 'Prev', // Display text for previous month link
+ nextText: 'Next', // Display text for next month link
+ currentText: 'Today', // Display text for current month link
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'], // Names of months for drop-down and formatting
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
+ weekHeader: 'Wk', // Column header for week of the year
+ dateFormat: 'mm/dd/yy', // See format options on parseDate
+ firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
+ isRTL: false, // True if right-to-left language, false if left-to-right
+ showMonthAfterYear: false, // True if the year select precedes month, false for month then year
+ yearSuffix: '' // Additional text to append to the year in the month headers
+ };
+ this._defaults = { // Global defaults for all the date picker instances
+ showOn: 'focus', // 'focus' for popup on focus,
+ // 'button' for trigger button, or 'both' for either
+ showAnim: 'fadeIn', // Name of jQuery animation for popup
+ showOptions: {}, // Options for enhanced animations
+ defaultDate: null, // Used when field is blank: actual date,
+ // +/-number for offset from today, null for today
+ appendText: '', // Display text following the input box, e.g. showing the format
+ buttonText: '...', // Text for trigger button
+ buttonImage: '', // URL for trigger button image
+ buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
+ hideIfNoPrevNext: false, // True to hide next/previous month links
+ // if not applicable, false to just disable them
+ navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
+ gotoCurrent: false, // True if today link goes back to current selection instead
+ changeMonth: false, // True if month can be selected directly, false if only prev/next
+ changeYear: false, // True if year can be selected directly, false if only prev/next
+ yearRange: 'c-10:c+10', // Range of years to display in drop-down,
+ // either relative to today's year (-nn:+nn), relative to currently displayed year
+ // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
+ showOtherMonths: false, // True to show dates in other months, false to leave blank
+ selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
+ showWeek: false, // True to show week of the year, false to not show it
+ calculateWeek: this.iso8601Week, // How to calculate the week of the year,
+ // takes a Date and returns the number of the week for it
+ shortYearCutoff: '+10', // Short year values < this are in the current century,
+ // > this are in the previous century,
+ // string value starting with '+' for current year + value
+ minDate: null, // The earliest selectable date, or null for no limit
+ maxDate: null, // The latest selectable date, or null for no limit
+ duration: 'fast', // Duration of display/closure
+ beforeShowDay: null, // Function that takes a date and returns an array with
+ // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
+ // [2] = cell title (optional), e.g. $.datepicker.noWeekends
+ beforeShow: null, // Function that takes an input field and
+ // returns a set of custom settings for the date picker
+ onSelect: null, // Define a callback function when a date is selected
+ onChangeMonthYear: null, // Define a callback function when the month or year is changed
+ onClose: null, // Define a callback function when the datepicker is closed
+ numberOfMonths: 1, // Number of months to show at a time
+ showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
+ stepMonths: 1, // Number of months to step back/forward
+ stepBigMonths: 12, // Number of months to step back/forward for the big links
+ altField: '', // Selector for an alternate field to store selected dates into
+ altFormat: '', // The date format to use for the alternate field
+ constrainInput: true, // The input is constrained by the current date format
+ showButtonPanel: false, // True to show button panel, false to not show it
+ autoSize: false, // True to size the input for the date format, false to leave as is
+ disabled: false // The initial disabled state
+ };
+ $.extend(this._defaults, this.regional['']);
+ this.dpDiv = bindHover($('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'));
+}
+
+$.extend(Datepicker.prototype, {
+ /* Class name added to elements to indicate already configured with a date picker. */
+ markerClassName: 'hasDatepicker',
+
+ //Keep track of the maximum number of rows displayed (see #7043)
+ maxRows: 4,
+
+ /* Debug logging (if enabled). */
+ log: function () {
+ if (this.debug)
+ console.log.apply('', arguments);
+ },
+
+ // TODO rename to "widget" when switching to widget factory
+ _widgetDatepicker: function() {
+ return this.dpDiv;
+ },
+
+ /* Override the default settings for all instances of the date picker.
+ @param settings object - the new settings to use as defaults (anonymous object)
+ @return the manager object */
+ setDefaults: function(settings) {
+ extendRemove(this._defaults, settings || {});
+ return this;
+ },
+
+ /* Attach the date picker to a jQuery selection.
+ @param target element - the target input field or division or span
+ @param settings object - the new settings to use for this date picker instance (anonymous) */
+ _attachDatepicker: function(target, settings) {
+ // check for settings on the control itself - in namespace 'date:'
+ var inlineSettings = null;
+ for (var attrName in this._defaults) {
+ var attrValue = target.getAttribute('date:' + attrName);
+ if (attrValue) {
+ inlineSettings = inlineSettings || {};
+ try {
+ inlineSettings[attrName] = eval(attrValue);
+ } catch (err) {
+ inlineSettings[attrName] = attrValue;
+ }
+ }
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ var inline = (nodeName == 'div' || nodeName == 'span');
+ if (!target.id) {
+ this.uuid += 1;
+ target.id = 'dp' + this.uuid;
+ }
+ var inst = this._newInst($(target), inline);
+ inst.settings = $.extend({}, settings || {}, inlineSettings || {});
+ if (nodeName == 'input') {
+ this._connectDatepicker(target, inst);
+ } else if (inline) {
+ this._inlineDatepicker(target, inst);
+ }
+ },
+
+ /* Create a new instance object. */
+ _newInst: function(target, inline) {
+ var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'); // escape jQuery meta chars
+ return {id: id, input: target, // associated target
+ selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
+ drawMonth: 0, drawYear: 0, // month being drawn
+ inline: inline, // is datepicker inline or not
+ dpDiv: (!inline ? this.dpDiv : // presentation div
+ bindHover($('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')))};
+ },
+
+ /* Attach the date picker to an input field. */
+ _connectDatepicker: function(target, inst) {
+ var input = $(target);
+ inst.append = $([]);
+ inst.trigger = $([]);
+ if (input.hasClass(this.markerClassName))
+ return;
+ this._attachments(input, inst);
+ input.addClass(this.markerClassName).keydown(this._doKeyDown).
+ keypress(this._doKeyPress).keyup(this._doKeyUp).
+ bind("setData.datepicker", function(event, key, value) {
+ inst.settings[key] = value;
+ }).bind("getData.datepicker", function(event, key) {
+ return this._get(inst, key);
+ });
+ this._autoSize(inst);
+ $.data(target, PROP_NAME, inst);
+ //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
+ if( inst.settings.disabled ) {
+ this._disableDatepicker( target );
+ }
+ },
+
+ /* Make attachments based on settings. */
+ _attachments: function(input, inst) {
+ var appendText = this._get(inst, 'appendText');
+ var isRTL = this._get(inst, 'isRTL');
+ if (inst.append)
+ inst.append.remove();
+ if (appendText) {
+ inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
+ input[isRTL ? 'before' : 'after'](inst.append);
+ }
+ input.unbind('focus', this._showDatepicker);
+ if (inst.trigger)
+ inst.trigger.remove();
+ var showOn = this._get(inst, 'showOn');
+ if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
+ input.focus(this._showDatepicker);
+ if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
+ var buttonText = this._get(inst, 'buttonText');
+ var buttonImage = this._get(inst, 'buttonImage');
+ inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
+ $('<img/>').addClass(this._triggerClass).
+ attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
+ $('<button type="button"></button>').addClass(this._triggerClass).
+ html(buttonImage == '' ? buttonText : $('<img/>').attr(
+ { src:buttonImage, alt:buttonText, title:buttonText })));
+ input[isRTL ? 'before' : 'after'](inst.trigger);
+ inst.trigger.click(function() {
+ if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
+ $.datepicker._hideDatepicker();
+ else
+ $.datepicker._showDatepicker(input[0]);
+ return false;
+ });
+ }
+ },
+
+ /* Apply the maximum length for the date format. */
+ _autoSize: function(inst) {
+ if (this._get(inst, 'autoSize') && !inst.inline) {
+ var date = new Date(2009, 12 - 1, 20); // Ensure double digits
+ var dateFormat = this._get(inst, 'dateFormat');
+ if (dateFormat.match(/[DM]/)) {
+ var findMax = function(names) {
+ var max = 0;
+ var maxI = 0;
+ for (var i = 0; i < names.length; i++) {
+ if (names[i].length > max) {
+ max = names[i].length;
+ maxI = i;
+ }
+ }
+ return maxI;
+ };
+ date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
+ 'monthNames' : 'monthNamesShort'))));
+ date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
+ 'dayNames' : 'dayNamesShort'))) + 20 - date.getDay());
+ }
+ inst.input.attr('size', this._formatDate(inst, date).length);
+ }
+ },
+
+ /* Attach an inline date picker to a div. */
+ _inlineDatepicker: function(target, inst) {
+ var divSpan = $(target);
+ if (divSpan.hasClass(this.markerClassName))
+ return;
+ divSpan.addClass(this.markerClassName).append(inst.dpDiv).
+ bind("setData.datepicker", function(event, key, value){
+ inst.settings[key] = value;
+ }).bind("getData.datepicker", function(event, key){
+ return this._get(inst, key);
+ });
+ $.data(target, PROP_NAME, inst);
+ this._setDate(inst, this._getDefaultDate(inst), true);
+ this._updateDatepicker(inst);
+ this._updateAlternate(inst);
+ //If disabled option is true, disable the datepicker before showing it (see ticket #5665)
+ if( inst.settings.disabled ) {
+ this._disableDatepicker( target );
+ }
+ // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
+ // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
+ inst.dpDiv.css( "display", "block" );
+ },
+
+ /* Pop-up the date picker in a "dialog" box.
+ @param input element - ignored
+ @param date string or Date - the initial date to display
+ @param onSelect function - the function to call when a date is selected
+ @param settings object - update the dialog date picker instance's settings (anonymous object)
+ @param pos int[2] - coordinates for the dialog's position within the screen or
+ event - with x/y coordinates or
+ leave empty for default (screen centre)
+ @return the manager object */
+ _dialogDatepicker: function(input, date, onSelect, settings, pos) {
+ var inst = this._dialogInst; // internal instance
+ if (!inst) {
+ this.uuid += 1;
+ var id = 'dp' + this.uuid;
+ this._dialogInput = $('<input type="text" id="' + id +
+ '" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
+ this._dialogInput.keydown(this._doKeyDown);
+ $('body').append(this._dialogInput);
+ inst = this._dialogInst = this._newInst(this._dialogInput, false);
+ inst.settings = {};
+ $.data(this._dialogInput[0], PROP_NAME, inst);
+ }
+ extendRemove(inst.settings, settings || {});
+ date = (date && date.constructor == Date ? this._formatDate(inst, date) : date);
+ this._dialogInput.val(date);
+
+ this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
+ if (!this._pos) {
+ var browserWidth = document.documentElement.clientWidth;
+ var browserHeight = document.documentElement.clientHeight;
+ var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
+ var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
+ this._pos = // should use actual width/height below
+ [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
+ }
+
+ // move input on screen for focus, but hidden behind dialog
+ this._dialogInput.css('left', (this._pos[0] + 20) + 'px').css('top', this._pos[1] + 'px');
+ inst.settings.onSelect = onSelect;
+ this._inDialog = true;
+ this.dpDiv.addClass(this._dialogClass);
+ this._showDatepicker(this._dialogInput[0]);
+ if ($.blockUI)
+ $.blockUI(this.dpDiv);
+ $.data(this._dialogInput[0], PROP_NAME, inst);
+ return this;
+ },
+
+ /* Detach a datepicker from its control.
+ @param target element - the target input field or division or span */
+ _destroyDatepicker: function(target) {
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ $.removeData(target, PROP_NAME);
+ if (nodeName == 'input') {
+ inst.append.remove();
+ inst.trigger.remove();
+ $target.removeClass(this.markerClassName).
+ unbind('focus', this._showDatepicker).
+ unbind('keydown', this._doKeyDown).
+ unbind('keypress', this._doKeyPress).
+ unbind('keyup', this._doKeyUp);
+ } else if (nodeName == 'div' || nodeName == 'span')
+ $target.removeClass(this.markerClassName).empty();
+ },
+
+ /* Enable the date picker to a jQuery selection.
+ @param target element - the target input field or division or span */
+ _enableDatepicker: function(target) {
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ target.disabled = false;
+ inst.trigger.filter('button').
+ each(function() { this.disabled = false; }).end().
+ filter('img').css({opacity: '1.0', cursor: ''});
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var inline = $target.children('.' + this._inlineClass);
+ inline.children().removeClass('ui-state-disabled');
+ inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
+ removeAttr("disabled");
+ }
+ this._disabledInputs = $.map(this._disabledInputs,
+ function(value) { return (value == target ? null : value); }); // delete entry
+ },
+
+ /* Disable the date picker to a jQuery selection.
+ @param target element - the target input field or division or span */
+ _disableDatepicker: function(target) {
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ target.disabled = true;
+ inst.trigger.filter('button').
+ each(function() { this.disabled = true; }).end().
+ filter('img').css({opacity: '0.5', cursor: 'default'});
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var inline = $target.children('.' + this._inlineClass);
+ inline.children().addClass('ui-state-disabled');
+ inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
+ attr("disabled", "disabled");
+ }
+ this._disabledInputs = $.map(this._disabledInputs,
+ function(value) { return (value == target ? null : value); }); // delete entry
+ this._disabledInputs[this._disabledInputs.length] = target;
+ },
+
+ /* Is the first field in a jQuery collection disabled as a datepicker?
+ @param target element - the target input field or division or span
+ @return boolean - true if disabled, false if enabled */
+ _isDisabledDatepicker: function(target) {
+ if (!target) {
+ return false;
+ }
+ for (var i = 0; i < this._disabledInputs.length; i++) {
+ if (this._disabledInputs[i] == target)
+ return true;
+ }
+ return false;
+ },
+
+ /* Retrieve the instance data for the target control.
+ @param target element - the target input field or division or span
+ @return object - the associated instance data
+ @throws error if a jQuery problem getting data */
+ _getInst: function(target) {
+ try {
+ return $.data(target, PROP_NAME);
+ }
+ catch (err) {
+ throw 'Missing instance data for this datepicker';
+ }
+ },
+
+ /* Update or retrieve the settings for a date picker attached to an input field or division.
+ @param target element - the target input field or division or span
+ @param name object - the new settings to update or
+ string - the name of the setting to change or retrieve,
+ when retrieving also 'all' for all instance settings or
+ 'defaults' for all global defaults
+ @param value any - the new value for the setting
+ (omit if above is an object or to retrieve a value) */
+ _optionDatepicker: function(target, name, value) {
+ var inst = this._getInst(target);
+ if (arguments.length == 2 && typeof name == 'string') {
+ return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :
+ (inst ? (name == 'all' ? $.extend({}, inst.settings) :
+ this._get(inst, name)) : null));
+ }
+ var settings = name || {};
+ if (typeof name == 'string') {
+ settings = {};
+ settings[name] = value;
+ }
+ if (inst) {
+ if (this._curInst == inst) {
+ this._hideDatepicker();
+ }
+ var date = this._getDateDatepicker(target, true);
+ var minDate = this._getMinMaxDate(inst, 'min');
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ extendRemove(inst.settings, settings);
+ // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
+ if (minDate !== null && settings['dateFormat'] !== undefined && settings['minDate'] === undefined)
+ inst.settings.minDate = this._formatDate(inst, minDate);
+ if (maxDate !== null && settings['dateFormat'] !== undefined && settings['maxDate'] === undefined)
+ inst.settings.maxDate = this._formatDate(inst, maxDate);
+ this._attachments($(target), inst);
+ this._autoSize(inst);
+ this._setDate(inst, date);
+ this._updateAlternate(inst);
+ this._updateDatepicker(inst);
+ }
+ },
+
+ // change method deprecated
+ _changeDatepicker: function(target, name, value) {
+ this._optionDatepicker(target, name, value);
+ },
+
+ /* Redraw the date picker attached to an input field or division.
+ @param target element - the target input field or division or span */
+ _refreshDatepicker: function(target) {
+ var inst = this._getInst(target);
+ if (inst) {
+ this._updateDatepicker(inst);
+ }
+ },
+
+ /* Set the dates for a jQuery selection.
+ @param target element - the target input field or division or span
+ @param date Date - the new date */
+ _setDateDatepicker: function(target, date) {
+ var inst = this._getInst(target);
+ if (inst) {
+ this._setDate(inst, date);
+ this._updateDatepicker(inst);
+ this._updateAlternate(inst);
+ }
+ },
+
+ /* Get the date(s) for the first entry in a jQuery selection.
+ @param target element - the target input field or division or span
+ @param noDefault boolean - true if no default date is to be used
+ @return Date - the current date */
+ _getDateDatepicker: function(target, noDefault) {
+ var inst = this._getInst(target);
+ if (inst && !inst.inline)
+ this._setDateFromField(inst, noDefault);
+ return (inst ? this._getDate(inst) : null);
+ },
+
+ /* Handle keystrokes. */
+ _doKeyDown: function(event) {
+ var inst = $.datepicker._getInst(event.target);
+ var handled = true;
+ var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
+ inst._keyEvent = true;
+ if ($.datepicker._datepickerShowing)
+ switch (event.keyCode) {
+ case 9: $.datepicker._hideDatepicker();
+ handled = false;
+ break; // hide on tab out
+ case 13: var sel = $('td.' + $.datepicker._dayOverClass + ':not(.' +
+ $.datepicker._currentClass + ')', inst.dpDiv);
+ if (sel[0])
+ $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
+ var onSelect = $.datepicker._get(inst, 'onSelect');
+ if (onSelect) {
+ var dateStr = $.datepicker._formatDate(inst);
+
+ // trigger custom callback
+ onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
+ }
+ else
+ $.datepicker._hideDatepicker();
+ return false; // don't submit the form
+ break; // select the value on enter
+ case 27: $.datepicker._hideDatepicker();
+ break; // hide on escape
+ case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ -$.datepicker._get(inst, 'stepBigMonths') :
+ -$.datepicker._get(inst, 'stepMonths')), 'M');
+ break; // previous month/year on page up/+ ctrl
+ case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ +$.datepicker._get(inst, 'stepBigMonths') :
+ +$.datepicker._get(inst, 'stepMonths')), 'M');
+ break; // next month/year on page down/+ ctrl
+ case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
+ handled = event.ctrlKey || event.metaKey;
+ break; // clear on ctrl or command +end
+ case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
+ handled = event.ctrlKey || event.metaKey;
+ break; // current on ctrl or command +home
+ case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
+ handled = event.ctrlKey || event.metaKey;
+ // -1 day on ctrl or command +left
+ if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ -$.datepicker._get(inst, 'stepBigMonths') :
+ -$.datepicker._get(inst, 'stepMonths')), 'M');
+ // next month/year on alt +left on Mac
+ break;
+ case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
+ handled = event.ctrlKey || event.metaKey;
+ break; // -1 week on ctrl or command +up
+ case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
+ handled = event.ctrlKey || event.metaKey;
+ // +1 day on ctrl or command +right
+ if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ +$.datepicker._get(inst, 'stepBigMonths') :
+ +$.datepicker._get(inst, 'stepMonths')), 'M');
+ // next month/year on alt +right
+ break;
+ case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
+ handled = event.ctrlKey || event.metaKey;
+ break; // +1 week on ctrl or command +down
+ default: handled = false;
+ }
+ else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
+ $.datepicker._showDatepicker(this);
+ else {
+ handled = false;
+ }
+ if (handled) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ },
+
+ /* Filter entered characters - based on date format. */
+ _doKeyPress: function(event) {
+ var inst = $.datepicker._getInst(event.target);
+ if ($.datepicker._get(inst, 'constrainInput')) {
+ var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
+ var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
+ return event.ctrlKey || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
+ }
+ },
+
+ /* Synchronise manual entry and field/alternate field. */
+ _doKeyUp: function(event) {
+ var inst = $.datepicker._getInst(event.target);
+ if (inst.input.val() != inst.lastVal) {
+ try {
+ var date = $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
+ (inst.input ? inst.input.val() : null),
+ $.datepicker._getFormatConfig(inst));
+ if (date) { // only if valid
+ $.datepicker._setDateFromField(inst);
+ $.datepicker._updateAlternate(inst);
+ $.datepicker._updateDatepicker(inst);
+ }
+ }
+ catch (event) {
+ $.datepicker.log(event);
+ }
+ }
+ return true;
+ },
+
+ /* Pop-up the date picker for a given input field.
+ If false returned from beforeShow event handler do not show.
+ @param input element - the input field attached to the date picker or
+ event - if triggered by focus */
+ _showDatepicker: function(input) {
+ input = input.target || input;
+ if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
+ input = $('input', input.parentNode)[0];
+ if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
+ return;
+ var inst = $.datepicker._getInst(input);
+ if ($.datepicker._curInst && $.datepicker._curInst != inst) {
+ if ( $.datepicker._datepickerShowing ) {
+ $.datepicker._triggerOnClose($.datepicker._curInst);
+ }
+ $.datepicker._curInst.dpDiv.stop(true, true);
+ }
+ var beforeShow = $.datepicker._get(inst, 'beforeShow');
+ var beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
+ if(beforeShowSettings === false){
+ //false
+ return;
+ }
+ extendRemove(inst.settings, beforeShowSettings);
+ inst.lastVal = null;
+ $.datepicker._lastInput = input;
+ $.datepicker._setDateFromField(inst);
+ if ($.datepicker._inDialog) // hide cursor
+ input.value = '';
+ if (!$.datepicker._pos) { // position below input
+ $.datepicker._pos = $.datepicker._findPos(input);
+ $.datepicker._pos[1] += input.offsetHeight; // add the height
+ }
+ var isFixed = false;
+ $(input).parents().each(function() {
+ isFixed |= $(this).css('position') == 'fixed';
+ return !isFixed;
+ });
+ if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
+ $.datepicker._pos[0] -= document.documentElement.scrollLeft;
+ $.datepicker._pos[1] -= document.documentElement.scrollTop;
+ }
+ var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
+ $.datepicker._pos = null;
+ //to avoid flashes on Firefox
+ inst.dpDiv.empty();
+ // determine sizing offscreen
+ inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
+ $.datepicker._updateDatepicker(inst);
+ // fix width for dynamic number of date pickers
+ // and adjust position before showing
+ offset = $.datepicker._checkOffset(inst, offset, isFixed);
+ inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
+ 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
+ left: offset.left + 'px', top: offset.top + 'px'});
+ if (!inst.inline) {
+ var showAnim = $.datepicker._get(inst, 'showAnim');
+ var duration = $.datepicker._get(inst, 'duration');
+ var postProcess = function() {
+ var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
+ if( !! cover.length ){
+ var borders = $.datepicker._getBorders(inst.dpDiv);
+ cover.css({left: -borders[0], top: -borders[1],
+ width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});
+ }
+ };
+ inst.dpDiv.zIndex($(input).zIndex()+1);
+ $.datepicker._datepickerShowing = true;
+ if ($.effects && $.effects[showAnim])
+ inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
+ else
+ inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
+ if (!showAnim || !duration)
+ postProcess();
+ if (inst.input.is(':visible') && !inst.input.is(':disabled'))
+ inst.input.focus();
+ $.datepicker._curInst = inst;
+ }
+ },
+
+ /* Generate the date picker content. */
+ _updateDatepicker: function(inst) {
+ var self = this;
+ self.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
+ var borders = $.datepicker._getBorders(inst.dpDiv);
+ instActive = inst; // for delegate hover events
+ inst.dpDiv.empty().append(this._generateHTML(inst));
+ var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
+ if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6
+ cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
+ }
+ inst.dpDiv.find('.' + this._dayOverClass + ' a').mouseover();
+ var numMonths = this._getNumberOfMonths(inst);
+ var cols = numMonths[1];
+ var width = 17;
+ inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
+ if (cols > 1)
+ inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
+ inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
+ 'Class']('ui-datepicker-multi');
+ inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
+ 'Class']('ui-datepicker-rtl');
+ if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
+ // #6694 - don't focus the input if it's already focused
+ // this breaks the change event in IE
+ inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement)
+ inst.input.focus();
+ // deffered render of the years select (to avoid flashes on Firefox)
+ if( inst.yearshtml ){
+ var origyearshtml = inst.yearshtml;
+ setTimeout(function(){
+ //assure that inst.yearshtml didn't change.
+ if( origyearshtml === inst.yearshtml && inst.yearshtml ){
+ inst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml);
+ }
+ origyearshtml = inst.yearshtml = null;
+ }, 0);
+ }
+ },
+
+ /* Retrieve the size of left and top borders for an element.
+ @param elem (jQuery object) the element of interest
+ @return (number[2]) the left and top borders */
+ _getBorders: function(elem) {
+ var convert = function(value) {
+ return {thin: 1, medium: 2, thick: 3}[value] || value;
+ };
+ return [parseFloat(convert(elem.css('border-left-width'))),
+ parseFloat(convert(elem.css('border-top-width')))];
+ },
+
+ /* Check positioning to remain on screen. */
+ _checkOffset: function(inst, offset, isFixed) {
+ var dpWidth = inst.dpDiv.outerWidth();
+ var dpHeight = inst.dpDiv.outerHeight();
+ var inputWidth = inst.input ? inst.input.outerWidth() : 0;
+ var inputHeight = inst.input ? inst.input.outerHeight() : 0;
+ var viewWidth = document.documentElement.clientWidth + $(document).scrollLeft();
+ var viewHeight = document.documentElement.clientHeight + $(document).scrollTop();
+
+ offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
+ offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
+ offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
+
+ // now check if datepicker is showing outside window viewport - move to a better place if so.
+ offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
+ Math.abs(offset.left + dpWidth - viewWidth) : 0);
+ offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
+ Math.abs(dpHeight + inputHeight) : 0);
+
+ return offset;
+ },
+
+ /* Find an object's position on the screen. */
+ _findPos: function(obj) {
+ var inst = this._getInst(obj);
+ var isRTL = this._get(inst, 'isRTL');
+ while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) {
+ obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
+ }
+ var position = $(obj).offset();
+ return [position.left, position.top];
+ },
+
+ /* Trigger custom callback of onClose. */
+ _triggerOnClose: function(inst) {
+ var onClose = this._get(inst, 'onClose');
+ if (onClose)
+ onClose.apply((inst.input ? inst.input[0] : null),
+ [(inst.input ? inst.input.val() : ''), inst]);
+ },
+
+ /* Hide the date picker from view.
+ @param input element - the input field attached to the date picker */
+ _hideDatepicker: function(input) {
+ var inst = this._curInst;
+ if (!inst || (input && inst != $.data(input, PROP_NAME)))
+ return;
+ if (this._datepickerShowing) {
+ var showAnim = this._get(inst, 'showAnim');
+ var duration = this._get(inst, 'duration');
+ var postProcess = function() {
+ $.datepicker._tidyDialog(inst);
+ this._curInst = null;
+ };
+ if ($.effects && $.effects[showAnim])
+ inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
+ else
+ inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :
+ (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
+ if (!showAnim)
+ postProcess();
+ $.datepicker._triggerOnClose(inst);
+ this._datepickerShowing = false;
+ this._lastInput = null;
+ if (this._inDialog) {
+ this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
+ if ($.blockUI) {
+ $.unblockUI();
+ $('body').append(this.dpDiv);
+ }
+ }
+ this._inDialog = false;
+ }
+ },
+
+ /* Tidy up after a dialog display. */
+ _tidyDialog: function(inst) {
+ inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');
+ },
+
+ /* Close date picker if clicked elsewhere. */
+ _checkExternalClick: function(event) {
+ if (!$.datepicker._curInst)
+ return;
+ var $target = $(event.target);
+ if ($target[0].id != $.datepicker._mainDivId &&
+ $target.parents('#' + $.datepicker._mainDivId).length == 0 &&
+ !$target.hasClass($.datepicker.markerClassName) &&
+ !$target.hasClass($.datepicker._triggerClass) &&
+ $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
+ $.datepicker._hideDatepicker();
+ },
+
+ /* Adjust one of the date sub-fields. */
+ _adjustDate: function(id, offset, period) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ if (this._isDisabledDatepicker(target[0])) {
+ return;
+ }
+ this._adjustInstDate(inst, offset +
+ (period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
+ period);
+ this._updateDatepicker(inst);
+ },
+
+ /* Action for current link. */
+ _gotoToday: function(id) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
+ inst.selectedDay = inst.currentDay;
+ inst.drawMonth = inst.selectedMonth = inst.currentMonth;
+ inst.drawYear = inst.selectedYear = inst.currentYear;
+ }
+ else {
+ var date = new Date();
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ }
+ this._notifyChange(inst);
+ this._adjustDate(target);
+ },
+
+ /* Action for selecting a new month/year. */
+ _selectMonthYear: function(id, select, period) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
+ inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
+ parseInt(select.options[select.selectedIndex].value,10);
+ this._notifyChange(inst);
+ this._adjustDate(target);
+ },
+
+ /* Action for selecting a day. */
+ _selectDay: function(id, month, year, td) {
+ var target = $(id);
+ if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
+ return;
+ }
+ var inst = this._getInst(target[0]);
+ inst.selectedDay = inst.currentDay = $('a', td).html();
+ inst.selectedMonth = inst.currentMonth = month;
+ inst.selectedYear = inst.currentYear = year;
+ this._selectDate(id, this._formatDate(inst,
+ inst.currentDay, inst.currentMonth, inst.currentYear));
+ },
+
+ /* Erase the input field and hide the date picker. */
+ _clearDate: function(id) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ this._selectDate(target, '');
+ },
+
+ /* Update the input field with the selected date. */
+ _selectDate: function(id, dateStr) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
+ if (inst.input)
+ inst.input.val(dateStr);
+ this._updateAlternate(inst);
+ var onSelect = this._get(inst, 'onSelect');
+ if (onSelect)
+ onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
+ else if (inst.input)
+ inst.input.trigger('change'); // fire the change event
+ if (inst.inline)
+ this._updateDatepicker(inst);
+ else {
+ this._hideDatepicker();
+ this._lastInput = inst.input[0];
+ if (typeof(inst.input[0]) != 'object')
+ inst.input.focus(); // restore focus
+ this._lastInput = null;
+ }
+ },
+
+ /* Update any alternate field to synchronise with the main field. */
+ _updateAlternate: function(inst) {
+ var altField = this._get(inst, 'altField');
+ if (altField) { // update alternate field too
+ var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
+ var date = this._getDate(inst);
+ var dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
+ $(altField).each(function() { $(this).val(dateStr); });
+ }
+ },
+
+ /* Set as beforeShowDay function to prevent selection of weekends.
+ @param date Date - the date to customise
+ @return [boolean, string] - is this date selectable?, what is its CSS class? */
+ noWeekends: function(date) {
+ var day = date.getDay();
+ return [(day > 0 && day < 6), ''];
+ },
+
+ /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
+ @param date Date - the date to get the week for
+ @return number - the number of the week within the year that contains this date */
+ iso8601Week: function(date) {
+ var checkDate = new Date(date.getTime());
+ // Find Thursday of this week starting on Monday
+ checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
+ var time = checkDate.getTime();
+ checkDate.setMonth(0); // Compare with Jan 1
+ checkDate.setDate(1);
+ return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
+ },
+
+ /* Parse a string value into a date object.
+ See formatDate below for the possible formats.
+
+ @param format string - the expected format of the date
+ @param value string - the date in the above format
+ @param settings Object - attributes include:
+ shortYearCutoff number - the cutoff year for determining the century (optional)
+ dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
+ dayNames string[7] - names of the days from Sunday (optional)
+ monthNamesShort string[12] - abbreviated names of the months (optional)
+ monthNames string[12] - names of the months (optional)
+ @return Date - the extracted date value or null if value is blank */
+ parseDate: function (format, value, settings) {
+ if (format == null || value == null)
+ throw 'Invalid arguments';
+ value = (typeof value == 'object' ? value.toString() : value + '');
+ if (value == '')
+ return null;
+ var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
+ shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
+ new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
+ var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
+ var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
+ var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
+ var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
+ var year = -1;
+ var month = -1;
+ var day = -1;
+ var doy = -1;
+ var literal = false;
+ // Check whether a format character is doubled
+ var lookAhead = function(match) {
+ var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
+ if (matches)
+ iFormat++;
+ return matches;
+ };
+ // Extract a number from the string value
+ var getNumber = function(match) {
+ var isDoubled = lookAhead(match);
+ var size = (match == '@' ? 14 : (match == '!' ? 20 :
+ (match == 'y' && isDoubled ? 4 : (match == 'o' ? 3 : 2))));
+ var digits = new RegExp('^\\d{1,' + size + '}');
+ var num = value.substring(iValue).match(digits);
+ if (!num)
+ throw 'Missing number at position ' + iValue;
+ iValue += num[0].length;
+ return parseInt(num[0], 10);
+ };
+ // Extract a name from the string value and convert to an index
+ var getName = function(match, shortNames, longNames) {
+ var names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
+ return [ [k, v] ];
+ }).sort(function (a, b) {
+ return -(a[1].length - b[1].length);
+ });
+ var index = -1;
+ $.each(names, function (i, pair) {
+ var name = pair[1];
+ if (value.substr(iValue, name.length).toLowerCase() == name.toLowerCase()) {
+ index = pair[0];
+ iValue += name.length;
+ return false;
+ }
+ });
+ if (index != -1)
+ return index + 1;
+ else
+ throw 'Unknown name at position ' + iValue;
+ };
+ // Confirm that a literal character matches the string value
+ var checkLiteral = function() {
+ if (value.charAt(iValue) != format.charAt(iFormat))
+ throw 'Unexpected literal at position ' + iValue;
+ iValue++;
+ };
+ var iValue = 0;
+ for (var iFormat = 0; iFormat < format.length; iFormat++) {
+ if (literal)
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+ literal = false;
+ else
+ checkLiteral();
+ else
+ switch (format.charAt(iFormat)) {
+ case 'd':
+ day = getNumber('d');
+ break;
+ case 'D':
+ getName('D', dayNamesShort, dayNames);
+ break;
+ case 'o':
+ doy = getNumber('o');
+ break;
+ case 'm':
+ month = getNumber('m');
+ break;
+ case 'M':
+ month = getName('M', monthNamesShort, monthNames);
+ break;
+ case 'y':
+ year = getNumber('y');
+ break;
+ case '@':
+ var date = new Date(getNumber('@'));
+ year = date.getFullYear();
+ month = date.getMonth() + 1;
+ day = date.getDate();
+ break;
+ case '!':
+ var date = new Date((getNumber('!') - this._ticksTo1970) / 10000);
+ year = date.getFullYear();
+ month = date.getMonth() + 1;
+ day = date.getDate();
+ break;
+ case "'":
+ if (lookAhead("'"))
+ checkLiteral();
+ else
+ literal = true;
+ break;
+ default:
+ checkLiteral();
+ }
+ }
+ if (iValue < value.length){
+ throw "Extra/unparsed characters found in date: " + value.substring(iValue);
+ }
+ if (year == -1)
+ year = new Date().getFullYear();
+ else if (year < 100)
+ year += new Date().getFullYear() - new Date().getFullYear() % 100 +
+ (year <= shortYearCutoff ? 0 : -100);
+ if (doy > -1) {
+ month = 1;
+ day = doy;
+ do {
+ var dim = this._getDaysInMonth(year, month - 1);
+ if (day <= dim)
+ break;
+ month++;
+ day -= dim;
+ } while (true);
+ }
+ var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
+ if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
+ throw 'Invalid date'; // E.g. 31/02/00
+ return date;
+ },
+
+ /* Standard date formats. */
+ ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
+ COOKIE: 'D, dd M yy',
+ ISO_8601: 'yy-mm-dd',
+ RFC_822: 'D, d M y',
+ RFC_850: 'DD, dd-M-y',
+ RFC_1036: 'D, d M y',
+ RFC_1123: 'D, d M yy',
+ RFC_2822: 'D, d M yy',
+ RSS: 'D, d M y', // RFC 822
+ TICKS: '!',
+ TIMESTAMP: '@',
+ W3C: 'yy-mm-dd', // ISO 8601
+
+ _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
+ Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
+
+ /* Format a date object into a string value.
+ The format can be combinations of the following:
+ d - day of month (no leading zero)
+ dd - day of month (two digit)
+ o - day of year (no leading zeros)
+ oo - day of year (three digit)
+ D - day name short
+ DD - day name long
+ m - month of year (no leading zero)
+ mm - month of year (two digit)
+ M - month name short
+ MM - month name long
+ y - year (two digit)
+ yy - year (four digit)
+ @ - Unix timestamp (ms since 01/01/1970)
+ ! - Windows ticks (100ns since 01/01/0001)
+ '...' - literal text
+ '' - single quote
+
+ @param format string - the desired format of the date
+ @param date Date - the date value to format
+ @param settings Object - attributes include:
+ dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
+ dayNames string[7] - names of the days from Sunday (optional)
+ monthNamesShort string[12] - abbreviated names of the months (optional)
+ monthNames string[12] - names of the months (optional)
+ @return string - the date in the above format */
+ formatDate: function (format, date, settings) {
+ if (!date)
+ return '';
+ var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
+ var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
+ var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
+ var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
+ // Check whether a format character is doubled
+ var lookAhead = function(match) {
+ var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
+ if (matches)
+ iFormat++;
+ return matches;
+ };
+ // Format a number, with leading zero if necessary
+ var formatNumber = function(match, value, len) {
+ var num = '' + value;
+ if (lookAhead(match))
+ while (num.length < len)
+ num = '0' + num;
+ return num;
+ };
+ // Format a name, short or long as requested
+ var formatName = function(match, value, shortNames, longNames) {
+ return (lookAhead(match) ? longNames[value] : shortNames[value]);
+ };
+ var output = '';
+ var literal = false;
+ if (date)
+ for (var iFormat = 0; iFormat < format.length; iFormat++) {
+ if (literal)
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+ literal = false;
+ else
+ output += format.charAt(iFormat);
+ else
+ switch (format.charAt(iFormat)) {
+ case 'd':
+ output += formatNumber('d', date.getDate(), 2);
+ break;
+ case 'D':
+ output += formatName('D', date.getDay(), dayNamesShort, dayNames);
+ break;
+ case 'o':
+ output += formatNumber('o',
+ Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
+ break;
+ case 'm':
+ output += formatNumber('m', date.getMonth() + 1, 2);
+ break;
+ case 'M':
+ output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
+ break;
+ case 'y':
+ output += (lookAhead('y') ? date.getFullYear() :
+ (date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
+ break;
+ case '@':
+ output += date.getTime();
+ break;
+ case '!':
+ output += date.getTime() * 10000 + this._ticksTo1970;
+ break;
+ case "'":
+ if (lookAhead("'"))
+ output += "'";
+ else
+ literal = true;
+ break;
+ default:
+ output += format.charAt(iFormat);
+ }
+ }
+ return output;
+ },
+
+ /* Extract all possible characters from the date format. */
+ _possibleChars: function (format) {
+ var chars = '';
+ var literal = false;
+ // Check whether a format character is doubled
+ var lookAhead = function(match) {
+ var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
+ if (matches)
+ iFormat++;
+ return matches;
+ };
+ for (var iFormat = 0; iFormat < format.length; iFormat++)
+ if (literal)
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+ literal = false;
+ else
+ chars += format.charAt(iFormat);
+ else
+ switch (format.charAt(iFormat)) {
+ case 'd': case 'm': case 'y': case '@':
+ chars += '0123456789';
+ break;
+ case 'D': case 'M':
+ return null; // Accept anything
+ case "'":
+ if (lookAhead("'"))
+ chars += "'";
+ else
+ literal = true;
+ break;
+ default:
+ chars += format.charAt(iFormat);
+ }
+ return chars;
+ },
+
+ /* Get a setting value, defaulting if necessary. */
+ _get: function(inst, name) {
+ return inst.settings[name] !== undefined ?
+ inst.settings[name] : this._defaults[name];
+ },
+
+ /* Parse existing date and initialise date picker. */
+ _setDateFromField: function(inst, noDefault) {
+ if (inst.input.val() == inst.lastVal) {
+ return;
+ }
+ var dateFormat = this._get(inst, 'dateFormat');
+ var dates = inst.lastVal = inst.input ? inst.input.val() : null;
+ var date, defaultDate;
+ date = defaultDate = this._getDefaultDate(inst);
+ var settings = this._getFormatConfig(inst);
+ try {
+ date = this.parseDate(dateFormat, dates, settings) || defaultDate;
+ } catch (event) {
+ this.log(event);
+ dates = (noDefault ? '' : dates);
+ }
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ inst.currentDay = (dates ? date.getDate() : 0);
+ inst.currentMonth = (dates ? date.getMonth() : 0);
+ inst.currentYear = (dates ? date.getFullYear() : 0);
+ this._adjustInstDate(inst);
+ },
+
+ /* Retrieve the default date shown on opening. */
+ _getDefaultDate: function(inst) {
+ return this._restrictMinMax(inst,
+ this._determineDate(inst, this._get(inst, 'defaultDate'), new Date()));
+ },
+
+ /* A date may be specified as an exact value or a relative one. */
+ _determineDate: function(inst, date, defaultDate) {
+ var offsetNumeric = function(offset) {
+ var date = new Date();
+ date.setDate(date.getDate() + offset);
+ return date;
+ };
+ var offsetString = function(offset) {
+ try {
+ return $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
+ offset, $.datepicker._getFormatConfig(inst));
+ }
+ catch (e) {
+ // Ignore
+ }
+ var date = (offset.toLowerCase().match(/^c/) ?
+ $.datepicker._getDate(inst) : null) || new Date();
+ var year = date.getFullYear();
+ var month = date.getMonth();
+ var day = date.getDate();
+ var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
+ var matches = pattern.exec(offset);
+ while (matches) {
+ switch (matches[2] || 'd') {
+ case 'd' : case 'D' :
+ day += parseInt(matches[1],10); break;
+ case 'w' : case 'W' :
+ day += parseInt(matches[1],10) * 7; break;
+ case 'm' : case 'M' :
+ month += parseInt(matches[1],10);
+ day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
+ break;
+ case 'y': case 'Y' :
+ year += parseInt(matches[1],10);
+ day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
+ break;
+ }
+ matches = pattern.exec(offset);
+ }
+ return new Date(year, month, day);
+ };
+ var newDate = (date == null || date === '' ? defaultDate : (typeof date == 'string' ? offsetString(date) :
+ (typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
+ newDate = (newDate && newDate.toString() == 'Invalid Date' ? defaultDate : newDate);
+ if (newDate) {
+ newDate.setHours(0);
+ newDate.setMinutes(0);
+ newDate.setSeconds(0);
+ newDate.setMilliseconds(0);
+ }
+ return this._daylightSavingAdjust(newDate);
+ },
+
+ /* Handle switch to/from daylight saving.
+ Hours may be non-zero on daylight saving cut-over:
+ > 12 when midnight changeover, but then cannot generate
+ midnight datetime, so jump to 1AM, otherwise reset.
+ @param date (Date) the date to check
+ @return (Date) the corrected date */
+ _daylightSavingAdjust: function(date) {
+ if (!date) return null;
+ date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
+ return date;
+ },
+
+ /* Set the date(s) directly. */
+ _setDate: function(inst, date, noChange) {
+ var clear = !date;
+ var origMonth = inst.selectedMonth;
+ var origYear = inst.selectedYear;
+ var newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
+ inst.selectedDay = inst.currentDay = newDate.getDate();
+ inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
+ inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
+ if ((origMonth != inst.selectedMonth || origYear != inst.selectedYear) && !noChange)
+ this._notifyChange(inst);
+ this._adjustInstDate(inst);
+ if (inst.input) {
+ inst.input.val(clear ? '' : this._formatDate(inst));
+ }
+ },
+
+ /* Retrieve the date(s) directly. */
+ _getDate: function(inst) {
+ var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
+ this._daylightSavingAdjust(new Date(
+ inst.currentYear, inst.currentMonth, inst.currentDay)));
+ return startDate;
+ },
+
+ /* Generate the HTML for the current state of the date picker. */
+ _generateHTML: function(inst) {
+ var today = new Date();
+ today = this._daylightSavingAdjust(
+ new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
+ var isRTL = this._get(inst, 'isRTL');
+ var showButtonPanel = this._get(inst, 'showButtonPanel');
+ var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
+ var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
+ var numMonths = this._getNumberOfMonths(inst);
+ var showCurrentAtPos = this._get(inst, 'showCurrentAtPos');
+ var stepMonths = this._get(inst, 'stepMonths');
+ var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
+ var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
+ new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
+ var minDate = this._getMinMaxDate(inst, 'min');
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ var drawMonth = inst.drawMonth - showCurrentAtPos;
+ var drawYear = inst.drawYear;
+ if (drawMonth < 0) {
+ drawMonth += 12;
+ drawYear--;
+ }
+ if (maxDate) {
+ var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
+ maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
+ maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
+ while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
+ drawMonth--;
+ if (drawMonth < 0) {
+ drawMonth = 11;
+ drawYear--;
+ }
+ }
+ }
+ inst.drawMonth = drawMonth;
+ inst.drawYear = drawYear;
+ var prevText = this._get(inst, 'prevText');
+ prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
+ this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
+ this._getFormatConfig(inst)));
+ var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
+ '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_' + dpuuid +
+ '.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
+ ' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
+ (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
+ var nextText = this._get(inst, 'nextText');
+ nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
+ this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
+ this._getFormatConfig(inst)));
+ var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
+ '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_' + dpuuid +
+ '.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
+ ' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
+ (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
+ var currentText = this._get(inst, 'currentText');
+ var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
+ currentText = (!navigationAsDateFormat ? currentText :
+ this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
+ var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_' + dpuuid +
+ '.datepicker._hideDatepicker();">' + this._get(inst, 'closeText') + '</button>' : '');
+ var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
+ (this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_' + dpuuid +
+ '.datepicker._gotoToday(\'#' + inst.id + '\');"' +
+ '>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
+ var firstDay = parseInt(this._get(inst, 'firstDay'),10);
+ firstDay = (isNaN(firstDay) ? 0 : firstDay);
+ var showWeek = this._get(inst, 'showWeek');
+ var dayNames = this._get(inst, 'dayNames');
+ var dayNamesShort = this._get(inst, 'dayNamesShort');
+ var dayNamesMin = this._get(inst, 'dayNamesMin');
+ var monthNames = this._get(inst, 'monthNames');
+ var monthNamesShort = this._get(inst, 'monthNamesShort');
+ var beforeShowDay = this._get(inst, 'beforeShowDay');
+ var showOtherMonths = this._get(inst, 'showOtherMonths');
+ var selectOtherMonths = this._get(inst, 'selectOtherMonths');
+ var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
+ var defaultDate = this._getDefaultDate(inst);
+ var html = '';
+ for (var row = 0; row < numMonths[0]; row++) {
+ var group = '';
+ this.maxRows = 4;
+ for (var col = 0; col < numMonths[1]; col++) {
+ var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
+ var cornerClass = ' ui-corner-all';
+ var calender = '';
+ if (isMultiMonth) {
+ calender += '<div class="ui-datepicker-group';
+ if (numMonths[1] > 1)
+ switch (col) {
+ case 0: calender += ' ui-datepicker-group-first';
+ cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
+ case numMonths[1]-1: calender += ' ui-datepicker-group-last';
+ cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
+ default: calender += ' ui-datepicker-group-middle'; cornerClass = ''; break;
+ }
+ calender += '">';
+ }
+ calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' +
+ (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +
+ (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +
+ this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
+ row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
+ '</div><table class="ui-datepicker-calendar"><thead>' +
+ '<tr>';
+ var thead = (showWeek ? '<th class="ui-datepicker-week-col">' + this._get(inst, 'weekHeader') + '</th>' : '');
+ for (var dow = 0; dow < 7; dow++) { // days of the week
+ var day = (dow + firstDay) % 7;
+ thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
+ '<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>';
+ }
+ calender += thead + '</tr></thead><tbody>';
+ var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
+ if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
+ inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
+ var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
+ var curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
+ var numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
+ this.maxRows = numRows;
+ var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
+ for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
+ calender += '<tr>';
+ var tbody = (!showWeek ? '' : '<td class="ui-datepicker-week-col">' +
+ this._get(inst, 'calculateWeek')(printDate) + '</td>');
+ for (var dow = 0; dow < 7; dow++) { // create date picker days
+ var daySettings = (beforeShowDay ?
+ beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
+ var otherMonth = (printDate.getMonth() != drawMonth);
+ var unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
+ (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
+ tbody += '<td class="' +
+ ((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
+ (otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months
+ ((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key
+ (defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ?
+ // or defaultDate is current printedDate and defaultDate is selectedDate
+ ' ' + this._dayOverClass : '') + // highlight selected day
+ (unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') + // highlight unselectable days
+ (otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
+ (printDate.getTime() == currentDate.getTime() ? ' ' + this._currentClass : '') + // highlight selected day
+ (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
+ ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
+ (unselectable ? '' : ' onclick="DP_jQuery_' + dpuuid + '.datepicker._selectDay(\'#' +
+ inst.id + '\',' + printDate.getMonth() + ',' + printDate.getFullYear() + ', this);return false;"') + '>' + // actions
+ (otherMonth && !showOtherMonths ? '&#xa0;' : // display for other months
+ (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
+ (printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
+ (printDate.getTime() == currentDate.getTime() ? ' ui-state-active' : '') + // highlight selected day
+ (otherMonth ? ' ui-priority-secondary' : '') + // distinguish dates from other months
+ '" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date
+ printDate.setDate(printDate.getDate() + 1);
+ printDate = this._daylightSavingAdjust(printDate);
+ }
+ calender += tbody + '</tr>';
+ }
+ drawMonth++;
+ if (drawMonth > 11) {
+ drawMonth = 0;
+ drawYear++;
+ }
+ calender += '</tbody></table>' + (isMultiMonth ? '</div>' +
+ ((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
+ group += calender;
+ }
+ html += group;
+ }
+ html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
+ '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
+ inst._keyEvent = false;
+ return html;
+ },
+
+ /* Generate the month and year header. */
+ _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
+ secondary, monthNames, monthNamesShort) {
+ var changeMonth = this._get(inst, 'changeMonth');
+ var changeYear = this._get(inst, 'changeYear');
+ var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
+ var html = '<div class="ui-datepicker-title">';
+ var monthHtml = '';
+ // month selection
+ if (secondary || !changeMonth)
+ monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span>';
+ else {
+ var inMinYear = (minDate && minDate.getFullYear() == drawYear);
+ var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
+ monthHtml += '<select class="ui-datepicker-month" ' +
+ 'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
+ '>';
+ for (var month = 0; month < 12; month++) {
+ if ((!inMinYear || month >= minDate.getMonth()) &&
+ (!inMaxYear || month <= maxDate.getMonth()))
+ monthHtml += '<option value="' + month + '"' +
+ (month == drawMonth ? ' selected="selected"' : '') +
+ '>' + monthNamesShort[month] + '</option>';
+ }
+ monthHtml += '</select>';
+ }
+ if (!showMonthAfterYear)
+ html += monthHtml + (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '');
+ // year selection
+ if ( !inst.yearshtml ) {
+ inst.yearshtml = '';
+ if (secondary || !changeYear)
+ html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
+ else {
+ // determine range of years to display
+ var years = this._get(inst, 'yearRange').split(':');
+ var thisYear = new Date().getFullYear();
+ var determineYear = function(value) {
+ var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) :
+ (value.match(/[+-].*/) ? thisYear + parseInt(value, 10) :
+ parseInt(value, 10)));
+ return (isNaN(year) ? thisYear : year);
+ };
+ var year = determineYear(years[0]);
+ var endYear = Math.max(year, determineYear(years[1] || ''));
+ year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
+ endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
+ inst.yearshtml += '<select class="ui-datepicker-year" ' +
+ 'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
+ '>';
+ for (; year <= endYear; year++) {
+ inst.yearshtml += '<option value="' + year + '"' +
+ (year == drawYear ? ' selected="selected"' : '') +
+ '>' + year + '</option>';
+ }
+ inst.yearshtml += '</select>';
+
+ html += inst.yearshtml;
+ inst.yearshtml = null;
+ }
+ }
+ html += this._get(inst, 'yearSuffix');
+ if (showMonthAfterYear)
+ html += (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '') + monthHtml;
+ html += '</div>'; // Close datepicker_header
+ return html;
+ },
+
+ /* Adjust one of the date sub-fields. */
+ _adjustInstDate: function(inst, offset, period) {
+ var year = inst.drawYear + (period == 'Y' ? offset : 0);
+ var month = inst.drawMonth + (period == 'M' ? offset : 0);
+ var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
+ (period == 'D' ? offset : 0);
+ var date = this._restrictMinMax(inst,
+ this._daylightSavingAdjust(new Date(year, month, day)));
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ if (period == 'M' || period == 'Y')
+ this._notifyChange(inst);
+ },
+
+ /* Ensure a date is within any min/max bounds. */
+ _restrictMinMax: function(inst, date) {
+ var minDate = this._getMinMaxDate(inst, 'min');
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ var newDate = (minDate && date < minDate ? minDate : date);
+ newDate = (maxDate && newDate > maxDate ? maxDate : newDate);
+ return newDate;
+ },
+
+ /* Notify change of month/year. */
+ _notifyChange: function(inst) {
+ var onChange = this._get(inst, 'onChangeMonthYear');
+ if (onChange)
+ onChange.apply((inst.input ? inst.input[0] : null),
+ [inst.selectedYear, inst.selectedMonth + 1, inst]);
+ },
+
+ /* Determine the number of months to show. */
+ _getNumberOfMonths: function(inst) {
+ var numMonths = this._get(inst, 'numberOfMonths');
+ return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
+ },
+
+ /* Determine the current maximum date - ensure no time components are set. */
+ _getMinMaxDate: function(inst, minMax) {
+ return this._determineDate(inst, this._get(inst, minMax + 'Date'), null);
+ },
+
+ /* Find the number of days in a given month. */
+ _getDaysInMonth: function(year, month) {
+ return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
+ },
+
+ /* Find the day of the week of the first of a month. */
+ _getFirstDayOfMonth: function(year, month) {
+ return new Date(year, month, 1).getDay();
+ },
+
+ /* Determines if we should allow a "next/prev" month display change. */
+ _canAdjustMonth: function(inst, offset, curYear, curMonth) {
+ var numMonths = this._getNumberOfMonths(inst);
+ var date = this._daylightSavingAdjust(new Date(curYear,
+ curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
+ if (offset < 0)
+ date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
+ return this._isInRange(inst, date);
+ },
+
+ /* Is the given date in the accepted range? */
+ _isInRange: function(inst, date) {
+ var minDate = this._getMinMaxDate(inst, 'min');
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ return ((!minDate || date.getTime() >= minDate.getTime()) &&
+ (!maxDate || date.getTime() <= maxDate.getTime()));
+ },
+
+ /* Provide the configuration settings for formatting/parsing. */
+ _getFormatConfig: function(inst) {
+ var shortYearCutoff = this._get(inst, 'shortYearCutoff');
+ shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
+ new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
+ return {shortYearCutoff: shortYearCutoff,
+ dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
+ monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
+ },
+
+ /* Format the given date for display. */
+ _formatDate: function(inst, day, month, year) {
+ if (!day) {
+ inst.currentDay = inst.selectedDay;
+ inst.currentMonth = inst.selectedMonth;
+ inst.currentYear = inst.selectedYear;
+ }
+ var date = (day ? (typeof day == 'object' ? day :
+ this._daylightSavingAdjust(new Date(year, month, day))) :
+ this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
+ return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
+ }
+});
+
+/*
+ * Bind hover events for datepicker elements.
+ * Done via delegate so the binding only occurs once in the lifetime of the parent div.
+ * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
+ */
+function bindHover(dpDiv) {
+ var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a';
+ return dpDiv.bind('mouseout', function(event) {
+ var elem = $( event.target ).closest( selector );
+ if ( !elem.length ) {
+ return;
+ }
+ elem.removeClass( "ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover" );
+ })
+ .bind('mouseover', function(event) {
+ var elem = $( event.target ).closest( selector );
+ if ($.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0]) ||
+ !elem.length ) {
+ return;
+ }
+ elem.parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
+ elem.addClass('ui-state-hover');
+ if (elem.hasClass('ui-datepicker-prev')) elem.addClass('ui-datepicker-prev-hover');
+ if (elem.hasClass('ui-datepicker-next')) elem.addClass('ui-datepicker-next-hover');
+ });
+}
+
+/* jQuery extend now ignores nulls! */
+function extendRemove(target, props) {
+ $.extend(target, props);
+ for (var name in props)
+ if (props[name] == null || props[name] == undefined)
+ target[name] = props[name];
+ return target;
+};
+
+/* Determine whether an object is an array. */
+function isArray(a) {
+ return (a && (($.browser.safari && typeof a == 'object' && a.length) ||
+ (a.constructor && a.constructor.toString().match(/\Array\(\)/))));
+};
+
+/* Invoke the datepicker functionality.
+ @param options string - a command, optionally followed by additional parameters or
+ Object - settings for attaching new datepicker functionality
+ @return jQuery object */
+$.fn.datepicker = function(options){
+
+ /* Verify an empty collection wasn't passed - Fixes #6976 */
+ if ( !this.length ) {
+ return this;
+ }
+
+ /* Initialise the date picker. */
+ if (!$.datepicker.initialized) {
+ $(document).mousedown($.datepicker._checkExternalClick).
+ find('body').append($.datepicker.dpDiv);
+ $.datepicker.initialized = true;
+ }
+
+ var otherArgs = Array.prototype.slice.call(arguments, 1);
+ if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget'))
+ return $.datepicker['_' + options + 'Datepicker'].
+ apply($.datepicker, [this[0]].concat(otherArgs));
+ if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
+ return $.datepicker['_' + options + 'Datepicker'].
+ apply($.datepicker, [this[0]].concat(otherArgs));
+ return this.each(function() {
+ typeof options == 'string' ?
+ $.datepicker['_' + options + 'Datepicker'].
+ apply($.datepicker, [this].concat(otherArgs)) :
+ $.datepicker._attachDatepicker(this, options);
+ });
+};
+
+$.datepicker = new Datepicker(); // singleton instance
+$.datepicker.initialized = false;
+$.datepicker.uuid = new Date().getTime();
+$.datepicker.version = "1.8.16";
+
+// Workaround for #4055
+// Add another global to avoid noConflict issues with inline event handlers
+window['DP_jQuery_' + dpuuid] = $;
+
+})(jQuery);
+/*
+ * jQuery UI Dialog 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ * jquery.ui.button.js
+ * jquery.ui.draggable.js
+ * jquery.ui.mouse.js
+ * jquery.ui.position.js
+ * jquery.ui.resizable.js
+ */
+(function( $, undefined ) {
+
+var uiDialogClasses =
+ 'ui-dialog ' +
+ 'ui-widget ' +
+ 'ui-widget-content ' +
+ 'ui-corner-all ',
+ sizeRelatedOptions = {
+ buttons: true,
+ height: true,
+ maxHeight: true,
+ maxWidth: true,
+ minHeight: true,
+ minWidth: true,
+ width: true
+ },
+ resizableRelatedOptions = {
+ maxHeight: true,
+ maxWidth: true,
+ minHeight: true,
+ minWidth: true
+ },
+ // support for jQuery 1.3.2 - handle common attrFn methods for dialog
+ attrFn = $.attrFn || {
+ val: true,
+ css: true,
+ html: true,
+ text: true,
+ data: true,
+ width: true,
+ height: true,
+ offset: true,
+ click: true
+ };
+
+$.widget("ui.dialog", {
+ options: {
+ autoOpen: true,
+ buttons: {},
+ closeOnEscape: true,
+ closeText: 'close',
+ dialogClass: '',
+ draggable: true,
+ hide: null,
+ height: 'auto',
+ maxHeight: false,
+ maxWidth: false,
+ minHeight: 150,
+ minWidth: 150,
+ modal: false,
+ position: {
+ my: 'center',
+ at: 'center',
+ collision: 'fit',
+ // ensure that the titlebar is never outside the document
+ using: function(pos) {
+ var topOffset = $(this).css(pos).offset().top;
+ if (topOffset < 0) {
+ $(this).css('top', pos.top - topOffset);
+ }
+ }
+ },
+ resizable: true,
+ show: null,
+ stack: true,
+ title: '',
+ width: 300,
+ zIndex: 1000
+ },
+
+ _create: function() {
+ this.originalTitle = this.element.attr('title');
+ // #5742 - .attr() might return a DOMElement
+ if ( typeof this.originalTitle !== "string" ) {
+ this.originalTitle = "";
+ }
+
+ this.options.title = this.options.title || this.originalTitle;
+ var self = this,
+ options = self.options,
+
+ title = options.title || '&#160;',
+ titleId = $.ui.dialog.getTitleId(self.element),
+
+ uiDialog = (self.uiDialog = $('<div></div>'))
+ .appendTo(document.body)
+ .hide()
+ .addClass(uiDialogClasses + options.dialogClass)
+ .css({
+ zIndex: options.zIndex
+ })
+ // setting tabIndex makes the div focusable
+ // setting outline to 0 prevents a border on focus in Mozilla
+ .attr('tabIndex', -1).css('outline', 0).keydown(function(event) {
+ if (options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
+ event.keyCode === $.ui.keyCode.ESCAPE) {
+
+ self.close(event);
+ event.preventDefault();
+ }
+ })
+ .attr({
+ role: 'dialog',
+ 'aria-labelledby': titleId
+ })
+ .mousedown(function(event) {
+ self.moveToTop(false, event);
+ }),
+
+ uiDialogContent = self.element
+ .show()
+ .removeAttr('title')
+ .addClass(
+ 'ui-dialog-content ' +
+ 'ui-widget-content')
+ .appendTo(uiDialog),
+
+ uiDialogTitlebar = (self.uiDialogTitlebar = $('<div></div>'))
+ .addClass(
+ 'ui-dialog-titlebar ' +
+ 'ui-widget-header ' +
+ 'ui-corner-all ' +
+ 'ui-helper-clearfix'
+ )
+ .prependTo(uiDialog),
+
+ uiDialogTitlebarClose = $('<a href="#"></a>')
+ .addClass(
+ 'ui-dialog-titlebar-close ' +
+ 'ui-corner-all'
+ )
+ .attr('role', 'button')
+ .hover(
+ function() {
+ uiDialogTitlebarClose.addClass('ui-state-hover');
+ },
+ function() {
+ uiDialogTitlebarClose.removeClass('ui-state-hover');
+ }
+ )
+ .focus(function() {
+ uiDialogTitlebarClose.addClass('ui-state-focus');
+ })
+ .blur(function() {
+ uiDialogTitlebarClose.removeClass('ui-state-focus');
+ })
+ .click(function(event) {
+ self.close(event);
+ return false;
+ })
+ .appendTo(uiDialogTitlebar),
+
+ uiDialogTitlebarCloseText = (self.uiDialogTitlebarCloseText = $('<span></span>'))
+ .addClass(
+ 'ui-icon ' +
+ 'ui-icon-closethick'
+ )
+ .text(options.closeText)
+ .appendTo(uiDialogTitlebarClose),
+
+ uiDialogTitle = $('<span></span>')
+ .addClass('ui-dialog-title')
+ .attr('id', titleId)
+ .html(title)
+ .prependTo(uiDialogTitlebar);
+
+ //handling of deprecated beforeclose (vs beforeClose) option
+ //Ticket #4669 http://dev.jqueryui.com/ticket/4669
+ //TODO: remove in 1.9pre
+ if ($.isFunction(options.beforeclose) && !$.isFunction(options.beforeClose)) {
+ options.beforeClose = options.beforeclose;
+ }
+
+ uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();
+
+ if (options.draggable && $.fn.draggable) {
+ self._makeDraggable();
+ }
+ if (options.resizable && $.fn.resizable) {
+ self._makeResizable();
+ }
+
+ self._createButtons(options.buttons);
+ self._isOpen = false;
+
+ if ($.fn.bgiframe) {
+ uiDialog.bgiframe();
+ }
+ },
+
+ _init: function() {
+ if ( this.options.autoOpen ) {
+ this.open();
+ }
+ },
+
+ destroy: function() {
+ var self = this;
+
+ if (self.overlay) {
+ self.overlay.destroy();
+ }
+ self.uiDialog.hide();
+ self.element
+ .unbind('.dialog')
+ .removeData('dialog')
+ .removeClass('ui-dialog-content ui-widget-content')
+ .hide().appendTo('body');
+ self.uiDialog.remove();
+
+ if (self.originalTitle) {
+ self.element.attr('title', self.originalTitle);
+ }
+
+ return self;
+ },
+
+ widget: function() {
+ return this.uiDialog;
+ },
+
+ close: function(event) {
+ var self = this,
+ maxZ, thisZ;
+
+ if (false === self._trigger('beforeClose', event)) {
+ return;
+ }
+
+ if (self.overlay) {
+ self.overlay.destroy();
+ }
+ self.uiDialog.unbind('keypress.ui-dialog');
+
+ self._isOpen = false;
+
+ if (self.options.hide) {
+ self.uiDialog.hide(self.options.hide, function() {
+ self._trigger('close', event);
+ });
+ } else {
+ self.uiDialog.hide();
+ self._trigger('close', event);
+ }
+
+ $.ui.dialog.overlay.resize();
+
+ // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
+ if (self.options.modal) {
+ maxZ = 0;
+ $('.ui-dialog').each(function() {
+ if (this !== self.uiDialog[0]) {
+ thisZ = $(this).css('z-index');
+ if(!isNaN(thisZ)) {
+ maxZ = Math.max(maxZ, thisZ);
+ }
+ }
+ });
+ $.ui.dialog.maxZ = maxZ;
+ }
+
+ return self;
+ },
+
+ isOpen: function() {
+ return this._isOpen;
+ },
+
+ // the force parameter allows us to move modal dialogs to their correct
+ // position on open
+ moveToTop: function(force, event) {
+ var self = this,
+ options = self.options,
+ saveScroll;
+
+ if ((options.modal && !force) ||
+ (!options.stack && !options.modal)) {
+ return self._trigger('focus', event);
+ }
+
+ if (options.zIndex > $.ui.dialog.maxZ) {
+ $.ui.dialog.maxZ = options.zIndex;
+ }
+ if (self.overlay) {
+ $.ui.dialog.maxZ += 1;
+ self.overlay.$el.css('z-index', $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ);
+ }
+
+ //Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
+ // http://ui.jquery.com/bugs/ticket/3193
+ saveScroll = { scrollTop: self.element.scrollTop(), scrollLeft: self.element.scrollLeft() };
+ $.ui.dialog.maxZ += 1;
+ self.uiDialog.css('z-index', $.ui.dialog.maxZ);
+ self.element.attr(saveScroll);
+ self._trigger('focus', event);
+
+ return self;
+ },
+
+ open: function() {
+ if (this._isOpen) { return; }
+
+ var self = this,
+ options = self.options,
+ uiDialog = self.uiDialog;
+
+ self.overlay = options.modal ? new $.ui.dialog.overlay(self) : null;
+ self._size();
+ self._position(options.position);
+ uiDialog.show(options.show);
+ self.moveToTop(true);
+
+ // prevent tabbing out of modal dialogs
+ if (options.modal) {
+ uiDialog.bind('keypress.ui-dialog', function(event) {
+ if (event.keyCode !== $.ui.keyCode.TAB) {
+ return;
+ }
+
+ var tabbables = $(':tabbable', this),
+ first = tabbables.filter(':first'),
+ last = tabbables.filter(':last');
+
+ if (event.target === last[0] && !event.shiftKey) {
+ first.focus(1);
+ return false;
+ } else if (event.target === first[0] && event.shiftKey) {
+ last.focus(1);
+ return false;
+ }
+ });
+ }
+
+ // set focus to the first tabbable element in the content area or the first button
+ // if there are no tabbable elements, set focus on the dialog itself
+ $(self.element.find(':tabbable').get().concat(
+ uiDialog.find('.ui-dialog-buttonpane :tabbable').get().concat(
+ uiDialog.get()))).eq(0).focus();
+
+ self._isOpen = true;
+ self._trigger('open');
+
+ return self;
+ },
+
+ _createButtons: function(buttons) {
+ var self = this,
+ hasButtons = false,
+ uiDialogButtonPane = $('<div></div>')
+ .addClass(
+ 'ui-dialog-buttonpane ' +
+ 'ui-widget-content ' +
+ 'ui-helper-clearfix'
+ ),
+ uiButtonSet = $( "<div></div>" )
+ .addClass( "ui-dialog-buttonset" )
+ .appendTo( uiDialogButtonPane );
+
+ // if we already have a button pane, remove it
+ self.uiDialog.find('.ui-dialog-buttonpane').remove();
+
+ if (typeof buttons === 'object' && buttons !== null) {
+ $.each(buttons, function() {
+ return !(hasButtons = true);
+ });
+ }
+ if (hasButtons) {
+ $.each(buttons, function(name, props) {
+ props = $.isFunction( props ) ?
+ { click: props, text: name } :
+ props;
+ var button = $('<button type="button"></button>')
+ .click(function() {
+ props.click.apply(self.element[0], arguments);
+ })
+ .appendTo(uiButtonSet);
+ // can't use .attr( props, true ) with jQuery 1.3.2.
+ $.each( props, function( key, value ) {
+ if ( key === "click" ) {
+ return;
+ }
+ if ( key in attrFn ) {
+ button[ key ]( value );
+ } else {
+ button.attr( key, value );
+ }
+ });
+ if ($.fn.button) {
+ button.button();
+ }
+ });
+ uiDialogButtonPane.appendTo(self.uiDialog);
+ }
+ },
+
+ _makeDraggable: function() {
+ var self = this,
+ options = self.options,
+ doc = $(document),
+ heightBeforeDrag;
+
+ function filteredUi(ui) {
+ return {
+ position: ui.position,
+ offset: ui.offset
+ };
+ }
+
+ self.uiDialog.draggable({
+ cancel: '.ui-dialog-content, .ui-dialog-titlebar-close',
+ handle: '.ui-dialog-titlebar',
+ containment: 'document',
+ start: function(event, ui) {
+ heightBeforeDrag = options.height === "auto" ? "auto" : $(this).height();
+ $(this).height($(this).height()).addClass("ui-dialog-dragging");
+ self._trigger('dragStart', event, filteredUi(ui));
+ },
+ drag: function(event, ui) {
+ self._trigger('drag', event, filteredUi(ui));
+ },
+ stop: function(event, ui) {
+ options.position = [ui.position.left - doc.scrollLeft(),
+ ui.position.top - doc.scrollTop()];
+ $(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);
+ self._trigger('dragStop', event, filteredUi(ui));
+ $.ui.dialog.overlay.resize();
+ }
+ });
+ },
+
+ _makeResizable: function(handles) {
+ handles = (handles === undefined ? this.options.resizable : handles);
+ var self = this,
+ options = self.options,
+ // .ui-resizable has position: relative defined in the stylesheet
+ // but dialogs have to use absolute or fixed positioning
+ position = self.uiDialog.css('position'),
+ resizeHandles = (typeof handles === 'string' ?
+ handles :
+ 'n,e,s,w,se,sw,ne,nw'
+ );
+
+ function filteredUi(ui) {
+ return {
+ originalPosition: ui.originalPosition,
+ originalSize: ui.originalSize,
+ position: ui.position,
+ size: ui.size
+ };
+ }
+
+ self.uiDialog.resizable({
+ cancel: '.ui-dialog-content',
+ containment: 'document',
+ alsoResize: self.element,
+ maxWidth: options.maxWidth,
+ maxHeight: options.maxHeight,
+ minWidth: options.minWidth,
+ minHeight: self._minHeight(),
+ handles: resizeHandles,
+ start: function(event, ui) {
+ $(this).addClass("ui-dialog-resizing");
+ self._trigger('resizeStart', event, filteredUi(ui));
+ },
+ resize: function(event, ui) {
+ self._trigger('resize', event, filteredUi(ui));
+ },
+ stop: function(event, ui) {
+ $(this).removeClass("ui-dialog-resizing");
+ options.height = $(this).height();
+ options.width = $(this).width();
+ self._trigger('resizeStop', event, filteredUi(ui));
+ $.ui.dialog.overlay.resize();
+ }
+ })
+ .css('position', position)
+ .find('.ui-resizable-se').addClass('ui-icon ui-icon-grip-diagonal-se');
+ },
+
+ _minHeight: function() {
+ var options = this.options;
+
+ if (options.height === 'auto') {
+ return options.minHeight;
+ } else {
+ return Math.min(options.minHeight, options.height);
+ }
+ },
+
+ _position: function(position) {
+ var myAt = [],
+ offset = [0, 0],
+ isVisible;
+
+ if (position) {
+ // deep extending converts arrays to objects in jQuery <= 1.3.2 :-(
+ // if (typeof position == 'string' || $.isArray(position)) {
+ // myAt = $.isArray(position) ? position : position.split(' ');
+
+ if (typeof position === 'string' || (typeof position === 'object' && '0' in position)) {
+ myAt = position.split ? position.split(' ') : [position[0], position[1]];
+ if (myAt.length === 1) {
+ myAt[1] = myAt[0];
+ }
+
+ $.each(['left', 'top'], function(i, offsetPosition) {
+ if (+myAt[i] === myAt[i]) {
+ offset[i] = myAt[i];
+ myAt[i] = offsetPosition;
+ }
+ });
+
+ position = {
+ my: myAt.join(" "),
+ at: myAt.join(" "),
+ offset: offset.join(" ")
+ };
+ }
+
+ position = $.extend({}, $.ui.dialog.prototype.options.position, position);
+ } else {
+ position = $.ui.dialog.prototype.options.position;
+ }
+
+ // need to show the dialog to get the actual offset in the position plugin
+ isVisible = this.uiDialog.is(':visible');
+ if (!isVisible) {
+ this.uiDialog.show();
+ }
+ this.uiDialog
+ // workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781
+ .css({ top: 0, left: 0 })
+ .position($.extend({ of: window }, position));
+ if (!isVisible) {
+ this.uiDialog.hide();
+ }
+ },
+
+ _setOptions: function( options ) {
+ var self = this,
+ resizableOptions = {},
+ resize = false;
+
+ $.each( options, function( key, value ) {
+ self._setOption( key, value );
+
+ if ( key in sizeRelatedOptions ) {
+ resize = true;
+ }
+ if ( key in resizableRelatedOptions ) {
+ resizableOptions[ key ] = value;
+ }
+ });
+
+ if ( resize ) {
+ this._size();
+ }
+ if ( this.uiDialog.is( ":data(resizable)" ) ) {
+ this.uiDialog.resizable( "option", resizableOptions );
+ }
+ },
+
+ _setOption: function(key, value){
+ var self = this,
+ uiDialog = self.uiDialog;
+
+ switch (key) {
+ //handling of deprecated beforeclose (vs beforeClose) option
+ //Ticket #4669 http://dev.jqueryui.com/ticket/4669
+ //TODO: remove in 1.9pre
+ case "beforeclose":
+ key = "beforeClose";
+ break;
+ case "buttons":
+ self._createButtons(value);
+ break;
+ case "closeText":
+ // ensure that we always pass a string
+ self.uiDialogTitlebarCloseText.text("" + value);
+ break;
+ case "dialogClass":
+ uiDialog
+ .removeClass(self.options.dialogClass)
+ .addClass(uiDialogClasses + value);
+ break;
+ case "disabled":
+ if (value) {
+ uiDialog.addClass('ui-dialog-disabled');
+ } else {
+ uiDialog.removeClass('ui-dialog-disabled');
+ }
+ break;
+ case "draggable":
+ var isDraggable = uiDialog.is( ":data(draggable)" );
+ if ( isDraggable && !value ) {
+ uiDialog.draggable( "destroy" );
+ }
+
+ if ( !isDraggable && value ) {
+ self._makeDraggable();
+ }
+ break;
+ case "position":
+ self._position(value);
+ break;
+ case "resizable":
+ // currently resizable, becoming non-resizable
+ var isResizable = uiDialog.is( ":data(resizable)" );
+ if (isResizable && !value) {
+ uiDialog.resizable('destroy');
+ }
+
+ // currently resizable, changing handles
+ if (isResizable && typeof value === 'string') {
+ uiDialog.resizable('option', 'handles', value);
+ }
+
+ // currently non-resizable, becoming resizable
+ if (!isResizable && value !== false) {
+ self._makeResizable(value);
+ }
+ break;
+ case "title":
+ // convert whatever was passed in o a string, for html() to not throw up
+ $(".ui-dialog-title", self.uiDialogTitlebar).html("" + (value || '&#160;'));
+ break;
+ }
+
+ $.Widget.prototype._setOption.apply(self, arguments);
+ },
+
+ _size: function() {
+ /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
+ * divs will both have width and height set, so we need to reset them
+ */
+ var options = this.options,
+ nonContentHeight,
+ minContentHeight,
+ isVisible = this.uiDialog.is( ":visible" );
+
+ // reset content sizing
+ this.element.show().css({
+ width: 'auto',
+ minHeight: 0,
+ height: 0
+ });
+
+ if (options.minWidth > options.width) {
+ options.width = options.minWidth;
+ }
+
+ // reset wrapper sizing
+ // determine the height of all the non-content elements
+ nonContentHeight = this.uiDialog.css({
+ height: 'auto',
+ width: options.width
+ })
+ .height();
+ minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
+
+ if ( options.height === "auto" ) {
+ // only needed for IE6 support
+ if ( $.support.minHeight ) {
+ this.element.css({
+ minHeight: minContentHeight,
+ height: "auto"
+ });
+ } else {
+ this.uiDialog.show();
+ var autoHeight = this.element.css( "height", "auto" ).height();
+ if ( !isVisible ) {
+ this.uiDialog.hide();
+ }
+ this.element.height( Math.max( autoHeight, minContentHeight ) );
+ }
+ } else {
+ this.element.height( Math.max( options.height - nonContentHeight, 0 ) );
+ }
+
+ if (this.uiDialog.is(':data(resizable)')) {
+ this.uiDialog.resizable('option', 'minHeight', this._minHeight());
+ }
+ }
+});
+
+$.extend($.ui.dialog, {
+ version: "1.8.16",
+
+ uuid: 0,
+ maxZ: 0,
+
+ getTitleId: function($el) {
+ var id = $el.attr('id');
+ if (!id) {
+ this.uuid += 1;
+ id = this.uuid;
+ }
+ return 'ui-dialog-title-' + id;
+ },
+
+ overlay: function(dialog) {
+ this.$el = $.ui.dialog.overlay.create(dialog);
+ }
+});
+
+$.extend($.ui.dialog.overlay, {
+ instances: [],
+ // reuse old instances due to IE memory leak with alpha transparency (see #5185)
+ oldInstances: [],
+ maxZ: 0,
+ events: $.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','),
+ function(event) { return event + '.dialog-overlay'; }).join(' '),
+ create: function(dialog) {
+ if (this.instances.length === 0) {
+ // prevent use of anchors and inputs
+ // we use a setTimeout in case the overlay is created from an
+ // event that we're going to be cancelling (see #2804)
+ setTimeout(function() {
+ // handle $(el).dialog().dialog('close') (see #4065)
+ if ($.ui.dialog.overlay.instances.length) {
+ $(document).bind($.ui.dialog.overlay.events, function(event) {
+ // stop events if the z-index of the target is < the z-index of the overlay
+ // we cannot return true when we don't want to cancel the event (#3523)
+ if ($(event.target).zIndex() < $.ui.dialog.overlay.maxZ) {
+ return false;
+ }
+ });
+ }
+ }, 1);
+
+ // allow closing by pressing the escape key
+ $(document).bind('keydown.dialog-overlay', function(event) {
+ if (dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
+ event.keyCode === $.ui.keyCode.ESCAPE) {
+
+ dialog.close(event);
+ event.preventDefault();
+ }
+ });
+
+ // handle window resize
+ $(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize);
+ }
+
+ var $el = (this.oldInstances.pop() || $('<div></div>').addClass('ui-widget-overlay'))
+ .appendTo(document.body)
+ .css({
+ width: this.width(),
+ height: this.height()
+ });
+
+ if ($.fn.bgiframe) {
+ $el.bgiframe();
+ }
+
+ this.instances.push($el);
+ return $el;
+ },
+
+ destroy: function($el) {
+ var indexOf = $.inArray($el, this.instances);
+ if (indexOf != -1){
+ this.oldInstances.push(this.instances.splice(indexOf, 1)[0]);
+ }
+
+ if (this.instances.length === 0) {
+ $([document, window]).unbind('.dialog-overlay');
+ }
+
+ $el.remove();
+
+ // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
+ var maxZ = 0;
+ $.each(this.instances, function() {
+ maxZ = Math.max(maxZ, this.css('z-index'));
+ });
+ this.maxZ = maxZ;
+ },
+
+ height: function() {
+ var scrollHeight,
+ offsetHeight;
+ // handle IE 6
+ if ($.browser.msie && $.browser.version < 7) {
+ scrollHeight = Math.max(
+ document.documentElement.scrollHeight,
+ document.body.scrollHeight
+ );
+ offsetHeight = Math.max(
+ document.documentElement.offsetHeight,
+ document.body.offsetHeight
+ );
+
+ if (scrollHeight < offsetHeight) {
+ return $(window).height() + 'px';
+ } else {
+ return scrollHeight + 'px';
+ }
+ // handle "good" browsers
+ } else {
+ return $(document).height() + 'px';
+ }
+ },
+
+ width: function() {
+ var scrollWidth,
+ offsetWidth;
+ // handle IE
+ if ( $.browser.msie ) {
+ scrollWidth = Math.max(
+ document.documentElement.scrollWidth,
+ document.body.scrollWidth
+ );
+ offsetWidth = Math.max(
+ document.documentElement.offsetWidth,
+ document.body.offsetWidth
+ );
+
+ if (scrollWidth < offsetWidth) {
+ return $(window).width() + 'px';
+ } else {
+ return scrollWidth + 'px';
+ }
+ // handle "good" browsers
+ } else {
+ return $(document).width() + 'px';
+ }
+ },
+
+ resize: function() {
+ /* If the dialog is draggable and the user drags it past the
+ * right edge of the window, the document becomes wider so we
+ * need to stretch the overlay. If the user then drags the
+ * dialog back to the left, the document will become narrower,
+ * so we need to shrink the overlay to the appropriate size.
+ * This is handled by shrinking the overlay before setting it
+ * to the full document size.
+ */
+ var $overlays = $([]);
+ $.each($.ui.dialog.overlay.instances, function() {
+ $overlays = $overlays.add(this);
+ });
+
+ $overlays.css({
+ width: 0,
+ height: 0
+ }).css({
+ width: $.ui.dialog.overlay.width(),
+ height: $.ui.dialog.overlay.height()
+ });
+ }
+});
+
+$.extend($.ui.dialog.overlay.prototype, {
+ destroy: function() {
+ $.ui.dialog.overlay.destroy(this.$el);
+ }
+});
+
+}(jQuery));
+/*
+ * jQuery UI Position 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Position
+ */
+(function( $, undefined ) {
+
+$.ui = $.ui || {};
+
+var horizontalPositions = /left|center|right/,
+ verticalPositions = /top|center|bottom/,
+ center = "center",
+ _position = $.fn.position,
+ _offset = $.fn.offset;
+
+$.fn.position = function( options ) {
+ if ( !options || !options.of ) {
+ return _position.apply( this, arguments );
+ }
+
+ // make a copy, we don't want to modify arguments
+ options = $.extend( {}, options );
+
+ var target = $( options.of ),
+ targetElem = target[0],
+ collision = ( options.collision || "flip" ).split( " " ),
+ offset = options.offset ? options.offset.split( " " ) : [ 0, 0 ],
+ targetWidth,
+ targetHeight,
+ basePosition;
+
+ if ( targetElem.nodeType === 9 ) {
+ targetWidth = target.width();
+ targetHeight = target.height();
+ basePosition = { top: 0, left: 0 };
+ // TODO: use $.isWindow() in 1.9
+ } else if ( targetElem.setTimeout ) {
+ targetWidth = target.width();
+ targetHeight = target.height();
+ basePosition = { top: target.scrollTop(), left: target.scrollLeft() };
+ } else if ( targetElem.preventDefault ) {
+ // force left top to allow flipping
+ options.at = "left top";
+ targetWidth = targetHeight = 0;
+ basePosition = { top: options.of.pageY, left: options.of.pageX };
+ } else {
+ targetWidth = target.outerWidth();
+ targetHeight = target.outerHeight();
+ basePosition = target.offset();
+ }
+
+ // force my and at to have valid horizontal and veritcal positions
+ // if a value is missing or invalid, it will be converted to center
+ $.each( [ "my", "at" ], function() {
+ var pos = ( options[this] || "" ).split( " " );
+ if ( pos.length === 1) {
+ pos = horizontalPositions.test( pos[0] ) ?
+ pos.concat( [center] ) :
+ verticalPositions.test( pos[0] ) ?
+ [ center ].concat( pos ) :
+ [ center, center ];
+ }
+ pos[ 0 ] = horizontalPositions.test( pos[0] ) ? pos[ 0 ] : center;
+ pos[ 1 ] = verticalPositions.test( pos[1] ) ? pos[ 1 ] : center;
+ options[ this ] = pos;
+ });
+
+ // normalize collision option
+ if ( collision.length === 1 ) {
+ collision[ 1 ] = collision[ 0 ];
+ }
+
+ // normalize offset option
+ offset[ 0 ] = parseInt( offset[0], 10 ) || 0;
+ if ( offset.length === 1 ) {
+ offset[ 1 ] = offset[ 0 ];
+ }
+ offset[ 1 ] = parseInt( offset[1], 10 ) || 0;
+
+ if ( options.at[0] === "right" ) {
+ basePosition.left += targetWidth;
+ } else if ( options.at[0] === center ) {
+ basePosition.left += targetWidth / 2;
+ }
+
+ if ( options.at[1] === "bottom" ) {
+ basePosition.top += targetHeight;
+ } else if ( options.at[1] === center ) {
+ basePosition.top += targetHeight / 2;
+ }
+
+ basePosition.left += offset[ 0 ];
+ basePosition.top += offset[ 1 ];
+
+ return this.each(function() {
+ var elem = $( this ),
+ elemWidth = elem.outerWidth(),
+ elemHeight = elem.outerHeight(),
+ marginLeft = parseInt( $.curCSS( this, "marginLeft", true ) ) || 0,
+ marginTop = parseInt( $.curCSS( this, "marginTop", true ) ) || 0,
+ collisionWidth = elemWidth + marginLeft +
+ ( parseInt( $.curCSS( this, "marginRight", true ) ) || 0 ),
+ collisionHeight = elemHeight + marginTop +
+ ( parseInt( $.curCSS( this, "marginBottom", true ) ) || 0 ),
+ position = $.extend( {}, basePosition ),
+ collisionPosition;
+
+ if ( options.my[0] === "right" ) {
+ position.left -= elemWidth;
+ } else if ( options.my[0] === center ) {
+ position.left -= elemWidth / 2;
+ }
+
+ if ( options.my[1] === "bottom" ) {
+ position.top -= elemHeight;
+ } else if ( options.my[1] === center ) {
+ position.top -= elemHeight / 2;
+ }
+
+ // prevent fractions (see #5280)
+ position.left = Math.round( position.left );
+ position.top = Math.round( position.top );
+
+ collisionPosition = {
+ left: position.left - marginLeft,
+ top: position.top - marginTop
+ };
+
+ $.each( [ "left", "top" ], function( i, dir ) {
+ if ( $.ui.position[ collision[i] ] ) {
+ $.ui.position[ collision[i] ][ dir ]( position, {
+ targetWidth: targetWidth,
+ targetHeight: targetHeight,
+ elemWidth: elemWidth,
+ elemHeight: elemHeight,
+ collisionPosition: collisionPosition,
+ collisionWidth: collisionWidth,
+ collisionHeight: collisionHeight,
+ offset: offset,
+ my: options.my,
+ at: options.at
+ });
+ }
+ });
+
+ if ( $.fn.bgiframe ) {
+ elem.bgiframe();
+ }
+ elem.offset( $.extend( position, { using: options.using } ) );
+ });
+};
+
+$.ui.position = {
+ fit: {
+ left: function( position, data ) {
+ var win = $( window ),
+ over = data.collisionPosition.left + data.collisionWidth - win.width() - win.scrollLeft();
+ position.left = over > 0 ? position.left - over : Math.max( position.left - data.collisionPosition.left, position.left );
+ },
+ top: function( position, data ) {
+ var win = $( window ),
+ over = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop();
+ position.top = over > 0 ? position.top - over : Math.max( position.top - data.collisionPosition.top, position.top );
+ }
+ },
+
+ flip: {
+ left: function( position, data ) {
+ if ( data.at[0] === center ) {
+ return;
+ }
+ var win = $( window ),
+ over = data.collisionPosition.left + data.collisionWidth - win.width() - win.scrollLeft(),
+ myOffset = data.my[ 0 ] === "left" ?
+ -data.elemWidth :
+ data.my[ 0 ] === "right" ?
+ data.elemWidth :
+ 0,
+ atOffset = data.at[ 0 ] === "left" ?
+ data.targetWidth :
+ -data.targetWidth,
+ offset = -2 * data.offset[ 0 ];
+ position.left += data.collisionPosition.left < 0 ?
+ myOffset + atOffset + offset :
+ over > 0 ?
+ myOffset + atOffset + offset :
+ 0;
+ },
+ top: function( position, data ) {
+ if ( data.at[1] === center ) {
+ return;
+ }
+ var win = $( window ),
+ over = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop(),
+ myOffset = data.my[ 1 ] === "top" ?
+ -data.elemHeight :
+ data.my[ 1 ] === "bottom" ?
+ data.elemHeight :
+ 0,
+ atOffset = data.at[ 1 ] === "top" ?
+ data.targetHeight :
+ -data.targetHeight,
+ offset = -2 * data.offset[ 1 ];
+ position.top += data.collisionPosition.top < 0 ?
+ myOffset + atOffset + offset :
+ over > 0 ?
+ myOffset + atOffset + offset :
+ 0;
+ }
+ }
+};
+
+// offset setter from jQuery 1.4
+if ( !$.offset.setOffset ) {
+ $.offset.setOffset = function( elem, options ) {
+ // set position first, in-case top/left are set even on static elem
+ if ( /static/.test( $.curCSS( elem, "position" ) ) ) {
+ elem.style.position = "relative";
+ }
+ var curElem = $( elem ),
+ curOffset = curElem.offset(),
+ curTop = parseInt( $.curCSS( elem, "top", true ), 10 ) || 0,
+ curLeft = parseInt( $.curCSS( elem, "left", true ), 10) || 0,
+ props = {
+ top: (options.top - curOffset.top) + curTop,
+ left: (options.left - curOffset.left) + curLeft
+ };
+
+ if ( 'using' in options ) {
+ options.using.call( elem, props );
+ } else {
+ curElem.css( props );
+ }
+ };
+
+ $.fn.offset = function( options ) {
+ var elem = this[ 0 ];
+ if ( !elem || !elem.ownerDocument ) { return null; }
+ if ( options ) {
+ return this.each(function() {
+ $.offset.setOffset( this, options );
+ });
+ }
+ return _offset.call( this );
+ };
+}
+
+}( jQuery ));
+/*
+ * jQuery UI Progressbar 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+$.widget( "ui.progressbar", {
+ options: {
+ value: 0,
+ max: 100
+ },
+
+ min: 0,
+
+ _create: function() {
+ this.element
+ .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
+ .attr({
+ role: "progressbar",
+ "aria-valuemin": this.min,
+ "aria-valuemax": this.options.max,
+ "aria-valuenow": this._value()
+ });
+
+ this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" )
+ .appendTo( this.element );
+
+ this.oldValue = this._value();
+ this._refreshValue();
+ },
+
+ destroy: function() {
+ this.element
+ .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
+ .removeAttr( "role" )
+ .removeAttr( "aria-valuemin" )
+ .removeAttr( "aria-valuemax" )
+ .removeAttr( "aria-valuenow" );
+
+ this.valueDiv.remove();
+
+ $.Widget.prototype.destroy.apply( this, arguments );
+ },
+
+ value: function( newValue ) {
+ if ( newValue === undefined ) {
+ return this._value();
+ }
+
+ this._setOption( "value", newValue );
+ return this;
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "value" ) {
+ this.options.value = value;
+ this._refreshValue();
+ if ( this._value() === this.options.max ) {
+ this._trigger( "complete" );
+ }
+ }
+
+ $.Widget.prototype._setOption.apply( this, arguments );
+ },
+
+ _value: function() {
+ var val = this.options.value;
+ // normalize invalid value
+ if ( typeof val !== "number" ) {
+ val = 0;
+ }
+ return Math.min( this.options.max, Math.max( this.min, val ) );
+ },
+
+ _percentage: function() {
+ return 100 * this._value() / this.options.max;
+ },
+
+ _refreshValue: function() {
+ var value = this.value();
+ var percentage = this._percentage();
+
+ if ( this.oldValue !== value ) {
+ this.oldValue = value;
+ this._trigger( "change" );
+ }
+
+ this.valueDiv
+ .toggle( value > this.min )
+ .toggleClass( "ui-corner-right", value === this.options.max )
+ .width( percentage.toFixed(0) + "%" );
+ this.element.attr( "aria-valuenow", value );
+ }
+});
+
+$.extend( $.ui.progressbar, {
+ version: "1.8.16"
+});
+
+})( jQuery );
+/*
+ * jQuery UI Slider 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+// number of pages in a slider
+// (how many times can you page up/down to go through the whole range)
+var numPages = 5;
+
+$.widget( "ui.slider", $.ui.mouse, {
+
+ widgetEventPrefix: "slide",
+
+ options: {
+ animate: false,
+ distance: 0,
+ max: 100,
+ min: 0,
+ orientation: "horizontal",
+ range: false,
+ step: 1,
+ value: 0,
+ values: null
+ },
+
+ _create: function() {
+ var self = this,
+ o = this.options,
+ existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
+ handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
+ handleCount = ( o.values && o.values.length ) || 1,
+ handles = [];
+
+ this._keySliding = false;
+ this._mouseSliding = false;
+ this._animateOff = true;
+ this._handleIndex = null;
+ this._detectOrientation();
+ this._mouseInit();
+
+ this.element
+ .addClass( "ui-slider" +
+ " ui-slider-" + this.orientation +
+ " ui-widget" +
+ " ui-widget-content" +
+ " ui-corner-all" +
+ ( o.disabled ? " ui-slider-disabled ui-disabled" : "" ) );
+
+ this.range = $([]);
+
+ if ( o.range ) {
+ if ( o.range === true ) {
+ if ( !o.values ) {
+ o.values = [ this._valueMin(), this._valueMin() ];
+ }
+ if ( o.values.length && o.values.length !== 2 ) {
+ o.values = [ o.values[0], o.values[0] ];
+ }
+ }
+
+ this.range = $( "<div></div>" )
+ .appendTo( this.element )
+ .addClass( "ui-slider-range" +
+ // note: this isn't the most fittingly semantic framework class for this element,
+ // but worked best visually with a variety of themes
+ " ui-widget-header" +
+ ( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) );
+ }
+
+ for ( var i = existingHandles.length; i < handleCount; i += 1 ) {
+ handles.push( handle );
+ }
+
+ this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( self.element ) );
+
+ this.handle = this.handles.eq( 0 );
+
+ this.handles.add( this.range ).filter( "a" )
+ .click(function( event ) {
+ event.preventDefault();
+ })
+ .hover(function() {
+ if ( !o.disabled ) {
+ $( this ).addClass( "ui-state-hover" );
+ }
+ }, function() {
+ $( this ).removeClass( "ui-state-hover" );
+ })
+ .focus(function() {
+ if ( !o.disabled ) {
+ $( ".ui-slider .ui-state-focus" ).removeClass( "ui-state-focus" );
+ $( this ).addClass( "ui-state-focus" );
+ } else {
+ $( this ).blur();
+ }
+ })
+ .blur(function() {
+ $( this ).removeClass( "ui-state-focus" );
+ });
+
+ this.handles.each(function( i ) {
+ $( this ).data( "index.ui-slider-handle", i );
+ });
+
+ this.handles
+ .keydown(function( event ) {
+ var ret = true,
+ index = $( this ).data( "index.ui-slider-handle" ),
+ allowed,
+ curVal,
+ newVal,
+ step;
+
+ if ( self.options.disabled ) {
+ return;
+ }
+
+ switch ( event.keyCode ) {
+ case $.ui.keyCode.HOME:
+ case $.ui.keyCode.END:
+ case $.ui.keyCode.PAGE_UP:
+ case $.ui.keyCode.PAGE_DOWN:
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.RIGHT:
+ case $.ui.keyCode.DOWN:
+ case $.ui.keyCode.LEFT:
+ ret = false;
+ if ( !self._keySliding ) {
+ self._keySliding = true;
+ $( this ).addClass( "ui-state-active" );
+ allowed = self._start( event, index );
+ if ( allowed === false ) {
+ return;
+ }
+ }
+ break;
+ }
+
+ step = self.options.step;
+ if ( self.options.values && self.options.values.length ) {
+ curVal = newVal = self.values( index );
+ } else {
+ curVal = newVal = self.value();
+ }
+
+ switch ( event.keyCode ) {
+ case $.ui.keyCode.HOME:
+ newVal = self._valueMin();
+ break;
+ case $.ui.keyCode.END:
+ newVal = self._valueMax();
+ break;
+ case $.ui.keyCode.PAGE_UP:
+ newVal = self._trimAlignValue( curVal + ( (self._valueMax() - self._valueMin()) / numPages ) );
+ break;
+ case $.ui.keyCode.PAGE_DOWN:
+ newVal = self._trimAlignValue( curVal - ( (self._valueMax() - self._valueMin()) / numPages ) );
+ break;
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.RIGHT:
+ if ( curVal === self._valueMax() ) {
+ return;
+ }
+ newVal = self._trimAlignValue( curVal + step );
+ break;
+ case $.ui.keyCode.DOWN:
+ case $.ui.keyCode.LEFT:
+ if ( curVal === self._valueMin() ) {
+ return;
+ }
+ newVal = self._trimAlignValue( curVal - step );
+ break;
+ }
+
+ self._slide( event, index, newVal );
+
+ return ret;
+
+ })
+ .keyup(function( event ) {
+ var index = $( this ).data( "index.ui-slider-handle" );
+
+ if ( self._keySliding ) {
+ self._keySliding = false;
+ self._stop( event, index );
+ self._change( event, index );
+ $( this ).removeClass( "ui-state-active" );
+ }
+
+ });
+
+ this._refreshValue();
+
+ this._animateOff = false;
+ },
+
+ destroy: function() {
+ this.handles.remove();
+ this.range.remove();
+
+ this.element
+ .removeClass( "ui-slider" +
+ " ui-slider-horizontal" +
+ " ui-slider-vertical" +
+ " ui-slider-disabled" +
+ " ui-widget" +
+ " ui-widget-content" +
+ " ui-corner-all" )
+ .removeData( "slider" )
+ .unbind( ".slider" );
+
+ this._mouseDestroy();
+
+ return this;
+ },
+
+ _mouseCapture: function( event ) {
+ var o = this.options,
+ position,
+ normValue,
+ distance,
+ closestHandle,
+ self,
+ index,
+ allowed,
+ offset,
+ mouseOverHandle;
+
+ if ( o.disabled ) {
+ return false;
+ }
+
+ this.elementSize = {
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight()
+ };
+ this.elementOffset = this.element.offset();
+
+ position = { x: event.pageX, y: event.pageY };
+ normValue = this._normValueFromMouse( position );
+ distance = this._valueMax() - this._valueMin() + 1;
+ self = this;
+ this.handles.each(function( i ) {
+ var thisDistance = Math.abs( normValue - self.values(i) );
+ if ( distance > thisDistance ) {
+ distance = thisDistance;
+ closestHandle = $( this );
+ index = i;
+ }
+ });
+
+ // workaround for bug #3736 (if both handles of a range are at 0,
+ // the first is always used as the one with least distance,
+ // and moving it is obviously prevented by preventing negative ranges)
+ if( o.range === true && this.values(1) === o.min ) {
+ index += 1;
+ closestHandle = $( this.handles[index] );
+ }
+
+ allowed = this._start( event, index );
+ if ( allowed === false ) {
+ return false;
+ }
+ this._mouseSliding = true;
+
+ self._handleIndex = index;
+
+ closestHandle
+ .addClass( "ui-state-active" )
+ .focus();
+
+ offset = closestHandle.offset();
+ mouseOverHandle = !$( event.target ).parents().andSelf().is( ".ui-slider-handle" );
+ this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
+ left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
+ top: event.pageY - offset.top -
+ ( closestHandle.height() / 2 ) -
+ ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
+ ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
+ ( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
+ };
+
+ if ( !this.handles.hasClass( "ui-state-hover" ) ) {
+ this._slide( event, index, normValue );
+ }
+ this._animateOff = true;
+ return true;
+ },
+
+ _mouseStart: function( event ) {
+ return true;
+ },
+
+ _mouseDrag: function( event ) {
+ var position = { x: event.pageX, y: event.pageY },
+ normValue = this._normValueFromMouse( position );
+
+ this._slide( event, this._handleIndex, normValue );
+
+ return false;
+ },
+
+ _mouseStop: function( event ) {
+ this.handles.removeClass( "ui-state-active" );
+ this._mouseSliding = false;
+
+ this._stop( event, this._handleIndex );
+ this._change( event, this._handleIndex );
+
+ this._handleIndex = null;
+ this._clickOffset = null;
+ this._animateOff = false;
+
+ return false;
+ },
+
+ _detectOrientation: function() {
+ this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
+ },
+
+ _normValueFromMouse: function( position ) {
+ var pixelTotal,
+ pixelMouse,
+ percentMouse,
+ valueTotal,
+ valueMouse;
+
+ if ( this.orientation === "horizontal" ) {
+ pixelTotal = this.elementSize.width;
+ pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
+ } else {
+ pixelTotal = this.elementSize.height;
+ pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
+ }
+
+ percentMouse = ( pixelMouse / pixelTotal );
+ if ( percentMouse > 1 ) {
+ percentMouse = 1;
+ }
+ if ( percentMouse < 0 ) {
+ percentMouse = 0;
+ }
+ if ( this.orientation === "vertical" ) {
+ percentMouse = 1 - percentMouse;
+ }
+
+ valueTotal = this._valueMax() - this._valueMin();
+ valueMouse = this._valueMin() + percentMouse * valueTotal;
+
+ return this._trimAlignValue( valueMouse );
+ },
+
+ _start: function( event, index ) {
+ var uiHash = {
+ handle: this.handles[ index ],
+ value: this.value()
+ };
+ if ( this.options.values && this.options.values.length ) {
+ uiHash.value = this.values( index );
+ uiHash.values = this.values();
+ }
+ return this._trigger( "start", event, uiHash );
+ },
+
+ _slide: function( event, index, newVal ) {
+ var otherVal,
+ newValues,
+ allowed;
+
+ if ( this.options.values && this.options.values.length ) {
+ otherVal = this.values( index ? 0 : 1 );
+
+ if ( ( this.options.values.length === 2 && this.options.range === true ) &&
+ ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
+ ) {
+ newVal = otherVal;
+ }
+
+ if ( newVal !== this.values( index ) ) {
+ newValues = this.values();
+ newValues[ index ] = newVal;
+ // A slide can be canceled by returning false from the slide callback
+ allowed = this._trigger( "slide", event, {
+ handle: this.handles[ index ],
+ value: newVal,
+ values: newValues
+ } );
+ otherVal = this.values( index ? 0 : 1 );
+ if ( allowed !== false ) {
+ this.values( index, newVal, true );
+ }
+ }
+ } else {
+ if ( newVal !== this.value() ) {
+ // A slide can be canceled by returning false from the slide callback
+ allowed = this._trigger( "slide", event, {
+ handle: this.handles[ index ],
+ value: newVal
+ } );
+ if ( allowed !== false ) {
+ this.value( newVal );
+ }
+ }
+ }
+ },
+
+ _stop: function( event, index ) {
+ var uiHash = {
+ handle: this.handles[ index ],
+ value: this.value()
+ };
+ if ( this.options.values && this.options.values.length ) {
+ uiHash.value = this.values( index );
+ uiHash.values = this.values();
+ }
+
+ this._trigger( "stop", event, uiHash );
+ },
+
+ _change: function( event, index ) {
+ if ( !this._keySliding && !this._mouseSliding ) {
+ var uiHash = {
+ handle: this.handles[ index ],
+ value: this.value()
+ };
+ if ( this.options.values && this.options.values.length ) {
+ uiHash.value = this.values( index );
+ uiHash.values = this.values();
+ }
+
+ this._trigger( "change", event, uiHash );
+ }
+ },
+
+ value: function( newValue ) {
+ if ( arguments.length ) {
+ this.options.value = this._trimAlignValue( newValue );
+ this._refreshValue();
+ this._change( null, 0 );
+ return;
+ }
+
+ return this._value();
+ },
+
+ values: function( index, newValue ) {
+ var vals,
+ newValues,
+ i;
+
+ if ( arguments.length > 1 ) {
+ this.options.values[ index ] = this._trimAlignValue( newValue );
+ this._refreshValue();
+ this._change( null, index );
+ return;
+ }
+
+ if ( arguments.length ) {
+ if ( $.isArray( arguments[ 0 ] ) ) {
+ vals = this.options.values;
+ newValues = arguments[ 0 ];
+ for ( i = 0; i < vals.length; i += 1 ) {
+ vals[ i ] = this._trimAlignValue( newValues[ i ] );
+ this._change( null, i );
+ }
+ this._refreshValue();
+ } else {
+ if ( this.options.values && this.options.values.length ) {
+ return this._values( index );
+ } else {
+ return this.value();
+ }
+ }
+ } else {
+ return this._values();
+ }
+ },
+
+ _setOption: function( key, value ) {
+ var i,
+ valsLength = 0;
+
+ if ( $.isArray( this.options.values ) ) {
+ valsLength = this.options.values.length;
+ }
+
+ $.Widget.prototype._setOption.apply( this, arguments );
+
+ switch ( key ) {
+ case "disabled":
+ if ( value ) {
+ this.handles.filter( ".ui-state-focus" ).blur();
+ this.handles.removeClass( "ui-state-hover" );
+ this.handles.propAttr( "disabled", true );
+ this.element.addClass( "ui-disabled" );
+ } else {
+ this.handles.propAttr( "disabled", false );
+ this.element.removeClass( "ui-disabled" );
+ }
+ break;
+ case "orientation":
+ this._detectOrientation();
+ this.element
+ .removeClass( "ui-slider-horizontal ui-slider-vertical" )
+ .addClass( "ui-slider-" + this.orientation );
+ this._refreshValue();
+ break;
+ case "value":
+ this._animateOff = true;
+ this._refreshValue();
+ this._change( null, 0 );
+ this._animateOff = false;
+ break;
+ case "values":
+ this._animateOff = true;
+ this._refreshValue();
+ for ( i = 0; i < valsLength; i += 1 ) {
+ this._change( null, i );
+ }
+ this._animateOff = false;
+ break;
+ }
+ },
+
+ //internal value getter
+ // _value() returns value trimmed by min and max, aligned by step
+ _value: function() {
+ var val = this.options.value;
+ val = this._trimAlignValue( val );
+
+ return val;
+ },
+
+ //internal values getter
+ // _values() returns array of values trimmed by min and max, aligned by step
+ // _values( index ) returns single value trimmed by min and max, aligned by step
+ _values: function( index ) {
+ var val,
+ vals,
+ i;
+
+ if ( arguments.length ) {
+ val = this.options.values[ index ];
+ val = this._trimAlignValue( val );
+
+ return val;
+ } else {
+ // .slice() creates a copy of the array
+ // this copy gets trimmed by min and max and then returned
+ vals = this.options.values.slice();
+ for ( i = 0; i < vals.length; i+= 1) {
+ vals[ i ] = this._trimAlignValue( vals[ i ] );
+ }
+
+ return vals;
+ }
+ },
+
+ // returns the step-aligned value that val is closest to, between (inclusive) min and max
+ _trimAlignValue: function( val ) {
+ if ( val <= this._valueMin() ) {
+ return this._valueMin();
+ }
+ if ( val >= this._valueMax() ) {
+ return this._valueMax();
+ }
+ var step = ( this.options.step > 0 ) ? this.options.step : 1,
+ valModStep = (val - this._valueMin()) % step,
+ alignValue = val - valModStep;
+
+ if ( Math.abs(valModStep) * 2 >= step ) {
+ alignValue += ( valModStep > 0 ) ? step : ( -step );
+ }
+
+ // Since JavaScript has problems with large floats, round
+ // the final value to 5 digits after the decimal point (see #4124)
+ return parseFloat( alignValue.toFixed(5) );
+ },
+
+ _valueMin: function() {
+ return this.options.min;
+ },
+
+ _valueMax: function() {
+ return this.options.max;
+ },
+
+ _refreshValue: function() {
+ var oRange = this.options.range,
+ o = this.options,
+ self = this,
+ animate = ( !this._animateOff ) ? o.animate : false,
+ valPercent,
+ _set = {},
+ lastValPercent,
+ value,
+ valueMin,
+ valueMax;
+
+ if ( this.options.values && this.options.values.length ) {
+ this.handles.each(function( i, j ) {
+ valPercent = ( self.values(i) - self._valueMin() ) / ( self._valueMax() - self._valueMin() ) * 100;
+ _set[ self.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
+ $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
+ if ( self.options.range === true ) {
+ if ( self.orientation === "horizontal" ) {
+ if ( i === 0 ) {
+ self.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
+ }
+ if ( i === 1 ) {
+ self.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
+ }
+ } else {
+ if ( i === 0 ) {
+ self.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
+ }
+ if ( i === 1 ) {
+ self.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
+ }
+ }
+ }
+ lastValPercent = valPercent;
+ });
+ } else {
+ value = this.value();
+ valueMin = this._valueMin();
+ valueMax = this._valueMax();
+ valPercent = ( valueMax !== valueMin ) ?
+ ( value - valueMin ) / ( valueMax - valueMin ) * 100 :
+ 0;
+ _set[ self.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
+ this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
+
+ if ( oRange === "min" && this.orientation === "horizontal" ) {
+ this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
+ }
+ if ( oRange === "max" && this.orientation === "horizontal" ) {
+ this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
+ }
+ if ( oRange === "min" && this.orientation === "vertical" ) {
+ this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
+ }
+ if ( oRange === "max" && this.orientation === "vertical" ) {
+ this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
+ }
+ }
+ }
+
+});
+
+$.extend( $.ui.slider, {
+ version: "1.8.16"
+});
+
+}(jQuery));
+/*
+ * jQuery UI Tabs 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+var tabId = 0,
+ listId = 0;
+
+function getNextTabId() {
+ return ++tabId;
+}
+
+function getNextListId() {
+ return ++listId;
+}
+
+$.widget( "ui.tabs", {
+ options: {
+ add: null,
+ ajaxOptions: null,
+ cache: false,
+ cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
+ collapsible: false,
+ disable: null,
+ disabled: [],
+ enable: null,
+ event: "click",
+ fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
+ idPrefix: "ui-tabs-",
+ load: null,
+ panelTemplate: "<div></div>",
+ remove: null,
+ select: null,
+ show: null,
+ spinner: "<em>Loading&#8230;</em>",
+ tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>"
+ },
+
+ _create: function() {
+ this._tabify( true );
+ },
+
+ _setOption: function( key, value ) {
+ if ( key == "selected" ) {
+ if (this.options.collapsible && value == this.options.selected ) {
+ return;
+ }
+ this.select( value );
+ } else {
+ this.options[ key ] = value;
+ this._tabify();
+ }
+ },
+
+ _tabId: function( a ) {
+ return a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF-]/g, "" ) ||
+ this.options.idPrefix + getNextTabId();
+ },
+
+ _sanitizeSelector: function( hash ) {
+ // we need this because an id may contain a ":"
+ return hash.replace( /:/g, "\\:" );
+ },
+
+ _cookie: function() {
+ var cookie = this.cookie ||
+ ( this.cookie = this.options.cookie.name || "ui-tabs-" + getNextListId() );
+ return $.cookie.apply( null, [ cookie ].concat( $.makeArray( arguments ) ) );
+ },
+
+ _ui: function( tab, panel ) {
+ return {
+ tab: tab,
+ panel: panel,
+ index: this.anchors.index( tab )
+ };
+ },
+
+ _cleanup: function() {
+ // restore all former loading tabs labels
+ this.lis.filter( ".ui-state-processing" )
+ .removeClass( "ui-state-processing" )
+ .find( "span:data(label.tabs)" )
+ .each(function() {
+ var el = $( this );
+ el.html( el.data( "label.tabs" ) ).removeData( "label.tabs" );
+ });
+ },
+
+ _tabify: function( init ) {
+ var self = this,
+ o = this.options,
+ fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash
+
+ this.list = this.element.find( "ol,ul" ).eq( 0 );
+ this.lis = $( " > li:has(a[href])", this.list );
+ this.anchors = this.lis.map(function() {
+ return $( "a", this )[ 0 ];
+ });
+ this.panels = $( [] );
+
+ this.anchors.each(function( i, a ) {
+ var href = $( a ).attr( "href" );
+ // For dynamically created HTML that contains a hash as href IE < 8 expands
+ // such href to the full page url with hash and then misinterprets tab as ajax.
+ // Same consideration applies for an added tab with a fragment identifier
+ // since a[href=#fragment-identifier] does unexpectedly not match.
+ // Thus normalize href attribute...
+ var hrefBase = href.split( "#" )[ 0 ],
+ baseEl;
+ if ( hrefBase && ( hrefBase === location.toString().split( "#" )[ 0 ] ||
+ ( baseEl = $( "base" )[ 0 ]) && hrefBase === baseEl.href ) ) {
+ href = a.hash;
+ a.href = href;
+ }
+
+ // inline tab
+ if ( fragmentId.test( href ) ) {
+ self.panels = self.panels.add( self.element.find( self._sanitizeSelector( href ) ) );
+ // remote tab
+ // prevent loading the page itself if href is just "#"
+ } else if ( href && href !== "#" ) {
+ // required for restore on destroy
+ $.data( a, "href.tabs", href );
+
+ // TODO until #3808 is fixed strip fragment identifier from url
+ // (IE fails to load from such url)
+ $.data( a, "load.tabs", href.replace( /#.*$/, "" ) );
+
+ var id = self._tabId( a );
+ a.href = "#" + id;
+ var $panel = self.element.find( "#" + id );
+ if ( !$panel.length ) {
+ $panel = $( o.panelTemplate )
+ .attr( "id", id )
+ .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
+ .insertAfter( self.panels[ i - 1 ] || self.list );
+ $panel.data( "destroy.tabs", true );
+ }
+ self.panels = self.panels.add( $panel );
+ // invalid tab href
+ } else {
+ o.disabled.push( i );
+ }
+ });
+
+ // initialization from scratch
+ if ( init ) {
+ // attach necessary classes for styling
+ this.element.addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" );
+ this.list.addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" );
+ this.lis.addClass( "ui-state-default ui-corner-top" );
+ this.panels.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" );
+
+ // Selected tab
+ // use "selected" option or try to retrieve:
+ // 1. from fragment identifier in url
+ // 2. from cookie
+ // 3. from selected class attribute on <li>
+ if ( o.selected === undefined ) {
+ if ( location.hash ) {
+ this.anchors.each(function( i, a ) {
+ if ( a.hash == location.hash ) {
+ o.selected = i;
+ return false;
+ }
+ });
+ }
+ if ( typeof o.selected !== "number" && o.cookie ) {
+ o.selected = parseInt( self._cookie(), 10 );
+ }
+ if ( typeof o.selected !== "number" && this.lis.filter( ".ui-tabs-selected" ).length ) {
+ o.selected = this.lis.index( this.lis.filter( ".ui-tabs-selected" ) );
+ }
+ o.selected = o.selected || ( this.lis.length ? 0 : -1 );
+ } else if ( o.selected === null ) { // usage of null is deprecated, TODO remove in next release
+ o.selected = -1;
+ }
+
+ // sanity check - default to first tab...
+ o.selected = ( ( o.selected >= 0 && this.anchors[ o.selected ] ) || o.selected < 0 )
+ ? o.selected
+ : 0;
+
+ // Take disabling tabs via class attribute from HTML
+ // into account and update option properly.
+ // A selected tab cannot become disabled.
+ o.disabled = $.unique( o.disabled.concat(
+ $.map( this.lis.filter( ".ui-state-disabled" ), function( n, i ) {
+ return self.lis.index( n );
+ })
+ ) ).sort();
+
+ if ( $.inArray( o.selected, o.disabled ) != -1 ) {
+ o.disabled.splice( $.inArray( o.selected, o.disabled ), 1 );
+ }
+
+ // highlight selected tab
+ this.panels.addClass( "ui-tabs-hide" );
+ this.lis.removeClass( "ui-tabs-selected ui-state-active" );
+ // check for length avoids error when initializing empty list
+ if ( o.selected >= 0 && this.anchors.length ) {
+ self.element.find( self._sanitizeSelector( self.anchors[ o.selected ].hash ) ).removeClass( "ui-tabs-hide" );
+ this.lis.eq( o.selected ).addClass( "ui-tabs-selected ui-state-active" );
+
+ // seems to be expected behavior that the show callback is fired
+ self.element.queue( "tabs", function() {
+ self._trigger( "show", null,
+ self._ui( self.anchors[ o.selected ], self.element.find( self._sanitizeSelector( self.anchors[ o.selected ].hash ) )[ 0 ] ) );
+ });
+
+ this.load( o.selected );
+ }
+
+ // clean up to avoid memory leaks in certain versions of IE 6
+ // TODO: namespace this event
+ $( window ).bind( "unload", function() {
+ self.lis.add( self.anchors ).unbind( ".tabs" );
+ self.lis = self.anchors = self.panels = null;
+ });
+ // update selected after add/remove
+ } else {
+ o.selected = this.lis.index( this.lis.filter( ".ui-tabs-selected" ) );
+ }
+
+ // update collapsible
+ // TODO: use .toggleClass()
+ this.element[ o.collapsible ? "addClass" : "removeClass" ]( "ui-tabs-collapsible" );
+
+ // set or update cookie after init and add/remove respectively
+ if ( o.cookie ) {
+ this._cookie( o.selected, o.cookie );
+ }
+
+ // disable tabs
+ for ( var i = 0, li; ( li = this.lis[ i ] ); i++ ) {
+ $( li )[ $.inArray( i, o.disabled ) != -1 &&
+ // TODO: use .toggleClass()
+ !$( li ).hasClass( "ui-tabs-selected" ) ? "addClass" : "removeClass" ]( "ui-state-disabled" );
+ }
+
+ // reset cache if switching from cached to not cached
+ if ( o.cache === false ) {
+ this.anchors.removeData( "cache.tabs" );
+ }
+
+ // remove all handlers before, tabify may run on existing tabs after add or option change
+ this.lis.add( this.anchors ).unbind( ".tabs" );
+
+ if ( o.event !== "mouseover" ) {
+ var addState = function( state, el ) {
+ if ( el.is( ":not(.ui-state-disabled)" ) ) {
+ el.addClass( "ui-state-" + state );
+ }
+ };
+ var removeState = function( state, el ) {
+ el.removeClass( "ui-state-" + state );
+ };
+ this.lis.bind( "mouseover.tabs" , function() {
+ addState( "hover", $( this ) );
+ });
+ this.lis.bind( "mouseout.tabs", function() {
+ removeState( "hover", $( this ) );
+ });
+ this.anchors.bind( "focus.tabs", function() {
+ addState( "focus", $( this ).closest( "li" ) );
+ });
+ this.anchors.bind( "blur.tabs", function() {
+ removeState( "focus", $( this ).closest( "li" ) );
+ });
+ }
+
+ // set up animations
+ var hideFx, showFx;
+ if ( o.fx ) {
+ if ( $.isArray( o.fx ) ) {
+ hideFx = o.fx[ 0 ];
+ showFx = o.fx[ 1 ];
+ } else {
+ hideFx = showFx = o.fx;
+ }
+ }
+
+ // Reset certain styles left over from animation
+ // and prevent IE's ClearType bug...
+ function resetStyle( $el, fx ) {
+ $el.css( "display", "" );
+ if ( !$.support.opacity && fx.opacity ) {
+ $el[ 0 ].style.removeAttribute( "filter" );
+ }
+ }
+
+ // Show a tab...
+ var showTab = showFx
+ ? function( clicked, $show ) {
+ $( clicked ).closest( "li" ).addClass( "ui-tabs-selected ui-state-active" );
+ $show.hide().removeClass( "ui-tabs-hide" ) // avoid flicker that way
+ .animate( showFx, showFx.duration || "normal", function() {
+ resetStyle( $show, showFx );
+ self._trigger( "show", null, self._ui( clicked, $show[ 0 ] ) );
+ });
+ }
+ : function( clicked, $show ) {
+ $( clicked ).closest( "li" ).addClass( "ui-tabs-selected ui-state-active" );
+ $show.removeClass( "ui-tabs-hide" );
+ self._trigger( "show", null, self._ui( clicked, $show[ 0 ] ) );
+ };
+
+ // Hide a tab, $show is optional...
+ var hideTab = hideFx
+ ? function( clicked, $hide ) {
+ $hide.animate( hideFx, hideFx.duration || "normal", function() {
+ self.lis.removeClass( "ui-tabs-selected ui-state-active" );
+ $hide.addClass( "ui-tabs-hide" );
+ resetStyle( $hide, hideFx );
+ self.element.dequeue( "tabs" );
+ });
+ }
+ : function( clicked, $hide, $show ) {
+ self.lis.removeClass( "ui-tabs-selected ui-state-active" );
+ $hide.addClass( "ui-tabs-hide" );
+ self.element.dequeue( "tabs" );
+ };
+
+ // attach tab event handler, unbind to avoid duplicates from former tabifying...
+ this.anchors.bind( o.event + ".tabs", function() {
+ var el = this,
+ $li = $(el).closest( "li" ),
+ $hide = self.panels.filter( ":not(.ui-tabs-hide)" ),
+ $show = self.element.find( self._sanitizeSelector( el.hash ) );
+
+ // If tab is already selected and not collapsible or tab disabled or
+ // or is already loading or click callback returns false stop here.
+ // Check if click handler returns false last so that it is not executed
+ // for a disabled or loading tab!
+ if ( ( $li.hasClass( "ui-tabs-selected" ) && !o.collapsible) ||
+ $li.hasClass( "ui-state-disabled" ) ||
+ $li.hasClass( "ui-state-processing" ) ||
+ self.panels.filter( ":animated" ).length ||
+ self._trigger( "select", null, self._ui( this, $show[ 0 ] ) ) === false ) {
+ this.blur();
+ return false;
+ }
+
+ o.selected = self.anchors.index( this );
+
+ self.abort();
+
+ // if tab may be closed
+ if ( o.collapsible ) {
+ if ( $li.hasClass( "ui-tabs-selected" ) ) {
+ o.selected = -1;
+
+ if ( o.cookie ) {
+ self._cookie( o.selected, o.cookie );
+ }
+
+ self.element.queue( "tabs", function() {
+ hideTab( el, $hide );
+ }).dequeue( "tabs" );
+
+ this.blur();
+ return false;
+ } else if ( !$hide.length ) {
+ if ( o.cookie ) {
+ self._cookie( o.selected, o.cookie );
+ }
+
+ self.element.queue( "tabs", function() {
+ showTab( el, $show );
+ });
+
+ // TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171
+ self.load( self.anchors.index( this ) );
+
+ this.blur();
+ return false;
+ }
+ }
+
+ if ( o.cookie ) {
+ self._cookie( o.selected, o.cookie );
+ }
+
+ // show new tab
+ if ( $show.length ) {
+ if ( $hide.length ) {
+ self.element.queue( "tabs", function() {
+ hideTab( el, $hide );
+ });
+ }
+ self.element.queue( "tabs", function() {
+ showTab( el, $show );
+ });
+
+ self.load( self.anchors.index( this ) );
+ } else {
+ throw "jQuery UI Tabs: Mismatching fragment identifier.";
+ }
+
+ // Prevent IE from keeping other link focussed when using the back button
+ // and remove dotted border from clicked link. This is controlled via CSS
+ // in modern browsers; blur() removes focus from address bar in Firefox
+ // which can become a usability and annoying problem with tabs('rotate').
+ if ( $.browser.msie ) {
+ this.blur();
+ }
+ });
+
+ // disable click in any case
+ this.anchors.bind( "click.tabs", function(){
+ return false;
+ });
+ },
+
+ _getIndex: function( index ) {
+ // meta-function to give users option to provide a href string instead of a numerical index.
+ // also sanitizes numerical indexes to valid values.
+ if ( typeof index == "string" ) {
+ index = this.anchors.index( this.anchors.filter( "[href$=" + index + "]" ) );
+ }
+
+ return index;
+ },
+
+ destroy: function() {
+ var o = this.options;
+
+ this.abort();
+
+ this.element
+ .unbind( ".tabs" )
+ .removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" )
+ .removeData( "tabs" );
+
+ this.list.removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" );
+
+ this.anchors.each(function() {
+ var href = $.data( this, "href.tabs" );
+ if ( href ) {
+ this.href = href;
+ }
+ var $this = $( this ).unbind( ".tabs" );
+ $.each( [ "href", "load", "cache" ], function( i, prefix ) {
+ $this.removeData( prefix + ".tabs" );
+ });
+ });
+
+ this.lis.unbind( ".tabs" ).add( this.panels ).each(function() {
+ if ( $.data( this, "destroy.tabs" ) ) {
+ $( this ).remove();
+ } else {
+ $( this ).removeClass([
+ "ui-state-default",
+ "ui-corner-top",
+ "ui-tabs-selected",
+ "ui-state-active",
+ "ui-state-hover",
+ "ui-state-focus",
+ "ui-state-disabled",
+ "ui-tabs-panel",
+ "ui-widget-content",
+ "ui-corner-bottom",
+ "ui-tabs-hide"
+ ].join( " " ) );
+ }
+ });
+
+ if ( o.cookie ) {
+ this._cookie( null, o.cookie );
+ }
+
+ return this;
+ },
+
+ add: function( url, label, index ) {
+ if ( index === undefined ) {
+ index = this.anchors.length;
+ }
+
+ var self = this,
+ o = this.options,
+ $li = $( o.tabTemplate.replace( /#\{href\}/g, url ).replace( /#\{label\}/g, label ) ),
+ id = !url.indexOf( "#" ) ? url.replace( "#", "" ) : this._tabId( $( "a", $li )[ 0 ] );
+
+ $li.addClass( "ui-state-default ui-corner-top" ).data( "destroy.tabs", true );
+
+ // try to find an existing element before creating a new one
+ var $panel = self.element.find( "#" + id );
+ if ( !$panel.length ) {
+ $panel = $( o.panelTemplate )
+ .attr( "id", id )
+ .data( "destroy.tabs", true );
+ }
+ $panel.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" );
+
+ if ( index >= this.lis.length ) {
+ $li.appendTo( this.list );
+ $panel.appendTo( this.list[ 0 ].parentNode );
+ } else {
+ $li.insertBefore( this.lis[ index ] );
+ $panel.insertBefore( this.panels[ index ] );
+ }
+
+ o.disabled = $.map( o.disabled, function( n, i ) {
+ return n >= index ? ++n : n;
+ });
+
+ this._tabify();
+
+ if ( this.anchors.length == 1 ) {
+ o.selected = 0;
+ $li.addClass( "ui-tabs-selected ui-state-active" );
+ $panel.removeClass( "ui-tabs-hide" );
+ this.element.queue( "tabs", function() {
+ self._trigger( "show", null, self._ui( self.anchors[ 0 ], self.panels[ 0 ] ) );
+ });
+
+ this.load( 0 );
+ }
+
+ this._trigger( "add", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
+ return this;
+ },
+
+ remove: function( index ) {
+ index = this._getIndex( index );
+ var o = this.options,
+ $li = this.lis.eq( index ).remove(),
+ $panel = this.panels.eq( index ).remove();
+
+ // If selected tab was removed focus tab to the right or
+ // in case the last tab was removed the tab to the left.
+ if ( $li.hasClass( "ui-tabs-selected" ) && this.anchors.length > 1) {
+ this.select( index + ( index + 1 < this.anchors.length ? 1 : -1 ) );
+ }
+
+ o.disabled = $.map(
+ $.grep( o.disabled, function(n, i) {
+ return n != index;
+ }),
+ function( n, i ) {
+ return n >= index ? --n : n;
+ });
+
+ this._tabify();
+
+ this._trigger( "remove", null, this._ui( $li.find( "a" )[ 0 ], $panel[ 0 ] ) );
+ return this;
+ },
+
+ enable: function( index ) {
+ index = this._getIndex( index );
+ var o = this.options;
+ if ( $.inArray( index, o.disabled ) == -1 ) {
+ return;
+ }
+
+ this.lis.eq( index ).removeClass( "ui-state-disabled" );
+ o.disabled = $.grep( o.disabled, function( n, i ) {
+ return n != index;
+ });
+
+ this._trigger( "enable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
+ return this;
+ },
+
+ disable: function( index ) {
+ index = this._getIndex( index );
+ var self = this, o = this.options;
+ // cannot disable already selected tab
+ if ( index != o.selected ) {
+ this.lis.eq( index ).addClass( "ui-state-disabled" );
+
+ o.disabled.push( index );
+ o.disabled.sort();
+
+ this._trigger( "disable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
+ }
+
+ return this;
+ },
+
+ select: function( index ) {
+ index = this._getIndex( index );
+ if ( index == -1 ) {
+ if ( this.options.collapsible && this.options.selected != -1 ) {
+ index = this.options.selected;
+ } else {
+ return this;
+ }
+ }
+ this.anchors.eq( index ).trigger( this.options.event + ".tabs" );
+ return this;
+ },
+
+ load: function( index ) {
+ index = this._getIndex( index );
+ var self = this,
+ o = this.options,
+ a = this.anchors.eq( index )[ 0 ],
+ url = $.data( a, "load.tabs" );
+
+ this.abort();
+
+ // not remote or from cache
+ if ( !url || this.element.queue( "tabs" ).length !== 0 && $.data( a, "cache.tabs" ) ) {
+ this.element.dequeue( "tabs" );
+ return;
+ }
+
+ // load remote from here on
+ this.lis.eq( index ).addClass( "ui-state-processing" );
+
+ if ( o.spinner ) {
+ var span = $( "span", a );
+ span.data( "label.tabs", span.html() ).html( o.spinner );
+ }
+
+ this.xhr = $.ajax( $.extend( {}, o.ajaxOptions, {
+ url: url,
+ success: function( r, s ) {
+ self.element.find( self._sanitizeSelector( a.hash ) ).html( r );
+
+ // take care of tab labels
+ self._cleanup();
+
+ if ( o.cache ) {
+ $.data( a, "cache.tabs", true );
+ }
+
+ self._trigger( "load", null, self._ui( self.anchors[ index ], self.panels[ index ] ) );
+ try {
+ o.ajaxOptions.success( r, s );
+ }
+ catch ( e ) {}
+ },
+ error: function( xhr, s, e ) {
+ // take care of tab labels
+ self._cleanup();
+
+ self._trigger( "load", null, self._ui( self.anchors[ index ], self.panels[ index ] ) );
+ try {
+ // Passing index avoid a race condition when this method is
+ // called after the user has selected another tab.
+ // Pass the anchor that initiated this request allows
+ // loadError to manipulate the tab content panel via $(a.hash)
+ o.ajaxOptions.error( xhr, s, index, a );
+ }
+ catch ( e ) {}
+ }
+ } ) );
+
+ // last, so that load event is fired before show...
+ self.element.dequeue( "tabs" );
+
+ return this;
+ },
+
+ abort: function() {
+ // stop possibly running animations
+ this.element.queue( [] );
+ this.panels.stop( false, true );
+
+ // "tabs" queue must not contain more than two elements,
+ // which are the callbacks for the latest clicked tab...
+ this.element.queue( "tabs", this.element.queue( "tabs" ).splice( -2, 2 ) );
+
+ // terminate pending requests from other tabs
+ if ( this.xhr ) {
+ this.xhr.abort();
+ delete this.xhr;
+ }
+
+ // take care of tab labels
+ this._cleanup();
+ return this;
+ },
+
+ url: function( index, url ) {
+ this.anchors.eq( index ).removeData( "cache.tabs" ).data( "load.tabs", url );
+ return this;
+ },
+
+ length: function() {
+ return this.anchors.length;
+ }
+});
+
+$.extend( $.ui.tabs, {
+ version: "1.8.16"
+});
+
+/*
+ * Tabs Extensions
+ */
+
+/*
+ * Rotate
+ */
+$.extend( $.ui.tabs.prototype, {
+ rotation: null,
+ rotate: function( ms, continuing ) {
+ var self = this,
+ o = this.options;
+
+ var rotate = self._rotate || ( self._rotate = function( e ) {
+ clearTimeout( self.rotation );
+ self.rotation = setTimeout(function() {
+ var t = o.selected;
+ self.select( ++t < self.anchors.length ? t : 0 );
+ }, ms );
+
+ if ( e ) {
+ e.stopPropagation();
+ }
+ });
+
+ var stop = self._unrotate || ( self._unrotate = !continuing
+ ? function(e) {
+ if (e.clientX) { // in case of a true click
+ self.rotate(null);
+ }
+ }
+ : function( e ) {
+ t = o.selected;
+ rotate();
+ });
+
+ // start rotation
+ if ( ms ) {
+ this.element.bind( "tabsshow", rotate );
+ this.anchors.bind( o.event + ".tabs", stop );
+ rotate();
+ // stop rotation
+ } else {
+ clearTimeout( self.rotation );
+ this.element.unbind( "tabsshow", rotate );
+ this.anchors.unbind( o.event + ".tabs", stop );
+ delete this._rotate;
+ delete this._unrotate;
+ }
+
+ return this;
+ }
+});
+
+})( jQuery );
diff --git a/lib/scripts/jquery/jquery-ui.min.js b/lib/scripts/jquery/jquery-ui.min.js
new file mode 100644
index 000000000..0202506b5
--- /dev/null
+++ b/lib/scripts/jquery/jquery-ui.min.js
@@ -0,0 +1,414 @@
+/*!
+ * jQuery UI 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI
+ */
+(function(a,d){function c(h,g){var i=h.nodeName.toLowerCase();if("area"===i){g=h.parentNode;i=g.name;if(!h.href||!i||g.nodeName.toLowerCase()!=="map")return false;h=a("img[usemap=#"+i+"]")[0];return!!h&&e(h)}return(/input|select|textarea|button|object/.test(i)?!h.disabled:"a"==i?h.href||g:g)&&e(h)}function e(h){return!a(h).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(!a.ui.version){a.extend(a.ui,{version:"1.8.16",
+keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(h,g){return typeof h==="number"?this.each(function(){var i=
+this;setTimeout(function(){a(i).focus();g&&g.call(i)},h)}):this._focus.apply(this,arguments)},scrollParent:function(){var h;h=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,
+"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!h.length?a(document):h},zIndex:function(h){if(h!==d)return this.css("zIndex",h);if(this.length){h=a(this[0]);for(var g;h.length&&h[0]!==document;){g=h.css("position");if(g==="absolute"||g==="relative"||g==="fixed"){g=parseInt(h.css("zIndex"),10);if(!isNaN(g)&&g!==0)return g}h=h.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":
+"mousedown")+".ui-disableSelection",function(h){h.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(h,g){function i(l,o,n,k){a.each(b,function(){o-=parseFloat(a.curCSS(l,"padding"+this,true))||0;if(n)o-=parseFloat(a.curCSS(l,"border"+this+"Width",true))||0;if(k)o-=parseFloat(a.curCSS(l,"margin"+this,true))||0});return o}var b=g==="Width"?["Left","Right"]:["Top","Bottom"],f=g.toLowerCase(),j={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,
+outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+g]=function(l){if(l===d)return j["inner"+g].call(this);return this.each(function(){a(this).css(f,i(this,l)+"px")})};a.fn["outer"+g]=function(l,o){if(typeof l!=="number")return j["outer"+g].call(this,l);return this.each(function(){a(this).css(f,i(this,l,true,o)+"px")})}});a.extend(a.expr[":"],{data:function(h,g,i){return!!a.data(h,i[3])},focusable:function(h){return c(h,!isNaN(a.attr(h,"tabindex")))},tabbable:function(h){var g=a.attr(h,
+"tabindex"),i=isNaN(g);return(i||g>=0)&&c(h,!i)}});a(function(){var h=document.body,g=h.appendChild(g=document.createElement("div"));a.extend(g.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=g.offsetHeight===100;a.support.selectstart="onselectstart"in g;h.removeChild(g).style.display="none"});a.extend(a.ui,{plugin:{add:function(h,g,i){h=a.ui[h].prototype;for(var b in i){h.plugins[b]=h.plugins[b]||[];h.plugins[b].push([g,i[b]])}},call:function(h,g,i){if((g=h.plugins[g])&&
+h.element[0].parentNode)for(var b=0;b<g.length;b++)h.options[g[b][0]]&&g[b][1].apply(h.element,i)}},contains:function(h,g){return document.compareDocumentPosition?h.compareDocumentPosition(g)&16:h!==g&&h.contains(g)},hasScroll:function(h,g){if(a(h).css("overflow")==="hidden")return false;g=g&&g==="left"?"scrollLeft":"scrollTop";var i=false;if(h[g]>0)return true;h[g]=1;i=h[g]>0;h[g]=0;return i},isOverAxis:function(h,g,i){return h>g&&h<g+i},isOver:function(h,g,i,b,f,j){return a.ui.isOverAxis(h,i,f)&&
+a.ui.isOverAxis(g,b,j)}})}})(jQuery);
+(function(a,d){if(a.cleanData){var c=a.cleanData;a.cleanData=function(h){for(var g=0,i;(i=h[g])!=null;g++)try{a(i).triggerHandler("remove")}catch(b){}c(h)}}else{var e=a.fn.remove;a.fn.remove=function(h,g){return this.each(function(){if(!g)if(!h||a.filter(h,[this]).length)a("*",this).add([this]).each(function(){try{a(this).triggerHandler("remove")}catch(i){}});return e.call(a(this),h,g)})}}a.widget=function(h,g,i){var b=h.split(".")[0],f;h=h.split(".")[1];f=b+"-"+h;if(!i){i=g;g=a.Widget}a.expr[":"][f]=
+function(j){return!!a.data(j,h)};a[b]=a[b]||{};a[b][h]=function(j,l){arguments.length&&this._createWidget(j,l)};g=new g;g.options=a.extend(true,{},g.options);a[b][h].prototype=a.extend(true,g,{namespace:b,widgetName:h,widgetEventPrefix:a[b][h].prototype.widgetEventPrefix||h,widgetBaseClass:f},i);a.widget.bridge(h,a[b][h])};a.widget.bridge=function(h,g){a.fn[h]=function(i){var b=typeof i==="string",f=Array.prototype.slice.call(arguments,1),j=this;i=!b&&f.length?a.extend.apply(null,[true,i].concat(f)):
+i;if(b&&i.charAt(0)==="_")return j;b?this.each(function(){var l=a.data(this,h),o=l&&a.isFunction(l[i])?l[i].apply(l,f):l;if(o!==l&&o!==d){j=o;return false}}):this.each(function(){var l=a.data(this,h);l?l.option(i||{})._init():a.data(this,h,new g(i,this))});return j}};a.Widget=function(h,g){arguments.length&&this._createWidget(h,g)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(h,g){a.data(g,this.widgetName,this);this.element=a(g);this.options=
+a.extend(true,{},this.options,this._getCreateOptions(),h);var i=this;this.element.bind("remove."+this.widgetName,function(){i.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+
+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(h,g){var i=h;if(arguments.length===0)return a.extend({},this.options);if(typeof h==="string"){if(g===d)return this.options[h];i={};i[h]=g}this._setOptions(i);return this},_setOptions:function(h){var g=this;a.each(h,function(i,b){g._setOption(i,b)});return this},_setOption:function(h,g){this.options[h]=g;if(h==="disabled")this.widget()[g?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",
+g);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(h,g,i){var b=this.options[h];g=a.Event(g);g.type=(h===this.widgetEventPrefix?h:this.widgetEventPrefix+h).toLowerCase();i=i||{};if(g.originalEvent){h=a.event.props.length;for(var f;h;){f=a.event.props[--h];g[f]=g.originalEvent[f]}}this.element.trigger(g,i);return!(a.isFunction(b)&&b.call(this.element[0],g,i)===false||g.isDefaultPrevented())}}})(jQuery);
+(function(a){var d=false;a(document).mouseup(function(){d=false});a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var c=this;this.element.bind("mousedown."+this.widgetName,function(e){return c._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===a.data(e.target,c.widgetName+".preventClickEvent")){a.removeData(e.target,c.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+
+this.widgetName)},_mouseDown:function(c){if(!d){this._mouseStarted&&this._mouseUp(c);this._mouseDownEvent=c;var e=this,h=c.which==1,g=typeof this.options.cancel=="string"&&c.target.nodeName?a(c.target).closest(this.options.cancel).length:false;if(!h||g||!this._mouseCapture(c))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)){this._mouseStarted=
+this._mouseStart(c)!==false;if(!this._mouseStarted){c.preventDefault();return true}}true===a.data(c.target,this.widgetName+".preventClickEvent")&&a.removeData(c.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(i){return e._mouseMove(i)};this._mouseUpDelegate=function(i){return e._mouseUp(i)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.preventDefault();return d=true}},_mouseMove:function(c){if(a.browser.msie&&
+!(document.documentMode>=9)&&!c.button)return this._mouseUp(c);if(this._mouseStarted){this._mouseDrag(c);return c.preventDefault()}if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,c)!==false)?this._mouseDrag(c):this._mouseUp(c);return!this._mouseStarted},_mouseUp:function(c){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=
+false;c.target==this._mouseDownEvent.target&&a.data(c.target,this.widgetName+".preventClickEvent",true);this._mouseStop(c)}return false},_mouseDistanceMet:function(c){return Math.max(Math.abs(this._mouseDownEvent.pageX-c.pageX),Math.abs(this._mouseDownEvent.pageY-c.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
+(function(a){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
+"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(d){var c=
+this.options;if(this.helper||c.disabled||a(d.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(d);if(!this.handle)return false;if(c.iframeFix)a(c.iframeFix===true?"iframe":c.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(a(this).offset()).appendTo("body")});return true},_mouseStart:function(d){var c=this.options;
+this.helper=this._createHelper(d);this._cacheHelperProportions();if(a.ui.ddmanager)a.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:d.pageX-this.offset.left,top:d.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
+this.originalPosition=this.position=this._generatePosition(d);this.originalPageX=d.pageX;this.originalPageY=d.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);c.containment&&this._setContainment();if(this._trigger("start",d)===false){this._clear();return false}this._cacheHelperProportions();a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,d);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(d,true);a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,d);return true},
+_mouseDrag:function(d,c){this.position=this._generatePosition(d);this.positionAbs=this._convertPositionTo("absolute");if(!c){c=this._uiHash();if(this._trigger("drag",d,c)===false){this._mouseUp({});return false}this.position=c.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";a.ui.ddmanager&&a.ui.ddmanager.drag(this,d);return false},_mouseStop:function(d){var c=
+false;if(a.ui.ddmanager&&!this.options.dropBehaviour)c=a.ui.ddmanager.drop(this,d);if(this.dropped){c=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!c||this.options.revert=="valid"&&c||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var e=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,
+10),function(){e._trigger("stop",d)!==false&&e._clear()})}else this._trigger("stop",d)!==false&&this._clear();return false},_mouseUp:function(d){this.options.iframeFix===true&&a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,d);return a.ui.mouse.prototype._mouseUp.call(this,d)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(d){var c=!this.options.handle||
+!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==d.target)c=true});return c},_createHelper:function(d){var c=this.options;d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[d])):c.helper=="clone"?this.element.clone().removeAttr("id"):this.element;d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo);d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))&&
+d.css("position","absolute");return d},_adjustOffsetFromHelper:function(d){if(typeof d=="string")d=d.split(" ");if(a.isArray(d))d={left:+d[0],top:+d[1]||0};if("left"in d)this.offset.click.left=d.left+this.margins.left;if("right"in d)this.offset.click.left=this.helperProportions.width-d.right+this.margins.left;if("top"in d)this.offset.click.top=d.top+this.margins.top;if("bottom"in d)this.offset.click.top=this.helperProportions.height-d.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=
+this.helper.offsetParent();var d=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){d.left+=this.scrollParent.scrollLeft();d.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)d={top:0,left:0};return{top:d.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:d.left+(parseInt(this.offsetParent.css("borderLeftWidth"),
+10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var d=this.element.position();return{top:d.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:d.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),
+10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var d=this.options;if(d.containment=="parent")d.containment=this.helper[0].parentNode;if(d.containment=="document"||d.containment=="window")this.containment=[d.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,d.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,
+(d.containment=="document"?0:a(window).scrollLeft())+a(d.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d.containment=="document"?0:a(window).scrollTop())+(a(d.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(d.containment)&&d.containment.constructor!=Array){d=a(d.containment);var c=d[0];if(c){d.offset();var e=a(c).css("overflow")!=
+"hidden";this.containment=[(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0),(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0),(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),
+10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=d}}else if(d.containment.constructor==Array)this.containment=d.containment},_convertPositionTo:function(d,c){if(!c)c=this.position;d=d=="absolute"?1:-1;var e=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=/(html|body)/i.test(e[0].tagName);return{top:c.top+
+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():h?0:e.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:e.scrollLeft())*d)}},_generatePosition:function(d){var c=this.options,e=this.cssPosition=="absolute"&&
+!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=/(html|body)/i.test(e[0].tagName),g=d.pageX,i=d.pageY;if(this.originalPosition){var b;if(this.containment){if(this.relative_container){b=this.relative_container.offset();b=[this.containment[0]+b.left,this.containment[1]+b.top,this.containment[2]+b.left,this.containment[3]+b.top]}else b=this.containment;if(d.pageX-this.offset.click.left<b[0])g=b[0]+this.offset.click.left;
+if(d.pageY-this.offset.click.top<b[1])i=b[1]+this.offset.click.top;if(d.pageX-this.offset.click.left>b[2])g=b[2]+this.offset.click.left;if(d.pageY-this.offset.click.top>b[3])i=b[3]+this.offset.click.top}if(c.grid){i=c.grid[1]?this.originalPageY+Math.round((i-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY;i=b?!(i-this.offset.click.top<b[1]||i-this.offset.click.top>b[3])?i:!(i-this.offset.click.top<b[1])?i-c.grid[1]:i+c.grid[1]:i;g=c.grid[0]?this.originalPageX+Math.round((g-this.originalPageX)/
+c.grid[0])*c.grid[0]:this.originalPageX;g=b?!(g-this.offset.click.left<b[0]||g-this.offset.click.left>b[2])?g:!(g-this.offset.click.left<b[0])?g-c.grid[0]:g+c.grid[0]:g}}return{top:i-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():h?0:e.scrollTop()),left:g-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<
+526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:e.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(d,c,e){e=e||this._uiHash();a.ui.plugin.call(this,d,[c,e]);if(d=="drag")this.positionAbs=this._convertPositionTo("absolute");return a.Widget.prototype._trigger.call(this,d,c,
+e)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"1.8.16"});a.ui.plugin.add("draggable","connectToSortable",{start:function(d,c){var e=a(this).data("draggable"),h=e.options,g=a.extend({},c,{item:e.element});e.sortables=[];a(h.connectToSortable).each(function(){var i=a.data(this,"sortable");if(i&&!i.options.disabled){e.sortables.push({instance:i,shouldRevert:i.options.revert});
+i.refreshPositions();i._trigger("activate",d,g)}})},stop:function(d,c){var e=a(this).data("draggable"),h=a.extend({},c,{item:e.element});a.each(e.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;e.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(d);this.instance.options.helper=this.instance.options._helper;e.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=
+false;this.instance._trigger("deactivate",d,h)}})},drag:function(d,c){var e=a(this).data("draggable"),h=this;a.each(e.sortables,function(){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(h).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);
+this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return c.helper[0]};d.target=this.instance.currentItem[0];this.instance._mouseCapture(d,true);this.instance._mouseStart(d,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;
+e._trigger("toSortable",d);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}this.instance.currentItem&&this.instance._mouseDrag(d)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",d,this.instance._uiHash(this.instance));this.instance._mouseStop(d,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&
+this.instance.placeholder.remove();e._trigger("fromSortable",d);e.dropped=false}})}});a.ui.plugin.add("draggable","cursor",{start:function(){var d=a("body"),c=a(this).data("draggable").options;if(d.css("cursor"))c._cursor=d.css("cursor");d.css("cursor",c.cursor)},stop:function(){var d=a(this).data("draggable").options;d._cursor&&a("body").css("cursor",d._cursor)}});a.ui.plugin.add("draggable","opacity",{start:function(d,c){d=a(c.helper);c=a(this).data("draggable").options;if(d.css("opacity"))c._opacity=
+d.css("opacity");d.css("opacity",c.opacity)},stop:function(d,c){d=a(this).data("draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var d=a(this).data("draggable");if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML")d.overflowOffset=d.scrollParent.offset()},drag:function(d){var c=a(this).data("draggable"),e=c.options,h=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!=
+"x")if(c.overflowOffset.top+c.scrollParent[0].offsetHeight-d.pageY<e.scrollSensitivity)c.scrollParent[0].scrollTop=h=c.scrollParent[0].scrollTop+e.scrollSpeed;else if(d.pageY-c.overflowOffset.top<e.scrollSensitivity)c.scrollParent[0].scrollTop=h=c.scrollParent[0].scrollTop-e.scrollSpeed;if(!e.axis||e.axis!="y")if(c.overflowOffset.left+c.scrollParent[0].offsetWidth-d.pageX<e.scrollSensitivity)c.scrollParent[0].scrollLeft=h=c.scrollParent[0].scrollLeft+e.scrollSpeed;else if(d.pageX-c.overflowOffset.left<
+e.scrollSensitivity)c.scrollParent[0].scrollLeft=h=c.scrollParent[0].scrollLeft-e.scrollSpeed}else{if(!e.axis||e.axis!="x")if(d.pageY-a(document).scrollTop()<e.scrollSensitivity)h=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed);else if(a(window).height()-(d.pageY-a(document).scrollTop())<e.scrollSensitivity)h=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed);if(!e.axis||e.axis!="y")if(d.pageX-a(document).scrollLeft()<e.scrollSensitivity)h=a(document).scrollLeft(a(document).scrollLeft()-
+e.scrollSpeed);else if(a(window).width()-(d.pageX-a(document).scrollLeft())<e.scrollSensitivity)h=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed)}h!==false&&a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(c,d)}});a.ui.plugin.add("draggable","snap",{start:function(){var d=a(this).data("draggable"),c=d.options;d.snapElements=[];a(c.snap.constructor!=String?c.snap.items||":data(draggable)":c.snap).each(function(){var e=a(this),h=e.offset();this!=d.element[0]&&d.snapElements.push({item:this,
+width:e.outerWidth(),height:e.outerHeight(),top:h.top,left:h.left})})},drag:function(d,c){for(var e=a(this).data("draggable"),h=e.options,g=h.snapTolerance,i=c.offset.left,b=i+e.helperProportions.width,f=c.offset.top,j=f+e.helperProportions.height,l=e.snapElements.length-1;l>=0;l--){var o=e.snapElements[l].left,n=o+e.snapElements[l].width,k=e.snapElements[l].top,m=k+e.snapElements[l].height;if(o-g<i&&i<n+g&&k-g<f&&f<m+g||o-g<i&&i<n+g&&k-g<j&&j<m+g||o-g<b&&b<n+g&&k-g<f&&f<m+g||o-g<b&&b<n+g&&k-g<j&&
+j<m+g){if(h.snapMode!="inner"){var p=Math.abs(k-j)<=g,q=Math.abs(m-f)<=g,s=Math.abs(o-b)<=g,r=Math.abs(n-i)<=g;if(p)c.position.top=e._convertPositionTo("relative",{top:k-e.helperProportions.height,left:0}).top-e.margins.top;if(q)c.position.top=e._convertPositionTo("relative",{top:m,left:0}).top-e.margins.top;if(s)c.position.left=e._convertPositionTo("relative",{top:0,left:o-e.helperProportions.width}).left-e.margins.left;if(r)c.position.left=e._convertPositionTo("relative",{top:0,left:n}).left-e.margins.left}var u=
+p||q||s||r;if(h.snapMode!="outer"){p=Math.abs(k-f)<=g;q=Math.abs(m-j)<=g;s=Math.abs(o-i)<=g;r=Math.abs(n-b)<=g;if(p)c.position.top=e._convertPositionTo("relative",{top:k,left:0}).top-e.margins.top;if(q)c.position.top=e._convertPositionTo("relative",{top:m-e.helperProportions.height,left:0}).top-e.margins.top;if(s)c.position.left=e._convertPositionTo("relative",{top:0,left:o}).left-e.margins.left;if(r)c.position.left=e._convertPositionTo("relative",{top:0,left:n-e.helperProportions.width}).left-e.margins.left}if(!e.snapElements[l].snapping&&
+(p||q||s||r||u))e.options.snap.snap&&e.options.snap.snap.call(e.element,d,a.extend(e._uiHash(),{snapItem:e.snapElements[l].item}));e.snapElements[l].snapping=p||q||s||r||u}else{e.snapElements[l].snapping&&e.options.snap.release&&e.options.snap.release.call(e.element,d,a.extend(e._uiHash(),{snapItem:e.snapElements[l].item}));e.snapElements[l].snapping=false}}}});a.ui.plugin.add("draggable","stack",{start:function(){var d=a(this).data("draggable").options;d=a.makeArray(a(d.stack)).sort(function(e,h){return(parseInt(a(e).css("zIndex"),
+10)||0)-(parseInt(a(h).css("zIndex"),10)||0)});if(d.length){var c=parseInt(d[0].style.zIndex)||0;a(d).each(function(e){this.style.zIndex=c+e});this[0].style.zIndex=c+d.length}}});a.ui.plugin.add("draggable","zIndex",{start:function(d,c){d=a(c.helper);c=a(this).data("draggable").options;if(d.css("zIndex"))c._zIndex=d.css("zIndex");d.css("zIndex",c.zIndex)},stop:function(d,c){d=a(this).data("draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})})(jQuery);
+(function(a){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var d=this.options,c=d.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(c)?c:function(e){return e.is(c)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[d.scope]=a.ui.ddmanager.droppables[d.scope]||[];a.ui.ddmanager.droppables[d.scope].push(this);
+d.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var d=a.ui.ddmanager.droppables[this.options.scope],c=0;c<d.length;c++)d[c]==this&&d.splice(c,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(d,c){if(d=="accept")this.accept=a.isFunction(c)?c:function(e){return e.is(c)};a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(d){var c=a.ui.ddmanager.current;this.options.activeClass&&
+this.element.addClass(this.options.activeClass);c&&this._trigger("activate",d,this.ui(c))},_deactivate:function(d){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);c&&this._trigger("deactivate",d,this.ui(c))},_over:function(d){var c=a.ui.ddmanager.current;if(!(!c||(c.currentItem||c.element)[0]==this.element[0]))if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
+this._trigger("over",d,this.ui(c))}},_out:function(d){var c=a.ui.ddmanager.current;if(!(!c||(c.currentItem||c.element)[0]==this.element[0]))if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",d,this.ui(c))}},_drop:function(d,c){var e=c||a.ui.ddmanager.current;if(!e||(e.currentItem||e.element)[0]==this.element[0])return false;var h=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=
+a.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==e.options.scope&&g.accept.call(g.element[0],e.currentItem||e.element)&&a.ui.intersect(e,a.extend(g,{offset:g.element.offset()}),g.options.tolerance)){h=true;return false}});if(h)return false;if(this.accept.call(this.element[0],e.currentItem||e.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",
+d,this.ui(e));return this.element}return false},ui:function(d){return{draggable:d.currentItem||d.element,helper:d.helper,position:d.position,offset:d.positionAbs}}});a.extend(a.ui.droppable,{version:"1.8.16"});a.ui.intersect=function(d,c,e){if(!c.offset)return false;var h=(d.positionAbs||d.position.absolute).left,g=h+d.helperProportions.width,i=(d.positionAbs||d.position.absolute).top,b=i+d.helperProportions.height,f=c.offset.left,j=f+c.proportions.width,l=c.offset.top,o=l+c.proportions.height;
+switch(e){case "fit":return f<=h&&g<=j&&l<=i&&b<=o;case "intersect":return f<h+d.helperProportions.width/2&&g-d.helperProportions.width/2<j&&l<i+d.helperProportions.height/2&&b-d.helperProportions.height/2<o;case "pointer":return a.ui.isOver((d.positionAbs||d.position.absolute).top+(d.clickOffset||d.offset.click).top,(d.positionAbs||d.position.absolute).left+(d.clickOffset||d.offset.click).left,l,f,c.proportions.height,c.proportions.width);case "touch":return(i>=l&&i<=o||b>=l&&b<=o||i<l&&b>o)&&(h>=
+f&&h<=j||g>=f&&g<=j||h<f&&g>j);default:return false}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(d,c){var e=a.ui.ddmanager.droppables[d.options.scope]||[],h=c?c.type:null,g=(d.currentItem||d.element).find(":data(droppable)").andSelf(),i=0;a:for(;i<e.length;i++)if(!(e[i].options.disabled||d&&!e[i].accept.call(e[i].element[0],d.currentItem||d.element))){for(var b=0;b<g.length;b++)if(g[b]==e[i].element[0]){e[i].proportions.height=0;continue a}e[i].visible=e[i].element.css("display")!=
+"none";if(e[i].visible){h=="mousedown"&&e[i]._activate.call(e[i],c);e[i].offset=e[i].element.offset();e[i].proportions={width:e[i].element[0].offsetWidth,height:e[i].element[0].offsetHeight}}}},drop:function(d,c){var e=false;a.each(a.ui.ddmanager.droppables[d.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&a.ui.intersect(d,this,this.options.tolerance))e=e||this._drop.call(this,c);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],d.currentItem||
+d.element)){this.isout=1;this.isover=0;this._deactivate.call(this,c)}}});return e},dragStart:function(d,c){d.element.parents(":not(body,html)").bind("scroll.droppable",function(){d.options.refreshPositions||a.ui.ddmanager.prepareOffsets(d,c)})},drag:function(d,c){d.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(d,c);a.each(a.ui.ddmanager.droppables[d.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var e=a.ui.intersect(d,this,this.options.tolerance);
+if(e=!e&&this.isover==1?"isout":e&&this.isover==0?"isover":null){var h;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){h=a.data(g[0],"droppable");h.greedyChild=e=="isover"?1:0}}if(h&&e=="isover"){h.isover=0;h.isout=1;h._out.call(h,c)}this[e]=1;this[e=="isout"?"isover":"isout"]=0;this[e=="isover"?"_over":"_out"].call(this,c);if(h&&e=="isout"){h.isout=0;h.isover=1;h._over.call(h,c)}}}})},dragStop:function(d,c){d.element.parents(":not(body,html)").unbind("scroll.droppable");
+d.options.refreshPositions||a.ui.ddmanager.prepareOffsets(d,c)}}})(jQuery);
+(function(a){a.widget("ui.resizable",a.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var e=this,h=this.options;this.element.addClass("ui-resizable");a.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,
+_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&a.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
+top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
+this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=h.handles||(!a(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",
+nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var g=this.handles.split(",");this.handles={};for(var i=0;i<g.length;i++){var b=a.trim(g[i]),f=a('<div class="ui-resizable-handle '+("ui-resizable-"+b)+'"></div>');/sw|se|ne|nw/.test(b)&&f.css({zIndex:++h.zIndex});"se"==b&&f.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[b]=".ui-resizable-"+b;this.element.append(f)}}this._renderAxis=function(j){j=j||this.element;for(var l in this.handles){if(this.handles[l].constructor==
+String)this.handles[l]=a(this.handles[l],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=a(this.handles[l],this.element),n=0;n=/sw|ne|nw|se|n|s/.test(l)?o.outerHeight():o.outerWidth();o=["padding",/ne|nw|n/.test(l)?"Top":/se|sw|s/.test(l)?"Bottom":/^e$/.test(l)?"Right":"Left"].join("");j.css(o,n);this._proportionallyResize()}a(this.handles[l])}};this._renderAxis(this.element);this._handles=a(".ui-resizable-handle",this.element).disableSelection();
+this._handles.mouseover(function(){if(!e.resizing){if(this.className)var j=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);e.axis=j&&j[1]?j[1]:"se"}});if(h.autoHide){this._handles.hide();a(this.element).addClass("ui-resizable-autohide").hover(function(){if(!h.disabled){a(this).removeClass("ui-resizable-autohide");e._handles.show()}},function(){if(!h.disabled)if(!e.resizing){a(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();
+var e=function(g){a(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var h=this.element;h.after(this.originalElement.css({position:h.css("position"),width:h.outerWidth(),height:h.outerHeight(),top:h.css("top"),left:h.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(e){var h=
+false;for(var g in this.handles)if(a(this.handles[g])[0]==e.target)h=true;return!this.options.disabled&&h},_mouseStart:function(e){var h=this.options,g=this.element.position(),i=this.element;this.resizing=true;this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()};if(i.is(".ui-draggable")||/absolute/.test(i.css("position")))i.css({position:"absolute",top:g.top,left:g.left});a.browser.opera&&/relative/.test(i.css("position"))&&i.css({position:"relative",top:"auto",left:"auto"});
+this._renderProxy();g=d(this.helper.css("left"));var b=d(this.helper.css("top"));if(h.containment){g+=a(h.containment).scrollLeft()||0;b+=a(h.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:g,top:b};this.size=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};this.originalSize=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};this.originalPosition={left:g,top:b};this.sizeDiff=
+{width:i.outerWidth()-i.width(),height:i.outerHeight()-i.height()};this.originalMousePosition={left:e.pageX,top:e.pageY};this.aspectRatio=typeof h.aspectRatio=="number"?h.aspectRatio:this.originalSize.width/this.originalSize.height||1;h=a(".ui-resizable-"+this.axis).css("cursor");a("body").css("cursor",h=="auto"?this.axis+"-resize":h);i.addClass("ui-resizable-resizing");this._propagate("start",e);return true},_mouseDrag:function(e){var h=this.helper,g=this.originalMousePosition,i=this._change[this.axis];
+if(!i)return false;g=i.apply(this,[e,e.pageX-g.left||0,e.pageY-g.top||0]);this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey)g=this._updateRatio(g,e);g=this._respectSize(g,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(g);this._trigger("resize",e,this.ui());return false},
+_mouseStop:function(e){this.resizing=false;var h=this.options,g=this;if(this._helper){var i=this._proportionallyResizeElements,b=i.length&&/textarea/i.test(i[0].nodeName);i=b&&a.ui.hasScroll(i[0],"left")?0:g.sizeDiff.height;b=b?0:g.sizeDiff.width;b={width:g.helper.width()-b,height:g.helper.height()-i};i=parseInt(g.element.css("left"),10)+(g.position.left-g.originalPosition.left)||null;var f=parseInt(g.element.css("top"),10)+(g.position.top-g.originalPosition.top)||null;h.animate||this.element.css(a.extend(b,
+{top:f,left:i}));g.helper.height(g.size.height);g.helper.width(g.size.width);this._helper&&!h.animate&&this._proportionallyResize()}a("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",e);this._helper&&this.helper.remove();return false},_updateVirtualBoundaries:function(e){var h=this.options,g,i,b;h={minWidth:c(h.minWidth)?h.minWidth:0,maxWidth:c(h.maxWidth)?h.maxWidth:Infinity,minHeight:c(h.minHeight)?h.minHeight:0,maxHeight:c(h.maxHeight)?h.maxHeight:
+Infinity};if(this._aspectRatio||e){e=h.minHeight*this.aspectRatio;i=h.minWidth/this.aspectRatio;g=h.maxHeight*this.aspectRatio;b=h.maxWidth/this.aspectRatio;if(e>h.minWidth)h.minWidth=e;if(i>h.minHeight)h.minHeight=i;if(g<h.maxWidth)h.maxWidth=g;if(b<h.maxHeight)h.maxHeight=b}this._vBoundaries=h},_updateCache:function(e){this.offset=this.helper.offset();if(c(e.left))this.position.left=e.left;if(c(e.top))this.position.top=e.top;if(c(e.height))this.size.height=e.height;if(c(e.width))this.size.width=
+e.width},_updateRatio:function(e){var h=this.position,g=this.size,i=this.axis;if(c(e.height))e.width=e.height*this.aspectRatio;else if(c(e.width))e.height=e.width/this.aspectRatio;if(i=="sw"){e.left=h.left+(g.width-e.width);e.top=null}if(i=="nw"){e.top=h.top+(g.height-e.height);e.left=h.left+(g.width-e.width)}return e},_respectSize:function(e){var h=this._vBoundaries,g=this.axis,i=c(e.width)&&h.maxWidth&&h.maxWidth<e.width,b=c(e.height)&&h.maxHeight&&h.maxHeight<e.height,f=c(e.width)&&h.minWidth&&
+h.minWidth>e.width,j=c(e.height)&&h.minHeight&&h.minHeight>e.height;if(f)e.width=h.minWidth;if(j)e.height=h.minHeight;if(i)e.width=h.maxWidth;if(b)e.height=h.maxHeight;var l=this.originalPosition.left+this.originalSize.width,o=this.position.top+this.size.height,n=/sw|nw|w/.test(g);g=/nw|ne|n/.test(g);if(f&&n)e.left=l-h.minWidth;if(i&&n)e.left=l-h.maxWidth;if(j&&g)e.top=o-h.minHeight;if(b&&g)e.top=o-h.maxHeight;if((h=!e.width&&!e.height)&&!e.left&&e.top)e.top=null;else if(h&&!e.top&&e.left)e.left=
+null;return e},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e=this.helper||this.element,h=0;h<this._proportionallyResizeElements.length;h++){var g=this._proportionallyResizeElements[h];if(!this.borderDif){var i=[g.css("borderTopWidth"),g.css("borderRightWidth"),g.css("borderBottomWidth"),g.css("borderLeftWidth")],b=[g.css("paddingTop"),g.css("paddingRight"),g.css("paddingBottom"),g.css("paddingLeft")];this.borderDif=a.map(i,function(f,j){f=parseInt(f,10)||
+0;j=parseInt(b[j],10)||0;return f+j})}a.browser.msie&&(a(e).is(":hidden")||a(e).parents(":hidden").length)||g.css({height:e.height()-this.borderDif[0]-this.borderDif[2]||0,width:e.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var e=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||a('<div style="overflow:hidden;"></div>');var h=a.browser.msie&&a.browser.version<7,g=h?1:0;h=h?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+
+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++e.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(e,h){return{width:this.originalSize.width+h}},w:function(e,h){return{left:this.originalPosition.left+h,width:this.originalSize.width-h}},n:function(e,h,g){return{top:this.originalPosition.top+g,height:this.originalSize.height-g}},s:function(e,h,g){return{height:this.originalSize.height+
+g}},se:function(e,h,g){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,h,g]))},sw:function(e,h,g){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,h,g]))},ne:function(e,h,g){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,h,g]))},nw:function(e,h,g){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,h,g]))}},_propagate:function(e,h){a.ui.plugin.call(this,e,[h,this.ui()]);
+e!="resize"&&this._trigger(e,h,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});a.extend(a.ui.resizable,{version:"1.8.16"});a.ui.plugin.add("resizable","alsoResize",{start:function(){var e=a(this).data("resizable").options,h=function(g){a(g).each(function(){var i=a(this);i.data("resizable-alsoresize",{width:parseInt(i.width(),
+10),height:parseInt(i.height(),10),left:parseInt(i.css("left"),10),top:parseInt(i.css("top"),10),position:i.css("position")})})};if(typeof e.alsoResize=="object"&&!e.alsoResize.parentNode)if(e.alsoResize.length){e.alsoResize=e.alsoResize[0];h(e.alsoResize)}else a.each(e.alsoResize,function(g){h(g)});else h(e.alsoResize)},resize:function(e,h){var g=a(this).data("resizable");e=g.options;var i=g.originalSize,b=g.originalPosition,f={height:g.size.height-i.height||0,width:g.size.width-i.width||0,top:g.position.top-
+b.top||0,left:g.position.left-b.left||0},j=function(l,o){a(l).each(function(){var n=a(this),k=a(this).data("resizable-alsoresize"),m={},p=o&&o.length?o:n.parents(h.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(p,function(q,s){if((q=(k[s]||0)+(f[s]||0))&&q>=0)m[s]=q||null});if(a.browser.opera&&/relative/.test(n.css("position"))){g._revertToRelativePosition=true;n.css({position:"absolute",top:"auto",left:"auto"})}n.css(m)})};typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?
+a.each(e.alsoResize,function(l,o){j(l,o)}):j(e.alsoResize)},stop:function(){var e=a(this).data("resizable"),h=e.options,g=function(i){a(i).each(function(){var b=a(this);b.css({position:b.data("resizable-alsoresize").position})})};if(e._revertToRelativePosition){e._revertToRelativePosition=false;typeof h.alsoResize=="object"&&!h.alsoResize.nodeType?a.each(h.alsoResize,function(i){g(i)}):g(h.alsoResize)}a(this).removeData("resizable-alsoresize")}});a.ui.plugin.add("resizable","animate",{stop:function(e){var h=
+a(this).data("resizable"),g=h.options,i=h._proportionallyResizeElements,b=i.length&&/textarea/i.test(i[0].nodeName),f=b&&a.ui.hasScroll(i[0],"left")?0:h.sizeDiff.height;b={width:h.size.width-(b?0:h.sizeDiff.width),height:h.size.height-f};f=parseInt(h.element.css("left"),10)+(h.position.left-h.originalPosition.left)||null;var j=parseInt(h.element.css("top"),10)+(h.position.top-h.originalPosition.top)||null;h.element.animate(a.extend(b,j&&f?{top:j,left:f}:{}),{duration:g.animateDuration,easing:g.animateEasing,
+step:function(){var l={width:parseInt(h.element.css("width"),10),height:parseInt(h.element.css("height"),10),top:parseInt(h.element.css("top"),10),left:parseInt(h.element.css("left"),10)};i&&i.length&&a(i[0]).css({width:l.width,height:l.height});h._updateCache(l);h._propagate("resize",e)}})}});a.ui.plugin.add("resizable","containment",{start:function(){var e=a(this).data("resizable"),h=e.element,g=e.options.containment;if(h=g instanceof a?g.get(0):/parent/.test(g)?h.parent().get(0):g){e.containerElement=
+a(h);if(/document/.test(g)||g==document){e.containerOffset={left:0,top:0};e.containerPosition={left:0,top:0};e.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{var i=a(h),b=[];a(["Top","Right","Left","Bottom"]).each(function(l,o){b[l]=d(i.css("padding"+o))});e.containerOffset=i.offset();e.containerPosition=i.position();e.containerSize={height:i.innerHeight()-b[3],width:i.innerWidth()-b[1]};g=e.containerOffset;
+var f=e.containerSize.height,j=e.containerSize.width;j=a.ui.hasScroll(h,"left")?h.scrollWidth:j;f=a.ui.hasScroll(h)?h.scrollHeight:f;e.parentData={element:h,left:g.left,top:g.top,width:j,height:f}}}},resize:function(e){var h=a(this).data("resizable"),g=h.options,i=h.containerOffset,b=h.position;e=h._aspectRatio||e.shiftKey;var f={top:0,left:0},j=h.containerElement;if(j[0]!=document&&/static/.test(j.css("position")))f=i;if(b.left<(h._helper?i.left:0)){h.size.width+=h._helper?h.position.left-i.left:
+h.position.left-f.left;if(e)h.size.height=h.size.width/g.aspectRatio;h.position.left=g.helper?i.left:0}if(b.top<(h._helper?i.top:0)){h.size.height+=h._helper?h.position.top-i.top:h.position.top;if(e)h.size.width=h.size.height*g.aspectRatio;h.position.top=h._helper?i.top:0}h.offset.left=h.parentData.left+h.position.left;h.offset.top=h.parentData.top+h.position.top;g=Math.abs((h._helper?h.offset.left-f.left:h.offset.left-f.left)+h.sizeDiff.width);i=Math.abs((h._helper?h.offset.top-f.top:h.offset.top-
+i.top)+h.sizeDiff.height);b=h.containerElement.get(0)==h.element.parent().get(0);f=/relative|absolute/.test(h.containerElement.css("position"));if(b&&f)g-=h.parentData.left;if(g+h.size.width>=h.parentData.width){h.size.width=h.parentData.width-g;if(e)h.size.height=h.size.width/h.aspectRatio}if(i+h.size.height>=h.parentData.height){h.size.height=h.parentData.height-i;if(e)h.size.width=h.size.height*h.aspectRatio}},stop:function(){var e=a(this).data("resizable"),h=e.options,g=e.containerOffset,i=e.containerPosition,
+b=e.containerElement,f=a(e.helper),j=f.offset(),l=f.outerWidth()-e.sizeDiff.width;f=f.outerHeight()-e.sizeDiff.height;e._helper&&!h.animate&&/relative/.test(b.css("position"))&&a(this).css({left:j.left-i.left-g.left,width:l,height:f});e._helper&&!h.animate&&/static/.test(b.css("position"))&&a(this).css({left:j.left-i.left-g.left,width:l,height:f})}});a.ui.plugin.add("resizable","ghost",{start:function(){var e=a(this).data("resizable"),h=e.options,g=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,
+display:"block",position:"relative",height:g.height,width:g.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");e.ghost.appendTo(e.helper)},resize:function(){var e=a(this).data("resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=a(this).data("resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}});a.ui.plugin.add("resizable","grid",{resize:function(){var e=
+a(this).data("resizable"),h=e.options,g=e.size,i=e.originalSize,b=e.originalPosition,f=e.axis;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var j=Math.round((g.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1);h=Math.round((g.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(f)){e.size.width=i.width+j;e.size.height=i.height+h}else if(/^(ne)$/.test(f)){e.size.width=i.width+j;e.size.height=i.height+h;e.position.top=b.top-h}else{if(/^(sw)$/.test(f)){e.size.width=i.width+j;e.size.height=
+i.height+h}else{e.size.width=i.width+j;e.size.height=i.height+h;e.position.top=b.top-h}e.position.left=b.left-j}}});var d=function(e){return parseInt(e,10)||0},c=function(e){return!isNaN(parseInt(e,10))}})(jQuery);
+(function(a){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var d=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(d.options.filter,d.element[0]);c.each(function(){var e=a(this),h=e.offset();a.data(this,"selectable-item",{element:this,$element:e,left:h.left,top:h.top,right:h.left+e.outerWidth(),bottom:h.top+e.outerHeight(),startselected:false,selected:e.hasClass("ui-selected"),
+selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(d){var c=this;this.opos=[d.pageX,
+d.pageY];if(!this.options.disabled){var e=this.options;this.selectees=a(e.filter,this.element[0]);this._trigger("start",d);a(e.appendTo).append(this.helper);this.helper.css({left:d.clientX,top:d.clientY,width:0,height:0});e.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var h=a.data(this,"selectable-item");h.startselected=true;if(!d.metaKey){h.$element.removeClass("ui-selected");h.selected=false;h.$element.addClass("ui-unselecting");h.unselecting=true;c._trigger("unselecting",
+d,{unselecting:h.element})}});a(d.target).parents().andSelf().each(function(){var h=a.data(this,"selectable-item");if(h){var g=!d.metaKey||!h.$element.hasClass("ui-selected");h.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");h.unselecting=!g;h.selecting=g;(h.selected=g)?c._trigger("selecting",d,{selecting:h.element}):c._trigger("unselecting",d,{unselecting:h.element});return false}})}},_mouseDrag:function(d){var c=this;this.dragged=true;if(!this.options.disabled){var e=
+this.options,h=this.opos[0],g=this.opos[1],i=d.pageX,b=d.pageY;if(h>i){var f=i;i=h;h=f}if(g>b){f=b;b=g;g=f}this.helper.css({left:h,top:g,width:i-h,height:b-g});this.selectees.each(function(){var j=a.data(this,"selectable-item");if(!(!j||j.element==c.element[0])){var l=false;if(e.tolerance=="touch")l=!(j.left>i||j.right<h||j.top>b||j.bottom<g);else if(e.tolerance=="fit")l=j.left>h&&j.right<i&&j.top>g&&j.bottom<b;if(l){if(j.selected){j.$element.removeClass("ui-selected");j.selected=false}if(j.unselecting){j.$element.removeClass("ui-unselecting");
+j.unselecting=false}if(!j.selecting){j.$element.addClass("ui-selecting");j.selecting=true;c._trigger("selecting",d,{selecting:j.element})}}else{if(j.selecting)if(d.metaKey&&j.startselected){j.$element.removeClass("ui-selecting");j.selecting=false;j.$element.addClass("ui-selected");j.selected=true}else{j.$element.removeClass("ui-selecting");j.selecting=false;if(j.startselected){j.$element.addClass("ui-unselecting");j.unselecting=true}c._trigger("unselecting",d,{unselecting:j.element})}if(j.selected)if(!d.metaKey&&
+!j.startselected){j.$element.removeClass("ui-selected");j.selected=false;j.$element.addClass("ui-unselecting");j.unselecting=true;c._trigger("unselecting",d,{unselecting:j.element})}}}});return false}},_mouseStop:function(d){var c=this;this.dragged=false;a(".ui-unselecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-unselecting");e.unselecting=false;e.startselected=false;c._trigger("unselected",d,{unselected:e.element})});a(".ui-selecting",this.element[0]).each(function(){var e=
+a.data(this,"selectable-item");e.$element.removeClass("ui-selecting").addClass("ui-selected");e.selecting=false;e.selected=true;e.startselected=true;c._trigger("selected",d,{selected:e.element})});this._trigger("stop",d);this.helper.remove();return false}});a.extend(a.ui.selectable,{version:"1.8.16"})})(jQuery);
+(function(a){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var d=this.options;this.containerCache={};this.element.addClass("ui-sortable");
+this.refresh();this.floating=this.items.length?d.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var d=this.items.length-1;d>=0;d--)this.items[d].item.removeData("sortable-item");return this},_setOption:function(d,c){if(d===
+"disabled"){this.options[d]=c;this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")}else a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(d,c){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(d);var e=null,h=this;a(d.target).parents().each(function(){if(a.data(this,"sortable-item")==h){e=a(this);return false}});if(a.data(d.target,"sortable-item")==h)e=a(d.target);if(!e)return false;if(this.options.handle&&
+!c){var g=false;a(this.options.handle,e).find("*").andSelf().each(function(){if(this==d.target)g=true});if(!g)return false}this.currentItem=e;this._removeCurrentsFromItems();return true},_mouseStart:function(d,c,e){c=this.options;var h=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(d);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,
+left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:d.pageX-this.offset.left,top:d.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(d);this.originalPageX=d.pageX;this.originalPageY=d.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};
+this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();c.containment&&this._setContainment();if(c.cursor){if(a("body").css("cursor"))this._storedCursor=a("body").css("cursor");a("body").css("cursor",c.cursor)}if(c.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",c.opacity)}if(c.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",c.zIndex)}if(this.scrollParent[0]!=
+document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",d,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!e)for(e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("activate",d,h._uiHash(this));if(a.ui.ddmanager)a.ui.ddmanager.current=this;a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,d);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(d);
+return true},_mouseDrag:function(d){this.position=this._generatePosition(d);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var c=this.options,e=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-d.pageY<c.scrollSensitivity)this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop+c.scrollSpeed;else if(d.pageY-this.overflowOffset.top<
+c.scrollSensitivity)this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop-c.scrollSpeed;if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-d.pageX<c.scrollSensitivity)this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft+c.scrollSpeed;else if(d.pageX-this.overflowOffset.left<c.scrollSensitivity)this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(d.pageY-a(document).scrollTop()<c.scrollSensitivity)e=a(document).scrollTop(a(document).scrollTop()-
+c.scrollSpeed);else if(a(window).height()-(d.pageY-a(document).scrollTop())<c.scrollSensitivity)e=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed);if(d.pageX-a(document).scrollLeft()<c.scrollSensitivity)e=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed);else if(a(window).width()-(d.pageX-a(document).scrollLeft())<c.scrollSensitivity)e=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed)}e!==false&&a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,
+d)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(c=this.items.length-1;c>=0;c--){e=this.items[c];var h=e.item[0],g=this._intersectsWithPointer(e);if(g)if(h!=this.currentItem[0]&&this.placeholder[g==1?"next":"prev"]()[0]!=h&&!a.ui.contains(this.placeholder[0],h)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],
+h):true)){this.direction=g==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e))this._rearrange(d,e);else break;this._trigger("change",d,this._uiHash());break}}this._contactContainers(d);a.ui.ddmanager&&a.ui.ddmanager.drag(this,d);this._trigger("sort",d,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(d,c){if(d){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,d);if(this.options.revert){var e=this;c=e.placeholder.offset();
+e.reverting=true;a(this.helper).animate({left:c.left-this.offset.parent.left-e.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:c.top-this.offset.parent.top-e.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){e._clear(d)})}else this._clear(d,c);return false}},cancel:function(){var d=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):
+this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,d._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,d._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();a.extend(this,{helper:null,
+dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(d){var c=this._getItemsAsjQuery(d&&d.connected),e=[];d=d||{};a(c).each(function(){var h=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||/(.+)[-=_](.+)/);if(h)e.push((d.key||h[1]+"[]")+"="+(d.key&&d.expression?h[1]:h[2]))});!e.length&&d.key&&e.push(d.key+"=");return e.join("&")},
+toArray:function(d){var c=this._getItemsAsjQuery(d&&d.connected),e=[];d=d||{};c.each(function(){e.push(a(d.item||this).attr(d.attribute||"id")||"")});return e},_intersectsWith:function(d){var c=this.positionAbs.left,e=c+this.helperProportions.width,h=this.positionAbs.top,g=h+this.helperProportions.height,i=d.left,b=i+d.width,f=d.top,j=f+d.height,l=this.offset.click.top,o=this.offset.click.left;l=h+l>f&&h+l<j&&c+o>i&&c+o<b;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||
+this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>d[this.floating?"width":"height"]?l:i<c+this.helperProportions.width/2&&e-this.helperProportions.width/2<b&&f<h+this.helperProportions.height/2&&g-this.helperProportions.height/2<j},_intersectsWithPointer:function(d){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height);d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width);c=c&&d;d=this._getDragVerticalDirection();
+var e=this._getDragHorizontalDirection();if(!c)return false;return this.floating?e&&e=="right"||d=="down"?2:1:d&&(d=="down"?2:1)},_intersectsWithSides:function(d){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top+d.height/2,d.height);d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left+d.width/2,d.width);var e=this._getDragVerticalDirection(),h=this._getDragHorizontalDirection();return this.floating&&h?h=="right"&&d||h=="left"&&!d:e&&(e=="down"&&c||e=="up"&&!c)},
+_getDragVerticalDirection:function(){var d=this.positionAbs.top-this.lastPositionAbs.top;return d!=0&&(d>0?"down":"up")},_getDragHorizontalDirection:function(){var d=this.positionAbs.left-this.lastPositionAbs.left;return d!=0&&(d>0?"right":"left")},refresh:function(d){this._refreshItems(d);this.refreshPositions();return this},_connectWith:function(){var d=this.options;return d.connectWith.constructor==String?[d.connectWith]:d.connectWith},_getItemsAsjQuery:function(d){var c=[],e=[],h=this._connectWith();
+if(h&&d)for(d=h.length-1;d>=0;d--)for(var g=a(h[d]),i=g.length-1;i>=0;i--){var b=a.data(g[i],"sortable");if(b&&b!=this&&!b.options.disabled)e.push([a.isFunction(b.options.items)?b.options.items.call(b.element):a(b.options.items,b.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),b])}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),
+this]);for(d=e.length-1;d>=0;d--)e[d][0].each(function(){c.push(this)});return a(c)},_removeCurrentsFromItems:function(){for(var d=this.currentItem.find(":data(sortable-item)"),c=0;c<this.items.length;c++)for(var e=0;e<d.length;e++)d[e]==this.items[c].item[0]&&this.items.splice(c,1)},_refreshItems:function(d){this.items=[];this.containers=[this];var c=this.items,e=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],d,{item:this.currentItem}):a(this.options.items,this.element),
+this]],h=this._connectWith();if(h)for(var g=h.length-1;g>=0;g--)for(var i=a(h[g]),b=i.length-1;b>=0;b--){var f=a.data(i[b],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element[0],d,{item:this.currentItem}):a(f.options.items,f.element),f]);this.containers.push(f)}}for(g=e.length-1;g>=0;g--){d=e[g][1];h=e[g][0];b=0;for(i=h.length;b<i;b++){f=a(h[b]);f.data("sortable-item",d);c.push({item:f,instance:d,width:0,height:0,left:0,top:0})}}},refreshPositions:function(d){if(this.offsetParent&&
+this.helper)this.offset.parent=this._getParentOffset();for(var c=this.items.length-1;c>=0;c--){var e=this.items[c];if(!(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0])){var h=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!d){e.width=h.outerWidth();e.height=h.outerHeight()}h=h.offset();e.left=h.left;e.top=h.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(c=
+this.containers.length-1;c>=0;c--){h=this.containers[c].element.offset();this.containers[c].containerCache.left=h.left;this.containers[c].containerCache.top=h.top;this.containers[c].containerCache.width=this.containers[c].element.outerWidth();this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(d){var c=d||this,e=c.options;if(!e.placeholder||e.placeholder.constructor==String){var h=e.placeholder;e.placeholder={element:function(){var g=
+a(document.createElement(c.currentItem[0].nodeName)).addClass(h||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!h)g.style.visibility="hidden";return g},update:function(g,i){if(!(h&&!e.forcePlaceholderSize)){i.height()||i.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10));i.width()||i.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||
+0,10))}}}}c.placeholder=a(e.placeholder.element.call(c.element,c.currentItem));c.currentItem.after(c.placeholder);e.placeholder.update(c,c.placeholder)},_contactContainers:function(d){for(var c=null,e=null,h=this.containers.length-1;h>=0;h--)if(!a.ui.contains(this.currentItem[0],this.containers[h].element[0]))if(this._intersectsWith(this.containers[h].containerCache)){if(!(c&&a.ui.contains(this.containers[h].element[0],c.element[0]))){c=this.containers[h];e=h}}else if(this.containers[h].containerCache.over){this.containers[h]._trigger("out",
+d,this._uiHash(this));this.containers[h].containerCache.over=0}if(c)if(this.containers.length===1){this.containers[e]._trigger("over",d,this._uiHash(this));this.containers[e].containerCache.over=1}else if(this.currentContainer!=this.containers[e]){c=1E4;h=null;for(var g=this.positionAbs[this.containers[e].floating?"left":"top"],i=this.items.length-1;i>=0;i--)if(a.ui.contains(this.containers[e].element[0],this.items[i].item[0])){var b=this.items[i][this.containers[e].floating?"left":"top"];if(Math.abs(b-
+g)<c){c=Math.abs(b-g);h=this.items[i]}}if(h||this.options.dropOnEmpty){this.currentContainer=this.containers[e];h?this._rearrange(d,h,null,true):this._rearrange(d,null,this.containers[e].element,true);this._trigger("change",d,this._uiHash());this.containers[e]._trigger("change",d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[e]._trigger("over",d,this._uiHash(this));this.containers[e].containerCache.over=1}}},_createHelper:function(d){var c=
+this.options;d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[d,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]);if(d[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(d[0].style.width==
+""||c.forceHelperSize)d.width(this.currentItem.width());if(d[0].style.height==""||c.forceHelperSize)d.height(this.currentItem.height());return d},_adjustOffsetFromHelper:function(d){if(typeof d=="string")d=d.split(" ");if(a.isArray(d))d={left:+d[0],top:+d[1]||0};if("left"in d)this.offset.click.left=d.left+this.margins.left;if("right"in d)this.offset.click.left=this.helperProportions.width-d.right+this.margins.left;if("top"in d)this.offset.click.top=d.top+this.margins.top;if("bottom"in d)this.offset.click.top=
+this.helperProportions.height-d.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var d=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){d.left+=this.scrollParent.scrollLeft();d.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)d=
+{top:0,left:0};return{top:d.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:d.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var d=this.currentItem.position();return{top:d.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:d.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),
+10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var d=this.options;if(d.containment=="parent")d.containment=this.helper[0].parentNode;if(d.containment=="document"||d.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(d.containment=="document"?
+document:window).width()-this.helperProportions.width-this.margins.left,(a(d.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(d.containment)){var c=a(d.containment)[0];d=a(d.containment).offset();var e=a(c).css("overflow")!="hidden";this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),
+10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(e?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(d,c){if(!c)c=
+this.position;d=d=="absolute"?1:-1;var e=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=/(html|body)/i.test(e[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():h?0:e.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&
+this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:e.scrollLeft())*d)}},_generatePosition:function(d){var c=this.options,e=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=/(html|body)/i.test(e[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();
+var g=d.pageX,i=d.pageY;if(this.originalPosition){if(this.containment){if(d.pageX-this.offset.click.left<this.containment[0])g=this.containment[0]+this.offset.click.left;if(d.pageY-this.offset.click.top<this.containment[1])i=this.containment[1]+this.offset.click.top;if(d.pageX-this.offset.click.left>this.containment[2])g=this.containment[2]+this.offset.click.left;if(d.pageY-this.offset.click.top>this.containment[3])i=this.containment[3]+this.offset.click.top}if(c.grid){i=this.originalPageY+Math.round((i-
+this.originalPageY)/c.grid[1])*c.grid[1];i=this.containment?!(i-this.offset.click.top<this.containment[1]||i-this.offset.click.top>this.containment[3])?i:!(i-this.offset.click.top<this.containment[1])?i-c.grid[1]:i+c.grid[1]:i;g=this.originalPageX+Math.round((g-this.originalPageX)/c.grid[0])*c.grid[0];g=this.containment?!(g-this.offset.click.left<this.containment[0]||g-this.offset.click.left>this.containment[2])?g:!(g-this.offset.click.left<this.containment[0])?g-c.grid[0]:g+c.grid[0]:g}}return{top:i-
+this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():h?0:e.scrollTop()),left:g-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:e.scrollLeft())}},_rearrange:function(d,c,e,h){e?e[0].appendChild(this.placeholder[0]):c.item[0].parentNode.insertBefore(this.placeholder[0],
+this.direction=="down"?c.item[0]:c.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var g=this,i=this.counter;window.setTimeout(function(){i==g.counter&&g.refreshPositions(!h)},0)},_clear:function(d,c){this.reverting=false;var e=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var h in this._storedCSS)if(this._storedCSS[h]=="auto"||this._storedCSS[h]=="static")this._storedCSS[h]=
+"";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!c&&e.push(function(g){this._trigger("receive",g,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!c)e.push(function(g){this._trigger("update",g,this._uiHash())});if(!a.ui.contains(this.element[0],this.currentItem[0])){c||e.push(function(g){this._trigger("remove",
+g,this._uiHash())});for(h=this.containers.length-1;h>=0;h--)if(a.ui.contains(this.containers[h].element[0],this.currentItem[0])&&!c){e.push(function(g){return function(i){g._trigger("receive",i,this._uiHash(this))}}.call(this,this.containers[h]));e.push(function(g){return function(i){g._trigger("update",i,this._uiHash(this))}}.call(this,this.containers[h]))}}for(h=this.containers.length-1;h>=0;h--){c||e.push(function(g){return function(i){g._trigger("deactivate",i,this._uiHash(this))}}.call(this,
+this.containers[h]));if(this.containers[h].containerCache.over){e.push(function(g){return function(i){g._trigger("out",i,this._uiHash(this))}}.call(this,this.containers[h]));this.containers[h].containerCache.over=0}}this._storedCursor&&a("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",
+d,this._uiHash());for(h=0;h<e.length;h++)e[h].call(this,d);this._trigger("stop",d,this._uiHash())}return false}c||this._trigger("beforeStop",d,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!c){for(h=0;h<e.length;h++)e[h].call(this,d);this._trigger("stop",d,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},
+_uiHash:function(d){var c=d||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:d?d.element:null}}});a.extend(a.ui.sortable,{version:"1.8.16"})})(jQuery);
+jQuery.effects||function(a,d){function c(n){var k;if(n&&n.constructor==Array&&n.length==3)return n;if(k=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(n))return[parseInt(k[1],10),parseInt(k[2],10),parseInt(k[3],10)];if(k=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(n))return[parseFloat(k[1])*2.55,parseFloat(k[2])*2.55,parseFloat(k[3])*2.55];if(k=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(n))return[parseInt(k[1],
+16),parseInt(k[2],16),parseInt(k[3],16)];if(k=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(n))return[parseInt(k[1]+k[1],16),parseInt(k[2]+k[2],16),parseInt(k[3]+k[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(n))return j.transparent;return j[a.trim(n).toLowerCase()]}function e(n,k){var m;do{m=a.curCSS(n,k);if(m!=""&&m!="transparent"||a.nodeName(n,"body"))break;k="backgroundColor"}while(n=n.parentNode);return c(m)}function h(){var n=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
+k={},m,p;if(n&&n.length&&n[0]&&n[n[0]])for(var q=n.length;q--;){m=n[q];if(typeof n[m]=="string"){p=m.replace(/\-(\w)/g,function(s,r){return r.toUpperCase()});k[p]=n[m]}}else for(m in n)if(typeof n[m]==="string")k[m]=n[m];return k}function g(n){var k,m;for(k in n){m=n[k];if(m==null||a.isFunction(m)||k in o||/scrollbar/.test(k)||!/color/i.test(k)&&isNaN(parseFloat(m)))delete n[k]}return n}function i(n,k){var m={_:0},p;for(p in k)if(n[p]!=k[p])m[p]=k[p];return m}function b(n,k,m,p){if(typeof n=="object"){p=
+k;m=null;k=n;n=k.effect}if(a.isFunction(k)){p=k;m=null;k={}}if(typeof k=="number"||a.fx.speeds[k]){p=m;m=k;k={}}if(a.isFunction(m)){p=m;m=null}k=k||{};m=m||k.duration;m=a.fx.off?0:typeof m=="number"?m:m in a.fx.speeds?a.fx.speeds[m]:a.fx.speeds._default;p=p||k.complete;return[n,k,m,p]}function f(n){if(!n||typeof n==="number"||a.fx.speeds[n])return true;if(typeof n==="string"&&!a.effects[n])return true;return false}a.effects={};a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
+"borderTopColor","borderColor","color","outlineColor"],function(n,k){a.fx.step[k]=function(m){if(!m.colorInit){m.start=e(m.elem,k);m.end=c(m.end);m.colorInit=true}m.elem.style[k]="rgb("+Math.max(Math.min(parseInt(m.pos*(m.end[0]-m.start[0])+m.start[0],10),255),0)+","+Math.max(Math.min(parseInt(m.pos*(m.end[1]-m.start[1])+m.start[1],10),255),0)+","+Math.max(Math.min(parseInt(m.pos*(m.end[2]-m.start[2])+m.start[2],10),255),0)+")"}});var j={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
+0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,
+211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},l=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(n,k,m,
+p){if(a.isFunction(m)){p=m;m=null}return this.queue(function(){var q=a(this),s=q.attr("style")||" ",r=g(h.call(this)),u,v=q.attr("class");a.each(l,function(w,x){n[x]&&q[x+"Class"](n[x])});u=g(h.call(this));q.attr("class",v);q.animate(i(r,u),{queue:false,duration:k,easing:m,complete:function(){a.each(l,function(w,x){n[x]&&q[x+"Class"](n[x])});if(typeof q.attr("style")=="object"){q.attr("style").cssText="";q.attr("style").cssText=s}else q.attr("style",s);p&&p.apply(this,arguments);a.dequeue(this)}})})};
+a.fn.extend({_addClass:a.fn.addClass,addClass:function(n,k,m,p){return k?a.effects.animateClass.apply(this,[{add:n},k,m,p]):this._addClass(n)},_removeClass:a.fn.removeClass,removeClass:function(n,k,m,p){return k?a.effects.animateClass.apply(this,[{remove:n},k,m,p]):this._removeClass(n)},_toggleClass:a.fn.toggleClass,toggleClass:function(n,k,m,p,q){return typeof k=="boolean"||k===d?m?a.effects.animateClass.apply(this,[k?{add:n}:{remove:n},m,p,q]):this._toggleClass(n,k):a.effects.animateClass.apply(this,
+[{toggle:n},k,m,p])},switchClass:function(n,k,m,p,q){return a.effects.animateClass.apply(this,[{add:k,remove:n},m,p,q])}});a.extend(a.effects,{version:"1.8.16",save:function(n,k){for(var m=0;m<k.length;m++)k[m]!==null&&n.data("ec.storage."+k[m],n[0].style[k[m]])},restore:function(n,k){for(var m=0;m<k.length;m++)k[m]!==null&&n.css(k[m],n.data("ec.storage."+k[m]))},setMode:function(n,k){if(k=="toggle")k=n.is(":hidden")?"show":"hide";return k},getBaseline:function(n,k){var m;switch(n[0]){case "top":m=
+0;break;case "middle":m=0.5;break;case "bottom":m=1;break;default:m=n[0]/k.height}switch(n[1]){case "left":n=0;break;case "center":n=0.5;break;case "right":n=1;break;default:n=n[1]/k.width}return{x:n,y:m}},createWrapper:function(n){if(n.parent().is(".ui-effects-wrapper"))return n.parent();var k={width:n.outerWidth(true),height:n.outerHeight(true),"float":n.css("float")},m=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),
+p=document.activeElement;n.wrap(m);if(n[0]===p||a.contains(n[0],p))a(p).focus();m=n.parent();if(n.css("position")=="static"){m.css({position:"relative"});n.css({position:"relative"})}else{a.extend(k,{position:n.css("position"),zIndex:n.css("z-index")});a.each(["top","left","bottom","right"],function(q,s){k[s]=n.css(s);if(isNaN(parseInt(k[s],10)))k[s]="auto"});n.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return m.css(k).show()},removeWrapper:function(n){var k,m=document.activeElement;
+if(n.parent().is(".ui-effects-wrapper")){k=n.parent().replaceWith(n);if(n[0]===m||a.contains(n[0],m))a(m).focus();return k}return n},setTransition:function(n,k,m,p){p=p||{};a.each(k,function(q,s){unit=n.cssUnit(s);if(unit[0]>0)p[s]=unit[0]*m+unit[1]});return p}});a.fn.extend({effect:function(n){var k=b.apply(this,arguments),m={options:k[1],duration:k[2],callback:k[3]};k=m.options.mode;var p=a.effects[n];if(a.fx.off||!p)return k?this[k](m.duration,m.callback):this.each(function(){m.callback&&m.callback.call(this)});
+return p.call(this,m)},_show:a.fn.show,show:function(n){if(f(n))return this._show.apply(this,arguments);else{var k=b.apply(this,arguments);k[1].mode="show";return this.effect.apply(this,k)}},_hide:a.fn.hide,hide:function(n){if(f(n))return this._hide.apply(this,arguments);else{var k=b.apply(this,arguments);k[1].mode="hide";return this.effect.apply(this,k)}},__toggle:a.fn.toggle,toggle:function(n){if(f(n)||typeof n==="boolean"||a.isFunction(n))return this.__toggle.apply(this,arguments);else{var k=b.apply(this,
+arguments);k[1].mode="toggle";return this.effect.apply(this,k)}},cssUnit:function(n){var k=this.css(n),m=[];a.each(["em","px","%","pt"],function(p,q){if(k.indexOf(q)>0)m=[parseFloat(k),q]});return m}});a.easing.jswing=a.easing.swing;a.extend(a.easing,{def:"easeOutQuad",swing:function(n,k,m,p,q){return a.easing[a.easing.def](n,k,m,p,q)},easeInQuad:function(n,k,m,p,q){return p*(k/=q)*k+m},easeOutQuad:function(n,k,m,p,q){return-p*(k/=q)*(k-2)+m},easeInOutQuad:function(n,k,m,p,q){if((k/=q/2)<1)return p/
+2*k*k+m;return-p/2*(--k*(k-2)-1)+m},easeInCubic:function(n,k,m,p,q){return p*(k/=q)*k*k+m},easeOutCubic:function(n,k,m,p,q){return p*((k=k/q-1)*k*k+1)+m},easeInOutCubic:function(n,k,m,p,q){if((k/=q/2)<1)return p/2*k*k*k+m;return p/2*((k-=2)*k*k+2)+m},easeInQuart:function(n,k,m,p,q){return p*(k/=q)*k*k*k+m},easeOutQuart:function(n,k,m,p,q){return-p*((k=k/q-1)*k*k*k-1)+m},easeInOutQuart:function(n,k,m,p,q){if((k/=q/2)<1)return p/2*k*k*k*k+m;return-p/2*((k-=2)*k*k*k-2)+m},easeInQuint:function(n,k,m,
+p,q){return p*(k/=q)*k*k*k*k+m},easeOutQuint:function(n,k,m,p,q){return p*((k=k/q-1)*k*k*k*k+1)+m},easeInOutQuint:function(n,k,m,p,q){if((k/=q/2)<1)return p/2*k*k*k*k*k+m;return p/2*((k-=2)*k*k*k*k+2)+m},easeInSine:function(n,k,m,p,q){return-p*Math.cos(k/q*(Math.PI/2))+p+m},easeOutSine:function(n,k,m,p,q){return p*Math.sin(k/q*(Math.PI/2))+m},easeInOutSine:function(n,k,m,p,q){return-p/2*(Math.cos(Math.PI*k/q)-1)+m},easeInExpo:function(n,k,m,p,q){return k==0?m:p*Math.pow(2,10*(k/q-1))+m},easeOutExpo:function(n,
+k,m,p,q){return k==q?m+p:p*(-Math.pow(2,-10*k/q)+1)+m},easeInOutExpo:function(n,k,m,p,q){if(k==0)return m;if(k==q)return m+p;if((k/=q/2)<1)return p/2*Math.pow(2,10*(k-1))+m;return p/2*(-Math.pow(2,-10*--k)+2)+m},easeInCirc:function(n,k,m,p,q){return-p*(Math.sqrt(1-(k/=q)*k)-1)+m},easeOutCirc:function(n,k,m,p,q){return p*Math.sqrt(1-(k=k/q-1)*k)+m},easeInOutCirc:function(n,k,m,p,q){if((k/=q/2)<1)return-p/2*(Math.sqrt(1-k*k)-1)+m;return p/2*(Math.sqrt(1-(k-=2)*k)+1)+m},easeInElastic:function(n,k,m,
+p,q){n=1.70158;var s=0,r=p;if(k==0)return m;if((k/=q)==1)return m+p;s||(s=q*0.3);if(r<Math.abs(p)){r=p;n=s/4}else n=s/(2*Math.PI)*Math.asin(p/r);return-(r*Math.pow(2,10*(k-=1))*Math.sin((k*q-n)*2*Math.PI/s))+m},easeOutElastic:function(n,k,m,p,q){n=1.70158;var s=0,r=p;if(k==0)return m;if((k/=q)==1)return m+p;s||(s=q*0.3);if(r<Math.abs(p)){r=p;n=s/4}else n=s/(2*Math.PI)*Math.asin(p/r);return r*Math.pow(2,-10*k)*Math.sin((k*q-n)*2*Math.PI/s)+p+m},easeInOutElastic:function(n,k,m,p,q){n=1.70158;var s=
+0,r=p;if(k==0)return m;if((k/=q/2)==2)return m+p;s||(s=q*0.3*1.5);if(r<Math.abs(p)){r=p;n=s/4}else n=s/(2*Math.PI)*Math.asin(p/r);if(k<1)return-0.5*r*Math.pow(2,10*(k-=1))*Math.sin((k*q-n)*2*Math.PI/s)+m;return r*Math.pow(2,-10*(k-=1))*Math.sin((k*q-n)*2*Math.PI/s)*0.5+p+m},easeInBack:function(n,k,m,p,q,s){if(s==d)s=1.70158;return p*(k/=q)*k*((s+1)*k-s)+m},easeOutBack:function(n,k,m,p,q,s){if(s==d)s=1.70158;return p*((k=k/q-1)*k*((s+1)*k+s)+1)+m},easeInOutBack:function(n,k,m,p,q,s){if(s==d)s=1.70158;
+if((k/=q/2)<1)return p/2*k*k*(((s*=1.525)+1)*k-s)+m;return p/2*((k-=2)*k*(((s*=1.525)+1)*k+s)+2)+m},easeInBounce:function(n,k,m,p,q){return p-a.easing.easeOutBounce(n,q-k,0,p,q)+m},easeOutBounce:function(n,k,m,p,q){return(k/=q)<1/2.75?p*7.5625*k*k+m:k<2/2.75?p*(7.5625*(k-=1.5/2.75)*k+0.75)+m:k<2.5/2.75?p*(7.5625*(k-=2.25/2.75)*k+0.9375)+m:p*(7.5625*(k-=2.625/2.75)*k+0.984375)+m},easeInOutBounce:function(n,k,m,p,q){if(k<q/2)return a.easing.easeInBounce(n,k*2,0,p,q)*0.5+m;return a.easing.easeOutBounce(n,
+k*2-q,0,p,q)*0.5+p*0.5+m}})}(jQuery);
+(function(a){a.effects.blind=function(d){return this.queue(function(){var c=a(this),e=["position","top","bottom","left","right"],h=a.effects.setMode(c,d.options.mode||"hide"),g=d.options.direction||"vertical";a.effects.save(c,e);c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"}),b=g=="vertical"?"height":"width";g=g=="vertical"?i.height():i.width();h=="show"&&i.css(b,0);var f={};f[b]=h=="show"?g:0;i.animate(f,d.duration,d.options.easing,function(){h=="hide"&&c.hide();a.effects.restore(c,
+e);a.effects.removeWrapper(c);d.callback&&d.callback.apply(c[0],arguments);c.dequeue()})})}})(jQuery);
+(function(a){a.effects.bounce=function(d){return this.queue(function(){var c=a(this),e=["position","top","bottom","left","right"],h=a.effects.setMode(c,d.options.mode||"effect"),g=d.options.direction||"up",i=d.options.distance||20,b=d.options.times||5,f=d.duration||250;/show|hide/.test(h)&&e.push("opacity");a.effects.save(c,e);c.show();a.effects.createWrapper(c);var j=g=="up"||g=="down"?"top":"left";g=g=="up"||g=="left"?"pos":"neg";i=d.options.distance||(j=="top"?c.outerHeight({margin:true})/3:c.outerWidth({margin:true})/
+3);if(h=="show")c.css("opacity",0).css(j,g=="pos"?-i:i);if(h=="hide")i/=b*2;h!="hide"&&b--;if(h=="show"){var l={opacity:1};l[j]=(g=="pos"?"+=":"-=")+i;c.animate(l,f/2,d.options.easing);i/=2;b--}for(l=0;l<b;l++){var o={},n={};o[j]=(g=="pos"?"-=":"+=")+i;n[j]=(g=="pos"?"+=":"-=")+i;c.animate(o,f/2,d.options.easing).animate(n,f/2,d.options.easing);i=h=="hide"?i*2:i/2}if(h=="hide"){l={opacity:0};l[j]=(g=="pos"?"-=":"+=")+i;c.animate(l,f/2,d.options.easing,function(){c.hide();a.effects.restore(c,e);a.effects.removeWrapper(c);
+d.callback&&d.callback.apply(this,arguments)})}else{o={};n={};o[j]=(g=="pos"?"-=":"+=")+i;n[j]=(g=="pos"?"+=":"-=")+i;c.animate(o,f/2,d.options.easing).animate(n,f/2,d.options.easing,function(){a.effects.restore(c,e);a.effects.removeWrapper(c);d.callback&&d.callback.apply(this,arguments)})}c.queue("fx",function(){c.dequeue()});c.dequeue()})}})(jQuery);
+(function(a){a.effects.clip=function(d){return this.queue(function(){var c=a(this),e=["position","top","bottom","left","right","height","width"],h=a.effects.setMode(c,d.options.mode||"hide"),g=d.options.direction||"vertical";a.effects.save(c,e);c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"});i=c[0].tagName=="IMG"?i:c;var b={size:g=="vertical"?"height":"width",position:g=="vertical"?"top":"left"};g=g=="vertical"?i.height():i.width();if(h=="show"){i.css(b.size,0);i.css(b.position,
+g/2)}var f={};f[b.size]=h=="show"?g:0;f[b.position]=h=="show"?0:g/2;i.animate(f,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){h=="hide"&&c.hide();a.effects.restore(c,e);a.effects.removeWrapper(c);d.callback&&d.callback.apply(c[0],arguments);c.dequeue()}})})}})(jQuery);
+(function(a){a.effects.drop=function(d){return this.queue(function(){var c=a(this),e=["position","top","bottom","left","right","opacity"],h=a.effects.setMode(c,d.options.mode||"hide"),g=d.options.direction||"left";a.effects.save(c,e);c.show();a.effects.createWrapper(c);var i=g=="up"||g=="down"?"top":"left";g=g=="up"||g=="left"?"pos":"neg";var b=d.options.distance||(i=="top"?c.outerHeight({margin:true})/2:c.outerWidth({margin:true})/2);if(h=="show")c.css("opacity",0).css(i,g=="pos"?-b:b);var f={opacity:h==
+"show"?1:0};f[i]=(h=="show"?g=="pos"?"+=":"-=":g=="pos"?"-=":"+=")+b;c.animate(f,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){h=="hide"&&c.hide();a.effects.restore(c,e);a.effects.removeWrapper(c);d.callback&&d.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
+(function(a){a.effects.explode=function(d){return this.queue(function(){var c=d.options.pieces?Math.round(Math.sqrt(d.options.pieces)):3,e=d.options.pieces?Math.round(Math.sqrt(d.options.pieces)):3;d.options.mode=d.options.mode=="toggle"?a(this).is(":visible")?"hide":"show":d.options.mode;var h=a(this).show().css("visibility","hidden"),g=h.offset();g.top-=parseInt(h.css("marginTop"),10)||0;g.left-=parseInt(h.css("marginLeft"),10)||0;for(var i=h.outerWidth(true),b=h.outerHeight(true),f=0;f<c;f++)for(var j=
+0;j<e;j++)h.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*(i/e),top:-f*(b/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:i/e,height:b/c,left:g.left+j*(i/e)+(d.options.mode=="show"?(j-Math.floor(e/2))*(i/e):0),top:g.top+f*(b/c)+(d.options.mode=="show"?(f-Math.floor(c/2))*(b/c):0),opacity:d.options.mode=="show"?0:1}).animate({left:g.left+j*(i/e)+(d.options.mode=="show"?0:(j-Math.floor(e/2))*(i/e)),top:g.top+
+f*(b/c)+(d.options.mode=="show"?0:(f-Math.floor(c/2))*(b/c)),opacity:d.options.mode=="show"?1:0},d.duration||500);setTimeout(function(){d.options.mode=="show"?h.css({visibility:"visible"}):h.css({visibility:"visible"}).hide();d.callback&&d.callback.apply(h[0]);h.dequeue();a("div.ui-effects-explode").remove()},d.duration||500)})}})(jQuery);
+(function(a){a.effects.fade=function(d){return this.queue(function(){var c=a(this),e=a.effects.setMode(c,d.options.mode||"hide");c.animate({opacity:e},{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){d.callback&&d.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
+(function(a){a.effects.fold=function(d){return this.queue(function(){var c=a(this),e=["position","top","bottom","left","right"],h=a.effects.setMode(c,d.options.mode||"hide"),g=d.options.size||15,i=!!d.options.horizFirst,b=d.duration?d.duration/2:a.fx.speeds._default/2;a.effects.save(c,e);c.show();var f=a.effects.createWrapper(c).css({overflow:"hidden"}),j=h=="show"!=i,l=j?["width","height"]:["height","width"];j=j?[f.width(),f.height()]:[f.height(),f.width()];var o=/([0-9]+)%/.exec(g);if(o)g=parseInt(o[1],
+10)/100*j[h=="hide"?0:1];if(h=="show")f.css(i?{height:0,width:g}:{height:g,width:0});i={};o={};i[l[0]]=h=="show"?j[0]:g;o[l[1]]=h=="show"?j[1]:0;f.animate(i,b,d.options.easing).animate(o,b,d.options.easing,function(){h=="hide"&&c.hide();a.effects.restore(c,e);a.effects.removeWrapper(c);d.callback&&d.callback.apply(c[0],arguments);c.dequeue()})})}})(jQuery);
+(function(a){a.effects.highlight=function(d){return this.queue(function(){var c=a(this),e=["backgroundImage","backgroundColor","opacity"],h=a.effects.setMode(c,d.options.mode||"show"),g={backgroundColor:c.css("backgroundColor")};if(h=="hide")g.opacity=0;a.effects.save(c,e);c.show().css({backgroundImage:"none",backgroundColor:d.options.color||"#ffff99"}).animate(g,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){h=="hide"&&c.hide();a.effects.restore(c,e);h=="show"&&!a.support.opacity&&
+this.style.removeAttribute("filter");d.callback&&d.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
+(function(a){a.effects.pulsate=function(d){return this.queue(function(){var c=a(this),e=a.effects.setMode(c,d.options.mode||"show");times=(d.options.times||5)*2-1;duration=d.duration?d.duration/2:a.fx.speeds._default/2;isVisible=c.is(":visible");animateTo=0;if(!isVisible){c.css("opacity",0).show();animateTo=1}if(e=="hide"&&isVisible||e=="show"&&!isVisible)times--;for(e=0;e<times;e++){c.animate({opacity:animateTo},duration,d.options.easing);animateTo=(animateTo+1)%2}c.animate({opacity:animateTo},duration,
+d.options.easing,function(){animateTo==0&&c.hide();d.callback&&d.callback.apply(this,arguments)});c.queue("fx",function(){c.dequeue()}).dequeue()})}})(jQuery);
+(function(a){a.effects.puff=function(d){return this.queue(function(){var c=a(this),e=a.effects.setMode(c,d.options.mode||"hide"),h=parseInt(d.options.percent,10)||150,g=h/100,i={height:c.height(),width:c.width()};a.extend(d.options,{fade:true,mode:e,percent:e=="hide"?h:100,from:e=="hide"?i:{height:i.height*g,width:i.width*g}});c.effect("scale",d.options,d.duration,d.callback);c.dequeue()})};a.effects.scale=function(d){return this.queue(function(){var c=a(this),e=a.extend(true,{},d.options),h=a.effects.setMode(c,
+d.options.mode||"effect"),g=parseInt(d.options.percent,10)||(parseInt(d.options.percent,10)==0?0:h=="hide"?0:100),i=d.options.direction||"both",b=d.options.origin;if(h!="effect"){e.origin=b||["middle","center"];e.restore=true}b={height:c.height(),width:c.width()};c.from=d.options.from||(h=="show"?{height:0,width:0}:b);g={y:i!="horizontal"?g/100:1,x:i!="vertical"?g/100:1};c.to={height:b.height*g.y,width:b.width*g.x};if(d.options.fade){if(h=="show"){c.from.opacity=0;c.to.opacity=1}if(h=="hide"){c.from.opacity=
+1;c.to.opacity=0}}e.from=c.from;e.to=c.to;e.mode=h;c.effect("size",e,d.duration,d.callback);c.dequeue()})};a.effects.size=function(d){return this.queue(function(){var c=a(this),e=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],g=["width","height","overflow"],i=["fontSize"],b=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],f=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
+j=a.effects.setMode(c,d.options.mode||"effect"),l=d.options.restore||false,o=d.options.scale||"both",n=d.options.origin,k={height:c.height(),width:c.width()};c.from=d.options.from||k;c.to=d.options.to||k;if(n){n=a.effects.getBaseline(n,k);c.from.top=(k.height-c.from.height)*n.y;c.from.left=(k.width-c.from.width)*n.x;c.to.top=(k.height-c.to.height)*n.y;c.to.left=(k.width-c.to.width)*n.x}var m={from:{y:c.from.height/k.height,x:c.from.width/k.width},to:{y:c.to.height/k.height,x:c.to.width/k.width}};
+if(o=="box"||o=="both"){if(m.from.y!=m.to.y){e=e.concat(b);c.from=a.effects.setTransition(c,b,m.from.y,c.from);c.to=a.effects.setTransition(c,b,m.to.y,c.to)}if(m.from.x!=m.to.x){e=e.concat(f);c.from=a.effects.setTransition(c,f,m.from.x,c.from);c.to=a.effects.setTransition(c,f,m.to.x,c.to)}}if(o=="content"||o=="both")if(m.from.y!=m.to.y){e=e.concat(i);c.from=a.effects.setTransition(c,i,m.from.y,c.from);c.to=a.effects.setTransition(c,i,m.to.y,c.to)}a.effects.save(c,l?e:h);c.show();a.effects.createWrapper(c);
+c.css("overflow","hidden").css(c.from);if(o=="content"||o=="both"){b=b.concat(["marginTop","marginBottom"]).concat(i);f=f.concat(["marginLeft","marginRight"]);g=e.concat(b).concat(f);c.find("*[width]").each(function(){child=a(this);l&&a.effects.save(child,g);var p={height:child.height(),width:child.width()};child.from={height:p.height*m.from.y,width:p.width*m.from.x};child.to={height:p.height*m.to.y,width:p.width*m.to.x};if(m.from.y!=m.to.y){child.from=a.effects.setTransition(child,b,m.from.y,child.from);
+child.to=a.effects.setTransition(child,b,m.to.y,child.to)}if(m.from.x!=m.to.x){child.from=a.effects.setTransition(child,f,m.from.x,child.from);child.to=a.effects.setTransition(child,f,m.to.x,child.to)}child.css(child.from);child.animate(child.to,d.duration,d.options.easing,function(){l&&a.effects.restore(child,g)})})}c.animate(c.to,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){c.to.opacity===0&&c.css("opacity",c.from.opacity);j=="hide"&&c.hide();a.effects.restore(c,
+l?e:h);a.effects.removeWrapper(c);d.callback&&d.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
+(function(a){a.effects.shake=function(d){return this.queue(function(){var c=a(this),e=["position","top","bottom","left","right"];a.effects.setMode(c,d.options.mode||"effect");var h=d.options.direction||"left",g=d.options.distance||20,i=d.options.times||3,b=d.duration||d.options.duration||140;a.effects.save(c,e);c.show();a.effects.createWrapper(c);var f=h=="up"||h=="down"?"top":"left",j=h=="up"||h=="left"?"pos":"neg";h={};var l={},o={};h[f]=(j=="pos"?"-=":"+=")+g;l[f]=(j=="pos"?"+=":"-=")+g*2;o[f]=
+(j=="pos"?"-=":"+=")+g*2;c.animate(h,b,d.options.easing);for(g=1;g<i;g++)c.animate(l,b,d.options.easing).animate(o,b,d.options.easing);c.animate(l,b,d.options.easing).animate(h,b/2,d.options.easing,function(){a.effects.restore(c,e);a.effects.removeWrapper(c);d.callback&&d.callback.apply(this,arguments)});c.queue("fx",function(){c.dequeue()});c.dequeue()})}})(jQuery);
+(function(a){a.effects.slide=function(d){return this.queue(function(){var c=a(this),e=["position","top","bottom","left","right"],h=a.effects.setMode(c,d.options.mode||"show"),g=d.options.direction||"left";a.effects.save(c,e);c.show();a.effects.createWrapper(c).css({overflow:"hidden"});var i=g=="up"||g=="down"?"top":"left";g=g=="up"||g=="left"?"pos":"neg";var b=d.options.distance||(i=="top"?c.outerHeight({margin:true}):c.outerWidth({margin:true}));if(h=="show")c.css(i,g=="pos"?isNaN(b)?"-"+b:-b:b);
+var f={};f[i]=(h=="show"?g=="pos"?"+=":"-=":g=="pos"?"-=":"+=")+b;c.animate(f,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){h=="hide"&&c.hide();a.effects.restore(c,e);a.effects.removeWrapper(c);d.callback&&d.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
+(function(a){a.effects.transfer=function(d){return this.queue(function(){var c=a(this),e=a(d.options.to),h=e.offset();e={top:h.top,left:h.left,height:e.innerHeight(),width:e.innerWidth()};h=c.offset();var g=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(d.options.className).css({top:h.top,left:h.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(e,d.duration,d.options.easing,function(){g.remove();d.callback&&d.callback.apply(c[0],arguments);
+c.dequeue()})})}})(jQuery);
+(function(a){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var d=this,c=d.options;d.running=0;d.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");d.headers=
+d.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){c.disabled||a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){c.disabled||a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){c.disabled||a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){c.disabled||a(this).removeClass("ui-state-focus")});d.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
+if(c.navigation){var e=d.element.find("a").filter(c.navigationFilter).eq(0);if(e.length){var h=e.closest(".ui-accordion-header");d.active=h.length?h:e.closest(".ui-accordion-content").prev()}}d.active=d._findActive(d.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");d.active.next().addClass("ui-accordion-content-active");d._createIcons();d.resize();d.element.attr("role","tablist");d.headers.attr("role","tab").bind("keydown.accordion",
+function(g){return d._keydown(g)}).next().attr("role","tabpanel");d.headers.not(d.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();d.active.length?d.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):d.headers.eq(0).attr("tabIndex",0);a.browser.safari||d.headers.find("a").attr("tabIndex",-1);c.event&&d.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(g){d._clickHandler.call(d,g,this);g.preventDefault()})},_createIcons:function(){var d=
+this.options;if(d.icons){a("<span></span>").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var d=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");
+this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(d.autoHeight||d.fillHeight)c.css("height","");return a.Widget.prototype.destroy.call(this)},_setOption:function(d,c){a.Widget.prototype._setOption.apply(this,arguments);d=="active"&&this.activate(c);if(d=="icons"){this._destroyIcons();
+c&&this._createIcons()}if(d=="disabled")this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(d){if(!(this.options.disabled||d.altKey||d.ctrlKey)){var c=a.ui.keyCode,e=this.headers.length,h=this.headers.index(d.target),g=false;switch(d.keyCode){case c.RIGHT:case c.DOWN:g=this.headers[(h+1)%e];break;case c.LEFT:case c.UP:g=this.headers[(h-1+e)%e];break;case c.SPACE:case c.ENTER:this._clickHandler({target:d.target},d.target);
+d.preventDefault()}if(g){a(d.target).attr("tabIndex",-1);a(g).attr("tabIndex",0);g.focus();return false}return true}},resize:function(){var d=this.options,c;if(d.fillSpace){if(a.browser.msie){var e=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height();a.browser.msie&&this.element.parent().css("overflow",e);this.headers.each(function(){c-=a(this).outerHeight(true)});this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+
+a(this).height()))}).css("overflow","auto")}else if(d.autoHeight){c=0;this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c)}return this},activate:function(d){this.options.active=d;d=this._findActive(d)[0];this._clickHandler({target:d},d);return this},_findActive:function(d){return d?typeof d==="number"?this.headers.filter(":eq("+d+")"):this.headers.not(this.headers.not(d)):d===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(d,c){var e=this.options;
+if(!e.disabled)if(d.target){d=a(d.currentTarget||c);c=d[0]===this.active[0];e.active=e.collapsible&&c?false:this.headers.index(d);if(!(this.running||!e.collapsible&&c)){var h=this.active;f=d.next();i=this.active.next();b={options:e,newHeader:c&&e.collapsible?a([]):d,oldHeader:this.active,newContent:c&&e.collapsible?a([]):f,oldContent:i};var g=this.headers.index(this.active[0])>this.headers.index(d[0]);this.active=c?a([]):d;this._toggle(f,i,b,c,g);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(e.icons.headerSelected).addClass(e.icons.header);
+if(!c){d.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(e.icons.header).addClass(e.icons.headerSelected);d.next().addClass("ui-accordion-content-active")}}}else if(e.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(e.icons.headerSelected).addClass(e.icons.header);this.active.next().addClass("ui-accordion-content-active");var i=this.active.next(),
+b={options:e,newHeader:a([]),oldHeader:e.active,newContent:a([]),oldContent:i},f=this.active=a([]);this._toggle(f,i,b)}},_toggle:function(d,c,e,h,g){var i=this,b=i.options;i.toShow=d;i.toHide=c;i.data=e;var f=function(){if(i)return i._completed.apply(i,arguments)};i._trigger("changestart",null,i.data);i.running=c.size()===0?d.size():c.size();if(b.animated){e={};e=b.collapsible&&h?{toShow:a([]),toHide:c,complete:f,down:g,autoHeight:b.autoHeight||b.fillSpace}:{toShow:d,toHide:c,complete:f,down:g,autoHeight:b.autoHeight||
+b.fillSpace};if(!b.proxied)b.proxied=b.animated;if(!b.proxiedDuration)b.proxiedDuration=b.duration;b.animated=a.isFunction(b.proxied)?b.proxied(e):b.proxied;b.duration=a.isFunction(b.proxiedDuration)?b.proxiedDuration(e):b.proxiedDuration;h=a.ui.accordion.animations;var j=b.duration,l=b.animated;if(l&&!h[l]&&!a.easing[l])l="slide";h[l]||(h[l]=function(o){this.slide(o,{easing:l,duration:j||700})});h[l](e)}else{if(b.collapsible&&h)d.toggle();else{c.hide();d.show()}f(true)}c.prev().attr({"aria-expanded":"false",
+"aria-selected":"false",tabIndex:-1}).blur();d.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(d){this.running=d?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});a.extend(a.ui.accordion,{version:"1.8.16",
+animations:{slide:function(d,c){d=a.extend({easing:"swing",duration:300},d,c);if(d.toHide.size())if(d.toShow.size()){var e=d.toShow.css("overflow"),h=0,g={},i={},b;c=d.toShow;b=c[0].style.width;c.width(parseInt(c.parent().width(),10)-parseInt(c.css("paddingLeft"),10)-parseInt(c.css("paddingRight"),10)-(parseInt(c.css("borderLeftWidth"),10)||0)-(parseInt(c.css("borderRightWidth"),10)||0));a.each(["height","paddingTop","paddingBottom"],function(f,j){i[j]="hide";f=(""+a.css(d.toShow[0],j)).match(/^([\d+-.]+)(.*)$/);
+g[j]={value:f[1],unit:f[2]||"px"}});d.toShow.css({height:0,overflow:"hidden"}).show();d.toHide.filter(":hidden").each(d.complete).end().filter(":visible").animate(i,{step:function(f,j){if(j.prop=="height")h=j.end-j.start===0?0:(j.now-j.start)/(j.end-j.start);d.toShow[0].style[j.prop]=h*g[j.prop].value+g[j.prop].unit},duration:d.duration,easing:d.easing,complete:function(){d.autoHeight||d.toShow.css("height","");d.toShow.css({width:b,overflow:e});d.complete()}})}else d.toHide.animate({height:"hide",
+paddingTop:"hide",paddingBottom:"hide"},d);else d.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},d)},bounceslide:function(d){this.slide(d,{easing:d.down?"easeOutBounce":"swing",duration:d.down?1E3:200})}}})})(jQuery);
+(function(a){var d=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var c=this,e=this.element[0].ownerDocument,h;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(g){if(!(c.options.disabled||c.element.propAttr("readOnly"))){h=
+false;var i=a.ui.keyCode;switch(g.keyCode){case i.PAGE_UP:c._move("previousPage",g);break;case i.PAGE_DOWN:c._move("nextPage",g);break;case i.UP:c._move("previous",g);g.preventDefault();break;case i.DOWN:c._move("next",g);g.preventDefault();break;case i.ENTER:case i.NUMPAD_ENTER:if(c.menu.active){h=true;g.preventDefault()}case i.TAB:if(!c.menu.active)return;c.menu.select(g);break;case i.ESCAPE:c.element.val(c.term);c.close(g);break;default:clearTimeout(c.searching);c.searching=setTimeout(function(){if(c.term!=
+c.element.val()){c.selectedItem=null;c.search(null,g)}},c.options.delay);break}}}).bind("keypress.autocomplete",function(g){if(h){h=false;g.preventDefault()}}).bind("focus.autocomplete",function(){if(!c.options.disabled){c.selectedItem=null;c.previous=c.element.val()}}).bind("blur.autocomplete",function(g){if(!c.options.disabled){clearTimeout(c.searching);c.closing=setTimeout(function(){c.close(g);c._change(g)},150)}});this._initSource();this.response=function(){return c._response.apply(c,arguments)};
+this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",e)[0]).mousedown(function(g){var i=c.menu.element[0];a(g.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(b){b.target!==c.element[0]&&b.target!==i&&!a.ui.contains(i,b.target)&&c.close()})},1);setTimeout(function(){clearTimeout(c.closing)},13)}).menu({focus:function(g,i){i=i.item.data("item.autocomplete");false!==c._trigger("focus",g,{item:i})&&/^key/.test(g.originalEvent.type)&&
+c.element.val(i.value)},selected:function(g,i){var b=i.item.data("item.autocomplete"),f=c.previous;if(c.element[0]!==e.activeElement){c.element.focus();c.previous=f;setTimeout(function(){c.previous=f;c.selectedItem=b},1)}false!==c._trigger("select",g,{item:b})&&c.element.val(b.value);c.term=c.element.val();c.close(g);c.selectedItem=b},blur:function(){c.menu.element.is(":visible")&&c.element.val()!==c.term&&c.element.val(c.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");
+a.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();a.Widget.prototype.destroy.call(this)},_setOption:function(c,e){a.Widget.prototype._setOption.apply(this,arguments);c==="source"&&this._initSource();if(c==="appendTo")this.menu.element.appendTo(a(e||"body",this.element[0].ownerDocument)[0]);c==="disabled"&&
+e&&this.xhr&&this.xhr.abort()},_initSource:function(){var c=this,e,h;if(a.isArray(this.options.source)){e=this.options.source;this.source=function(g,i){i(a.ui.autocomplete.filter(e,g.term))}}else if(typeof this.options.source==="string"){h=this.options.source;this.source=function(g,i){c.xhr&&c.xhr.abort();c.xhr=a.ajax({url:h,data:g,dataType:"json",autocompleteRequest:++d,success:function(b){this.autocompleteRequest===d&&i(b)},error:function(){this.autocompleteRequest===d&&i([])}})}}else this.source=
+this.options.source},search:function(c,e){c=c!=null?c:this.element.val();this.term=this.element.val();if(c.length<this.options.minLength)return this.close(e);clearTimeout(this.closing);if(this._trigger("search",e)!==false)return this._search(c)},_search:function(c){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:c},this.response)},_response:function(c){if(!this.options.disabled&&c&&c.length){c=this._normalize(c);this._suggest(c);this._trigger("open")}else this.close();
+this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(c){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",c)}},_change:function(c){this.previous!==this.element.val()&&this._trigger("change",c,{item:this.selectedItem})},_normalize:function(c){if(c.length&&c[0].label&&c[0].value)return c;return a.map(c,function(e){if(typeof e==="string")return{label:e,value:e};return a.extend({label:e.label||
+e.value,value:e.value||e.label},e)})},_suggest:function(c){var e=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(e,c);this.menu.deactivate();this.menu.refresh();e.show();this._resizeMenu();e.position(a.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var c=this.menu.element;c.outerWidth(Math.max(c.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(c,e){var h=this;
+a.each(e,function(g,i){h._renderItem(c,i)})},_renderItem:function(c,e){return a("<li></li>").data("item.autocomplete",e).append(a("<a></a>").text(e.label)).appendTo(c)},_move:function(c,e){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(c)||this.menu.last()&&/^next/.test(c)){this.element.val(this.term);this.menu.deactivate()}else this.menu[c](e);else this.search(null,e)},widget:function(){return this.menu.element}});a.extend(a.ui.autocomplete,{escapeRegex:function(c){return c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,
+"\\$&")},filter:function(c,e){var h=new RegExp(a.ui.autocomplete.escapeRegex(e),"i");return a.grep(c,function(g){return h.test(g.label||g.value||g)})}})})(jQuery);
+(function(a){a.widget("ui.menu",{_create:function(){var d=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(a(c.target).closest(".ui-menu-item a").length){c.preventDefault();d.select(c)}});this.refresh()},refresh:function(){var d=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
+-1).mouseenter(function(c){d.activate(c,a(this).parent())}).mouseleave(function(){d.deactivate()})},activate:function(d,c){this.deactivate();if(this.hasScroll()){var e=c.offset().top-this.element.offset().top,h=this.element.scrollTop(),g=this.element.height();if(e<0)this.element.scrollTop(h+e);else e>=g&&this.element.scrollTop(h+e-g+c.height())}this.active=c.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",d,{item:c})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");
+this._trigger("blur");this.active=null}},next:function(d){this.move("next",".ui-menu-item:first",d)},previous:function(d){this.move("prev",".ui-menu-item:last",d)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(d,c,e){if(this.active){d=this.active[d+"All"](".ui-menu-item").eq(0);d.length?this.activate(e,d):this.activate(e,this.element.children(c))}else this.activate(e,
+this.element.children(c))},nextPage:function(d){if(this.hasScroll())if(!this.active||this.last())this.activate(d,this.element.children(".ui-menu-item:first"));else{var c=this.active.offset().top,e=this.element.height(),h=this.element.children(".ui-menu-item").filter(function(){var g=a(this).offset().top-c-e+a(this).height();return g<10&&g>-10});h.length||(h=this.element.children(".ui-menu-item:last"));this.activate(d,h)}else this.activate(d,this.element.children(".ui-menu-item").filter(!this.active||
+this.last()?":first":":last"))},previousPage:function(d){if(this.hasScroll())if(!this.active||this.first())this.activate(d,this.element.children(".ui-menu-item:last"));else{var c=this.active.offset().top,e=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var h=a(this).offset().top-c+e-a(this).height();return h<10&&h>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(d,result)}else this.activate(d,this.element.children(".ui-menu-item").filter(!this.active||
+this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(d){this._trigger("selected",d,{item:this.active})}})})(jQuery);
+(function(a){var d,c,e,h,g=function(){var b=a(this).find(":ui-button");setTimeout(function(){b.button("refresh")},1)},i=function(b){var f=b.name,j=b.form,l=a([]);if(f)l=j?a(j).find("[name='"+f+"']"):a("[name='"+f+"']",b.ownerDocument).filter(function(){return!this.form});return l};a.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",g);if(typeof this.options.disabled!==
+"boolean")this.options.disabled=this.element.propAttr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var b=this,f=this.options,j=this.type==="checkbox"||this.type==="radio",l="ui-state-hover"+(!j?" ui-state-active":"");if(f.label===null)f.label=this.buttonElement.html();if(this.element.is(":disabled"))f.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){if(!f.disabled){a(this).addClass("ui-state-hover");
+this===d&&a(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){f.disabled||a(this).removeClass(l)}).bind("click.button",function(o){if(f.disabled){o.preventDefault();o.stopImmediatePropagation()}});this.element.bind("focus.button",function(){b.buttonElement.addClass("ui-state-focus")}).bind("blur.button",function(){b.buttonElement.removeClass("ui-state-focus")});if(j){this.element.bind("change.button",function(){h||b.refresh()});this.buttonElement.bind("mousedown.button",function(o){if(!f.disabled){h=
+false;c=o.pageX;e=o.pageY}}).bind("mouseup.button",function(o){if(!f.disabled)if(c!==o.pageX||e!==o.pageY)h=true})}if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(f.disabled||h)return false;a(this).toggleClass("ui-state-active");b.buttonElement.attr("aria-pressed",b.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(f.disabled||h)return false;a(this).addClass("ui-state-active");b.buttonElement.attr("aria-pressed","true");
+var o=b.element[0];i(o).not(o).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")});else{this.buttonElement.bind("mousedown.button",function(){if(f.disabled)return false;a(this).addClass("ui-state-active");d=this;a(document).one("mouseup",function(){d=null})}).bind("mouseup.button",function(){if(f.disabled)return false;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(o){if(f.disabled)return false;if(o.keyCode==a.ui.keyCode.SPACE||
+o.keyCode==a.ui.keyCode.ENTER)a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(o){o.keyCode===a.ui.keyCode.SPACE&&a(this).click()})}this._setOption("disabled",f.disabled);this._resetButton()},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type===
+"radio"){var b=this.element.parents().filter(":last"),f="label[for='"+this.element.attr("id")+"']";this.buttonElement=b.find(f);if(!this.buttonElement.length){b=b.length?b.siblings():this.element.siblings();this.buttonElement=b.filter(f);if(!this.buttonElement.length)this.buttonElement=b.find(f)}this.element.addClass("ui-helper-hidden-accessible");(b=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",b)}else this.buttonElement=this.element},
+widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title");
+a.Widget.prototype.destroy.call(this)},_setOption:function(b,f){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled")f?this.element.propAttr("disabled",true):this.element.propAttr("disabled",false);else this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&&this._setOption("disabled",b);if(this.type==="radio")i(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
+"true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false")},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var b=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
+f=a("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),j=this.options.icons,l=j.primary&&j.secondary,o=[];if(j.primary||j.secondary){if(this.options.text)o.push("ui-button-text-icon"+(l?"s":j.primary?"-primary":"-secondary"));j.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+j.primary+"'></span>");j.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+j.secondary+"'></span>");if(!this.options.text){o.push(l?"ui-button-icons-only":
+"ui-button-icon-only");this.hasTitle||b.attr("title",f)}}else o.push("ui-button-text-only");b.addClass(o.join(" "))}}});a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,f){b==="disabled"&&this.buttons.button("option",b,f);a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var b=this.element.css("direction")===
+"ltr";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(b?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");
+a.Widget.prototype.destroy.call(this)}})})(jQuery);
+(function(a,d){function c(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
+"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
+"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
+minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false,disabled:false};a.extend(this._defaults,this.regional[""]);this.dpDiv=e(a('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function e(b){return b.bind("mouseout",
+function(f){f=a(f.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");f.length&&f.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(f){f=a(f.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");if(!(a.datepicker._isDisabledDatepicker(i.inline?b.parent()[0]:i.input[0])||!f.length)){f.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
+f.addClass("ui-state-hover");f.hasClass("ui-datepicker-prev")&&f.addClass("ui-datepicker-prev-hover");f.hasClass("ui-datepicker-next")&&f.addClass("ui-datepicker-next-hover")}})}function h(b,f){a.extend(b,f);for(var j in f)if(f[j]==null||f[j]==d)b[j]=f[j];return b}a.extend(a.ui,{datepicker:{version:"1.8.16"}});var g=(new Date).getTime(),i;a.extend(c.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},
+setDefaults:function(b){h(this._defaults,b||{});return this},_attachDatepicker:function(b,f){var j=null;for(var l in this._defaults){var o=b.getAttribute("date:"+l);if(o){j=j||{};try{j[l]=eval(o)}catch(n){j[l]=o}}}l=b.nodeName.toLowerCase();o=l=="div"||l=="span";if(!b.id){this.uuid+=1;b.id="dp"+this.uuid}var k=this._newInst(a(b),o);k.settings=a.extend({},f||{},j||{});if(l=="input")this._connectDatepicker(b,k);else o&&this._inlineDatepicker(b,k)},_newInst:function(b,f){return{id:b[0].id.replace(/([^A-Za-z0-9_-])/g,
+"\\\\$1"),input:b,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:f,dpDiv:!f?this.dpDiv:e(a('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(b,f){var j=a(b);f.append=a([]);f.trigger=a([]);if(!j.hasClass(this.markerClassName)){this._attachments(j,f);j.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",
+function(l,o,n){f.settings[o]=n}).bind("getData.datepicker",function(l,o){return this._get(f,o)});this._autoSize(f);a.data(b,"datepicker",f);f.settings.disabled&&this._disableDatepicker(b)}},_attachments:function(b,f){var j=this._get(f,"appendText"),l=this._get(f,"isRTL");f.append&&f.append.remove();if(j){f.append=a('<span class="'+this._appendClass+'">'+j+"</span>");b[l?"before":"after"](f.append)}b.unbind("focus",this._showDatepicker);f.trigger&&f.trigger.remove();j=this._get(f,"showOn");if(j==
+"focus"||j=="both")b.focus(this._showDatepicker);if(j=="button"||j=="both"){j=this._get(f,"buttonText");var o=this._get(f,"buttonImage");f.trigger=a(this._get(f,"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:o,alt:j,title:j}):a('<button type="button"></button>').addClass(this._triggerClass).html(o==""?j:a("<img/>").attr({src:o,alt:j,title:j})));b[l?"before":"after"](f.trigger);f.trigger.click(function(){a.datepicker._datepickerShowing&&a.datepicker._lastInput==b[0]?a.datepicker._hideDatepicker():
+a.datepicker._showDatepicker(b[0]);return false})}},_autoSize:function(b){if(this._get(b,"autoSize")&&!b.inline){var f=new Date(2009,11,20),j=this._get(b,"dateFormat");if(j.match(/[DM]/)){var l=function(o){for(var n=0,k=0,m=0;m<o.length;m++)if(o[m].length>n){n=o[m].length;k=m}return k};f.setMonth(l(this._get(b,j.match(/MM/)?"monthNames":"monthNamesShort")));f.setDate(l(this._get(b,j.match(/DD/)?"dayNames":"dayNamesShort"))+20-f.getDay())}b.input.attr("size",this._formatDate(b,f).length)}},_inlineDatepicker:function(b,
+f){var j=a(b);if(!j.hasClass(this.markerClassName)){j.addClass(this.markerClassName).append(f.dpDiv).bind("setData.datepicker",function(l,o,n){f.settings[o]=n}).bind("getData.datepicker",function(l,o){return this._get(f,o)});a.data(b,"datepicker",f);this._setDate(f,this._getDefaultDate(f),true);this._updateDatepicker(f);this._updateAlternate(f);f.settings.disabled&&this._disableDatepicker(b);f.dpDiv.css("display","block")}},_dialogDatepicker:function(b,f,j,l,o){b=this._dialogInst;if(!b){this.uuid+=
+1;this._dialogInput=a('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);a("body").append(this._dialogInput);b=this._dialogInst=this._newInst(this._dialogInput,false);b.settings={};a.data(this._dialogInput[0],"datepicker",b)}h(b.settings,l||{});f=f&&f.constructor==Date?this._formatDate(b,f):f;this._dialogInput.val(f);this._pos=o?o.length?o:[o.pageX,o.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/
+2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");b.settings.onSelect=j;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);a.blockUI&&a.blockUI(this.dpDiv);a.data(this._dialogInput[0],"datepicker",b);return this},_destroyDatepicker:function(b){var f=
+a(b),j=a.data(b,"datepicker");if(f.hasClass(this.markerClassName)){var l=b.nodeName.toLowerCase();a.removeData(b,"datepicker");if(l=="input"){j.append.remove();j.trigger.remove();f.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(l=="div"||l=="span")f.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(b){var f=a(b),j=a.data(b,"datepicker");if(f.hasClass(this.markerClassName)){var l=
+b.nodeName.toLowerCase();if(l=="input"){b.disabled=false;j.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(l=="div"||l=="span"){f=f.children("."+this._inlineClass);f.children().removeClass("ui-state-disabled");f.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=a.map(this._disabledInputs,function(o){return o==b?null:o})}},_disableDatepicker:function(b){var f=a(b),j=a.data(b,
+"datepicker");if(f.hasClass(this.markerClassName)){var l=b.nodeName.toLowerCase();if(l=="input"){b.disabled=true;j.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(l=="div"||l=="span"){f=f.children("."+this._inlineClass);f.children().addClass("ui-state-disabled");f.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=a.map(this._disabledInputs,function(o){return o==
+b?null:o});this._disabledInputs[this._disabledInputs.length]=b}},_isDisabledDatepicker:function(b){if(!b)return false;for(var f=0;f<this._disabledInputs.length;f++)if(this._disabledInputs[f]==b)return true;return false},_getInst:function(b){try{return a.data(b,"datepicker")}catch(f){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(b,f,j){var l=this._getInst(b);if(arguments.length==2&&typeof f=="string")return f=="defaults"?a.extend({},a.datepicker._defaults):l?f=="all"?
+a.extend({},l.settings):this._get(l,f):null;var o=f||{};if(typeof f=="string"){o={};o[f]=j}if(l){this._curInst==l&&this._hideDatepicker();var n=this._getDateDatepicker(b,true),k=this._getMinMaxDate(l,"min"),m=this._getMinMaxDate(l,"max");h(l.settings,o);if(k!==null&&o.dateFormat!==d&&o.minDate===d)l.settings.minDate=this._formatDate(l,k);if(m!==null&&o.dateFormat!==d&&o.maxDate===d)l.settings.maxDate=this._formatDate(l,m);this._attachments(a(b),l);this._autoSize(l);this._setDate(l,n);this._updateAlternate(l);
+this._updateDatepicker(l)}},_changeDatepicker:function(b,f,j){this._optionDatepicker(b,f,j)},_refreshDatepicker:function(b){(b=this._getInst(b))&&this._updateDatepicker(b)},_setDateDatepicker:function(b,f){if(b=this._getInst(b)){this._setDate(b,f);this._updateDatepicker(b);this._updateAlternate(b)}},_getDateDatepicker:function(b,f){(b=this._getInst(b))&&!b.inline&&this._setDateFromField(b,f);return b?this._getDate(b):null},_doKeyDown:function(b){var f=a.datepicker._getInst(b.target),j=true,l=f.dpDiv.is(".ui-datepicker-rtl");
+f._keyEvent=true;if(a.datepicker._datepickerShowing)switch(b.keyCode){case 9:a.datepicker._hideDatepicker();j=false;break;case 13:j=a("td."+a.datepicker._dayOverClass+":not(."+a.datepicker._currentClass+")",f.dpDiv);j[0]&&a.datepicker._selectDay(b.target,f.selectedMonth,f.selectedYear,j[0]);if(b=a.datepicker._get(f,"onSelect")){j=a.datepicker._formatDate(f);b.apply(f.input?f.input[0]:null,[j,f])}else a.datepicker._hideDatepicker();return false;case 27:a.datepicker._hideDatepicker();break;case 33:a.datepicker._adjustDate(b.target,
+b.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 34:a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 35:if(b.ctrlKey||b.metaKey)a.datepicker._clearDate(b.target);j=b.ctrlKey||b.metaKey;break;case 36:if(b.ctrlKey||b.metaKey)a.datepicker._gotoToday(b.target);j=b.ctrlKey||b.metaKey;break;case 37:if(b.ctrlKey||b.metaKey)a.datepicker._adjustDate(b.target,l?+1:-1,"D");j=
+b.ctrlKey||b.metaKey;if(b.originalEvent.altKey)a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 38:if(b.ctrlKey||b.metaKey)a.datepicker._adjustDate(b.target,-7,"D");j=b.ctrlKey||b.metaKey;break;case 39:if(b.ctrlKey||b.metaKey)a.datepicker._adjustDate(b.target,l?-1:+1,"D");j=b.ctrlKey||b.metaKey;if(b.originalEvent.altKey)a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,
+"stepMonths"),"M");break;case 40:if(b.ctrlKey||b.metaKey)a.datepicker._adjustDate(b.target,+7,"D");j=b.ctrlKey||b.metaKey;break;default:j=false}else if(b.keyCode==36&&b.ctrlKey)a.datepicker._showDatepicker(this);else j=false;if(j){b.preventDefault();b.stopPropagation()}},_doKeyPress:function(b){var f=a.datepicker._getInst(b.target);if(a.datepicker._get(f,"constrainInput")){f=a.datepicker._possibleChars(a.datepicker._get(f,"dateFormat"));var j=String.fromCharCode(b.charCode==d?b.keyCode:b.charCode);
+return b.ctrlKey||b.metaKey||j<" "||!f||f.indexOf(j)>-1}},_doKeyUp:function(b){b=a.datepicker._getInst(b.target);if(b.input.val()!=b.lastVal)try{if(a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,a.datepicker._getFormatConfig(b))){a.datepicker._setDateFromField(b);a.datepicker._updateAlternate(b);a.datepicker._updateDatepicker(b)}}catch(f){a.datepicker.log(f)}return true},_showDatepicker:function(b){b=b.target||b;if(b.nodeName.toLowerCase()!="input")b=a("input",
+b.parentNode)[0];if(!(a.datepicker._isDisabledDatepicker(b)||a.datepicker._lastInput==b)){var f=a.datepicker._getInst(b);if(a.datepicker._curInst&&a.datepicker._curInst!=f){a.datepicker._datepickerShowing&&a.datepicker._triggerOnClose(a.datepicker._curInst);a.datepicker._curInst.dpDiv.stop(true,true)}var j=a.datepicker._get(f,"beforeShow");j=j?j.apply(b,[b,f]):{};if(j!==false){h(f.settings,j);f.lastVal=null;a.datepicker._lastInput=b;a.datepicker._setDateFromField(f);if(a.datepicker._inDialog)b.value=
+"";if(!a.datepicker._pos){a.datepicker._pos=a.datepicker._findPos(b);a.datepicker._pos[1]+=b.offsetHeight}var l=false;a(b).parents().each(function(){l|=a(this).css("position")=="fixed";return!l});if(l&&a.browser.opera){a.datepicker._pos[0]-=document.documentElement.scrollLeft;a.datepicker._pos[1]-=document.documentElement.scrollTop}j={left:a.datepicker._pos[0],top:a.datepicker._pos[1]};a.datepicker._pos=null;f.dpDiv.empty();f.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});a.datepicker._updateDatepicker(f);
+j=a.datepicker._checkOffset(f,j,l);f.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":l?"fixed":"absolute",display:"none",left:j.left+"px",top:j.top+"px"});if(!f.inline){j=a.datepicker._get(f,"showAnim");var o=a.datepicker._get(f,"duration"),n=function(){var k=f.dpDiv.find("iframe.ui-datepicker-cover");if(k.length){var m=a.datepicker._getBorders(f.dpDiv);k.css({left:-m[0],top:-m[1],width:f.dpDiv.outerWidth(),height:f.dpDiv.outerHeight()})}};f.dpDiv.zIndex(a(b).zIndex()+1);a.datepicker._datepickerShowing=
+true;a.effects&&a.effects[j]?f.dpDiv.show(j,a.datepicker._get(f,"showOptions"),o,n):f.dpDiv[j||"show"](j?o:null,n);if(!j||!o)n();f.input.is(":visible")&&!f.input.is(":disabled")&&f.input.focus();a.datepicker._curInst=f}}}},_updateDatepicker:function(b){this.maxRows=4;var f=a.datepicker._getBorders(b.dpDiv);i=b;b.dpDiv.empty().append(this._generateHTML(b));var j=b.dpDiv.find("iframe.ui-datepicker-cover");j.length&&j.css({left:-f[0],top:-f[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()});
+b.dpDiv.find("."+this._dayOverClass+" a").mouseover();f=this._getNumberOfMonths(b);j=f[1];b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");j>1&&b.dpDiv.addClass("ui-datepicker-multi-"+j).css("width",17*j+"em");b.dpDiv[(f[0]!=1||f[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");b==a.datepicker._curInst&&a.datepicker._datepickerShowing&&b.input&&b.input.is(":visible")&&
+!b.input.is(":disabled")&&b.input[0]!=document.activeElement&&b.input.focus();if(b.yearshtml){var l=b.yearshtml;setTimeout(function(){l===b.yearshtml&&b.yearshtml&&b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml);l=b.yearshtml=null},0)}},_getBorders:function(b){var f=function(j){return{thin:1,medium:2,thick:3}[j]||j};return[parseFloat(f(b.css("border-left-width"))),parseFloat(f(b.css("border-top-width")))]},_checkOffset:function(b,f,j){var l=b.dpDiv.outerWidth(),o=b.dpDiv.outerHeight(),
+n=b.input?b.input.outerWidth():0,k=b.input?b.input.outerHeight():0,m=document.documentElement.clientWidth+a(document).scrollLeft(),p=document.documentElement.clientHeight+a(document).scrollTop();f.left-=this._get(b,"isRTL")?l-n:0;f.left-=j&&f.left==b.input.offset().left?a(document).scrollLeft():0;f.top-=j&&f.top==b.input.offset().top+k?a(document).scrollTop():0;f.left-=Math.min(f.left,f.left+l>m&&m>l?Math.abs(f.left+l-m):0);f.top-=Math.min(f.top,f.top+o>p&&p>o?Math.abs(o+k):0);return f},_findPos:function(b){for(var f=
+this._get(this._getInst(b),"isRTL");b&&(b.type=="hidden"||b.nodeType!=1||a.expr.filters.hidden(b));)b=b[f?"previousSibling":"nextSibling"];b=a(b).offset();return[b.left,b.top]},_triggerOnClose:function(b){var f=this._get(b,"onClose");if(f)f.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b])},_hideDatepicker:function(b){var f=this._curInst;if(!(!f||b&&f!=a.data(b,"datepicker")))if(this._datepickerShowing){b=this._get(f,"showAnim");var j=this._get(f,"duration"),l=function(){a.datepicker._tidyDialog(f);
+this._curInst=null};a.effects&&a.effects[b]?f.dpDiv.hide(b,a.datepicker._get(f,"showOptions"),j,l):f.dpDiv[b=="slideDown"?"slideUp":b=="fadeIn"?"fadeOut":"hide"](b?j:null,l);b||l();a.datepicker._triggerOnClose(f);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(a.blockUI){a.unblockUI();a("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(b){b.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},
+_checkExternalClick:function(b){if(a.datepicker._curInst){b=a(b.target);b[0].id!=a.datepicker._mainDivId&&b.parents("#"+a.datepicker._mainDivId).length==0&&!b.hasClass(a.datepicker.markerClassName)&&!b.hasClass(a.datepicker._triggerClass)&&a.datepicker._datepickerShowing&&!(a.datepicker._inDialog&&a.blockUI)&&a.datepicker._hideDatepicker()}},_adjustDate:function(b,f,j){b=a(b);var l=this._getInst(b[0]);if(!this._isDisabledDatepicker(b[0])){this._adjustInstDate(l,f+(j=="M"?this._get(l,"showCurrentAtPos"):
+0),j);this._updateDatepicker(l)}},_gotoToday:function(b){b=a(b);var f=this._getInst(b[0]);if(this._get(f,"gotoCurrent")&&f.currentDay){f.selectedDay=f.currentDay;f.drawMonth=f.selectedMonth=f.currentMonth;f.drawYear=f.selectedYear=f.currentYear}else{var j=new Date;f.selectedDay=j.getDate();f.drawMonth=f.selectedMonth=j.getMonth();f.drawYear=f.selectedYear=j.getFullYear()}this._notifyChange(f);this._adjustDate(b)},_selectMonthYear:function(b,f,j){b=a(b);var l=this._getInst(b[0]);l["selected"+(j=="M"?
+"Month":"Year")]=l["draw"+(j=="M"?"Month":"Year")]=parseInt(f.options[f.selectedIndex].value,10);this._notifyChange(l);this._adjustDate(b)},_selectDay:function(b,f,j,l){var o=a(b);if(!(a(l).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0]))){o=this._getInst(o[0]);o.selectedDay=o.currentDay=a("a",l).html();o.selectedMonth=o.currentMonth=f;o.selectedYear=o.currentYear=j;this._selectDate(b,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear))}},_clearDate:function(b){b=a(b);
+this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(b,f){b=this._getInst(a(b)[0]);f=f!=null?f:this._formatDate(b);b.input&&b.input.val(f);this._updateAlternate(b);var j=this._get(b,"onSelect");if(j)j.apply(b.input?b.input[0]:null,[f,b]);else b.input&&b.input.trigger("change");if(b.inline)this._updateDatepicker(b);else{this._hideDatepicker();this._lastInput=b.input[0];typeof b.input[0]!="object"&&b.input.focus();this._lastInput=null}},_updateAlternate:function(b){var f=this._get(b,"altField");
+if(f){var j=this._get(b,"altFormat")||this._get(b,"dateFormat"),l=this._getDate(b),o=this.formatDate(j,l,this._getFormatConfig(b));a(f).each(function(){a(this).val(o)})}},noWeekends:function(b){b=b.getDay();return[b>0&&b<6,""]},iso8601Week:function(b){b=new Date(b.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var f=b.getTime();b.setMonth(0);b.setDate(1);return Math.floor(Math.round((f-b)/864E5)/7)+1},parseDate:function(b,f,j){if(b==null||f==null)throw"Invalid arguments";f=typeof f=="object"?
+f.toString():f+"";if(f=="")return null;var l=(j?j.shortYearCutoff:null)||this._defaults.shortYearCutoff;l=typeof l!="string"?l:(new Date).getFullYear()%100+parseInt(l,10);for(var o=(j?j.dayNamesShort:null)||this._defaults.dayNamesShort,n=(j?j.dayNames:null)||this._defaults.dayNames,k=(j?j.monthNamesShort:null)||this._defaults.monthNamesShort,m=(j?j.monthNames:null)||this._defaults.monthNames,p=j=-1,q=-1,s=-1,r=false,u=function(z){(z=H+1<b.length&&b.charAt(H+1)==z)&&H++;return z},v=function(z){var I=
+u(z);z=new RegExp("^\\d{1,"+(z=="@"?14:z=="!"?20:z=="y"&&I?4:z=="o"?3:2)+"}");z=f.substring(y).match(z);if(!z)throw"Missing number at position "+y;y+=z[0].length;return parseInt(z[0],10)},w=function(z,I,N){z=a.map(u(z)?N:I,function(D,E){return[[E,D]]}).sort(function(D,E){return-(D[1].length-E[1].length)});var J=-1;a.each(z,function(D,E){D=E[1];if(f.substr(y,D.length).toLowerCase()==D.toLowerCase()){J=E[0];y+=D.length;return false}});if(J!=-1)return J+1;else throw"Unknown name at position "+y;},x=
+function(){if(f.charAt(y)!=b.charAt(H))throw"Unexpected literal at position "+y;y++},y=0,H=0;H<b.length;H++)if(r)if(b.charAt(H)=="'"&&!u("'"))r=false;else x();else switch(b.charAt(H)){case "d":q=v("d");break;case "D":w("D",o,n);break;case "o":s=v("o");break;case "m":p=v("m");break;case "M":p=w("M",k,m);break;case "y":j=v("y");break;case "@":var C=new Date(v("@"));j=C.getFullYear();p=C.getMonth()+1;q=C.getDate();break;case "!":C=new Date((v("!")-this._ticksTo1970)/1E4);j=C.getFullYear();p=C.getMonth()+
+1;q=C.getDate();break;case "'":if(u("'"))x();else r=true;break;default:x()}if(y<f.length)throw"Extra/unparsed characters found in date: "+f.substring(y);if(j==-1)j=(new Date).getFullYear();else if(j<100)j+=(new Date).getFullYear()-(new Date).getFullYear()%100+(j<=l?0:-100);if(s>-1){p=1;q=s;do{l=this._getDaysInMonth(j,p-1);if(q<=l)break;p++;q-=l}while(1)}C=this._daylightSavingAdjust(new Date(j,p-1,q));if(C.getFullYear()!=j||C.getMonth()+1!=p||C.getDate()!=q)throw"Invalid date";return C},ATOM:"yy-mm-dd",
+COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(b,f,j){if(!f)return"";var l=(j?j.dayNamesShort:null)||this._defaults.dayNamesShort,o=(j?j.dayNames:null)||this._defaults.dayNames,n=(j?j.monthNamesShort:null)||this._defaults.monthNamesShort;j=(j?j.monthNames:
+null)||this._defaults.monthNames;var k=function(u){(u=r+1<b.length&&b.charAt(r+1)==u)&&r++;return u},m=function(u,v,w){v=""+v;if(k(u))for(;v.length<w;)v="0"+v;return v},p=function(u,v,w,x){return k(u)?x[v]:w[v]},q="",s=false;if(f)for(var r=0;r<b.length;r++)if(s)if(b.charAt(r)=="'"&&!k("'"))s=false;else q+=b.charAt(r);else switch(b.charAt(r)){case "d":q+=m("d",f.getDate(),2);break;case "D":q+=p("D",f.getDay(),l,o);break;case "o":q+=m("o",Math.round(((new Date(f.getFullYear(),f.getMonth(),f.getDate())).getTime()-
+(new Date(f.getFullYear(),0,0)).getTime())/864E5),3);break;case "m":q+=m("m",f.getMonth()+1,2);break;case "M":q+=p("M",f.getMonth(),n,j);break;case "y":q+=k("y")?f.getFullYear():(f.getYear()%100<10?"0":"")+f.getYear()%100;break;case "@":q+=f.getTime();break;case "!":q+=f.getTime()*1E4+this._ticksTo1970;break;case "'":if(k("'"))q+="'";else s=true;break;default:q+=b.charAt(r)}return q},_possibleChars:function(b){for(var f="",j=false,l=function(n){(n=o+1<b.length&&b.charAt(o+1)==n)&&o++;return n},o=
+0;o<b.length;o++)if(j)if(b.charAt(o)=="'"&&!l("'"))j=false;else f+=b.charAt(o);else switch(b.charAt(o)){case "d":case "m":case "y":case "@":f+="0123456789";break;case "D":case "M":return null;case "'":if(l("'"))f+="'";else j=true;break;default:f+=b.charAt(o)}return f},_get:function(b,f){return b.settings[f]!==d?b.settings[f]:this._defaults[f]},_setDateFromField:function(b,f){if(b.input.val()!=b.lastVal){var j=this._get(b,"dateFormat"),l=b.lastVal=b.input?b.input.val():null,o,n;o=n=this._getDefaultDate(b);
+var k=this._getFormatConfig(b);try{o=this.parseDate(j,l,k)||n}catch(m){this.log(m);l=f?"":l}b.selectedDay=o.getDate();b.drawMonth=b.selectedMonth=o.getMonth();b.drawYear=b.selectedYear=o.getFullYear();b.currentDay=l?o.getDate():0;b.currentMonth=l?o.getMonth():0;b.currentYear=l?o.getFullYear():0;this._adjustInstDate(b)}},_getDefaultDate:function(b){return this._restrictMinMax(b,this._determineDate(b,this._get(b,"defaultDate"),new Date))},_determineDate:function(b,f,j){var l=function(n){var k=new Date;
+k.setDate(k.getDate()+n);return k},o=function(n){try{return a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),n,a.datepicker._getFormatConfig(b))}catch(k){}var m=(n.toLowerCase().match(/^c/)?a.datepicker._getDate(b):null)||new Date,p=m.getFullYear(),q=m.getMonth();m=m.getDate();for(var s=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,r=s.exec(n);r;){switch(r[2]||"d"){case "d":case "D":m+=parseInt(r[1],10);break;case "w":case "W":m+=parseInt(r[1],10)*7;break;case "m":case "M":q+=parseInt(r[1],10);m=
+Math.min(m,a.datepicker._getDaysInMonth(p,q));break;case "y":case "Y":p+=parseInt(r[1],10);m=Math.min(m,a.datepicker._getDaysInMonth(p,q));break}r=s.exec(n)}return new Date(p,q,m)};if(f=(f=f==null||f===""?j:typeof f=="string"?o(f):typeof f=="number"?isNaN(f)?j:l(f):new Date(f.getTime()))&&f.toString()=="Invalid Date"?j:f){f.setHours(0);f.setMinutes(0);f.setSeconds(0);f.setMilliseconds(0)}return this._daylightSavingAdjust(f)},_daylightSavingAdjust:function(b){if(!b)return null;b.setHours(b.getHours()>
+12?b.getHours()+2:0);return b},_setDate:function(b,f,j){var l=!f,o=b.selectedMonth,n=b.selectedYear;f=this._restrictMinMax(b,this._determineDate(b,f,new Date));b.selectedDay=b.currentDay=f.getDate();b.drawMonth=b.selectedMonth=b.currentMonth=f.getMonth();b.drawYear=b.selectedYear=b.currentYear=f.getFullYear();if((o!=b.selectedMonth||n!=b.selectedYear)&&!j)this._notifyChange(b);this._adjustInstDate(b);if(b.input)b.input.val(l?"":this._formatDate(b))},_getDate:function(b){return!b.currentYear||b.input&&
+b.input.val()==""?null:this._daylightSavingAdjust(new Date(b.currentYear,b.currentMonth,b.currentDay))},_generateHTML:function(b){var f=new Date;f=this._daylightSavingAdjust(new Date(f.getFullYear(),f.getMonth(),f.getDate()));var j=this._get(b,"isRTL"),l=this._get(b,"showButtonPanel"),o=this._get(b,"hideIfNoPrevNext"),n=this._get(b,"navigationAsDateFormat"),k=this._getNumberOfMonths(b),m=this._get(b,"showCurrentAtPos"),p=this._get(b,"stepMonths"),q=k[0]!=1||k[1]!=1,s=this._daylightSavingAdjust(!b.currentDay?
+new Date(9999,9,9):new Date(b.currentYear,b.currentMonth,b.currentDay)),r=this._getMinMaxDate(b,"min"),u=this._getMinMaxDate(b,"max");m=b.drawMonth-m;var v=b.drawYear;if(m<0){m+=12;v--}if(u){var w=this._daylightSavingAdjust(new Date(u.getFullYear(),u.getMonth()-k[0]*k[1]+1,u.getDate()));for(w=r&&w<r?r:w;this._daylightSavingAdjust(new Date(v,m,1))>w;){m--;if(m<0){m=11;v--}}}b.drawMonth=m;b.drawYear=v;w=this._get(b,"prevText");w=!n?w:this.formatDate(w,this._daylightSavingAdjust(new Date(v,m-p,1)),this._getFormatConfig(b));
+w=this._canAdjustMonth(b,-1,v,m)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+g+".datepicker._adjustDate('#"+b.id+"', -"+p+", 'M');\" title=\""+w+'"><span class="ui-icon ui-icon-circle-triangle-'+(j?"e":"w")+'">'+w+"</span></a>":o?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+w+'"><span class="ui-icon ui-icon-circle-triangle-'+(j?"e":"w")+'">'+w+"</span></a>";var x=this._get(b,"nextText");x=!n?x:this.formatDate(x,this._daylightSavingAdjust(new Date(v,
+m+p,1)),this._getFormatConfig(b));o=this._canAdjustMonth(b,+1,v,m)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+g+".datepicker._adjustDate('#"+b.id+"', +"+p+", 'M');\" title=\""+x+'"><span class="ui-icon ui-icon-circle-triangle-'+(j?"w":"e")+'">'+x+"</span></a>":o?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+x+'"><span class="ui-icon ui-icon-circle-triangle-'+(j?"w":"e")+'">'+x+"</span></a>";p=this._get(b,"currentText");x=this._get(b,"gotoCurrent")&&
+b.currentDay?s:f;p=!n?p:this.formatDate(p,x,this._getFormatConfig(b));n=!b.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+g+'.datepicker._hideDatepicker();">'+this._get(b,"closeText")+"</button>":"";l=l?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(j?n:"")+(this._isInRange(b,x)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+
+g+".datepicker._gotoToday('#"+b.id+"');\">"+p+"</button>":"")+(j?"":n)+"</div>":"";n=parseInt(this._get(b,"firstDay"),10);n=isNaN(n)?0:n;p=this._get(b,"showWeek");x=this._get(b,"dayNames");this._get(b,"dayNamesShort");var y=this._get(b,"dayNamesMin"),H=this._get(b,"monthNames"),C=this._get(b,"monthNamesShort"),z=this._get(b,"beforeShowDay"),I=this._get(b,"showOtherMonths"),N=this._get(b,"selectOtherMonths");this._get(b,"calculateWeek");for(var J=this._getDefaultDate(b),D="",E=0;E<k[0];E++){var P=
+"";this.maxRows=4;for(var L=0;L<k[1];L++){var Q=this._daylightSavingAdjust(new Date(v,m,b.selectedDay)),B=" ui-corner-all",F="";if(q){F+='<div class="ui-datepicker-group';if(k[1]>1)switch(L){case 0:F+=" ui-datepicker-group-first";B=" ui-corner-"+(j?"right":"left");break;case k[1]-1:F+=" ui-datepicker-group-last";B=" ui-corner-"+(j?"left":"right");break;default:F+=" ui-datepicker-group-middle";B="";break}F+='">'}F+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+B+'">'+(/all|left/.test(B)&&
+E==0?j?o:w:"")+(/all|right/.test(B)&&E==0?j?w:o:"")+this._generateMonthYearHeader(b,m,v,r,u,E>0||L>0,H,C)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var G=p?'<th class="ui-datepicker-week-col">'+this._get(b,"weekHeader")+"</th>":"";for(B=0;B<7;B++){var A=(B+n)%7;G+="<th"+((B+n+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+x[A]+'">'+y[A]+"</span></th>"}F+=G+"</tr></thead><tbody>";G=this._getDaysInMonth(v,m);if(v==b.selectedYear&&m==b.selectedMonth)b.selectedDay=Math.min(b.selectedDay,
+G);B=(this._getFirstDayOfMonth(v,m)-n+7)%7;G=Math.ceil((B+G)/7);this.maxRows=G=q?this.maxRows>G?this.maxRows:G:G;A=this._daylightSavingAdjust(new Date(v,m,1-B));for(var R=0;R<G;R++){F+="<tr>";var S=!p?"":'<td class="ui-datepicker-week-col">'+this._get(b,"calculateWeek")(A)+"</td>";for(B=0;B<7;B++){var M=z?z.apply(b.input?b.input[0]:null,[A]):[true,""],K=A.getMonth()!=m,O=K&&!N||!M[0]||r&&A<r||u&&A>u;S+='<td class="'+((B+n+6)%7>=5?" ui-datepicker-week-end":"")+(K?" ui-datepicker-other-month":"")+(A.getTime()==
+Q.getTime()&&m==b.selectedMonth&&b._keyEvent||J.getTime()==A.getTime()&&J.getTime()==Q.getTime()?" "+this._dayOverClass:"")+(O?" "+this._unselectableClass+" ui-state-disabled":"")+(K&&!I?"":" "+M[1]+(A.getTime()==s.getTime()?" "+this._currentClass:"")+(A.getTime()==f.getTime()?" ui-datepicker-today":""))+'"'+((!K||I)&&M[2]?' title="'+M[2]+'"':"")+(O?"":' onclick="DP_jQuery_'+g+".datepicker._selectDay('#"+b.id+"',"+A.getMonth()+","+A.getFullYear()+', this);return false;"')+">"+(K&&!I?"&#xa0;":O?'<span class="ui-state-default">'+
+A.getDate()+"</span>":'<a class="ui-state-default'+(A.getTime()==f.getTime()?" ui-state-highlight":"")+(A.getTime()==s.getTime()?" ui-state-active":"")+(K?" ui-priority-secondary":"")+'" href="#">'+A.getDate()+"</a>")+"</td>";A.setDate(A.getDate()+1);A=this._daylightSavingAdjust(A)}F+=S+"</tr>"}m++;if(m>11){m=0;v++}F+="</tbody></table>"+(q?"</div>"+(k[0]>0&&L==k[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");P+=F}D+=P}D+=l+(a.browser.msie&&parseInt(a.browser.version,10)<7&&!b.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':
+"");b._keyEvent=false;return D},_generateMonthYearHeader:function(b,f,j,l,o,n,k,m){var p=this._get(b,"changeMonth"),q=this._get(b,"changeYear"),s=this._get(b,"showMonthAfterYear"),r='<div class="ui-datepicker-title">',u="";if(n||!p)u+='<span class="ui-datepicker-month">'+k[f]+"</span>";else{k=l&&l.getFullYear()==j;var v=o&&o.getFullYear()==j;u+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+g+".datepicker._selectMonthYear('#"+b.id+"', this, 'M');\" >";for(var w=0;w<12;w++)if((!k||w>=l.getMonth())&&
+(!v||w<=o.getMonth()))u+='<option value="'+w+'"'+(w==f?' selected="selected"':"")+">"+m[w]+"</option>";u+="</select>"}s||(r+=u+(n||!(p&&q)?"&#xa0;":""));if(!b.yearshtml){b.yearshtml="";if(n||!q)r+='<span class="ui-datepicker-year">'+j+"</span>";else{m=this._get(b,"yearRange").split(":");var x=(new Date).getFullYear();k=function(y){y=y.match(/c[+-].*/)?j+parseInt(y.substring(1),10):y.match(/[+-].*/)?x+parseInt(y,10):parseInt(y,10);return isNaN(y)?x:y};f=k(m[0]);m=Math.max(f,k(m[1]||""));f=l?Math.max(f,
+l.getFullYear()):f;m=o?Math.min(m,o.getFullYear()):m;for(b.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+g+".datepicker._selectMonthYear('#"+b.id+"', this, 'Y');\" >";f<=m;f++)b.yearshtml+='<option value="'+f+'"'+(f==j?' selected="selected"':"")+">"+f+"</option>";b.yearshtml+="</select>";r+=b.yearshtml;b.yearshtml=null}}r+=this._get(b,"yearSuffix");if(s)r+=(n||!(p&&q)?"&#xa0;":"")+u;r+="</div>";return r},_adjustInstDate:function(b,f,j){var l=b.drawYear+(j=="Y"?f:0),o=b.drawMonth+
+(j=="M"?f:0);f=Math.min(b.selectedDay,this._getDaysInMonth(l,o))+(j=="D"?f:0);l=this._restrictMinMax(b,this._daylightSavingAdjust(new Date(l,o,f)));b.selectedDay=l.getDate();b.drawMonth=b.selectedMonth=l.getMonth();b.drawYear=b.selectedYear=l.getFullYear();if(j=="M"||j=="Y")this._notifyChange(b)},_restrictMinMax:function(b,f){var j=this._getMinMaxDate(b,"min");b=this._getMinMaxDate(b,"max");f=j&&f<j?j:f;return f=b&&f>b?b:f},_notifyChange:function(b){var f=this._get(b,"onChangeMonthYear");if(f)f.apply(b.input?
+b.input[0]:null,[b.selectedYear,b.selectedMonth+1,b])},_getNumberOfMonths:function(b){b=this._get(b,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(b,f){return this._determineDate(b,this._get(b,f+"Date"),null)},_getDaysInMonth:function(b,f){return 32-this._daylightSavingAdjust(new Date(b,f,32)).getDate()},_getFirstDayOfMonth:function(b,f){return(new Date(b,f,1)).getDay()},_canAdjustMonth:function(b,f,j,l){var o=this._getNumberOfMonths(b);j=this._daylightSavingAdjust(new Date(j,
+l+(f<0?f:o[0]*o[1]),1));f<0&&j.setDate(this._getDaysInMonth(j.getFullYear(),j.getMonth()));return this._isInRange(b,j)},_isInRange:function(b,f){var j=this._getMinMaxDate(b,"min");b=this._getMinMaxDate(b,"max");return(!j||f.getTime()>=j.getTime())&&(!b||f.getTime()<=b.getTime())},_getFormatConfig:function(b){var f=this._get(b,"shortYearCutoff");f=typeof f!="string"?f:(new Date).getFullYear()%100+parseInt(f,10);return{shortYearCutoff:f,dayNamesShort:this._get(b,"dayNamesShort"),dayNames:this._get(b,
+"dayNames"),monthNamesShort:this._get(b,"monthNamesShort"),monthNames:this._get(b,"monthNames")}},_formatDate:function(b,f,j,l){if(!f){b.currentDay=b.selectedDay;b.currentMonth=b.selectedMonth;b.currentYear=b.selectedYear}f=f?typeof f=="object"?f:this._daylightSavingAdjust(new Date(l,j,f)):this._daylightSavingAdjust(new Date(b.currentYear,b.currentMonth,b.currentDay));return this.formatDate(this._get(b,"dateFormat"),f,this._getFormatConfig(b))}});a.fn.datepicker=function(b){if(!this.length)return this;
+if(!a.datepicker.initialized){a(document).mousedown(a.datepicker._checkExternalClick).find("body").append(a.datepicker.dpDiv);a.datepicker.initialized=true}var f=Array.prototype.slice.call(arguments,1);if(typeof b=="string"&&(b=="isDisabled"||b=="getDate"||b=="widget"))return a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(f));if(b=="option"&&arguments.length==2&&typeof arguments[1]=="string")return a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(f));return this.each(function(){typeof b==
+"string"?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this].concat(f)):a.datepicker._attachDatepicker(this,b)})};a.datepicker=new c;a.datepicker.initialized=false;a.datepicker.uuid=(new Date).getTime();a.datepicker.version="1.8.16";window["DP_jQuery_"+g]=a})(jQuery);
+(function(a,d){var c={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},e={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},h=a.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};a.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,
+position:{my:"center",at:"center",collision:"fit",using:function(g){var i=a(this).css(g).offset().top;i<0&&a(this).css("top",g.top-i)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var g=this,i=g.options,b=i.title||"&#160;",f=a.ui.dialog.getTitleId(g.element),j=(g.uiDialog=a("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
+i.dialogClass).css({zIndex:i.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){if(i.closeOnEscape&&!n.isDefaultPrevented()&&n.keyCode&&n.keyCode===a.ui.keyCode.ESCAPE){g.close(n);n.preventDefault()}}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(n){g.moveToTop(false,n)});g.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(j);var l=(g.uiDialogTitlebar=a("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(j),
+o=a('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){o.addClass("ui-state-hover")},function(){o.removeClass("ui-state-hover")}).focus(function(){o.addClass("ui-state-focus")}).blur(function(){o.removeClass("ui-state-focus")}).click(function(n){g.close(n);return false}).appendTo(l);(g.uiDialogTitlebarCloseText=a("<span></span>")).addClass("ui-icon ui-icon-closethick").text(i.closeText).appendTo(o);a("<span></span>").addClass("ui-dialog-title").attr("id",
+f).html(b).prependTo(l);if(a.isFunction(i.beforeclose)&&!a.isFunction(i.beforeClose))i.beforeClose=i.beforeclose;l.find("*").add(l).disableSelection();i.draggable&&a.fn.draggable&&g._makeDraggable();i.resizable&&a.fn.resizable&&g._makeResizable();g._createButtons(i.buttons);g._isOpen=false;a.fn.bgiframe&&j.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var g=this;g.overlay&&g.overlay.destroy();g.uiDialog.hide();g.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
+g.uiDialog.remove();g.originalTitle&&g.element.attr("title",g.originalTitle);return g},widget:function(){return this.uiDialog},close:function(g){var i=this,b,f;if(false!==i._trigger("beforeClose",g)){i.overlay&&i.overlay.destroy();i.uiDialog.unbind("keypress.ui-dialog");i._isOpen=false;if(i.options.hide)i.uiDialog.hide(i.options.hide,function(){i._trigger("close",g)});else{i.uiDialog.hide();i._trigger("close",g)}a.ui.dialog.overlay.resize();if(i.options.modal){b=0;a(".ui-dialog").each(function(){if(this!==
+i.uiDialog[0]){f=a(this).css("z-index");isNaN(f)||(b=Math.max(b,f))}});a.ui.dialog.maxZ=b}return i}},isOpen:function(){return this._isOpen},moveToTop:function(g,i){var b=this,f=b.options;if(f.modal&&!g||!f.stack&&!f.modal)return b._trigger("focus",i);if(f.zIndex>a.ui.dialog.maxZ)a.ui.dialog.maxZ=f.zIndex;if(b.overlay){a.ui.dialog.maxZ+=1;b.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ)}g={scrollTop:b.element.scrollTop(),scrollLeft:b.element.scrollLeft()};a.ui.dialog.maxZ+=1;
+b.uiDialog.css("z-index",a.ui.dialog.maxZ);b.element.attr(g);b._trigger("focus",i);return b},open:function(){if(!this._isOpen){var g=this,i=g.options,b=g.uiDialog;g.overlay=i.modal?new a.ui.dialog.overlay(g):null;g._size();g._position(i.position);b.show(i.show);g.moveToTop(true);i.modal&&b.bind("keypress.ui-dialog",function(f){if(f.keyCode===a.ui.keyCode.TAB){var j=a(":tabbable",this),l=j.filter(":first");j=j.filter(":last");if(f.target===j[0]&&!f.shiftKey){l.focus(1);return false}else if(f.target===
+l[0]&&f.shiftKey){j.focus(1);return false}}});a(g.element.find(":tabbable").get().concat(b.find(".ui-dialog-buttonpane :tabbable").get().concat(b.get()))).eq(0).focus();g._isOpen=true;g._trigger("open");return g}},_createButtons:function(g){var i=this,b=false,f=a("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),j=a("<div></div>").addClass("ui-dialog-buttonset").appendTo(f);i.uiDialog.find(".ui-dialog-buttonpane").remove();typeof g==="object"&&g!==null&&a.each(g,
+function(){return!(b=true)});if(b){a.each(g,function(l,o){o=a.isFunction(o)?{click:o,text:l}:o;var n=a('<button type="button"></button>').click(function(){o.click.apply(i.element[0],arguments)}).appendTo(j);a.each(o,function(k,m){if(k!=="click")k in h?n[k](m):n.attr(k,m)});a.fn.button&&n.button()});f.appendTo(i.uiDialog)}},_makeDraggable:function(){function g(l){return{position:l.position,offset:l.offset}}var i=this,b=i.options,f=a(document),j;i.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",
+handle:".ui-dialog-titlebar",containment:"document",start:function(l,o){j=b.height==="auto"?"auto":a(this).height();a(this).height(a(this).height()).addClass("ui-dialog-dragging");i._trigger("dragStart",l,g(o))},drag:function(l,o){i._trigger("drag",l,g(o))},stop:function(l,o){b.position=[o.position.left-f.scrollLeft(),o.position.top-f.scrollTop()];a(this).removeClass("ui-dialog-dragging").height(j);i._trigger("dragStop",l,g(o));a.ui.dialog.overlay.resize()}})},_makeResizable:function(g){function i(l){return{originalPosition:l.originalPosition,
+originalSize:l.originalSize,position:l.position,size:l.size}}g=g===d?this.options.resizable:g;var b=this,f=b.options,j=b.uiDialog.css("position");g=typeof g==="string"?g:"n,e,s,w,se,sw,ne,nw";b.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:b.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:b._minHeight(),handles:g,start:function(l,o){a(this).addClass("ui-dialog-resizing");b._trigger("resizeStart",l,i(o))},resize:function(l,o){b._trigger("resize",
+l,i(o))},stop:function(l,o){a(this).removeClass("ui-dialog-resizing");f.height=a(this).height();f.width=a(this).width();b._trigger("resizeStop",l,i(o));a.ui.dialog.overlay.resize()}}).css("position",j).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var g=this.options;return g.height==="auto"?g.minHeight:Math.min(g.minHeight,g.height)},_position:function(g){var i=[],b=[0,0],f;if(g){if(typeof g==="string"||typeof g==="object"&&"0"in g){i=g.split?g.split(" "):
+[g[0],g[1]];if(i.length===1)i[1]=i[0];a.each(["left","top"],function(j,l){if(+i[j]===i[j]){b[j]=i[j];i[j]=l}});g={my:i.join(" "),at:i.join(" "),offset:b.join(" ")}}g=a.extend({},a.ui.dialog.prototype.options.position,g)}else g=a.ui.dialog.prototype.options.position;(f=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(a.extend({of:window},g));f||this.uiDialog.hide()},_setOptions:function(g){var i=this,b={},f=false;a.each(g,function(j,l){i._setOption(j,l);
+if(j in c)f=true;if(j in e)b[j]=l});f&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",b)},_setOption:function(g,i){var b=this,f=b.uiDialog;switch(g){case "beforeclose":g="beforeClose";break;case "buttons":b._createButtons(i);break;case "closeText":b.uiDialogTitlebarCloseText.text(""+i);break;case "dialogClass":f.removeClass(b.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+i);break;case "disabled":i?f.addClass("ui-dialog-disabled"):
+f.removeClass("ui-dialog-disabled");break;case "draggable":var j=f.is(":data(draggable)");j&&!i&&f.draggable("destroy");!j&&i&&b._makeDraggable();break;case "position":b._position(i);break;case "resizable":(j=f.is(":data(resizable)"))&&!i&&f.resizable("destroy");j&&typeof i==="string"&&f.resizable("option","handles",i);!j&&i!==false&&b._makeResizable(i);break;case "title":a(".ui-dialog-title",b.uiDialogTitlebar).html(""+(i||"&#160;"));break}a.Widget.prototype._setOption.apply(b,arguments)},_size:function(){var g=
+this.options,i,b,f=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(g.minWidth>g.width)g.width=g.minWidth;i=this.uiDialog.css({height:"auto",width:g.width}).height();b=Math.max(0,g.minHeight-i);if(g.height==="auto")if(a.support.minHeight)this.element.css({minHeight:b,height:"auto"});else{this.uiDialog.show();g=this.element.css("height","auto").height();f||this.uiDialog.hide();this.element.height(Math.max(g,b))}else this.element.height(Math.max(g.height-
+i,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});a.extend(a.ui.dialog,{version:"1.8.16",uuid:0,maxZ:0,getTitleId:function(g){g=g.attr("id");if(!g){this.uuid+=1;g=this.uuid}return"ui-dialog-title-"+g},overlay:function(g){this.$el=a.ui.dialog.overlay.create(g)}});a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(g){return g+".dialog-overlay"}).join(" "),
+create:function(g){if(this.instances.length===0){setTimeout(function(){a.ui.dialog.overlay.instances.length&&a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()<a.ui.dialog.overlay.maxZ)return false})},1);a(document).bind("keydown.dialog-overlay",function(b){if(g.options.closeOnEscape&&!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===a.ui.keyCode.ESCAPE){g.close(b);b.preventDefault()}});a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize)}var i=(this.oldInstances.pop()||
+a("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});a.fn.bgiframe&&i.bgiframe();this.instances.push(i);return i},destroy:function(g){var i=a.inArray(g,this.instances);i!=-1&&this.oldInstances.push(this.instances.splice(i,1)[0]);this.instances.length===0&&a([document,window]).unbind(".dialog-overlay");g.remove();var b=0;a.each(this.instances,function(){b=Math.max(b,this.css("z-index"))});this.maxZ=b},height:function(){var g,i;if(a.browser.msie&&
+a.browser.version<7){g=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);i=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return g<i?a(window).height()+"px":g+"px"}else return a(document).height()+"px"},width:function(){var g,i;if(a.browser.msie){g=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);i=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return g<i?a(window).width()+"px":g+"px"}else return a(document).width()+
+"px"},resize:function(){var g=a([]);a.each(a.ui.dialog.overlay.instances,function(){g=g.add(this)});g.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}});a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
+(function(a){a.ui=a.ui||{};var d=/left|center|right/,c=/top|center|bottom/,e=a.fn.position,h=a.fn.offset;a.fn.position=function(g){if(!g||!g.of)return e.apply(this,arguments);g=a.extend({},g);var i=a(g.of),b=i[0],f=(g.collision||"flip").split(" "),j=g.offset?g.offset.split(" "):[0,0],l,o,n;if(b.nodeType===9){l=i.width();o=i.height();n={top:0,left:0}}else if(b.setTimeout){l=i.width();o=i.height();n={top:i.scrollTop(),left:i.scrollLeft()}}else if(b.preventDefault){g.at="left top";l=o=0;n={top:g.of.pageY,
+left:g.of.pageX}}else{l=i.outerWidth();o=i.outerHeight();n=i.offset()}a.each(["my","at"],function(){var k=(g[this]||"").split(" ");if(k.length===1)k=d.test(k[0])?k.concat(["center"]):c.test(k[0])?["center"].concat(k):["center","center"];k[0]=d.test(k[0])?k[0]:"center";k[1]=c.test(k[1])?k[1]:"center";g[this]=k});if(f.length===1)f[1]=f[0];j[0]=parseInt(j[0],10)||0;if(j.length===1)j[1]=j[0];j[1]=parseInt(j[1],10)||0;if(g.at[0]==="right")n.left+=l;else if(g.at[0]==="center")n.left+=l/2;if(g.at[1]==="bottom")n.top+=
+o;else if(g.at[1]==="center")n.top+=o/2;n.left+=j[0];n.top+=j[1];return this.each(function(){var k=a(this),m=k.outerWidth(),p=k.outerHeight(),q=parseInt(a.curCSS(this,"marginLeft",true))||0,s=parseInt(a.curCSS(this,"marginTop",true))||0,r=m+q+(parseInt(a.curCSS(this,"marginRight",true))||0),u=p+s+(parseInt(a.curCSS(this,"marginBottom",true))||0),v=a.extend({},n),w;if(g.my[0]==="right")v.left-=m;else if(g.my[0]==="center")v.left-=m/2;if(g.my[1]==="bottom")v.top-=p;else if(g.my[1]==="center")v.top-=
+p/2;v.left=Math.round(v.left);v.top=Math.round(v.top);w={left:v.left-q,top:v.top-s};a.each(["left","top"],function(x,y){a.ui.position[f[x]]&&a.ui.position[f[x]][y](v,{targetWidth:l,targetHeight:o,elemWidth:m,elemHeight:p,collisionPosition:w,collisionWidth:r,collisionHeight:u,offset:j,my:g.my,at:g.at})});a.fn.bgiframe&&k.bgiframe();k.offset(a.extend(v,{using:g.using}))})};a.ui.position={fit:{left:function(g,i){var b=a(window);b=i.collisionPosition.left+i.collisionWidth-b.width()-b.scrollLeft();g.left=
+b>0?g.left-b:Math.max(g.left-i.collisionPosition.left,g.left)},top:function(g,i){var b=a(window);b=i.collisionPosition.top+i.collisionHeight-b.height()-b.scrollTop();g.top=b>0?g.top-b:Math.max(g.top-i.collisionPosition.top,g.top)}},flip:{left:function(g,i){if(i.at[0]!=="center"){var b=a(window);b=i.collisionPosition.left+i.collisionWidth-b.width()-b.scrollLeft();var f=i.my[0]==="left"?-i.elemWidth:i.my[0]==="right"?i.elemWidth:0,j=i.at[0]==="left"?i.targetWidth:-i.targetWidth,l=-2*i.offset[0];g.left+=
+i.collisionPosition.left<0?f+j+l:b>0?f+j+l:0}},top:function(g,i){if(i.at[1]!=="center"){var b=a(window);b=i.collisionPosition.top+i.collisionHeight-b.height()-b.scrollTop();var f=i.my[1]==="top"?-i.elemHeight:i.my[1]==="bottom"?i.elemHeight:0,j=i.at[1]==="top"?i.targetHeight:-i.targetHeight,l=-2*i.offset[1];g.top+=i.collisionPosition.top<0?f+j+l:b>0?f+j+l:0}}}};if(!a.offset.setOffset){a.offset.setOffset=function(g,i){if(/static/.test(a.curCSS(g,"position")))g.style.position="relative";var b=a(g),
+f=b.offset(),j=parseInt(a.curCSS(g,"top",true),10)||0,l=parseInt(a.curCSS(g,"left",true),10)||0;f={top:i.top-f.top+j,left:i.left-f.left+l};"using"in i?i.using.call(g,f):b.css(f)};a.fn.offset=function(g){var i=this[0];if(!i||!i.ownerDocument)return null;if(g)return this.each(function(){a.offset.setOffset(this,g)});return h.call(this)}}})(jQuery);
+(function(a,d){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
+this.valueDiv.remove();a.Widget.prototype.destroy.apply(this,arguments)},value:function(c){if(c===d)return this._value();this._setOption("value",c);return this},_setOption:function(c,e){if(c==="value"){this.options.value=e;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var c=this.options.value;if(typeof c!=="number")c=0;return Math.min(this.options.max,Math.max(this.min,c))},_percentage:function(){return 100*
+this._value()/this.options.max},_refreshValue:function(){var c=this.value(),e=this._percentage();if(this.oldValue!==c){this.oldValue=c;this._trigger("change")}this.valueDiv.toggle(c>this.min).toggleClass("ui-corner-right",c===this.options.max).width(e.toFixed(0)+"%");this.element.attr("aria-valuenow",c)}});a.extend(a.ui.progressbar,{version:"1.8.16"})})(jQuery);
+(function(a){a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var d=this,c=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),h=c.values&&c.values.length||1,g=[];this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+
+this.orientation+" ui-widget ui-widget-content ui-corner-all"+(c.disabled?" ui-slider-disabled ui-disabled":""));this.range=a([]);if(c.range){if(c.range===true){if(!c.values)c.values=[this._valueMin(),this._valueMin()];if(c.values.length&&c.values.length!==2)c.values=[c.values[0],c.values[0]]}this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(c.range==="min"||c.range==="max"?" ui-slider-range-"+c.range:""))}for(var i=e.length;i<h;i+=1)g.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");
+this.handles=e.add(a(g.join("")).appendTo(d.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(b){b.preventDefault()}).hover(function(){c.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(c.disabled)a(this).blur();else{a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(b){a(this).data("index.ui-slider-handle",
+b)});this.handles.keydown(function(b){var f=true,j=a(this).data("index.ui-slider-handle"),l,o,n;if(!d.options.disabled){switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!d._keySliding){d._keySliding=true;a(this).addClass("ui-state-active");l=d._start(b,j);if(l===false)return}break}n=d.options.step;l=d.options.values&&d.options.values.length?
+(o=d.values(j)):(o=d.value());switch(b.keyCode){case a.ui.keyCode.HOME:o=d._valueMin();break;case a.ui.keyCode.END:o=d._valueMax();break;case a.ui.keyCode.PAGE_UP:o=d._trimAlignValue(l+(d._valueMax()-d._valueMin())/5);break;case a.ui.keyCode.PAGE_DOWN:o=d._trimAlignValue(l-(d._valueMax()-d._valueMin())/5);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(l===d._valueMax())return;o=d._trimAlignValue(l+n);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(l===d._valueMin())return;o=d._trimAlignValue(l-
+n);break}d._slide(b,j,o);return f}}).keyup(function(b){var f=a(this).data("index.ui-slider-handle");if(d._keySliding){d._keySliding=false;d._stop(b,f);d._change(b,f);a(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();
+return this},_mouseCapture:function(d){var c=this.options,e,h,g,i,b;if(c.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();e=this._normValueFromMouse({x:d.pageX,y:d.pageY});h=this._valueMax()-this._valueMin()+1;i=this;this.handles.each(function(f){var j=Math.abs(e-i.values(f));if(h>j){h=j;g=a(this);b=f}});if(c.range===true&&this.values(1)===c.min){b+=1;g=a(this.handles[b])}if(this._start(d,b)===false)return false;
+this._mouseSliding=true;i._handleIndex=b;g.addClass("ui-state-active").focus();c=g.offset();this._clickOffset=!a(d.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:d.pageX-c.left-g.width()/2,top:d.pageY-c.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(d,b,e);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(d){var c=
+this._normValueFromMouse({x:d.pageX,y:d.pageY});this._slide(d,this._handleIndex,c);return false},_mouseStop:function(d){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(d,this._handleIndex);this._change(d,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c;if(this.orientation==="horizontal"){c=
+this.elementSize.width;d=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;d=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}c=d/c;if(c>1)c=1;if(c<0)c=0;if(this.orientation==="vertical")c=1-c;d=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+c*d)},_start:function(d,c){var e={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){e.value=this.values(c);
+e.values=this.values()}return this._trigger("start",d,e)},_slide:function(d,c,e){var h;if(this.options.values&&this.options.values.length){h=this.values(c?0:1);if(this.options.values.length===2&&this.options.range===true&&(c===0&&e>h||c===1&&e<h))e=h;if(e!==this.values(c)){h=this.values();h[c]=e;d=this._trigger("slide",d,{handle:this.handles[c],value:e,values:h});this.values(c?0:1);d!==false&&this.values(c,e,true)}}else if(e!==this.value()){d=this._trigger("slide",d,{handle:this.handles[c],value:e});
+d!==false&&this.value(e)}},_stop:function(d,c){var e={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){e.value=this.values(c);e.values=this.values()}this._trigger("stop",d,e)},_change:function(d,c){if(!this._keySliding&&!this._mouseSliding){var e={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){e.value=this.values(c);e.values=this.values()}this._trigger("change",d,e)}},value:function(d){if(arguments.length){this.options.value=
+this._trimAlignValue(d);this._refreshValue();this._change(null,0)}else return this._value()},values:function(d,c){var e,h,g;if(arguments.length>1){this.options.values[d]=this._trimAlignValue(c);this._refreshValue();this._change(null,d)}else if(arguments.length)if(a.isArray(arguments[0])){e=this.options.values;h=arguments[0];for(g=0;g<e.length;g+=1){e[g]=this._trimAlignValue(h[g]);this._change(null,g)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(d):
+this.value();else return this._values()},_setOption:function(d,c){var e,h=0;if(a.isArray(this.options.values))h=this.options.values.length;a.Widget.prototype._setOption.apply(this,arguments);switch(d){case "disabled":if(c){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.propAttr("disabled",true);this.element.addClass("ui-disabled")}else{this.handles.propAttr("disabled",false);this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
+this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(e=0;e<h;e+=1)this._change(null,e);this._animateOff=false;break}},_value:function(){var d=this.options.value;return d=this._trimAlignValue(d)},_values:function(d){var c,e;if(arguments.length){c=this.options.values[d];
+return c=this._trimAlignValue(c)}else{c=this.options.values.slice();for(e=0;e<c.length;e+=1)c[e]=this._trimAlignValue(c[e]);return c}},_trimAlignValue:function(d){if(d<=this._valueMin())return this._valueMin();if(d>=this._valueMax())return this._valueMax();var c=this.options.step>0?this.options.step:1,e=(d-this._valueMin())%c;d=d-e;if(Math.abs(e)*2>=c)d+=e>0?c:-c;return parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var d=
+this.options.range,c=this.options,e=this,h=!this._animateOff?c.animate:false,g,i={},b,f,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(o){g=(e.values(o)-e._valueMin())/(e._valueMax()-e._valueMin())*100;i[e.orientation==="horizontal"?"left":"bottom"]=g+"%";a(this).stop(1,1)[h?"animate":"css"](i,c.animate);if(e.options.range===true)if(e.orientation==="horizontal"){if(o===0)e.range.stop(1,1)[h?"animate":"css"]({left:g+"%"},c.animate);if(o===1)e.range[h?"animate":"css"]({width:g-
+b+"%"},{queue:false,duration:c.animate})}else{if(o===0)e.range.stop(1,1)[h?"animate":"css"]({bottom:g+"%"},c.animate);if(o===1)e.range[h?"animate":"css"]({height:g-b+"%"},{queue:false,duration:c.animate})}b=g});else{f=this.value();j=this._valueMin();l=this._valueMax();g=l!==j?(f-j)/(l-j)*100:0;i[e.orientation==="horizontal"?"left":"bottom"]=g+"%";this.handle.stop(1,1)[h?"animate":"css"](i,c.animate);if(d==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[h?"animate":"css"]({width:g+"%"},
+c.animate);if(d==="max"&&this.orientation==="horizontal")this.range[h?"animate":"css"]({width:100-g+"%"},{queue:false,duration:c.animate});if(d==="min"&&this.orientation==="vertical")this.range.stop(1,1)[h?"animate":"css"]({height:g+"%"},c.animate);if(d==="max"&&this.orientation==="vertical")this.range[h?"animate":"css"]({height:100-g+"%"},{queue:false,duration:c.animate})}}});a.extend(a.ui.slider,{version:"1.8.16"})})(jQuery);
+(function(a,d){function c(){return++h}function e(){return++g}var h=0,g=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(i,b){if(i=="selected")this.options.collapsible&&
+b==this.options.selected||this.select(b);else{this.options[i]=b;this._tabify()}},_tabId:function(i){return i.title&&i.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+c()},_sanitizeSelector:function(i){return i.replace(/:/g,"\\:")},_cookie:function(){var i=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+e());return a.cookie.apply(null,[i].concat(a.makeArray(arguments)))},_ui:function(i,b){return{tab:i,panel:b,index:this.anchors.index(i)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var i=
+a(this);i.html(i.data("label.tabs")).removeData("label.tabs")})},_tabify:function(i){function b(r,u){r.css("display","");!a.support.opacity&&u.opacity&&r[0].style.removeAttribute("filter")}var f=this,j=this.options,l=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=a(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);this.anchors.each(function(r,u){var v=a(u).attr("href"),w=v.split("#")[0],x;if(w&&(w===location.toString().split("#")[0]||
+(x=a("base")[0])&&w===x.href)){v=u.hash;u.href=v}if(l.test(v))f.panels=f.panels.add(f.element.find(f._sanitizeSelector(v)));else if(v&&v!=="#"){a.data(u,"href.tabs",v);a.data(u,"load.tabs",v.replace(/#.*$/,""));v=f._tabId(u);u.href="#"+v;u=f.element.find("#"+v);if(!u.length){u=a(j.panelTemplate).attr("id",v).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(f.panels[r-1]||f.list);u.data("destroy.tabs",true)}f.panels=f.panels.add(u)}else j.disabled.push(r)});if(i){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
+this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(j.selected===d){location.hash&&this.anchors.each(function(r,u){if(u.hash==location.hash){j.selected=r;return false}});if(typeof j.selected!=="number"&&j.cookie)j.selected=parseInt(f._cookie(),10);if(typeof j.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)j.selected=
+this.lis.index(this.lis.filter(".ui-tabs-selected"));j.selected=j.selected||(this.lis.length?0:-1)}else if(j.selected===null)j.selected=-1;j.selected=j.selected>=0&&this.anchors[j.selected]||j.selected<0?j.selected:0;j.disabled=a.unique(j.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(r){return f.lis.index(r)}))).sort();a.inArray(j.selected,j.disabled)!=-1&&j.disabled.splice(a.inArray(j.selected,j.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
+if(j.selected>=0&&this.anchors.length){f.element.find(f._sanitizeSelector(f.anchors[j.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(j.selected).addClass("ui-tabs-selected ui-state-active");f.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[j.selected],f.element.find(f._sanitizeSelector(f.anchors[j.selected].hash))[0]))});this.load(j.selected)}a(window).bind("unload",function(){f.lis.add(f.anchors).unbind(".tabs");f.lis=f.anchors=f.panels=null})}else j.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
+this.element[j.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");j.cookie&&this._cookie(j.selected,j.cookie);i=0;for(var o;o=this.lis[i];i++)a(o)[a.inArray(i,j.disabled)!=-1&&!a(o).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");j.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(j.event!=="mouseover"){var n=function(r,u){u.is(":not(.ui-state-disabled)")&&u.addClass("ui-state-"+r)},k=function(r,u){u.removeClass("ui-state-"+
+r)};this.lis.bind("mouseover.tabs",function(){n("hover",a(this))});this.lis.bind("mouseout.tabs",function(){k("hover",a(this))});this.anchors.bind("focus.tabs",function(){n("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){k("focus",a(this).closest("li"))})}var m,p;if(j.fx)if(a.isArray(j.fx)){m=j.fx[0];p=j.fx[1]}else m=p=j.fx;var q=p?function(r,u){a(r).closest("li").addClass("ui-tabs-selected ui-state-active");u.hide().removeClass("ui-tabs-hide").animate(p,p.duration||"normal",
+function(){b(u,p);f._trigger("show",null,f._ui(r,u[0]))})}:function(r,u){a(r).closest("li").addClass("ui-tabs-selected ui-state-active");u.removeClass("ui-tabs-hide");f._trigger("show",null,f._ui(r,u[0]))},s=m?function(r,u){u.animate(m,m.duration||"normal",function(){f.lis.removeClass("ui-tabs-selected ui-state-active");u.addClass("ui-tabs-hide");b(u,m);f.element.dequeue("tabs")})}:function(r,u){f.lis.removeClass("ui-tabs-selected ui-state-active");u.addClass("ui-tabs-hide");f.element.dequeue("tabs")};
+this.anchors.bind(j.event+".tabs",function(){var r=this,u=a(r).closest("li"),v=f.panels.filter(":not(.ui-tabs-hide)"),w=f.element.find(f._sanitizeSelector(r.hash));if(u.hasClass("ui-tabs-selected")&&!j.collapsible||u.hasClass("ui-state-disabled")||u.hasClass("ui-state-processing")||f.panels.filter(":animated").length||f._trigger("select",null,f._ui(this,w[0]))===false){this.blur();return false}j.selected=f.anchors.index(this);f.abort();if(j.collapsible)if(u.hasClass("ui-tabs-selected")){j.selected=
+-1;j.cookie&&f._cookie(j.selected,j.cookie);f.element.queue("tabs",function(){s(r,v)}).dequeue("tabs");this.blur();return false}else if(!v.length){j.cookie&&f._cookie(j.selected,j.cookie);f.element.queue("tabs",function(){q(r,w)});f.load(f.anchors.index(this));this.blur();return false}j.cookie&&f._cookie(j.selected,j.cookie);if(w.length){v.length&&f.element.queue("tabs",function(){s(r,v)});f.element.queue("tabs",function(){q(r,w)});f.load(f.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";
+a.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(i){if(typeof i=="string")i=this.anchors.index(this.anchors.filter("[href$="+i+"]"));return i},destroy:function(){var i=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var b=
+a.data(this,"href.tabs");if(b)this.href=b;var f=a(this).unbind(".tabs");a.each(["href","load","cache"],function(j,l){f.removeData(l+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});i.cookie&&this._cookie(null,i.cookie);return this},add:function(i,
+b,f){if(f===d)f=this.anchors.length;var j=this,l=this.options;b=a(l.tabTemplate.replace(/#\{href\}/g,i).replace(/#\{label\}/g,b));i=!i.indexOf("#")?i.replace("#",""):this._tabId(a("a",b)[0]);b.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var o=j.element.find("#"+i);o.length||(o=a(l.panelTemplate).attr("id",i).data("destroy.tabs",true));o.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(f>=this.lis.length){b.appendTo(this.list);o.appendTo(this.list[0].parentNode)}else{b.insertBefore(this.lis[f]);
+o.insertBefore(this.panels[f])}l.disabled=a.map(l.disabled,function(n){return n>=f?++n:n});this._tabify();if(this.anchors.length==1){l.selected=0;b.addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){j._trigger("show",null,j._ui(j.anchors[0],j.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[f],this.panels[f]));return this},remove:function(i){i=this._getIndex(i);var b=this.options,f=this.lis.eq(i).remove(),j=this.panels.eq(i).remove();
+if(f.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(i+(i+1<this.anchors.length?1:-1));b.disabled=a.map(a.grep(b.disabled,function(l){return l!=i}),function(l){return l>=i?--l:l});this._tabify();this._trigger("remove",null,this._ui(f.find("a")[0],j[0]));return this},enable:function(i){i=this._getIndex(i);var b=this.options;if(a.inArray(i,b.disabled)!=-1){this.lis.eq(i).removeClass("ui-state-disabled");b.disabled=a.grep(b.disabled,function(f){return f!=i});this._trigger("enable",null,
+this._ui(this.anchors[i],this.panels[i]));return this}},disable:function(i){i=this._getIndex(i);var b=this.options;if(i!=b.selected){this.lis.eq(i).addClass("ui-state-disabled");b.disabled.push(i);b.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[i],this.panels[i]))}return this},select:function(i){i=this._getIndex(i);if(i==-1)if(this.options.collapsible&&this.options.selected!=-1)i=this.options.selected;else return this;this.anchors.eq(i).trigger(this.options.event+".tabs");return this},
+load:function(i){i=this._getIndex(i);var b=this,f=this.options,j=this.anchors.eq(i)[0],l=a.data(j,"load.tabs");this.abort();if(!l||this.element.queue("tabs").length!==0&&a.data(j,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(i).addClass("ui-state-processing");if(f.spinner){var o=a("span",j);o.data("label.tabs",o.html()).html(f.spinner)}this.xhr=a.ajax(a.extend({},f.ajaxOptions,{url:l,success:function(n,k){b.element.find(b._sanitizeSelector(j.hash)).html(n);b._cleanup();f.cache&&a.data(j,
+"cache.tabs",true);b._trigger("load",null,b._ui(b.anchors[i],b.panels[i]));try{f.ajaxOptions.success(n,k)}catch(m){}},error:function(n,k){b._cleanup();b._trigger("load",null,b._ui(b.anchors[i],b.panels[i]));try{f.ajaxOptions.error(n,k,i,j)}catch(m){}}}));b.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},
+url:function(i,b){this.anchors.eq(i).removeData("cache.tabs").data("load.tabs",b);return this},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.8.16"});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(i,b){var f=this,j=this.options,l=f._rotate||(f._rotate=function(o){clearTimeout(f.rotation);f.rotation=setTimeout(function(){var n=j.selected;f.select(++n<f.anchors.length?n:0)},i);o&&o.stopPropagation()});b=f._unrotate||(f._unrotate=!b?function(o){o.clientX&&
+f.rotate(null)}:function(){t=j.selected;l()});if(i){this.element.bind("tabsshow",l);this.anchors.bind(j.event+".tabs",b);l()}else{clearTimeout(f.rotation);this.element.unbind("tabsshow",l);this.anchors.unbind(j.event+".tabs",b);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
diff --git a/lib/scripts/jquery/jquery.cookie.js b/lib/scripts/jquery/jquery.cookie.js
new file mode 100644
index 000000000..6a3e394b4
--- /dev/null
+++ b/lib/scripts/jquery/jquery.cookie.js
@@ -0,0 +1,41 @@
+/**
+ * jQuery Cookie plugin
+ *
+ * Copyright (c) 2010 Klaus Hartl (stilbuero.de)
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+jQuery.cookie = function (key, value, options) {
+
+ // key and at least value given, set cookie...
+ if (arguments.length > 1 && String(value) !== "[object Object]") {
+ options = jQuery.extend({}, options);
+
+ if (value === null || value === undefined) {
+ options.expires = -1;
+ }
+
+ if (typeof options.expires === 'number') {
+ var days = options.expires, t = options.expires = new Date();
+ t.setDate(t.getDate() + days);
+ }
+
+ value = String(value);
+
+ return (document.cookie = [
+ encodeURIComponent(key), '=',
+ options.raw ? value : encodeURIComponent(value),
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
+ options.path ? '; path=' + options.path : '',
+ options.domain ? '; domain=' + options.domain : '',
+ options.secure ? '; secure' : ''
+ ].join(''));
+ }
+
+ // key and possibly options given, get cookie...
+ options = value || {};
+ var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
+ return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
+};
diff --git a/lib/scripts/jquery/jquery.js b/lib/scripts/jquery/jquery.js
new file mode 100644
index 000000000..719e1d4ec
--- /dev/null
+++ b/lib/scripts/jquery/jquery.js
@@ -0,0 +1,9046 @@
+/*!
+ * jQuery JavaScript Library v1.6.4
+ * 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: Mon Sep 12 18:54:48 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
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+ 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]|[0-9])/ig,
+ rmsPrefix = /^-ms-/,
+
+ // 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.4",
+
+ // 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;
+ }
+
+ try {
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !hasOwn.call(obj, "constructor") &&
+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+ } catch ( e ) {
+ // IE8,9 Will throw exceptions on certain host objects #9897
+ 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
+ parseXML: function( data ) {
+ var xml, tmp;
+ try {
+ 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 );
+ }
+ } catch( e ) {
+ xml = undefined;
+ }
+ if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+ 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 );
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).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 ( !array ) {
+ return -1;
+ }
+
+ 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 + "With" ]( this === deferred ? newDefer : this, [ 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 = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+
+ 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,
+ background: "none"
+ };
+ if ( body ) {
+ jQuery.extend( testElementStyle, {
+ position: "absolute",
+ left: "-1000px",
+ top: "-1000px"
+ });
+ }
+ 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 = "<div style='width:4px;'></div>";
+ support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
+ }
+
+ div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
+ 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])/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 thisCache, ret,
+ internalKey = jQuery.expando,
+ getByName = typeof name === "string",
+
+ // 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 ] && !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;
+ }
+
+ // Check for both converted-to-camel and non-converted data property names
+ // If a data property was specified
+ if ( getByName ) {
+
+ // First Try to find as-is property data
+ ret = thisCache[ name ];
+
+ // Test for null|undefined property data
+ if ( ret == null ) {
+
+ // Try to find the camelCased property
+ ret = thisCache[ jQuery.camelCase( name ) ];
+ }
+ } else {
+ ret = thisCache;
+ }
+
+ return ret;
+ },
+
+ removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var thisCache,
+
+ // Reference to internal data cache key
+ 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 ) {
+
+ thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ];
+
+ if ( thisCache ) {
+
+ // Support interoperable removal of hyphenated or camelcased keys
+ if ( !thisCache[ name ] ) {
+ name = jQuery.camelCase( name );
+ }
+
+ 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
+ // Ensure that `cache` is not a window object #10080
+ if ( jQuery.support.deleteExpando || !cache.setInterval ) {
+ 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" ).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,
+ nodeHook, 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].nodeType === 1 && (" " + 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 nodeHook if available( IE6/7 )
+ } else if ( nodeHook ) {
+ hooks = nodeHook;
+ }
+ }
+ }
+
+ 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;
+
+ jQuery.attr( elem, name, "" );
+ elem.removeAttribute( 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;
+ }
+ }
+ },
+ // Use the value property for back compat
+ // Use the nodeHook for button elements in IE6/7 (#1954)
+ value: {
+ get: function( elem, name ) {
+ if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+ return nodeHook.get( elem, name );
+ }
+ return name in elem ?
+ elem.value :
+ null;
+ },
+ set: function( elem, value, name ) {
+ if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+ return nodeHook.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 )) !== null ) {
+ return ret;
+
+ } else {
+ return elem[ name ];
+ }
+ }
+ },
+
+ propHooks: {
+ 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;
+ }
+ }
+ }
+});
+
+// Add the tabindex propHook to attrHooks for back-compat
+jQuery.attrHooks.tabIndex = jQuery.propHooks.tabIndex;
+
+// Hook for boolean attributes
+boolHook = {
+ get: function( elem, name ) {
+ // Align boolean attributes with corresponding properties
+ // Fall back to attribute presence where some booleans are not supported
+ var attrNode;
+ return jQuery.prop( elem, name ) === true || ( attrNode = elem.getAttributeNode( name ) ) && attrNode.nodeValue !== false ?
+ 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 ) {
+
+ // Use this for any attribute in IE6/7
+ // This fixes almost every IE6/7 issue
+ nodeHook = 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 ) {
+ // Set the existing or create a new attribute node
+ var ret = elem.getAttributeNode( name );
+ if ( !ret ) {
+ ret = document.createAttribute( name );
+ elem.setAttributeNode( ret );
+ }
+ return (ret.nodeValue = 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;
+ }
+ }
+ return null;
+ }
+ });
+}
+
+// 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 ) {
+ // Avoid triggering error on non-existent type attribute in IE VML (#7071)
+ var elem = e.target,
+ type = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? 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 = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? 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 = jQuery.nodeName( elem, "input" ) ? 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 = "<a name='" + id + "'/>";
+
+ // 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 = "<a href='#'></a>";
+
+ if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+ div.firstChild.getAttribute("href") !== "#" ) {
+
+ Expr.attrHandle.href = function( elem ) {
+ return elem.getAttribute( "href", 2 );
+ };
+ }
+
+ // release memory in IE
+ div = null;
+})();
+
+if ( document.querySelectorAll ) {
+ (function(){
+ var oldSizzle = Sizzle,
+ div = document.createElement("div"),
+ id = "__sizzle__";
+
+ div.innerHTML = "<p class='TEST'></p>";
+
+ // 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 = "<div class='test e'></div><div class='test'></div>";
+
+ // 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 ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
+ }
+
+ // index in selector
+ if ( typeof elem === "string" ) {
+ return jQuery.inArray( this[0], jQuery( elem ) );
+ }
+
+ // 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 = /<tbody/i,
+ rhtml = /<|&#?\w+;/,
+ rnocache = /<(?:script|object|embed|option|style)/i,
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /\/(java|ecma)script/i,
+ rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
+ wrapMap = {
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+ legend: [ 1, "<fieldset>", "</fieldset>" ],
+ thead: [ 1, "<table>", "</table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+ col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+ area: [ 1, "<map>", "</map>" ],
+ _default: [ 0, "", "" ]
+ };
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE can't serialize <link> and <script> tags normally
+if ( !jQuery.support.htmlSerialize ) {
+ wrapMap._default = [ 1, "div<div>", "</div>" ];
+}
+
+jQuery.fn.extend({
+ text: function( text ) {
+ if ( jQuery.isFunction(text) ) {
+ return this.each(function(i) {
+ var self = jQuery( this );
+
+ self.text( text.call(this, i, self.text()) );
+ });
+ }
+
+ if ( typeof text !== "object" && text !== undefined ) {
+ return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
+ }
+
+ return jQuery.text( this );
+ },
+
+ wrapAll: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[0] ) {
+ // The elements to wrap the target around
+ var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+ if ( this[0].parentNode ) {
+ wrap.insertBefore( this[0] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+ elem = elem.firstChild;
+ }
+
+ return elem;
+ }).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ return this.each(function() {
+ jQuery( this ).wrapAll( html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ },
+
+ append: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 ) {
+ this.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 ) {
+ this.insertBefore( elem, this.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ if ( this[0] && this[0].parentNode ) {
+ return this.domManip(arguments, false, function( elem ) {
+ this.parentNode.insertBefore( elem, this );
+ });
+ } else if ( arguments.length ) {
+ var set = jQuery(arguments[0]);
+ set.push.apply( set, this.toArray() );
+ return this.pushStack( set, "before", arguments );
+ }
+ },
+
+ after: function() {
+ if ( this[0] && this[0].parentNode ) {
+ return this.domManip(arguments, false, function( elem ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ });
+ } else if ( arguments.length ) {
+ var set = this.pushStack( this, "after", arguments );
+ set.push.apply( set, jQuery(arguments[0]).toArray() );
+ return set;
+ }
+ },
+
+ // keepData is for internal use only--do not document
+ remove: function( selector, keepData ) {
+ for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+ if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( elem.getElementsByTagName("*") );
+ jQuery.cleanData( [ elem ] );
+ }
+
+ if ( elem.parentNode ) {
+ elem.parentNode.removeChild( elem );
+ }
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( elem.getElementsByTagName("*") );
+ }
+
+ // Remove any remaining nodes
+ while ( elem.firstChild ) {
+ elem.removeChild( elem.firstChild );
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map( function () {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ });
+ },
+
+ html: function( value ) {
+ if ( value === undefined ) {
+ return this[0] && this[0].nodeType === 1 ?
+ this[0].innerHTML.replace(rinlinejQuery, "") :
+ null;
+
+ // See if we can take a shortcut and just use innerHTML
+ } else if ( typeof value === "string" && !rnocache.test( value ) &&
+ (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
+ !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
+
+ value = value.replace(rxhtmlTag, "<$1></$2>");
+
+ try {
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ if ( this[i].nodeType === 1 ) {
+ jQuery.cleanData( this[i].getElementsByTagName("*") );
+ this[i].innerHTML = value;
+ }
+ }
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch(e) {
+ this.empty().append( value );
+ }
+
+ } else if ( jQuery.isFunction( value ) ) {
+ this.each(function(i){
+ var self = jQuery( this );
+
+ self.html( value.call(this, i, self.html()) );
+ });
+
+ } else {
+ this.empty().append( value );
+ }
+
+ return this;
+ },
+
+ replaceWith: function( value ) {
+ if ( this[0] && this[0].parentNode ) {
+ // Make sure that the elements are removed from the DOM before they are inserted
+ // this can help fix replacing a parent with child elements
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function(i) {
+ var self = jQuery(this), old = self.html();
+ self.replaceWith( value.call( this, i, old ) );
+ });
+ }
+
+ if ( typeof value !== "string" ) {
+ value = jQuery( value ).detach();
+ }
+
+ return this.each(function() {
+ var next = this.nextSibling,
+ parent = this.parentNode;
+
+ jQuery( this ).remove();
+
+ if ( next ) {
+ jQuery(next).before( value );
+ } else {
+ jQuery(parent).append( value );
+ }
+ });
+ } else {
+ return this.length ?
+ this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
+ this;
+ }
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, table, callback ) {
+ var results, first, fragment, parent,
+ value = args[0],
+ scripts = [];
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
+ return this.each(function() {
+ jQuery(this).domManip( args, table, callback, true );
+ });
+ }
+
+ if ( jQuery.isFunction(value) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ args[0] = value.call(this, i, table ? self.html() : undefined);
+ self.domManip( args, table, callback );
+ });
+ }
+
+ if ( this[0] ) {
+ parent = value && value.parentNode;
+
+ // If we're in a fragment, just use that instead of building a new one
+ if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
+ results = { fragment: parent };
+
+ } else {
+ results = jQuery.buildFragment( args, this, scripts );
+ }
+
+ fragment = results.fragment;
+
+ if ( fragment.childNodes.length === 1 ) {
+ first = fragment = fragment.firstChild;
+ } else {
+ first = fragment.firstChild;
+ }
+
+ if ( first ) {
+ table = table && jQuery.nodeName( first, "tr" );
+
+ for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
+ callback.call(
+ table ?
+ root(this[i], first) :
+ this[i],
+ // Make sure that we do not leak memory by inadvertently discarding
+ // the original fragment (which might have attached data) instead of
+ // using it; in addition, use the original fragment object for the last
+ // item instead of first because it can end up being emptied incorrectly
+ // in certain situations (Bug #8070).
+ // Fragments from the fragment cache must always be cloned and never used
+ // in place.
+ results.cacheable || (l > 1 && i < lastIndex) ?
+ jQuery.clone( fragment, true, true ) :
+ fragment
+ );
+ }
+ }
+
+ if ( scripts.length ) {
+ jQuery.each( scripts, evalScript );
+ }
+ }
+
+ return this;
+ }
+});
+
+function root( elem, cur ) {
+ return jQuery.nodeName(elem, "table") ?
+ (elem.getElementsByTagName("tbody")[0] ||
+ elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
+ elem;
+}
+
+function cloneCopyEvent( src, dest ) {
+
+ if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+ return;
+ }
+
+ var internalKey = jQuery.expando,
+ oldData = jQuery.data( src ),
+ curData = jQuery.data( dest, oldData );
+
+ // Switch to use the internal data object, if it exists, for the next
+ // stage of data copying
+ if ( (oldData = oldData[ internalKey ]) ) {
+ var events = oldData.events;
+ curData = curData[ internalKey ] = jQuery.extend({}, oldData);
+
+ if ( events ) {
+ delete curData.handle;
+ curData.events = {};
+
+ for ( var type in events ) {
+ for ( var i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
+ }
+ }
+ }
+ }
+}
+
+function cloneFixAttributes( src, dest ) {
+ var nodeName;
+
+ // We do not need to do anything for non-Elements
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ // clearAttributes removes the attributes, which we don't want,
+ // but also removes the attachEvent events, which we *do* want
+ if ( dest.clearAttributes ) {
+ dest.clearAttributes();
+ }
+
+ // mergeAttributes, in contrast, only merges back on the
+ // original attributes, not the events
+ if ( dest.mergeAttributes ) {
+ dest.mergeAttributes( src );
+ }
+
+ nodeName = dest.nodeName.toLowerCase();
+
+ // IE6-8 fail to clone children inside object elements that use
+ // the proprietary classid attribute value (rather than the type
+ // attribute) to identify the type of content to display
+ if ( nodeName === "object" ) {
+ dest.outerHTML = src.outerHTML;
+
+ } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
+ // IE6-8 fails to persist the checked state of a cloned checkbox
+ // or radio button. Worse, IE6-7 fail to give the cloned element
+ // a checked appearance if the defaultChecked value isn't also set
+ if ( src.checked ) {
+ dest.defaultChecked = dest.checked = src.checked;
+ }
+
+ // IE6-7 get confused and end up setting the value of a cloned
+ // checkbox/radio button to an empty string instead of "on"
+ if ( dest.value !== src.value ) {
+ dest.value = src.value;
+ }
+
+ // IE6-8 fails to return the selected option to the default selected
+ // state when cloning options
+ } else if ( nodeName === "option" ) {
+ dest.selected = src.defaultSelected;
+
+ // IE6-8 fails to set the defaultValue to the correct value when
+ // cloning other types of input fields
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+ }
+
+ // Event data gets referenced instead of copied if the expando
+ // gets copied too
+ dest.removeAttribute( jQuery.expando );
+}
+
+jQuery.buildFragment = function( args, nodes, scripts ) {
+ var fragment, cacheable, cacheresults, doc;
+
+ // nodes may contain either an explicit document object,
+ // a jQuery collection or context object.
+ // If nodes[0] contains a valid object to assign to doc
+ if ( nodes && nodes[0] ) {
+ doc = nodes[0].ownerDocument || nodes[0];
+ }
+
+ // Ensure that an attr object doesn't incorrectly stand in as a document object
+ // Chrome and Firefox seem to allow this to occur and will throw exception
+ // Fixes #8950
+ if ( !doc.createDocumentFragment ) {
+ doc = document;
+ }
+
+ // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
+ // Cloning options loses the selected state, so don't cache them
+ // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
+ // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+ if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
+ args[0].charAt(0) === "<" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
+
+ cacheable = true;
+
+ cacheresults = jQuery.fragments[ args[0] ];
+ if ( cacheresults && cacheresults !== 1 ) {
+ fragment = cacheresults;
+ }
+ }
+
+ if ( !fragment ) {
+ fragment = doc.createDocumentFragment();
+ jQuery.clean( args, doc, fragment, scripts );
+ }
+
+ if ( cacheable ) {
+ jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
+ }
+
+ return { fragment: fragment, cacheable: cacheable };
+};
+
+jQuery.fragments = {};
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var ret = [],
+ insert = jQuery( selector ),
+ parent = this.length === 1 && this[0].parentNode;
+
+ if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
+ insert[ original ]( this[0] );
+ return this;
+
+ } else {
+ for ( var i = 0, l = insert.length; i < l; i++ ) {
+ var elems = (i > 0 ? this.clone(true) : this).get();
+ jQuery( insert[i] )[ original ]( elems );
+ ret = ret.concat( elems );
+ }
+
+ return this.pushStack( ret, name, insert.selector );
+ }
+ };
+});
+
+function getAll( elem ) {
+ if ( "getElementsByTagName" in elem ) {
+ return elem.getElementsByTagName( "*" );
+
+ } else if ( "querySelectorAll" in elem ) {
+ return elem.querySelectorAll( "*" );
+
+ } else {
+ return [];
+ }
+}
+
+// Used in clean, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+ if ( elem.type === "checkbox" || elem.type === "radio" ) {
+ elem.defaultChecked = elem.checked;
+ }
+}
+// Finds all inputs and passes them to fixDefaultChecked
+function findInputs( elem ) {
+ if ( jQuery.nodeName( elem, "input" ) ) {
+ fixDefaultChecked( elem );
+ } else if ( "getElementsByTagName" in elem ) {
+ jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
+ }
+}
+
+jQuery.extend({
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var clone = elem.cloneNode(true),
+ srcElements,
+ destElements,
+ i;
+
+ if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+ (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+ // IE copies events bound via attachEvent when using cloneNode.
+ // Calling detachEvent on the clone will also remove the events
+ // from the original. In order to get around this, we use some
+ // proprietary methods to clear the events. Thanks to MooTools
+ // guys for this hotness.
+
+ cloneFixAttributes( elem, clone );
+
+ // Using Sizzle here is crazy slow, so we use getElementsByTagName
+ // instead
+ srcElements = getAll( elem );
+ destElements = getAll( clone );
+
+ // Weird iteration because IE will replace the length property
+ // with an element if you are cloning the body and one of the
+ // elements on the page has a name or id of "length"
+ for ( i = 0; srcElements[i]; ++i ) {
+ // Ensure that the destination node is not null; Fixes #9587
+ if ( destElements[i] ) {
+ cloneFixAttributes( srcElements[i], destElements[i] );
+ }
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ cloneCopyEvent( elem, clone );
+
+ if ( deepDataAndEvents ) {
+ srcElements = getAll( elem );
+ destElements = getAll( clone );
+
+ for ( i = 0; srcElements[i]; ++i ) {
+ cloneCopyEvent( srcElements[i], destElements[i] );
+ }
+ }
+ }
+
+ srcElements = destElements = null;
+
+ // Return the cloned set
+ return clone;
+ },
+
+ clean: function( elems, context, fragment, scripts ) {
+ var checkScriptType;
+
+ context = context || document;
+
+ // !context.createElement fails in IE with an error but returns typeof 'object'
+ if ( typeof context.createElement === "undefined" ) {
+ context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
+ }
+
+ var ret = [], j;
+
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+ if ( typeof elem === "number" ) {
+ elem += "";
+ }
+
+ if ( !elem ) {
+ continue;
+ }
+
+ // Convert html string into DOM nodes
+ if ( typeof elem === "string" ) {
+ if ( !rhtml.test( elem ) ) {
+ elem = context.createTextNode( elem );
+ } else {
+ // Fix "XHTML"-style tags in all browsers
+ elem = elem.replace(rxhtmlTag, "<$1></$2>");
+
+ // Trim whitespace, otherwise indexOf won't work as expected
+ var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
+ wrap = wrapMap[ tag ] || wrapMap._default,
+ depth = wrap[0],
+ div = context.createElement("div");
+
+ // Go to html and back, then peel off extra wrappers
+ div.innerHTML = wrap[1] + elem + wrap[2];
+
+ // Move to the right depth
+ while ( depth-- ) {
+ div = div.lastChild;
+ }
+
+ // Remove IE's autoinserted <tbody> from table fragments
+ if ( !jQuery.support.tbody ) {
+
+ // String was a <table>, *may* have spurious <tbody>
+ var hasBody = rtbody.test(elem),
+ tbody = tag === "table" && !hasBody ?
+ div.firstChild && div.firstChild.childNodes :
+
+ // String was a bare <thead> or <tfoot>
+ wrap[1] === "<table>" && !hasBody ?
+ div.childNodes :
+ [];
+
+ for ( j = tbody.length - 1; j >= 0 ; --j ) {
+ if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
+ tbody[ j ].parentNode.removeChild( tbody[ j ] );
+ }
+ }
+ }
+
+ // IE completely kills leading whitespace when innerHTML is used
+ if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+ div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+ }
+
+ elem = div.childNodes;
+ }
+ }
+
+ // Resets defaultChecked for any radios and checkboxes
+ // about to be appended to the DOM in IE 6/7 (#8060)
+ var len;
+ if ( !jQuery.support.appendChecked ) {
+ if ( elem[0] && typeof (len = elem.length) === "number" ) {
+ for ( j = 0; j < len; j++ ) {
+ findInputs( elem[j] );
+ }
+ } else {
+ findInputs( elem );
+ }
+ }
+
+ if ( elem.nodeType ) {
+ ret.push( elem );
+ } else {
+ ret = jQuery.merge( ret, elem );
+ }
+ }
+
+ if ( fragment ) {
+ checkScriptType = function( elem ) {
+ return !elem.type || rscriptType.test( elem.type );
+ };
+ for ( i = 0; ret[i]; i++ ) {
+ if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
+ scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
+
+ } else {
+ if ( ret[i].nodeType === 1 ) {
+ var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
+
+ ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+ }
+ fragment.appendChild( ret[i] );
+ }
+ }
+ }
+
+ return ret;
+ },
+
+ cleanData: function( elems ) {
+ var data, id, cache = jQuery.cache, internalKey = jQuery.expando, special = jQuery.event.special,
+ deleteExpando = jQuery.support.deleteExpando;
+
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+ if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+ continue;
+ }
+
+ id = elem[ jQuery.expando ];
+
+ if ( id ) {
+ data = cache[ id ] && cache[ id ][ internalKey ];
+
+ if ( data && data.events ) {
+ for ( var type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+
+ // Null the DOM reference to avoid IE6/7/8 leak (#7054)
+ if ( data.handle ) {
+ data.handle.elem = null;
+ }
+ }
+
+ if ( deleteExpando ) {
+ delete elem[ jQuery.expando ];
+
+ } else if ( elem.removeAttribute ) {
+ elem.removeAttribute( jQuery.expando );
+ }
+
+ delete cache[ id ];
+ }
+ }
+ }
+});
+
+function evalScript( i, elem ) {
+ if ( elem.src ) {
+ jQuery.ajax({
+ url: elem.src,
+ async: false,
+ dataType: "script"
+ });
+ } else {
+ jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
+ }
+
+ if ( elem.parentNode ) {
+ elem.parentNode.removeChild( elem );
+ }
+}
+
+
+
+
+var ralpha = /alpha\([^)]*\)/i,
+ ropacity = /opacity=([^)]*)/,
+ // fixed for IE9, see #8346
+ rupper = /([A-Z]|^ms)/g,
+ rnumpx = /^-?\d+(?:px)?$/i,
+ rnum = /^-?\d/,
+ rrelNum = /^([\-+])=([\-+.\de]+)/,
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssWidth = [ "Left", "Right" ],
+ cssHeight = [ "Top", "Bottom" ],
+ curCSS,
+
+ getComputedStyle,
+ currentStyle;
+
+jQuery.fn.css = function( name, value ) {
+ // Setting 'undefined' is a no-op
+ if ( arguments.length === 2 && value === undefined ) {
+ return this;
+ }
+
+ return jQuery.access( this, name, value, true, function( elem, name, value ) {
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ });
+};
+
+jQuery.extend({
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity", "opacity" );
+ return ret === "" ? "1" : ret;
+
+ } else {
+ return elem.style.opacity;
+ }
+ }
+ }
+ },
+
+ // Exclude the following css properties to add px
+ cssNumber: {
+ "fillOpacity": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "orphans": true,
+ "widows": true,
+ "zIndex": true,
+ "zoom": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ // normalize float css property
+ "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, origName = jQuery.camelCase( name ),
+ style = elem.style, hooks = jQuery.cssHooks[ origName ];
+
+ name = jQuery.cssProps[ origName ] || origName;
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // convert relative number strings (+= or -=) to relative numbers. #7345
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+ value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that NaN and null values aren't set. See: #7116
+ if ( value == null || type === "number" && isNaN( value ) ) {
+ return;
+ }
+
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
+ // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+ // Fixes bug #5509
+ try {
+ style[ name ] = value;
+ } catch(e) {}
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, extra ) {
+ var ret, hooks;
+
+ // Make sure that we're working with the right name
+ name = jQuery.camelCase( name );
+ hooks = jQuery.cssHooks[ name ];
+ name = jQuery.cssProps[ name ] || name;
+
+ // cssFloat needs a special treatment
+ if ( name === "cssFloat" ) {
+ name = "float";
+ }
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
+ return ret;
+
+ // Otherwise, if a way to get the computed value exists, use that
+ } else if ( curCSS ) {
+ return curCSS( elem, name );
+ }
+ },
+
+ // A method for quickly swapping in/out CSS properties to get correct calculations
+ swap: function( elem, options, callback ) {
+ var old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( var name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ callback.call( elem );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+ }
+});
+
+// DEPRECATED, Use jQuery.css() instead
+jQuery.curCSS = jQuery.css;
+
+jQuery.each(["height", "width"], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ var val;
+
+ if ( computed ) {
+ if ( elem.offsetWidth !== 0 ) {
+ return getWH( elem, name, extra );
+ } else {
+ jQuery.swap( elem, cssShow, function() {
+ val = getWH( elem, name, extra );
+ });
+ }
+
+ return val;
+ }
+ },
+
+ set: function( elem, value ) {
+ if ( rnumpx.test( value ) ) {
+ // ignore negative width and height values #1599
+ value = parseFloat( value );
+
+ if ( value >= 0 ) {
+ return value + "px";
+ }
+
+ } else {
+ return value;
+ }
+ }
+ };
+});
+
+if ( !jQuery.support.opacity ) {
+ jQuery.cssHooks.opacity = {
+ get: function( elem, computed ) {
+ // IE uses filters for opacity
+ return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+ ( parseFloat( RegExp.$1 ) / 100 ) + "" :
+ computed ? "1" : "";
+ },
+
+ set: function( elem, value ) {
+ var style = elem.style,
+ currentStyle = elem.currentStyle,
+ opacity = jQuery.isNaN( value ) ? "" : "alpha(opacity=" + value * 100 + ")",
+ filter = currentStyle && currentStyle.filter || style.filter || "";
+
+ // IE has trouble with opacity if it does not have layout
+ // Force it by setting the zoom level
+ style.zoom = 1;
+
+ // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+ if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
+
+ // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+ // if "filter:" is present at all, clearType is disabled, we want to avoid this
+ // style.removeAttribute is IE Only, but so apparently is this code path...
+ style.removeAttribute( "filter" );
+
+ // if there there is no filter style applied in a css rule, we are done
+ if ( currentStyle && !currentStyle.filter ) {
+ return;
+ }
+ }
+
+ // otherwise, set new filter values
+ style.filter = ralpha.test( filter ) ?
+ filter.replace( ralpha, opacity ) :
+ filter + " " + opacity;
+ }
+ };
+}
+
+jQuery(function() {
+ // This hook cannot be added until DOM ready because the support test
+ // for it is not run until after DOM ready
+ if ( !jQuery.support.reliableMarginRight ) {
+ jQuery.cssHooks.marginRight = {
+ get: function( elem, computed ) {
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // Work around by temporarily setting element display to inline-block
+ var ret;
+ jQuery.swap( elem, { "display": "inline-block" }, function() {
+ if ( computed ) {
+ ret = curCSS( elem, "margin-right", "marginRight" );
+ } else {
+ ret = elem.style.marginRight;
+ }
+ });
+ return ret;
+ }
+ };
+ }
+});
+
+if ( document.defaultView && document.defaultView.getComputedStyle ) {
+ getComputedStyle = function( elem, name ) {
+ var ret, defaultView, computedStyle;
+
+ name = name.replace( rupper, "-$1" ).toLowerCase();
+
+ if ( !(defaultView = elem.ownerDocument.defaultView) ) {
+ return undefined;
+ }
+
+ if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
+ ret = computedStyle.getPropertyValue( name );
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+ }
+
+ return ret;
+ };
+}
+
+if ( document.documentElement.currentStyle ) {
+ currentStyle = function( elem, name ) {
+ var left,
+ ret = elem.currentStyle && elem.currentStyle[ name ],
+ rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ],
+ style = elem.style;
+
+ // From the awesome hack by Dean Edwards
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+ // If we're not dealing with a regular pixel number
+ // but a number that has a weird ending, we need to convert it to pixels
+ if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
+ // Remember the original values
+ left = style.left;
+
+ // Put in the new values to get a computed value out
+ if ( rsLeft ) {
+ elem.runtimeStyle.left = elem.currentStyle.left;
+ }
+ style.left = name === "fontSize" ? "1em" : (ret || 0);
+ ret = style.pixelLeft + "px";
+
+ // Revert the changed values
+ style.left = left;
+ if ( rsLeft ) {
+ elem.runtimeStyle.left = rsLeft;
+ }
+ }
+
+ return ret === "" ? "auto" : ret;
+ };
+}
+
+curCSS = getComputedStyle || currentStyle;
+
+function getWH( elem, name, extra ) {
+
+ // Start with offset property
+ var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ which = name === "width" ? cssWidth : cssHeight;
+
+ if ( val > 0 ) {
+ if ( extra !== "border" ) {
+ jQuery.each( which, function() {
+ if ( !extra ) {
+ val -= parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
+ }
+ if ( extra === "margin" ) {
+ val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
+ } else {
+ val -= parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
+ }
+ });
+ }
+
+ return val + "px";
+ }
+
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name, name );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ] || 0;
+ }
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+
+ // Add padding, border, margin
+ if ( extra ) {
+ jQuery.each( which, function() {
+ val += parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
+ if ( extra !== "padding" ) {
+ val += parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
+ }
+ if ( extra === "margin" ) {
+ val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
+ }
+ });
+ }
+
+ return val + "px";
+}
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.hidden = function( elem ) {
+ var width = elem.offsetWidth,
+ height = elem.offsetHeight;
+
+ return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
+ };
+
+ jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+ };
+}
+
+
+
+
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rhash = /#.*$/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+ rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+ rquery = /\?/,
+ rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+ rselectTextarea = /^(?:select|textarea)/i,
+ rspacesAjax = /\s+/,
+ rts = /([?&])_=[^&]*/,
+ rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
+
+ // Keep a copy of the old load method
+ _load = jQuery.fn.load,
+
+ /* Prefilters
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+ * 2) These are called:
+ * - BEFORE asking for a transport
+ * - AFTER param serialization (s.data is a string if s.processData is true)
+ * 3) key is the dataType
+ * 4) the catchall symbol "*" can be used
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+ */
+ prefilters = {},
+
+ /* Transports bindings
+ * 1) key is the dataType
+ * 2) the catchall symbol "*" can be used
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
+ */
+ transports = {},
+
+ // Document location
+ ajaxLocation,
+
+ // Document location segments
+ ajaxLocParts,
+
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+ allTypes = ["*/"] + ["*"];
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+ ajaxLocation = location.href;
+} catch( e ) {
+ // Use the href attribute of an A element
+ // since IE will modify it given document.location
+ ajaxLocation = document.createElement( "a" );
+ ajaxLocation.href = "";
+ ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+ // dataTypeExpression is optional and defaults to "*"
+ return function( dataTypeExpression, func ) {
+
+ if ( typeof dataTypeExpression !== "string" ) {
+ func = dataTypeExpression;
+ dataTypeExpression = "*";
+ }
+
+ if ( jQuery.isFunction( func ) ) {
+ var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
+ i = 0,
+ length = dataTypes.length,
+ dataType,
+ list,
+ placeBefore;
+
+ // For each dataType in the dataTypeExpression
+ for(; i < length; i++ ) {
+ dataType = dataTypes[ i ];
+ // We control if we're asked to add before
+ // any existing element
+ placeBefore = /^\+/.test( dataType );
+ if ( placeBefore ) {
+ dataType = dataType.substr( 1 ) || "*";
+ }
+ list = structure[ dataType ] = structure[ dataType ] || [];
+ // then we add to the structure accordingly
+ list[ placeBefore ? "unshift" : "push" ]( func );
+ }
+ }
+ };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
+ dataType /* internal */, inspected /* internal */ ) {
+
+ dataType = dataType || options.dataTypes[ 0 ];
+ inspected = inspected || {};
+
+ inspected[ dataType ] = true;
+
+ var list = structure[ dataType ],
+ i = 0,
+ length = list ? list.length : 0,
+ executeOnly = ( structure === prefilters ),
+ selection;
+
+ for(; i < length && ( executeOnly || !selection ); i++ ) {
+ selection = list[ i ]( options, originalOptions, jqXHR );
+ // If we got redirected to another dataType
+ // we try there if executing only and not done already
+ if ( typeof selection === "string" ) {
+ if ( !executeOnly || inspected[ selection ] ) {
+ selection = undefined;
+ } else {
+ options.dataTypes.unshift( selection );
+ selection = inspectPrefiltersOrTransports(
+ structure, options, originalOptions, jqXHR, selection, inspected );
+ }
+ }
+ }
+ // If we're only executing or nothing was selected
+ // we try the catchall dataType if not done already
+ if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
+ selection = inspectPrefiltersOrTransports(
+ structure, options, originalOptions, jqXHR, "*", inspected );
+ }
+ // unnecessary when only executing (prefilters)
+ // but it'll be ignored by the caller in that case
+ return selection;
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+ var key, deep,
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
+ for( key in src ) {
+ if ( src[ key ] !== undefined ) {
+ ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
+ }
+ }
+ if ( deep ) {
+ jQuery.extend( true, target, deep );
+ }
+}
+
+jQuery.fn.extend({
+ load: function( url, params, callback ) {
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
+
+ // Don't do a request if no elements are being requested
+ } else if ( !this.length ) {
+ return this;
+ }
+
+ var off = url.indexOf( " " );
+ if ( off >= 0 ) {
+ var selector = url.slice( off, url.length );
+ url = url.slice( 0, off );
+ }
+
+ // Default to a GET request
+ var type = "GET";
+
+ // If the second parameter was provided
+ if ( params ) {
+ // If it's a function
+ if ( jQuery.isFunction( params ) ) {
+ // We assume that it's the callback
+ callback = params;
+ params = undefined;
+
+ // Otherwise, build a param string
+ } else if ( typeof params === "object" ) {
+ params = jQuery.param( params, jQuery.ajaxSettings.traditional );
+ type = "POST";
+ }
+ }
+
+ var self = this;
+
+ // Request the remote document
+ jQuery.ajax({
+ url: url,
+ type: type,
+ dataType: "html",
+ data: params,
+ // Complete callback (responseText is used internally)
+ complete: function( jqXHR, status, responseText ) {
+ // Store the response as specified by the jqXHR object
+ responseText = jqXHR.responseText;
+ // If successful, inject the HTML into all the matched elements
+ if ( jqXHR.isResolved() ) {
+ // #4825: Get the actual response in case
+ // a dataFilter is present in ajaxSettings
+ jqXHR.done(function( r ) {
+ responseText = r;
+ });
+ // See if a selector was specified
+ self.html( selector ?
+ // Create a dummy div to hold the results
+ jQuery("<div>")
+ // inject the contents of the document in, removing the scripts
+ // to avoid any 'Permission Denied' errors in IE
+ .append(responseText.replace(rscript, ""))
+
+ // Locate the specified elements
+ .find(selector) :
+
+ // If not, just inject the full result
+ responseText );
+ }
+
+ if ( callback ) {
+ self.each( callback, [ responseText, status, jqXHR ] );
+ }
+ }
+ });
+
+ return this;
+ },
+
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+
+ serializeArray: function() {
+ return this.map(function(){
+ return this.elements ? jQuery.makeArray( this.elements ) : this;
+ })
+ .filter(function(){
+ return this.name && !this.disabled &&
+ ( this.checked || rselectTextarea.test( this.nodeName ) ||
+ rinput.test( this.type ) );
+ })
+ .map(function( i, elem ){
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val, i ){
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }).get();
+ }
+});
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
+ jQuery.fn[ o ] = function( f ){
+ return this.bind( o, f );
+ };
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+ jQuery[ method ] = function( url, data, callback, type ) {
+ // shift arguments if data argument was omitted
+ if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
+ callback = data;
+ data = undefined;
+ }
+
+ return jQuery.ajax({
+ type: method,
+ url: url,
+ data: data,
+ success: callback,
+ dataType: type
+ });
+ };
+});
+
+jQuery.extend({
+
+ getScript: function( url, callback ) {
+ return jQuery.get( url, undefined, callback, "script" );
+ },
+
+ getJSON: function( url, data, callback ) {
+ return jQuery.get( url, data, callback, "json" );
+ },
+
+ // Creates a full fledged settings object into target
+ // with both ajaxSettings and settings fields.
+ // If target is omitted, writes into ajaxSettings.
+ ajaxSetup: function( target, settings ) {
+ if ( settings ) {
+ // Building a settings object
+ ajaxExtend( target, jQuery.ajaxSettings );
+ } else {
+ // Extending ajaxSettings
+ settings = target;
+ target = jQuery.ajaxSettings;
+ }
+ ajaxExtend( target, settings );
+ return target;
+ },
+
+ ajaxSettings: {
+ url: ajaxLocation,
+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+ global: true,
+ type: "GET",
+ contentType: "application/x-www-form-urlencoded",
+ processData: true,
+ async: true,
+ /*
+ timeout: 0,
+ data: null,
+ dataType: null,
+ username: null,
+ password: null,
+ cache: null,
+ traditional: false,
+ headers: {},
+ */
+
+ accepts: {
+ xml: "application/xml, text/xml",
+ html: "text/html",
+ text: "text/plain",
+ json: "application/json, text/javascript",
+ "*": allTypes
+ },
+
+ contents: {
+ xml: /xml/,
+ html: /html/,
+ json: /json/
+ },
+
+ responseFields: {
+ xml: "responseXML",
+ text: "responseText"
+ },
+
+ // List of data converters
+ // 1) key format is "source_type destination_type" (a single space in-between)
+ // 2) the catchall symbol "*" can be used for source_type
+ converters: {
+
+ // Convert anything to text
+ "* text": window.String,
+
+ // Text to html (true = no transformation)
+ "text html": true,
+
+ // Evaluate text as a json expression
+ "text json": jQuery.parseJSON,
+
+ // Parse text as xml
+ "text xml": jQuery.parseXML
+ },
+
+ // For options that shouldn't be deep extended:
+ // you can add your own custom options here if
+ // and when you create one that shouldn't be
+ // deep extended (see ajaxExtend)
+ flatOptions: {
+ context: true,
+ url: true
+ }
+ },
+
+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+ ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+ // Main method
+ ajax: function( url, options ) {
+
+ // If url is an object, simulate pre-1.5 signature
+ if ( typeof url === "object" ) {
+ options = url;
+ url = undefined;
+ }
+
+ // Force options to be an object
+ options = options || {};
+
+ var // Create the final options object
+ s = jQuery.ajaxSetup( {}, options ),
+ // Callbacks context
+ callbackContext = s.context || s,
+ // Context for global events
+ // It's the callbackContext if one was provided in the options
+ // and if it's a DOM node or a jQuery collection
+ globalEventContext = callbackContext !== s &&
+ ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
+ jQuery( callbackContext ) : jQuery.event,
+ // Deferreds
+ deferred = jQuery.Deferred(),
+ completeDeferred = jQuery._Deferred(),
+ // Status-dependent callbacks
+ statusCode = s.statusCode || {},
+ // ifModified key
+ ifModifiedKey,
+ // Headers (they are sent all at once)
+ requestHeaders = {},
+ requestHeadersNames = {},
+ // Response headers
+ responseHeadersString,
+ responseHeaders,
+ // transport
+ transport,
+ // timeout handle
+ timeoutTimer,
+ // Cross-domain detection vars
+ parts,
+ // The jqXHR state
+ state = 0,
+ // To know if global events are to be dispatched
+ fireGlobals,
+ // Loop variable
+ i,
+ // Fake xhr
+ jqXHR = {
+
+ readyState: 0,
+
+ // Caches the header
+ setRequestHeader: function( name, value ) {
+ if ( !state ) {
+ var lname = name.toLowerCase();
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+ requestHeaders[ name ] = value;
+ }
+ return this;
+ },
+
+ // Raw string
+ getAllResponseHeaders: function() {
+ return state === 2 ? responseHeadersString : null;
+ },
+
+ // Builds headers hashtable if needed
+ getResponseHeader: function( key ) {
+ var match;
+ if ( state === 2 ) {
+ if ( !responseHeaders ) {
+ responseHeaders = {};
+ while( ( match = rheaders.exec( responseHeadersString ) ) ) {
+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+ }
+ }
+ match = responseHeaders[ key.toLowerCase() ];
+ }
+ return match === undefined ? null : match;
+ },
+
+ // Overrides response content-type header
+ overrideMimeType: function( type ) {
+ if ( !state ) {
+ s.mimeType = type;
+ }
+ return this;
+ },
+
+ // Cancel the request
+ abort: function( statusText ) {
+ statusText = statusText || "abort";
+ if ( transport ) {
+ transport.abort( statusText );
+ }
+ done( 0, statusText );
+ return this;
+ }
+ };
+
+ // Callback for when everything is done
+ // It is defined here because jslint complains if it is declared
+ // at the end of the function (which would be more logical and readable)
+ function done( status, nativeStatusText, responses, headers ) {
+
+ // Called once
+ if ( state === 2 ) {
+ return;
+ }
+
+ // State is "done" now
+ state = 2;
+
+ // Clear timeout if it exists
+ if ( timeoutTimer ) {
+ clearTimeout( timeoutTimer );
+ }
+
+ // Dereference transport for early garbage collection
+ // (no matter how long the jqXHR object will be used)
+ transport = undefined;
+
+ // Cache response headers
+ responseHeadersString = headers || "";
+
+ // Set readyState
+ jqXHR.readyState = status > 0 ? 4 : 0;
+
+ var isSuccess,
+ success,
+ error,
+ statusText = nativeStatusText,
+ response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
+ lastModified,
+ etag;
+
+ // If successful, handle type chaining
+ if ( status >= 200 && status < 300 || status === 304 ) {
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+
+ if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
+ jQuery.lastModified[ ifModifiedKey ] = lastModified;
+ }
+ if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
+ jQuery.etag[ ifModifiedKey ] = etag;
+ }
+ }
+
+ // If not modified
+ if ( status === 304 ) {
+
+ statusText = "notmodified";
+ isSuccess = true;
+
+ // If we have data
+ } else {
+
+ try {
+ success = ajaxConvert( s, response );
+ statusText = "success";
+ isSuccess = true;
+ } catch(e) {
+ // We have a parsererror
+ statusText = "parsererror";
+ error = e;
+ }
+ }
+ } else {
+ // We extract error from statusText
+ // then normalize statusText and status for non-aborts
+ error = statusText;
+ if( !statusText || status ) {
+ statusText = "error";
+ if ( status < 0 ) {
+ status = 0;
+ }
+ }
+ }
+
+ // Set data for the fake xhr object
+ jqXHR.status = status;
+ jqXHR.statusText = "" + ( nativeStatusText || statusText );
+
+ // Success/Error
+ if ( isSuccess ) {
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+ } else {
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+ }
+
+ // Status-dependent callbacks
+ jqXHR.statusCode( statusCode );
+ statusCode = undefined;
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
+ [ jqXHR, s, isSuccess ? success : error ] );
+ }
+
+ // Complete
+ completeDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+ // Handle the global AJAX counter
+ if ( !( --jQuery.active ) ) {
+ jQuery.event.trigger( "ajaxStop" );
+ }
+ }
+ }
+
+ // Attach deferreds
+ deferred.promise( jqXHR );
+ jqXHR.success = jqXHR.done;
+ jqXHR.error = jqXHR.fail;
+ jqXHR.complete = completeDeferred.done;
+
+ // Status-dependent callbacks
+ jqXHR.statusCode = function( map ) {
+ if ( map ) {
+ var tmp;
+ if ( state < 2 ) {
+ for( tmp in map ) {
+ statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
+ }
+ } else {
+ tmp = map[ jqXHR.status ];
+ jqXHR.then( tmp, tmp );
+ }
+ }
+ return this;
+ };
+
+ // Remove hash character (#7531: and string promotion)
+ // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+ // We also use the url parameter if available
+ s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+ // Extract dataTypes list
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
+
+ // Determine if a cross-domain request is in order
+ if ( s.crossDomain == null ) {
+ parts = rurl.exec( s.url.toLowerCase() );
+ s.crossDomain = !!( parts &&
+ ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+ );
+ }
+
+ // Convert data if not already a string
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
+
+ // Apply prefilters
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+ // If request was aborted inside a prefiler, stop there
+ if ( state === 2 ) {
+ return false;
+ }
+
+ // We can fire global events as of now if asked to
+ fireGlobals = s.global;
+
+ // Uppercase the type
+ s.type = s.type.toUpperCase();
+
+ // Determine if request has content
+ s.hasContent = !rnoContent.test( s.type );
+
+ // Watch for a new set of requests
+ if ( fireGlobals && jQuery.active++ === 0 ) {
+ jQuery.event.trigger( "ajaxStart" );
+ }
+
+ // More options handling for requests with no content
+ if ( !s.hasContent ) {
+
+ // If data is available, append data to url
+ if ( s.data ) {
+ s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
+ // #9682: remove data so that it's not used in an eventual retry
+ delete s.data;
+ }
+
+ // Get ifModifiedKey before adding the anti-cache parameter
+ ifModifiedKey = s.url;
+
+ // Add anti-cache in url if needed
+ if ( s.cache === false ) {
+
+ var ts = jQuery.now(),
+ // try replacing _= if it is there
+ ret = s.url.replace( rts, "$1_=" + ts );
+
+ // if nothing was replaced, add timestamp to the end
+ s.url = ret + ( (ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
+ }
+ }
+
+ // Set the correct header, if data is being sent
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ ifModifiedKey = ifModifiedKey || s.url;
+ if ( jQuery.lastModified[ ifModifiedKey ] ) {
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
+ }
+ if ( jQuery.etag[ ifModifiedKey ] ) {
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
+ }
+ }
+
+ // Set the Accepts header for the server, depending on the dataType
+ jqXHR.setRequestHeader(
+ "Accept",
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+ s.accepts[ "*" ]
+ );
+
+ // Check for headers option
+ for ( i in s.headers ) {
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
+ }
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+ // Abort if not done already
+ jqXHR.abort();
+ return false;
+
+ }
+
+ // Install callbacks on deferreds
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
+ jqXHR[ i ]( s[ i ] );
+ }
+
+ // Get transport
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+ // If no transport, we auto-abort
+ if ( !transport ) {
+ done( -1, "No Transport" );
+ } else {
+ jqXHR.readyState = 1;
+ // Send global event
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+ }
+ // Timeout
+ if ( s.async && s.timeout > 0 ) {
+ timeoutTimer = setTimeout( function(){
+ jqXHR.abort( "timeout" );
+ }, s.timeout );
+ }
+
+ try {
+ state = 1;
+ transport.send( requestHeaders, done );
+ } catch (e) {
+ // Propagate exception as error if not done
+ if ( state < 2 ) {
+ done( -1, e );
+ // Simply rethrow otherwise
+ } else {
+ jQuery.error( e );
+ }
+ }
+ }
+
+ return jqXHR;
+ },
+
+ // Serialize an array of form elements or a set of
+ // key/values into a query string
+ param: function( a, traditional ) {
+ var s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : value;
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( var prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+ }
+});
+
+function buildParams( prefix, obj, traditional, add ) {
+ if ( jQuery.isArray( obj ) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+ // If array item is non-scalar (array or object), encode its
+ // numeric index to resolve deserialization ambiguity issues.
+ // Note that rack (as of 1.0.0) can't currently deserialize
+ // nested arrays properly, and attempting to do so may cause
+ // a server error. Possible fixes are to modify rack's
+ // deserialization algorithm or to provide an option or flag
+ // to force array serialization to be shallow.
+ buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
+ }
+ });
+
+ } else if ( !traditional && obj != null && typeof obj === "object" ) {
+ // Serialize object item.
+ for ( var name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+
+// This is still on the jQuery object... for now
+// Want to move this to jQuery.ajax some day
+jQuery.extend({
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {}
+
+});
+
+/* Handles responses to an ajax request:
+ * - sets all responseXXX fields accordingly
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+ var contents = s.contents,
+ dataTypes = s.dataTypes,
+ responseFields = s.responseFields,
+ ct,
+ type,
+ finalDataType,
+ firstDataType;
+
+ // Fill responseXXX fields
+ for( type in responseFields ) {
+ if ( type in responses ) {
+ jqXHR[ responseFields[type] ] = responses[ type ];
+ }
+ }
+
+ // Remove auto dataType and get content-type in the process
+ while( dataTypes[ 0 ] === "*" ) {
+ dataTypes.shift();
+ if ( ct === undefined ) {
+ ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
+ }
+ }
+
+ // Check if we're dealing with a known content-type
+ if ( ct ) {
+ for ( type in contents ) {
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
+ dataTypes.unshift( type );
+ break;
+ }
+ }
+ }
+
+ // Check to see if we have a response for the expected dataType
+ if ( dataTypes[ 0 ] in responses ) {
+ finalDataType = dataTypes[ 0 ];
+ } else {
+ // Try convertible dataTypes
+ for ( type in responses ) {
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+ finalDataType = type;
+ break;
+ }
+ if ( !firstDataType ) {
+ firstDataType = type;
+ }
+ }
+ // Or just use first one
+ finalDataType = finalDataType || firstDataType;
+ }
+
+ // If we found a dataType
+ // We add the dataType to the list if needed
+ // and return the corresponding response
+ if ( finalDataType ) {
+ if ( finalDataType !== dataTypes[ 0 ] ) {
+ dataTypes.unshift( finalDataType );
+ }
+ return responses[ finalDataType ];
+ }
+}
+
+// Chain conversions given the request and the original response
+function ajaxConvert( s, response ) {
+
+ // Apply the dataFilter if provided
+ if ( s.dataFilter ) {
+ response = s.dataFilter( response, s.dataType );
+ }
+
+ var dataTypes = s.dataTypes,
+ converters = {},
+ i,
+ key,
+ length = dataTypes.length,
+ tmp,
+ // Current and previous dataTypes
+ current = dataTypes[ 0 ],
+ prev,
+ // Conversion expression
+ conversion,
+ // Conversion function
+ conv,
+ // Conversion functions (transitive conversion)
+ conv1,
+ conv2;
+
+ // For each dataType in the chain
+ for( i = 1; i < length; i++ ) {
+
+ // Create converters map
+ // with lowercased keys
+ if ( i === 1 ) {
+ for( key in s.converters ) {
+ if( typeof key === "string" ) {
+ converters[ key.toLowerCase() ] = s.converters[ key ];
+ }
+ }
+ }
+
+ // Get the dataTypes
+ prev = current;
+ current = dataTypes[ i ];
+
+ // If current is auto dataType, update it to prev
+ if( current === "*" ) {
+ current = prev;
+ // If no auto and dataTypes are actually different
+ } else if ( prev !== "*" && prev !== current ) {
+
+ // Get the converter
+ conversion = prev + " " + current;
+ conv = converters[ conversion ] || converters[ "* " + current ];
+
+ // If there is no direct converter, search transitively
+ if ( !conv ) {
+ conv2 = undefined;
+ for( conv1 in converters ) {
+ tmp = conv1.split( " " );
+ if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
+ conv2 = converters[ tmp[1] + " " + current ];
+ if ( conv2 ) {
+ conv1 = converters[ conv1 ];
+ if ( conv1 === true ) {
+ conv = conv2;
+ } else if ( conv2 === true ) {
+ conv = conv1;
+ }
+ break;
+ }
+ }
+ }
+ }
+ // If we found no converter, dispatch an error
+ if ( !( conv || conv2 ) ) {
+ jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
+ }
+ // If found converter is not an equivalence
+ if ( conv !== true ) {
+ // Convert with 1 or 2 converters accordingly
+ response = conv ? conv( response ) : conv2( conv1(response) );
+ }
+ }
+ }
+ return response;
+}
+
+
+
+
+var jsc = jQuery.now(),
+ jsre = /(\=)\?(&|$)|\?\?/i;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+ jsonp: "callback",
+ jsonpCallback: function() {
+ return jQuery.expando + "_" + ( jsc++ );
+ }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+ var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
+ ( typeof s.data === "string" );
+
+ if ( s.dataTypes[ 0 ] === "jsonp" ||
+ s.jsonp !== false && ( jsre.test( s.url ) ||
+ inspectData && jsre.test( s.data ) ) ) {
+
+ var responseContainer,
+ jsonpCallback = s.jsonpCallback =
+ jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
+ previous = window[ jsonpCallback ],
+ url = s.url,
+ data = s.data,
+ replace = "$1" + jsonpCallback + "$2";
+
+ if ( s.jsonp !== false ) {
+ url = url.replace( jsre, replace );
+ if ( s.url === url ) {
+ if ( inspectData ) {
+ data = data.replace( jsre, replace );
+ }
+ if ( s.data === data ) {
+ // Add callback manually
+ url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
+ }
+ }
+ }
+
+ s.url = url;
+ s.data = data;
+
+ // Install callback
+ window[ jsonpCallback ] = function( response ) {
+ responseContainer = [ response ];
+ };
+
+ // Clean-up function
+ jqXHR.always(function() {
+ // Set callback back to previous value
+ window[ jsonpCallback ] = previous;
+ // Call if it was a function and we have a response
+ if ( responseContainer && jQuery.isFunction( previous ) ) {
+ window[ jsonpCallback ]( responseContainer[ 0 ] );
+ }
+ });
+
+ // Use data converter to retrieve json after script execution
+ s.converters["script json"] = function() {
+ if ( !responseContainer ) {
+ jQuery.error( jsonpCallback + " was not called" );
+ }
+ return responseContainer[ 0 ];
+ };
+
+ // force json dataType
+ s.dataTypes[ 0 ] = "json";
+
+ // Delegate to script
+ return "script";
+ }
+});
+
+
+
+
+// Install script dataType
+jQuery.ajaxSetup({
+ accepts: {
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+ },
+ contents: {
+ script: /javascript|ecmascript/
+ },
+ converters: {
+ "text script": function( text ) {
+ jQuery.globalEval( text );
+ return text;
+ }
+ }
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+ if ( s.cache === undefined ) {
+ s.cache = false;
+ }
+ if ( s.crossDomain ) {
+ s.type = "GET";
+ s.global = false;
+ }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+ // This transport only deals with cross domain requests
+ if ( s.crossDomain ) {
+
+ var script,
+ head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
+
+ return {
+
+ send: function( _, callback ) {
+
+ script = document.createElement( "script" );
+
+ script.async = "async";
+
+ if ( s.scriptCharset ) {
+ script.charset = s.scriptCharset;
+ }
+
+ script.src = s.url;
+
+ // Attach handlers for all browsers
+ script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+ if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+ // Handle memory leak in IE
+ script.onload = script.onreadystatechange = null;
+
+ // Remove the script
+ if ( head && script.parentNode ) {
+ head.removeChild( script );
+ }
+
+ // Dereference the script
+ script = undefined;
+
+ // Callback if not abort
+ if ( !isAbort ) {
+ callback( 200, "success" );
+ }
+ }
+ };
+ // Use insertBefore instead of appendChild to circumvent an IE6 bug.
+ // This arises when a base node is used (#2709 and #4378).
+ head.insertBefore( script, head.firstChild );
+ },
+
+ abort: function() {
+ if ( script ) {
+ script.onload( 0, 1 );
+ }
+ }
+ };
+ }
+});
+
+
+
+
+var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
+ xhrOnUnloadAbort = window.ActiveXObject ? function() {
+ // Abort all pending requests
+ for ( var key in xhrCallbacks ) {
+ xhrCallbacks[ key ]( 0, 1 );
+ }
+ } : false,
+ xhrId = 0,
+ xhrCallbacks;
+
+// Functions to create xhrs
+function createStandardXHR() {
+ try {
+ return new window.XMLHttpRequest();
+ } catch( e ) {}
+}
+
+function createActiveXHR() {
+ try {
+ return new window.ActiveXObject( "Microsoft.XMLHTTP" );
+ } catch( e ) {}
+}
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+ /* Microsoft failed to properly
+ * implement the XMLHttpRequest in IE7 (can't request local files),
+ * so we use the ActiveXObject when it is available
+ * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+ * we need a fallback.
+ */
+ function() {
+ return !this.isLocal && createStandardXHR() || createActiveXHR();
+ } :
+ // For all other browsers, use the standard XMLHttpRequest object
+ createStandardXHR;
+
+// Determine support properties
+(function( xhr ) {
+ jQuery.extend( jQuery.support, {
+ ajax: !!xhr,
+ cors: !!xhr && ( "withCredentials" in xhr )
+ });
+})( jQuery.ajaxSettings.xhr() );
+
+// Create transport if the browser can provide an xhr
+if ( jQuery.support.ajax ) {
+
+ jQuery.ajaxTransport(function( s ) {
+ // Cross domain only allowed if supported through XMLHttpRequest
+ if ( !s.crossDomain || jQuery.support.cors ) {
+
+ var callback;
+
+ return {
+ send: function( headers, complete ) {
+
+ // Get a new xhr
+ var xhr = s.xhr(),
+ handle,
+ i;
+
+ // Open the socket
+ // Passing null username, generates a login popup on Opera (#2865)
+ if ( s.username ) {
+ xhr.open( s.type, s.url, s.async, s.username, s.password );
+ } else {
+ xhr.open( s.type, s.url, s.async );
+ }
+
+ // Apply custom fields if provided
+ if ( s.xhrFields ) {
+ for ( i in s.xhrFields ) {
+ xhr[ i ] = s.xhrFields[ i ];
+ }
+ }
+
+ // Override mime type if needed
+ if ( s.mimeType && xhr.overrideMimeType ) {
+ xhr.overrideMimeType( s.mimeType );
+ }
+
+ // X-Requested-With header
+ // For cross-domain requests, seeing as conditions for a preflight are
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
+ // (it can always be set on a per-request basis or even using ajaxSetup)
+ // For same-domain requests, won't change header if already provided.
+ if ( !s.crossDomain && !headers["X-Requested-With"] ) {
+ headers[ "X-Requested-With" ] = "XMLHttpRequest";
+ }
+
+ // Need an extra try/catch for cross domain requests in Firefox 3
+ try {
+ for ( i in headers ) {
+ xhr.setRequestHeader( i, headers[ i ] );
+ }
+ } catch( _ ) {}
+
+ // Do send the request
+ // This may raise an exception which is actually
+ // handled in jQuery.ajax (so no try/catch here)
+ xhr.send( ( s.hasContent && s.data ) || null );
+
+ // Listener
+ callback = function( _, isAbort ) {
+
+ var status,
+ statusText,
+ responseHeaders,
+ responses,
+ xml;
+
+ // Firefox throws exceptions when accessing properties
+ // of an xhr when a network error occured
+ // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
+ try {
+
+ // Was never called and is aborted or complete
+ if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+
+ // Only called once
+ callback = undefined;
+
+ // Do not keep as active anymore
+ if ( handle ) {
+ xhr.onreadystatechange = jQuery.noop;
+ if ( xhrOnUnloadAbort ) {
+ delete xhrCallbacks[ handle ];
+ }
+ }
+
+ // If it's an abort
+ if ( isAbort ) {
+ // Abort it manually if needed
+ if ( xhr.readyState !== 4 ) {
+ xhr.abort();
+ }
+ } else {
+ status = xhr.status;
+ responseHeaders = xhr.getAllResponseHeaders();
+ responses = {};
+ xml = xhr.responseXML;
+
+ // Construct response list
+ if ( xml && xml.documentElement /* #4958 */ ) {
+ responses.xml = xml;
+ }
+ responses.text = xhr.responseText;
+
+ // Firefox throws an exception when accessing
+ // statusText for faulty cross-domain requests
+ try {
+ statusText = xhr.statusText;
+ } catch( e ) {
+ // We normalize with Webkit giving an empty statusText
+ statusText = "";
+ }
+
+ // Filter status for non standard behaviors
+
+ // If the request is local and we have data: assume a success
+ // (success with no data won't get notified, that's the best we
+ // can do given current implementations)
+ if ( !status && s.isLocal && !s.crossDomain ) {
+ status = responses.text ? 200 : 404;
+ // IE - #1450: sometimes returns 1223 when it should be 204
+ } else if ( status === 1223 ) {
+ status = 204;
+ }
+ }
+ }
+ } catch( firefoxAccessException ) {
+ if ( !isAbort ) {
+ complete( -1, firefoxAccessException );
+ }
+ }
+
+ // Call complete if needed
+ if ( responses ) {
+ complete( status, statusText, responses, responseHeaders );
+ }
+ };
+
+ // if we're in sync mode or it's in cache
+ // and has been retrieved directly (IE6 & IE7)
+ // we need to manually fire the callback
+ if ( !s.async || xhr.readyState === 4 ) {
+ callback();
+ } else {
+ handle = ++xhrId;
+ if ( xhrOnUnloadAbort ) {
+ // Create the active xhrs callbacks list if needed
+ // and attach the unload handler
+ if ( !xhrCallbacks ) {
+ xhrCallbacks = {};
+ jQuery( window ).unload( xhrOnUnloadAbort );
+ }
+ // Add to list of active xhrs callbacks
+ xhrCallbacks[ handle ] = callback;
+ }
+ xhr.onreadystatechange = callback;
+ }
+ },
+
+ abort: function() {
+ if ( callback ) {
+ callback(0,1);
+ }
+ }
+ };
+ }
+ });
+}
+
+
+
+
+var elemdisplay = {},
+ iframe, iframeDoc,
+ rfxtypes = /^(?:toggle|show|hide)$/,
+ rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
+ timerId,
+ fxAttrs = [
+ // height animations
+ [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
+ // width animations
+ [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
+ // opacity animations
+ [ "opacity" ]
+ ],
+ fxNow;
+
+jQuery.fn.extend({
+ show: function( speed, easing, callback ) {
+ var elem, display;
+
+ if ( speed || speed === 0 ) {
+ return this.animate( genFx("show", 3), speed, easing, callback);
+
+ } else {
+ for ( var i = 0, j = this.length; i < j; i++ ) {
+ elem = this[i];
+
+ if ( elem.style ) {
+ display = elem.style.display;
+
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
+ display = elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
+ jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName));
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( i = 0; i < j; i++ ) {
+ elem = this[i];
+
+ if ( elem.style ) {
+ display = elem.style.display;
+
+ if ( display === "" || display === "none" ) {
+ elem.style.display = jQuery._data(elem, "olddisplay") || "";
+ }
+ }
+ }
+
+ return this;
+ }
+ },
+
+ hide: function( speed, easing, callback ) {
+ if ( speed || speed === 0 ) {
+ return this.animate( genFx("hide", 3), speed, easing, callback);
+
+ } else {
+ for ( var i = 0, j = this.length; i < j; i++ ) {
+ if ( this[i].style ) {
+ var display = jQuery.css( this[i], "display" );
+
+ if ( display !== "none" && !jQuery._data( this[i], "olddisplay" ) ) {
+ jQuery._data( this[i], "olddisplay", display );
+ }
+ }
+ }
+
+ // Set the display of the elements in a second loop
+ // to avoid the constant reflow
+ for ( i = 0; i < j; i++ ) {
+ if ( this[i].style ) {
+ this[i].style.display = "none";
+ }
+ }
+
+ return this;
+ }
+ },
+
+ // Save the old toggle function
+ _toggle: jQuery.fn.toggle,
+
+ toggle: function( fn, fn2, callback ) {
+ var bool = typeof fn === "boolean";
+
+ if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
+ this._toggle.apply( this, arguments );
+
+ } else if ( fn == null || bool ) {
+ this.each(function() {
+ var state = bool ? fn : jQuery(this).is(":hidden");
+ jQuery(this)[ state ? "show" : "hide" ]();
+ });
+
+ } else {
+ this.animate(genFx("toggle", 3), fn, fn2, callback);
+ }
+
+ return this;
+ },
+
+ fadeTo: function( speed, to, easing, callback ) {
+ return this.filter(":hidden").css("opacity", 0).show().end()
+ .animate({opacity: to}, speed, easing, callback);
+ },
+
+ animate: function( prop, speed, easing, callback ) {
+ var optall = jQuery.speed(speed, easing, callback);
+
+ if ( jQuery.isEmptyObject( prop ) ) {
+ return this.each( optall.complete, [ false ] );
+ }
+
+ // Do not change referenced properties as per-property easing will be lost
+ prop = jQuery.extend( {}, prop );
+
+ return this[ optall.queue === false ? "each" : "queue" ](function() {
+ // XXX 'this' does not always have a nodeName when running the
+ // test suite
+
+ if ( optall.queue === false ) {
+ jQuery._mark( this );
+ }
+
+ var opt = jQuery.extend( {}, optall ),
+ isElement = this.nodeType === 1,
+ hidden = isElement && jQuery(this).is(":hidden"),
+ name, val, p,
+ display, e,
+ parts, start, end, unit;
+
+ // will store per property easing and be used to determine when an animation is complete
+ opt.animatedProperties = {};
+
+ for ( p in prop ) {
+
+ // property name normalization
+ name = jQuery.camelCase( p );
+ if ( p !== name ) {
+ prop[ name ] = prop[ p ];
+ delete prop[ p ];
+ }
+
+ val = prop[ name ];
+
+ // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
+ if ( jQuery.isArray( val ) ) {
+ opt.animatedProperties[ name ] = val[ 1 ];
+ val = prop[ name ] = val[ 0 ];
+ } else {
+ opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
+ }
+
+ if ( val === "hide" && hidden || val === "show" && !hidden ) {
+ return opt.complete.call( this );
+ }
+
+ if ( isElement && ( name === "height" || name === "width" ) ) {
+ // Make sure that nothing sneaks out
+ // Record all 3 overflow attributes because IE does not
+ // change the overflow attribute when overflowX and
+ // overflowY are set to the same value
+ opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
+
+ // Set display property to inline-block for height/width
+ // animations on inline elements that are having width/height
+ // animated
+ if ( jQuery.css( this, "display" ) === "inline" &&
+ jQuery.css( this, "float" ) === "none" ) {
+ if ( !jQuery.support.inlineBlockNeedsLayout ) {
+ this.style.display = "inline-block";
+
+ } else {
+ display = defaultDisplay( this.nodeName );
+
+ // inline-level elements accept inline-block;
+ // block-level elements need to be inline with layout
+ if ( display === "inline" ) {
+ this.style.display = "inline-block";
+
+ } else {
+ this.style.display = "inline";
+ this.style.zoom = 1;
+ }
+ }
+ }
+ }
+ }
+
+ if ( opt.overflow != null ) {
+ this.style.overflow = "hidden";
+ }
+
+ for ( p in prop ) {
+ e = new jQuery.fx( this, opt, p );
+ val = prop[ p ];
+
+ if ( rfxtypes.test(val) ) {
+ e[ val === "toggle" ? hidden ? "show" : "hide" : val ]();
+
+ } else {
+ parts = rfxnum.exec( val );
+ start = e.cur();
+
+ if ( parts ) {
+ end = parseFloat( parts[2] );
+ unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
+
+ // We need to compute starting value
+ if ( unit !== "px" ) {
+ jQuery.style( this, p, (end || 1) + unit);
+ start = ((end || 1) / e.cur()) * start;
+ jQuery.style( this, p, start + unit);
+ }
+
+ // If a +=/-= token was provided, we're doing a relative animation
+ if ( parts[1] ) {
+ end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
+ }
+
+ e.custom( start, end, unit );
+
+ } else {
+ e.custom( start, val, "" );
+ }
+ }
+ }
+
+ // For JS strict compliance
+ return true;
+ });
+ },
+
+ stop: function( clearQueue, gotoEnd ) {
+ if ( clearQueue ) {
+ this.queue([]);
+ }
+
+ this.each(function() {
+ var timers = jQuery.timers,
+ i = timers.length;
+ // clear marker counters if we know they won't be
+ if ( !gotoEnd ) {
+ jQuery._unmark( true, this );
+ }
+ while ( i-- ) {
+ if ( timers[i].elem === this ) {
+ if (gotoEnd) {
+ // force the next step to be the last
+ timers[i](true);
+ }
+
+ timers.splice(i, 1);
+ }
+ }
+ });
+
+ // start the next in the queue if the last step wasn't forced
+ if ( !gotoEnd ) {
+ this.dequeue();
+ }
+
+ return this;
+ }
+
+});
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+ setTimeout( clearFxNow, 0 );
+ return ( fxNow = jQuery.now() );
+}
+
+function clearFxNow() {
+ fxNow = undefined;
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, num ) {
+ var obj = {};
+
+ jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
+ obj[ this ] = type;
+ });
+
+ return obj;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+ slideDown: genFx("show", 1),
+ slideUp: genFx("hide", 1),
+ slideToggle: genFx("toggle", 1),
+ fadeIn: { opacity: "show" },
+ fadeOut: { opacity: "hide" },
+ fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return this.animate( props, speed, easing, callback );
+ };
+});
+
+jQuery.extend({
+ speed: function( speed, easing, fn ) {
+ var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
+ complete: fn || !fn && easing ||
+ jQuery.isFunction( speed ) && speed,
+ duration: speed,
+ easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
+ };
+
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
+
+ // Queueing
+ opt.old = opt.complete;
+ opt.complete = function( noUnmark ) {
+ if ( jQuery.isFunction( opt.old ) ) {
+ opt.old.call( this );
+ }
+
+ if ( opt.queue !== false ) {
+ jQuery.dequeue( this );
+ } else if ( noUnmark !== false ) {
+ jQuery._unmark( this );
+ }
+ };
+
+ return opt;
+ },
+
+ easing: {
+ linear: function( p, n, firstNum, diff ) {
+ return firstNum + diff * p;
+ },
+ swing: function( p, n, firstNum, diff ) {
+ return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
+ }
+ },
+
+ timers: [],
+
+ fx: function( elem, options, prop ) {
+ this.options = options;
+ this.elem = elem;
+ this.prop = prop;
+
+ options.orig = options.orig || {};
+ }
+
+});
+
+jQuery.fx.prototype = {
+ // Simple function for setting a style value
+ update: function() {
+ if ( this.options.step ) {
+ this.options.step.call( this.elem, this.now, this );
+ }
+
+ (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
+ },
+
+ // Get the current size
+ cur: function() {
+ if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
+ return this.elem[ this.prop ];
+ }
+
+ var parsed,
+ r = jQuery.css( this.elem, this.prop );
+ // Empty strings, null, undefined and "auto" are converted to 0,
+ // complex values such as "rotate(1rad)" are returned as is,
+ // simple values such as "10px" are parsed to Float.
+ return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
+ },
+
+ // Start an animation from one number to another
+ custom: function( from, to, unit ) {
+ var self = this,
+ fx = jQuery.fx;
+
+ this.startTime = fxNow || createFxNow();
+ this.start = from;
+ this.end = to;
+ this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
+ this.now = this.start;
+ this.pos = this.state = 0;
+
+ function t( gotoEnd ) {
+ return self.step(gotoEnd);
+ }
+
+ t.elem = this.elem;
+
+ if ( t() && jQuery.timers.push(t) && !timerId ) {
+ timerId = setInterval( fx.tick, fx.interval );
+ }
+ },
+
+ // Simple 'show' function
+ show: function() {
+ // Remember where we started, so that we can go back to it later
+ this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
+ this.options.show = true;
+
+ // Begin the animation
+ // Make sure that we start at a small width/height to avoid any
+ // flash of content
+ this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());
+
+ // Start by showing the element
+ jQuery( this.elem ).show();
+ },
+
+ // Simple 'hide' function
+ hide: function() {
+ // Remember where we started, so that we can go back to it later
+ this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
+ this.options.hide = true;
+
+ // Begin the animation
+ this.custom(this.cur(), 0);
+ },
+
+ // Each step of an animation
+ step: function( gotoEnd ) {
+ var t = fxNow || createFxNow(),
+ done = true,
+ elem = this.elem,
+ options = this.options,
+ i, n;
+
+ if ( gotoEnd || t >= options.duration + this.startTime ) {
+ this.now = this.end;
+ this.pos = this.state = 1;
+ this.update();
+
+ options.animatedProperties[ this.prop ] = true;
+
+ for ( i in options.animatedProperties ) {
+ if ( options.animatedProperties[i] !== true ) {
+ done = false;
+ }
+ }
+
+ if ( done ) {
+ // Reset the overflow
+ if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
+
+ jQuery.each( [ "", "X", "Y" ], function (index, value) {
+ elem.style[ "overflow" + value ] = options.overflow[index];
+ });
+ }
+
+ // Hide the element if the "hide" operation was done
+ if ( options.hide ) {
+ jQuery(elem).hide();
+ }
+
+ // Reset the properties, if the item has been hidden or shown
+ if ( options.hide || options.show ) {
+ for ( var p in options.animatedProperties ) {
+ jQuery.style( elem, p, options.orig[p] );
+ }
+ }
+
+ // Execute the complete function
+ options.complete.call( elem );
+ }
+
+ return false;
+
+ } else {
+ // classical easing cannot be used with an Infinity duration
+ if ( options.duration == Infinity ) {
+ this.now = t;
+ } else {
+ n = t - this.startTime;
+ this.state = n / options.duration;
+
+ // Perform the easing function, defaults to swing
+ this.pos = jQuery.easing[ options.animatedProperties[ this.prop ] ]( this.state, n, 0, 1, options.duration );
+ this.now = this.start + ((this.end - this.start) * this.pos);
+ }
+ // Perform the next step of the animation
+ this.update();
+ }
+
+ return true;
+ }
+};
+
+jQuery.extend( jQuery.fx, {
+ tick: function() {
+ for ( var timers = jQuery.timers, i = 0 ; i < timers.length ; ++i ) {
+ if ( !timers[i]() ) {
+ timers.splice(i--, 1);
+ }
+ }
+
+ if ( !timers.length ) {
+ jQuery.fx.stop();
+ }
+ },
+
+ interval: 13,
+
+ stop: function() {
+ clearInterval( timerId );
+ timerId = null;
+ },
+
+ speeds: {
+ slow: 600,
+ fast: 200,
+ // Default speed
+ _default: 400
+ },
+
+ step: {
+ opacity: function( fx ) {
+ jQuery.style( fx.elem, "opacity", fx.now );
+ },
+
+ _default: function( fx ) {
+ if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
+ fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
+ } else {
+ fx.elem[ fx.prop ] = fx.now;
+ }
+ }
+ }
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.animated = function( elem ) {
+ return jQuery.grep(jQuery.timers, function( fn ) {
+ return elem === fn.elem;
+ }).length;
+ };
+}
+
+// Try to restore the default display value of an element
+function defaultDisplay( nodeName ) {
+
+ if ( !elemdisplay[ nodeName ] ) {
+
+ var body = document.body,
+ elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
+ display = elem.css( "display" );
+
+ elem.remove();
+
+ // If the simple way fails,
+ // get element's real default display by attaching it to a temp iframe
+ if ( display === "none" || display === "" ) {
+ // No iframe to use yet, so create it
+ if ( !iframe ) {
+ iframe = document.createElement( "iframe" );
+ iframe.frameBorder = iframe.width = iframe.height = 0;
+ }
+
+ body.appendChild( iframe );
+
+ // Create a cacheable copy of the iframe document on first call.
+ // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
+ // document to it; WebKit & Firefox won't allow reusing the iframe document.
+ if ( !iframeDoc || !iframe.createElement ) {
+ iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
+ iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
+ iframeDoc.close();
+ }
+
+ elem = iframeDoc.createElement( nodeName );
+
+ iframeDoc.body.appendChild( elem );
+
+ display = jQuery.css( elem, "display" );
+
+ body.removeChild( iframe );
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+ }
+
+ return elemdisplay[ nodeName ];
+}
+
+
+
+
+var rtable = /^t(?:able|d|h)$/i,
+ rroot = /^(?:body|html)$/i;
+
+if ( "getBoundingClientRect" in document.documentElement ) {
+ jQuery.fn.offset = function( options ) {
+ var elem = this[0], box;
+
+ if ( options ) {
+ return this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ if ( !elem || !elem.ownerDocument ) {
+ return null;
+ }
+
+ if ( elem === elem.ownerDocument.body ) {
+ return jQuery.offset.bodyOffset( elem );
+ }
+
+ try {
+ box = elem.getBoundingClientRect();
+ } catch(e) {}
+
+ var doc = elem.ownerDocument,
+ docElem = doc.documentElement;
+
+ // Make sure we're not dealing with a disconnected DOM node
+ if ( !box || !jQuery.contains( docElem, elem ) ) {
+ return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
+ }
+
+ var body = doc.body,
+ win = getWindow(doc),
+ clientTop = docElem.clientTop || body.clientTop || 0,
+ clientLeft = docElem.clientLeft || body.clientLeft || 0,
+ scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop,
+ scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
+ top = box.top + scrollTop - clientTop,
+ left = box.left + scrollLeft - clientLeft;
+
+ return { top: top, left: left };
+ };
+
+} else {
+ jQuery.fn.offset = function( options ) {
+ var elem = this[0];
+
+ if ( options ) {
+ return this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ if ( !elem || !elem.ownerDocument ) {
+ return null;
+ }
+
+ if ( elem === elem.ownerDocument.body ) {
+ return jQuery.offset.bodyOffset( elem );
+ }
+
+ jQuery.offset.initialize();
+
+ var computedStyle,
+ offsetParent = elem.offsetParent,
+ prevOffsetParent = elem,
+ doc = elem.ownerDocument,
+ docElem = doc.documentElement,
+ body = doc.body,
+ defaultView = doc.defaultView,
+ prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
+ top = elem.offsetTop,
+ left = elem.offsetLeft;
+
+ while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
+ if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
+ break;
+ }
+
+ computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
+ top -= elem.scrollTop;
+ left -= elem.scrollLeft;
+
+ if ( elem === offsetParent ) {
+ top += elem.offsetTop;
+ left += elem.offsetLeft;
+
+ if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
+ top += parseFloat( computedStyle.borderTopWidth ) || 0;
+ left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+ }
+
+ prevOffsetParent = offsetParent;
+ offsetParent = elem.offsetParent;
+ }
+
+ if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
+ top += parseFloat( computedStyle.borderTopWidth ) || 0;
+ left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+ }
+
+ prevComputedStyle = computedStyle;
+ }
+
+ if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
+ top += body.offsetTop;
+ left += body.offsetLeft;
+ }
+
+ if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
+ top += Math.max( docElem.scrollTop, body.scrollTop );
+ left += Math.max( docElem.scrollLeft, body.scrollLeft );
+ }
+
+ return { top: top, left: left };
+ };
+}
+
+jQuery.offset = {
+ initialize: function() {
+ var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, "marginTop") ) || 0,
+ html = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
+
+ jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
+
+ container.innerHTML = html;
+ body.insertBefore( container, body.firstChild );
+ innerDiv = container.firstChild;
+ checkDiv = innerDiv.firstChild;
+ td = innerDiv.nextSibling.firstChild.firstChild;
+
+ this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
+ this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
+
+ checkDiv.style.position = "fixed";
+ checkDiv.style.top = "20px";
+
+ // safari subtracts parent border width here which is 5px
+ this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
+ checkDiv.style.position = checkDiv.style.top = "";
+
+ innerDiv.style.overflow = "hidden";
+ innerDiv.style.position = "relative";
+
+ this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
+
+ this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
+
+ body.removeChild( container );
+ jQuery.offset.initialize = jQuery.noop;
+ },
+
+ bodyOffset: function( body ) {
+ var top = body.offsetTop,
+ left = body.offsetLeft;
+
+ jQuery.offset.initialize();
+
+ if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
+ top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
+ left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
+ }
+
+ return { top: top, left: left };
+ },
+
+ setOffset: function( elem, options, i ) {
+ var position = jQuery.css( elem, "position" );
+
+ // set position first, in-case top/left are set even on static elem
+ if ( position === "static" ) {
+ elem.style.position = "relative";
+ }
+
+ var curElem = jQuery( elem ),
+ curOffset = curElem.offset(),
+ curCSSTop = jQuery.css( elem, "top" ),
+ curCSSLeft = jQuery.css( elem, "left" ),
+ calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
+ props = {}, curPosition = {}, curTop, curLeft;
+
+ // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+ if ( calculatePosition ) {
+ curPosition = curElem.position();
+ curTop = curPosition.top;
+ curLeft = curPosition.left;
+ } else {
+ curTop = parseFloat( curCSSTop ) || 0;
+ curLeft = parseFloat( curCSSLeft ) || 0;
+ }
+
+ if ( jQuery.isFunction( options ) ) {
+ options = options.call( elem, i, curOffset );
+ }
+
+ if (options.top != null) {
+ props.top = (options.top - curOffset.top) + curTop;
+ }
+ if (options.left != null) {
+ props.left = (options.left - curOffset.left) + curLeft;
+ }
+
+ if ( "using" in options ) {
+ options.using.call( elem, props );
+ } else {
+ curElem.css( props );
+ }
+ }
+};
+
+
+jQuery.fn.extend({
+ position: function() {
+ if ( !this[0] ) {
+ return null;
+ }
+
+ var elem = this[0],
+
+ // Get *real* offsetParent
+ offsetParent = this.offsetParent(),
+
+ // Get correct offsets
+ offset = this.offset(),
+ parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
+
+ // Subtract element margins
+ // note: when an element has margin: auto the offsetLeft and marginLeft
+ // are the same in Safari causing offset.left to incorrectly be 0
+ offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
+ offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
+
+ // Add offsetParent borders
+ parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
+ parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
+
+ // Subtract the two offsets
+ return {
+ top: offset.top - parentOffset.top,
+ left: offset.left - parentOffset.left
+ };
+ },
+
+ offsetParent: function() {
+ return this.map(function() {
+ var offsetParent = this.offsetParent || document.body;
+ while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
+ offsetParent = offsetParent.offsetParent;
+ }
+ return offsetParent;
+ });
+ }
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( ["Left", "Top"], function( i, name ) {
+ var method = "scroll" + name;
+
+ jQuery.fn[ method ] = function( val ) {
+ var elem, win;
+
+ if ( val === undefined ) {
+ elem = this[ 0 ];
+
+ if ( !elem ) {
+ return null;
+ }
+
+ win = getWindow( elem );
+
+ // Return the scroll offset
+ return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
+ jQuery.support.boxModel && win.document.documentElement[ method ] ||
+ win.document.body[ method ] :
+ elem[ method ];
+ }
+
+ // Set the scroll offset
+ return this.each(function() {
+ win = getWindow( this );
+
+ if ( win ) {
+ win.scrollTo(
+ !i ? val : jQuery( win ).scrollLeft(),
+ i ? val : jQuery( win ).scrollTop()
+ );
+
+ } else {
+ this[ method ] = val;
+ }
+ });
+ };
+});
+
+function getWindow( elem ) {
+ return jQuery.isWindow( elem ) ?
+ elem :
+ elem.nodeType === 9 ?
+ elem.defaultView || elem.parentWindow :
+ false;
+}
+
+
+
+
+// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
+jQuery.each([ "Height", "Width" ], function( i, name ) {
+
+ var type = name.toLowerCase();
+
+ // innerHeight and innerWidth
+ jQuery.fn[ "inner" + name ] = function() {
+ var elem = this[0];
+ return elem && elem.style ?
+ parseFloat( jQuery.css( elem, type, "padding" ) ) :
+ null;
+ };
+
+ // outerHeight and outerWidth
+ jQuery.fn[ "outer" + name ] = function( margin ) {
+ var elem = this[0];
+ return elem && elem.style ?
+ parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
+ null;
+ };
+
+ jQuery.fn[ type ] = function( size ) {
+ // Get window width or height
+ var elem = this[0];
+ if ( !elem ) {
+ return size == null ? null : this;
+ }
+
+ if ( jQuery.isFunction( size ) ) {
+ return this.each(function( i ) {
+ var self = jQuery( this );
+ self[ type ]( size.call( this, i, self[ type ]() ) );
+ });
+ }
+
+ if ( jQuery.isWindow( elem ) ) {
+ // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
+ // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
+ var docElemProp = elem.document.documentElement[ "client" + name ],
+ body = elem.document.body;
+ return elem.document.compatMode === "CSS1Compat" && docElemProp ||
+ body && body[ "client" + name ] || docElemProp;
+
+ // Get document width or height
+ } else if ( elem.nodeType === 9 ) {
+ // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+ return Math.max(
+ elem.documentElement["client" + name],
+ elem.body["scroll" + name], elem.documentElement["scroll" + name],
+ elem.body["offset" + name], elem.documentElement["offset" + name]
+ );
+
+ // Get or set width or height on the element
+ } else if ( size === undefined ) {
+ var orig = jQuery.css( elem, type ),
+ ret = parseFloat( orig );
+
+ return jQuery.isNaN( ret ) ? orig : ret;
+
+ // Set the width or height on the element (default to pixels if value is unitless)
+ } else {
+ return this.css( type, typeof size === "string" ? size : size + "px" );
+ }
+ };
+
+});
+
+
+// Expose jQuery to the global object
+window.jQuery = window.$ = jQuery;
+})(window); \ No newline at end of file
diff --git a/lib/scripts/jquery/jquery.min.js b/lib/scripts/jquery/jquery.min.js
new file mode 100644
index 000000000..3684c36b5
--- /dev/null
+++ b/lib/scripts/jquery/jquery.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */
+(function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bA.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bP,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(Q.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(w,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(!b)return-1;if(I)return I.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g+"With"](this===b?d:this,[h])}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u,v;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},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(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete
+t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.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(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,M(a.origType,a.selector),f.extend({},a,{handler:L,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,M(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?D:C):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=D;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=D;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=D,this.stopPropagation()},isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C};var E=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},F=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?F:E,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?F:E)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="submit"||c==="image")&&f(b).closest("form").length&&J("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&J("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var G,H=function(a){var b=f.nodeName(a,"input")?a.type:"",c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var K={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||C,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=w.exec(h),k="",j&&(k=j[0],h=h.replace(w,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,K[h]?(a.push(K[h]+k),h=h+k):h=(K[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+M(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+M(h,m),e)}return this}}),f.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(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.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(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var N=/Until$/,O=/^(?:parents|prevUntil|prevAll)/,P=/,/,Q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,S=f.expr.match.POS,T={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(V(this,a,!1),"not",a)},filter:function(a){return this.pushStack(V(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=S.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|object|embed|option|style)/i,bb=/checked\s*(?:[^=]|=\s*.checked.)/i,bc=/\/(java|ecma)script/i,bd=/^\s*<!(?:\[CDATA\[|\-\-)/,be={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bb.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bf(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bl)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!ba.test(a[0])&&(f.support.checkClone||!bb.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean
+(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bk(k[i]);else bk(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bc.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bm=/alpha\([^)]*\)/i,bn=/opacity=([^)]*)/,bo=/([A-Z]|^ms)/g,bp=/^-?\d+(?:px)?$/i,bq=/^-?\d/,br=/^([\-+])=([\-+.\de]+)/,bs={position:"absolute",visibility:"hidden",display:"block"},bt=["Left","Right"],bu=["Top","Bottom"],bv,bw,bx;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bv(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=br.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bv)return bv(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return by(a,b,d);f.swap(a,bs,function(){e=by(a,b,d)});return e}},set:function(a,b){if(!bp.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bJ,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bK.test(this.nodeName)||bE.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bT},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bD.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bT+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bW(bQ,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bz,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cr(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cq("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cq("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cr(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cq("show",1),slideUp:cq("hide",1),slideToggle:cq("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return d.step(a)}var d=this,e=f.fx;this.startTime=cn||co(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&f.timers.push(g)&&!cl&&(cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||co(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cs=/^t(?:able|d|h)$/i,ct=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cu(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cs.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file
diff --git a/lib/scripts/jquery/update.sh b/lib/scripts/jquery/update.sh
new file mode 100755
index 000000000..fde46f4d7
--- /dev/null
+++ b/lib/scripts/jquery/update.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# This script loads the latest jQuery and jQuery-UI 1.* versions from Google's CDN
+#
+# It also loads the 'smoothness' jQuery-UI theme and all referenced images.
+#
+# @author Andreas Gohr <andi@splitbrain.org>
+# @link https://code.google.com/apis/libraries/devguide.html#jquery
+
+# load jQuery
+wget -nv https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js -O jquery.min.js
+wget -nv https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js -O jquery.js
+
+# load jQuery-UI
+wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js -O jquery-ui.min.js
+wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.js -O jquery-ui.js
+
+# load the smoothness theme
+mkdir -p jquery-ui-theme/images
+wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.css -O jquery-ui-theme/smoothness.css
+images=`gawk 'match($0, /url\((images\/[^\)]+)\)/, m) { print m[1] }' jquery-ui-theme/smoothness.css`
+for img in $images
+do
+ wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/$img -O jquery-ui-theme/$img
+done
+
+# remove font family declarations from smoothness CSS
+sed -i "s/font-family:[^;]*; \?//" jquery-ui-theme/smoothness.css
diff --git a/lib/scripts/linkwiz.js b/lib/scripts/linkwiz.js
index fec43ad5e..cc4c19e0d 100644
--- a/lib/scripts/linkwiz.js
+++ b/lib/scripts/linkwiz.js
@@ -2,57 +2,60 @@
* The Link Wizard
*
* @author Andreas Gohr <gohr@cosmocode.de>
+ * @author Pierre Spring <pierre.spring@caillou.ch>
*/
-var linkwiz = {
- wiz: null,
- entry: null,
+var dw_linkwiz = {
+ $wiz: null,
+ $entry: null,
result: null,
- timer: null,
- sack: null,
+ timer: null,
textArea: null,
- selected: -1,
+ selected: null,
selection: null,
/**
- * Initialize the linkwizard by creating the needed HTML
+ * Initialize the dw_linkwizard by creating the needed HTML
* and attaching the eventhandlers
*/
- init: function(textArea){
- // prepare AJAX object
- linkwiz.sack = new sack(DOKU_BASE + 'lib/exe/ajax.php');
- linkwiz.sack.AjaxFailedAlert = '';
- linkwiz.sack.encodeURIString = false;
+ init: function($editor){
+ // position relative to the text area
+ var pos = $editor.position();
// create HTML Structure
- linkwiz.wiz = document.createElement('div');
- linkwiz.wiz.id = 'link__wiz';
- linkwiz.wiz.className = 'picker';
- linkwiz.wiz.style.top = (findPosY(textArea)+20)+'px';
- linkwiz.wiz.style.left = (findPosX(textArea)+80)+'px';
- linkwiz.wiz.style.marginLeft = '-10000px';
- linkwiz.wiz.style.marginTop = '-10000px';
- linkwiz.wiz.style.position = 'absolute';
-
- linkwiz.wiz.innerHTML =
- '<div id="link__wiz_header">'+
- '<img src="'+DOKU_BASE+'lib/images/close.png" width="16" height="16" align="right" alt="" id="link__wiz_close" />'+
- LANG['linkwiz']+'</div>'+
- '<div>'+LANG['linkto']+' <input type="text" class="edit" id="link__wiz_entry" autocomplete="off" /></div>'+
- '<div id="link__wiz_result"></div>';
- $('dw__editform').parentNode.appendChild(linkwiz.wiz);
- linkwiz.textArea = textArea;
- linkwiz.result = $('link__wiz_result');
- linkwiz.entry = $('link__wiz_entry');
+ dw_linkwiz.$wiz = jQuery(document.createElement('div'))
+ .dialog({
+ autoOpen: false,
+ draggable: true,
+ title: LANG.linkwiz,
+ resizable: false
+ })
+ .html(
+ '<div>'+LANG.linkto+' <input type="text" class="edit" id="link__wiz_entry" autocomplete="off" /></div>'+
+ '<div id="link__wiz_result"></div>'
+ )
+ .parent()
+ .attr('id','link__wiz')
+ .addClass('a11y')
+ .css({
+ 'position': 'absolute',
+ 'top': (pos.top+20)+'px',
+ 'left': (pos.left+80)+'px'
+ })
+ .show()
+ .appendTo('div.dokuwiki');
+
+ dw_linkwiz.textArea = $editor[0];
+ dw_linkwiz.result = jQuery('#link__wiz_result')[0];
+
+ // scrollview correction on arrow up/down gets easier
+ jQuery(dw_linkwiz.result).css('position', 'relative');
+
+ dw_linkwiz.$entry = jQuery('#link__wiz_entry');
// attach event handlers
- var obj;
- obj = $('link__wiz_close');
- obj.onclick = linkwiz.hide;
-
- linkwiz.sack.elementObj = linkwiz.result;
- addEvent(linkwiz.entry,'keyup',linkwiz.onEntry);
- addEvent(linkwiz.result,'click',linkwiz.onResultClick);
- drag.attach(linkwiz.wiz,$('link__wiz_header'));
+ jQuery('#link__wiz_close').click(dw_linkwiz.hide);
+ dw_linkwiz.$entry.keyup(dw_linkwiz.onEntry);
+ jQuery(dw_linkwiz.result).delegate('a', 'click', dw_linkwiz.onResultClick);
},
/**
@@ -63,56 +66,59 @@ var linkwiz = {
return true; //ignore
}
if(e.keyCode == 27){
- linkwiz.hide();
+ dw_linkwiz.hide();
e.preventDefault();
e.stopPropagation();
return false;
}
if(e.keyCode == 38){ //Up
- linkwiz.select(linkwiz.selected -1);
+ dw_linkwiz.select(dw_linkwiz.selected -1);
e.preventDefault();
e.stopPropagation();
return false;
}
if(e.keyCode == 40){ //Down
- linkwiz.select(linkwiz.selected +1);
+ dw_linkwiz.select(dw_linkwiz.selected +1);
e.preventDefault();
e.stopPropagation();
return false;
}
if(e.keyCode == 13){ //Enter
- if(linkwiz.selected > -1){
- var obj = linkwiz.getResult(linkwiz.selected);
- if(obj){
- var a = obj.getElementsByTagName('A')[0];
- linkwiz.resultClick(a);
+ if(dw_linkwiz.selected > -1){
+ var $obj = dw_linkwiz.$getResult(dw_linkwiz.selected);
+ if($obj.length > 0){
+ dw_linkwiz.resultClick($obj.find('a')[0]);
}
- }else if(linkwiz.entry.value){
- linkwiz.insertLink(linkwiz.entry.value);
+ }else if(dw_linkwiz.$entry.val()){
+ dw_linkwiz.insertLink(dw_linkwiz.$entry.val());
}
e.preventDefault();
e.stopPropagation();
return false;
}
- linkwiz.autocomplete();
+ dw_linkwiz.autocomplete();
},
/**
- * Get one of the result by index
+ * Get one of the results by index
*
* @param int result div to return
* @returns DOMObject or null
*/
getResult: function(num){
- var obj;
- var childs = linkwiz.result.getElementsByTagName('DIV');
- obj = childs[num];
- if(obj){
- return obj;
- }else{
- return null;
- }
+ DEPRECATED('use dw_linkwiz.$getResult()[0] instead');
+ return dw_linkwiz.$getResult()[0] || null;
+ },
+
+ /**
+ * Get one of the results by index
+ *
+ * @param int result div to return
+ * @returns jQuery object
+ */
+ $getResult: function(num) {
+ return jQuery(dw_linkwiz.result).find('div').eq(num);
},
/**
@@ -120,43 +126,45 @@ var linkwiz = {
*/
select: function(num){
if(num < 0){
- linkwiz.deselect();
+ dw_linkwiz.deselect();
return;
}
- var obj = linkwiz.getResult(num);
- if(obj){
- linkwiz.deselect();
- obj.className += ' selected';
-
- // make sure the item is viewable in the scroll view
- // FIXME check IE compatibility
- if(obj.offsetTop > linkwiz.result.scrollTop + linkwiz.result.clientHeight){
- linkwiz.result.scrollTop += obj.clientHeight;
- }else if(obj.offsetTop - linkwiz.result.clientHeight < linkwiz.result.scrollTop){ // this works but isn't quite right, fixes welcome
- linkwiz.result.scrollTop -= obj.clientHeight;
- }
- // now recheck - if still not in view, the user used the mouse to scroll
- if( (obj.offsetTop > linkwiz.result.scrollTop + linkwiz.result.clientHeight) ||
- (obj.offsetTop < linkwiz.result.scrollTop) ){
- obj.scrollIntoView();
- }
+ var $obj = dw_linkwiz.$getResult(num);
+ if ($obj.length === 0) {
+ return;
+ }
- linkwiz.selected = num;
+ dw_linkwiz.deselect();
+ $obj.addClass('selected');
+
+ // make sure the item is viewable in the scroll view
+
+ //getting child position within the parent
+ var childPos = $obj.position().top;
+ //getting difference between the childs top and parents viewable area
+ var yDiff = childPos + $obj.outerHeight() - jQuery(dw_linkwiz.result).innerHeight();
+
+ if (childPos < 0) {
+ //if childPos is above viewable area (that's why it goes negative)
+ jQuery(dw_linkwiz.result)[0].scrollTop += childPos;
+ } else if(yDiff > 0) {
+ // if difference between childs top and parents viewable area is
+ // greater than the height of a childDiv
+ jQuery(dw_linkwiz.result)[0].scrollTop += yDiff;
}
+
+ dw_linkwiz.selected = num;
},
/**
* deselect a result if any is selected
*/
deselect: function(){
- if(linkwiz.selected > -1){
- var obj = linkwiz.getResult(linkwiz.selected);
- if(obj){
- obj.className = obj.className.replace(/ ?selected/,'');
- }
+ if(dw_linkwiz.selected > -1){
+ dw_linkwiz.$getResult(dw_linkwiz.selected).removeClass('selected');
}
- linkwiz.selected = -1;
+ dw_linkwiz.selected = -1;
},
/**
@@ -164,10 +172,12 @@ var linkwiz = {
* resultClick()
*/
onResultClick: function(e){
- if(e.target.tagName != 'A') return;
+ if(!jQuery(this).is('a')) {
+ return;
+ }
e.stopPropagation();
e.preventDefault();
- linkwiz.resultClick(e.target);
+ dw_linkwiz.resultClick(this);
return false;
},
@@ -175,33 +185,37 @@ var linkwiz = {
* Handles the "click" on a given result anchor
*/
resultClick: function(a){
- var id = a.title;
- if(id == '' || id.substr(id.length-1) == ':'){
- linkwiz.entry.value = id;
- linkwiz.autocomplete_exec();
+ dw_linkwiz.$entry.val(a.title);
+ if(a.title == '' || a.title.substr(-1) == ':'){
+ dw_linkwiz.autocomplete_exec();
}else{
- linkwiz.entry.value = id;
- if(a.nextSibling && a.nextSibling.tagName == 'SPAN'){
- linkwiz.insertLink(a.nextSibling.innerHTML);
+ if (jQuery(a.nextSibling).is('span')) {
+ dw_linkwiz.insertLink(a.nextSibling.innerHTML);
}else{
- linkwiz.insertLink('');
+ dw_linkwiz.insertLink('');
}
}
},
/**
* Insert the id currently in the entry box to the textarea,
- * replacing the current selection or at the curso postion.
+ * replacing the current selection or at the cursor position.
* When no selection is available the given title will be used
* as link title instead
*/
insertLink: function(title){
- if(!linkwiz.entry.value) return;
+ var link = dw_linkwiz.$entry.val(),
+ sel, stxt;
+ if(!link) {
+ return;
+ }
- var sel = getSelection(linkwiz.textArea);
- if(sel.start == 0 && sel.end == 0) sel = linkwiz.selection;
+ sel = getSelection(dw_linkwiz.textArea);
+ if(sel.start == 0 && sel.end == 0) {
+ sel = dw_linkwiz.selection;
+ }
- var stxt = sel.getText();
+ stxt = sel.getText();
// don't include trailing space in selection
if(stxt.charAt(stxt.length - 1) == ' '){
@@ -209,25 +223,29 @@ var linkwiz = {
stxt = sel.getText();
}
- if(!stxt && !DOKU_UHC) stxt=title;
+ if(!stxt && !DOKU_UHC) {
+ stxt=title;
+ }
// prepend colon inside namespaces for non namespace pages
- if(linkwiz.textArea.form['id'].value.indexOf(':') != -1 &&
- linkwiz.entry.value.indexOf(':') == -1){
- linkwiz.entry.value = ':'+linkwiz.entry.value;
+ if(dw_linkwiz.textArea.form.id.value.indexOf(':') != -1 &&
+ link.indexOf(':') == -1){
+ link = ':' + link;
}
- var link = '[['+linkwiz.entry.value+'|';
- if(stxt) link += stxt;
+ var so = link.length+3;
+
+ link = '[['+link+'|';
+ if(stxt) {
+ link += stxt;
+ }
link += ']]';
- var so = linkwiz.entry.value.length+3;
- var eo = 2;
+ pasteText(sel,link,{startofs: so, endofs: 2});
+ dw_linkwiz.hide();
- pasteText(sel,link,{startofs: so, endofs: eo});
- linkwiz.hide();
- // reset the entry to the parent namespace and remove : at the beginning
- linkwiz.entry.value = linkwiz.entry.value.replace(/(^:)?[^:]*$/, '');
+ // reset the entry to the parent namespace
+ dw_linkwiz.$entry.val(dw_linkwiz.$entry.val().replace(/[^:]*$/, ''));
},
/**
@@ -236,60 +254,56 @@ var linkwiz = {
* Calls autocomplete_exec when the timer runs out
*/
autocomplete: function(){
- if(linkwiz.timer !== null){
- window.clearTimeout(linkwiz.timer);
- linkwiz.timer = null;
+ if(dw_linkwiz.timer !== null){
+ window.clearTimeout(dw_linkwiz.timer);
+ dw_linkwiz.timer = null;
}
- linkwiz.timer = window.setTimeout(linkwiz.autocomplete_exec,350);
+ dw_linkwiz.timer = window.setTimeout(dw_linkwiz.autocomplete_exec,350);
},
/**
* Executes the AJAX call for the page/namespace lookup
*/
autocomplete_exec: function(){
- linkwiz.deselect();
- linkwiz.result.innerHTML = '<img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="" width="16" height="16" />';
- linkwiz.sack.runAJAX('call=linkwiz&q='+encodeURI(linkwiz.entry.value));
- },
-
- /**
- * Clears the result area
- */
- clear: function(){
- linkwiz.result.innerHTML = 'Search for a matching page name above, or browse through the pages on the right';
- linkwiz.entry.value = '';
+ var $res = jQuery(dw_linkwiz.result);
+ dw_linkwiz.deselect();
+ $res.html('<img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="" width="16" height="16" />')
+ .load(
+ DOKU_BASE + 'lib/exe/ajax.php',
+ {
+ call: 'linkwiz',
+ q: dw_linkwiz.$entry.val()
+ }
+ );
},
/**
- * Show the linkwizard
+ * Show the link wizard
*/
show: function(){
- linkwiz.selection = getSelection(linkwiz.textArea);
- linkwiz.wiz.style.marginLeft = '0px';
- linkwiz.wiz.style.marginTop = '0px';
- linkwiz.entry.focus();
- linkwiz.autocomplete();
+ dw_linkwiz.selection = getSelection(dw_linkwiz.textArea);
+ dw_linkwiz.$wiz.removeClass('a11y');
+ dw_linkwiz.$entry.focus();
+ dw_linkwiz.autocomplete();
},
/**
* Hide the link wizard
*/
hide: function(){
- linkwiz.wiz.style.marginLeft = '-10000px';
- linkwiz.wiz.style.marginTop = '-10000px';
- linkwiz.textArea.focus();
+ dw_linkwiz.$wiz.addClass('a11y');
+ dw_linkwiz.textArea.focus();
},
/**
* Toggle the link wizard
*/
toggle: function(){
- if(linkwiz.wiz.style.marginLeft == '-10000px'){
- linkwiz.show();
+ if(dw_linkwiz.$wiz.hasClass('a11y')){
+ dw_linkwiz.show();
}else{
- linkwiz.hide();
+ dw_linkwiz.hide();
}
}
};
-
diff --git a/lib/scripts/locktimer.js b/lib/scripts/locktimer.js
index 0db7d2b15..96f963c08 100644
--- a/lib/scripts/locktimer.js
+++ b/lib/scripts/locktimer.js
@@ -1,64 +1,81 @@
/**
* Class managing the timer to display a warning on a expiring lock
*/
-var locktimer = {
- sack: null,
- timeout: 0,
- timerID: null,
+var dw_locktimer = {
+ timeout: 0,
+ draft: false,
+ timerID: null,
lasttime: null,
- msg: '',
- pageid: '',
+ msg: LANG.willexpire,
+ pageid: '',
+ /**
+ * Initialize the lock timer
+ *
+ * @param int timeout Length of timeout in seconds
+ * @param string msg Deprecated; The expiry message
+ * @param bool draft Whether to save drafts
+ * @param string edid Optional; ID of an edit object which has to be present
+ */
init: function(timeout,msg,draft,edid){
- var edit = $(edid);
- if(!edit) return;
- if(edit.readOnly) return;
+ var $edit;
- // init values
- locktimer.timeout = timeout*1000;
- locktimer.msg = msg;
- locktimer.draft = draft;
- locktimer.lasttime = new Date();
+ switch (arguments.length) {
+ case 4:
+ DEPRECATED('Setting the locktimer expiry message is deprecated');
+ dw_locktimer.msg = msg;
+ break;
+ case 3:
+ edid = draft;
+ case 2:
+ draft = msg;
+ }
+ edid = edid || 'wiki__text';
- if(!$('dw__editform')) return;
- locktimer.pageid = $('dw__editform').elements.id.value;
- if(!locktimer.pageid) return;
+ $edit = jQuery('#' + edid);
+ if($edit.length === 0 || $edit.attr('readonly')) {
+ return;
+ }
- // init ajax component
- locktimer.sack = new sack(DOKU_BASE + 'lib/exe/ajax.php');
- locktimer.sack.AjaxFailedAlert = '';
- locktimer.sack.encodeURIString = false;
- locktimer.sack.onCompletion = locktimer.refreshed;
+ // init values
+ dw_locktimer.timeout = timeout*1000;
+ dw_locktimer.draft = draft;
+ dw_locktimer.lasttime = new Date();
+
+ dw_locktimer.pageid = jQuery('#dw__editform input[name=id]').val();
+ if(!dw_locktimer.pageid) {
+ return;
+ }
// register refresh event
- addEvent($('dw__editform'),'keypress',function(){locktimer.refresh();});
+ $edit.keypress(dw_locktimer.refresh);
// start timer
- locktimer.reset();
+ dw_locktimer.reset();
},
/**
* (Re)start the warning timer
*/
reset: function(){
- locktimer.clear();
- locktimer.timerID = window.setTimeout("locktimer.warning()", locktimer.timeout);
+ dw_locktimer.clear();
+ dw_locktimer.timerID = window.setTimeout(dw_locktimer.warning, dw_locktimer.timeout);
},
/**
* Display the warning about the expiring lock
*/
warning: function(){
- locktimer.clear();
- alert(locktimer.msg);
+ dw_locktimer.clear();
+ alert(fixtxt(dw_locktimer.msg));
},
/**
* Remove the current warning timer
*/
clear: function(){
- if(locktimer.timerID !== null){
- window.clearTimeout(locktimer.timerID);
- locktimer.timerID = null;
+ if(dw_locktimer.timerID !== null){
+ window.clearTimeout(dw_locktimer.timerID);
+ dw_locktimer.timerID = null;
}
},
@@ -68,35 +85,42 @@ var locktimer = {
* Called on keypresses in the edit area
*/
refresh: function(){
- var now = new Date();
+ var now = new Date(),
+ params = 'call=lock&id=' + dw_locktimer.pageid + '&';
+
// refresh every minute only
- if(now.getTime() - locktimer.lasttime.getTime() > 30*1000){
- var params = 'call=lock&id='+encodeURIComponent(locktimer.pageid);
- var dwform = $('dw__editform');
- if(locktimer.draft && dwform.elements.wikitext){
- params += '&prefix='+encodeURIComponent(dwform.elements.prefix.value);
- params += '&wikitext='+encodeURIComponent(dwform.elements.wikitext.value);
- params += '&suffix='+encodeURIComponent(dwform.elements.suffix.value);
- if(dwform.elements.date){
- params += '&date='+encodeURIComponent(dwform.elements.date.value);
- }
- }
- locktimer.sack.runAJAX(params);
- locktimer.lasttime = now;
+ if(now.getTime() - dw_locktimer.lasttime.getTime() <= 30*1000) {
+ return;
+ }
+
+ // POST everything necessary for draft saving
+ if(dw_locktimer.draft && jQuery('#dw__editform textarea[name=wikitext]').length > 0){
+ params += jQuery('#dw__editform').find('input[name=prefix], ' +
+ 'textarea[name=wikitext], ' +
+ 'input[name=suffix], ' +
+ 'input[name=date]').serialize();
}
+
+ jQuery.post(
+ DOKU_BASE + 'lib/exe/ajax.php',
+ params,
+ dw_locktimer.refreshed,
+ 'html'
+ );
+ dw_locktimer.lasttime = now;
},
/**
* Callback. Resets the warning timer
*/
- refreshed: function(){
- var data = this.response;
+ refreshed: function(data){
var error = data.charAt(0);
- data = data.substring(1);
+ data = data.substring(1);
- $('draft__status').innerHTML=data;
- if(error != '1') return; // locking failed
- locktimer.reset();
+ jQuery('#draft__status').html(data);
+ if(error != '1') {
+ return; // locking failed
+ }
+ dw_locktimer.reset();
}
};
-
diff --git a/lib/scripts/media.js b/lib/scripts/media.js
index 57f599163..7f5514f56 100644
--- a/lib/scripts/media.js
+++ b/lib/scripts/media.js
@@ -2,778 +2,933 @@
* JavaScript functionality for the media management popup
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @author Pierre Spring <pierre.spring@caillou.ch>
*/
-var media_manager = {
+
+var dw_mediamanager = {
keepopen: false,
hide: false,
- align: false,
popup: false,
- id: false,
display: false,
- link: false,
- size: false,
ext: false,
+ $popup: null,
- /**
- * Attach event handlers to all "folders" below the given element
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- treeattach: function(obj){
- if(!obj) return;
-
- var items = obj.getElementsByTagName('li');
- for(var i=0; i<items.length; i++){
- var elem = items[i];
-
- // attach action to make the +/- clickable
- var clicky = elem.getElementsByTagName('img')[0];
- clicky.style.cursor = 'pointer';
- addEvent(clicky,'click',function(event){ return media_manager.toggle(event,this); });
+ // Image insertion opts
+ align: false,
+ link: false,
+ size: false,
+ forbidden_opts: {},
+
+ // File list options
+ view_opts: {list: false, sort: false},
+
+ layout_width: 0,
+
+ // The minimum height of the full-screen mediamanager in px
+ minHeights: {thumbs: 200, rows: 100},
+
+ init: function () {
+ var $content, $tree;
+ $content = jQuery('#media__content');
+ $tree = jQuery('#media__tree');
+
+ dw_mediamanager.prepare_content($content);
+
+ dw_mediamanager.attachoptions();
+ dw_mediamanager.initpopup();
+
+ // add the action to autofill the "upload as" field
+ $content.delegate('#upload__file', 'change', dw_mediamanager.suggest)
+ // Attach the image selector action to all links
+ .delegate('a.select', 'click', dw_mediamanager.select)
+ // Attach deletion confirmation dialog to the delete buttons
+ .delegate('#media__content a.btn_media_delete', 'click',
+ dw_mediamanager.confirmattach)
+ .delegate('#mediamanager__done_form', 'submit', dw_mediamanager.list);
+
+ $tree.dw_tree({toggle_selector: 'img',
+ load_data: function (show_sublist, $clicky) {
+ // get the enclosed link (is always the first one)
+ var $link = $clicky.parent().find('div.li a.idx_dir');
+
+ jQuery.post(
+ DOKU_BASE + 'lib/exe/ajax.php',
+ $link[0].search.substr(1) + '&call=medians',
+ show_sublist,
+ 'html'
+ );
+ },
+
+ toggle_display: function ($clicky, opening) {
+ $clicky.attr('src',
+ DOKU_BASE + 'lib/images/' +
+ (opening ? 'minus' : 'plus') + '.gif');
+ }});
+ $tree.delegate('a', 'click', dw_mediamanager.list);
+
+ // Init view property
+ dw_mediamanager.set_fileview_list();
+
+ dw_mediamanager.init_options();
+
+ dw_mediamanager.image_diff();
+ dw_mediamanager.init_ajax_uploader();
+
+ // changing opened tab in the file list panel
+ jQuery('#mediamanager__page div.filelist').delegate('ul.tabs a', 'click', dw_mediamanager.list)
+ // loading file details
+ .delegate('div.panelContent a', 'click', dw_mediamanager.details)
+ // search form
+ .delegate('#dw__mediasearch', 'submit', dw_mediamanager.list)
+ // "upload as" field autofill
+ .delegate('#upload__file', 'change', dw_mediamanager.suggest)
+ // uploaded images
+ .delegate('.qq-upload-file a', 'click', dw_mediamanager.details);
+
+ // changing opened tab in the file details panel
+ jQuery('#mediamanager__page div.file').delegate('ul.tabs a', 'click', dw_mediamanager.details)
+ // "update new version" button
+ .delegate('#mediamanager__btn_update', 'submit', dw_mediamanager.list)
+ // revisions form
+ .delegate('#page__revisions', 'submit', dw_mediamanager.details)
+ .delegate('#page__revisions a', 'click', dw_mediamanager.details)
+ // meta edit form
+ .delegate('#mediamanager__save_meta', 'submit', dw_mediamanager.details)
+ // delete button
+ .delegate('#mediamanager__btn_delete', 'submit', dw_mediamanager.details)
+ // "restore this version" button
+ .delegate('#mediamanager__btn_restore', 'submit', dw_mediamanager.details)
+ // less/more recent buttons in media revisions form
+ .delegate('.btn_newer, .btn_older', 'submit', dw_mediamanager.details);
+
+ dw_mediamanager.update_resizable();
+ dw_mediamanager.layout_width = jQuery("#mediamanager__page").width();
+ jQuery(window).resize(dw_mediamanager.window_resize);
+ },
- // attach action load folder list via AJAX
- var link = elem.getElementsByTagName('a')[0];
- link.style.cursor = 'pointer';
- addEvent(link,'click',function(event){ return media_manager.list(event,this); });
+ init_options: function () {
+ var $options = jQuery('div.filelist div.panelHeader form.options'),
+ $listType, $sortBy, $both;
+ if ($options.length === 0) {
+ return;
}
+
+ $listType = $options.find('li.listType');
+ $sortBy = $options.find('li.sortBy');
+ $both = $listType.add($sortBy);
+
+ // Remove the submit button
+ $options.find('input[type=submit]').parent().hide();
+
+ // Prepare HTML for jQuery UI buttonset
+ $both.find('label').each(function () {
+ var $this = jQuery(this);
+ $this.children('input').appendTo($this.parent());
+ });
+
+ // Init buttonset
+ $both.buttonset();
+
+ // Change handlers
+ $listType.children('input').change(function (event) {
+ dw_mediamanager.set_fileview_list();
+ });
+ $sortBy.children('input').change(function (event) {
+ dw_mediamanager.set_fileview_sort();
+ dw_mediamanager.list.call(this, event);
+ });
},
/**
- * Attach the image selector action to all links below the given element
- * also add the action to autofill the "upload as" field
+ * build the popup window
*
- * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Dominik Eckelmann <eckelmann@cosmocode.de>
*/
- selectorattach: function(obj){
- if(!obj) return;
+ initpopup: function () {
+ var opts, $insp, $insbtn;
+
+ dw_mediamanager.$popup = jQuery(document.createElement('div'))
+ .attr('id', 'media__popup_content')
+ .dialog({autoOpen: false, width: 280, modal: true,
+ draggable: true, title: LANG.mediatitle,
+ resizable: false});
+
+ opts = [{id: 'link', label: LANG.mediatarget,
+ btns: ['lnk', 'direct', 'nolnk', 'displaylnk']},
+ {id: 'align', label: LANG.mediaalign,
+ btns: ['noalign', 'left', 'center', 'right']},
+ {id: 'size', label: LANG.mediasize,
+ btns: ['small', 'medium', 'large', 'original']}
+ ];
+
+ jQuery.each(opts, function (_, opt) {
+ var $p, $l;
+ $p = jQuery(document.createElement('p'))
+ .attr('id', 'media__' + opt.id);
+
+ if (dw_mediamanager.display === "2") {
+ $p.hide();
+ }
- var items = getElementsByClass('select',obj,'a');
- for(var i=0; i<items.length; i++){
- var elem = items[i];
- elem.style.cursor = 'pointer';
- addEvent(elem,'click',function(event){ return media_manager.select(event,this); });
- }
+ $l = jQuery(document.createElement('label'))
+ .text(opt.label);
+ $p.append($l);
- // hide syntax example
- items = getElementsByClass('example',obj,'div');
- for(var i=0; i<items.length; i++){
- elem = items[i];
- elem.style.display = 'none';
- }
+ jQuery.each(opt.btns, function (i, text) {
+ var $btn, $img;
+ $btn = jQuery(document.createElement('button'))
+ .addClass('button')
+ .attr('id', "media__" + opt.id + "btn" + (i + 1))
+ .attr('title', LANG['media' + text])
+ .click(bind(dw_mediamanager.setOpt, opt.id));
- var file = $('upload__file');
- if(!file) return;
- addEvent(file,'change',media_manager.suggest);
- },
+ $img = jQuery(document.createElement('img'))
+ .attr('src', DOKU_BASE + 'lib/images/media_' +
+ opt.id + '_' + text + '.png');
- /**
- * Attach deletion confirmation dialog to the delete buttons.
- *
- * Michael Klier <chi@chimeric.de>
- */
- confirmattach: function(obj){
- if(!obj) return;
-
- items = getElementsByClass('btn_media_delete',obj,'a');
- for(var i=0; i<items.length; i++){
- var elem = items[i];
- addEvent(elem,'click',function(e){
- if(e.target.tagName == 'IMG'){
- var name = e.target.parentNode.title;
- }else{
- var name = e.target.title;
- }
- if(!confirm(LANG['del_confirm'] + "\n" + name)) {
- e.preventDefault();
- return false;
- } else {
- return true;
- }
+ $btn.append($img);
+ $p.append($btn);
});
- }
+
+ dw_mediamanager.$popup.append($p);
+ });
+
+ // insert button
+ $insp = jQuery(document.createElement('p'));
+ dw_mediamanager.$popup.append($insp);
+
+ $insbtn = jQuery(document.createElement('input'))
+ .attr('id', 'media__sendbtn')
+ .attr('type', 'button')
+ .addClass('button')
+ .val(LANG.mediainsert);
+ $insp.append($insbtn);
},
/**
- * Creates checkboxes for additional options
+ * Insert the clicked image into the opener's textarea
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @author Dominik Eckelmann <eckelmann@cosmocode.de>
+ * @author Pierre Spring <pierre.spring@caillou.ch>
*/
- attachoptions: function(obj){
- if(!obj) return;
+ insert: function (id) {
+ var opts, alignleft, alignright, edid, s;
- // keep open
- if(opener){
- var kobox = document.createElement('input');
- kobox.type = 'checkbox';
- kobox.id = 'media__keepopen';
- if(DokuCookie.getValue('keepopen')){
- kobox.checked = true;
- kobox.defaultChecked = true; //IE wants this
- media_manager.keepopen = true;
- }
- addEvent(kobox,'click',function(event){ return media_manager.togglekeepopen(event,this); });
+ // set syntax options
+ dw_mediamanager.$popup.dialog('close');
- var kolbl = document.createElement('label');
- kolbl.htmlFor = 'media__keepopen';
- kolbl.innerHTML = LANG['keepopen'];
+ opts = '';
+ alignleft = '';
+ alignright = '';
- var kobr = document.createElement('br');
+ if ({img: 1, swf: 1}[dw_mediamanager.ext] === 1) {
- obj.appendChild(kobox);
- obj.appendChild(kolbl);
- obj.appendChild(kobr);
- }
-
- // hide details
- var hdbox = document.createElement('input');
- hdbox.type = 'checkbox';
- hdbox.id = 'media__hide';
- if(DokuCookie.getValue('hide')){
- hdbox.checked = true;
- hdbox.defaultChecked = true; //IE wants this
- media_manager.hide = true;
- }
- addEvent(hdbox,'click',function(event){ return media_manager.togglehide(event,this); });
+ if (dw_mediamanager.link === '4') {
+ opts = '?linkonly';
+ } else {
- var hdlbl = document.createElement('label');
- hdlbl.htmlFor = 'media__hide';
- hdlbl.innerHTML = LANG['hidedetails'];
+ if (dw_mediamanager.link === "3" && dw_mediamanager.ext === 'img') {
+ opts = '?nolink';
+ } else if (dw_mediamanager.link === "2" && dw_mediamanager.ext === 'img') {
+ opts = '?direct';
+ }
- var hdbr = document.createElement('br');
+ s = parseInt(dw_mediamanager.size, 10);
- obj.appendChild(hdbox);
- obj.appendChild(hdlbl);
- obj.appendChild(hdbr);
- media_manager.updatehide();
- },
+ if (s && s >= 1 && s < 4) {
+ opts += (opts.length)?'&':'?';
+ opts += dw_mediamanager.size + '00';
+ if (dw_mediamanager.ext === 'swf') {
+ switch (s) {
+ case 1:
+ opts += 'x62';
+ break;
+ case 2:
+ opts += 'x123';
+ break;
+ case 3:
+ opts += 'x185';
+ break;
+ }
+ }
+ }
+ alignleft = dw_mediamanager.align === '2' ? '' : ' ';
+ alignright = dw_mediamanager.align === '4' ? '' : ' ';
+ }
+ }
+ edid = String.prototype.match.call(document.location, /&edid=([^&]+)/);
+ opener.insertTags(edid ? edid[1] : 'wiki__text',
+ '{{'+alignleft+id+opts+alignright+'|','}}','');
- /**
- * Toggles the keep open state
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- togglekeepopen: function(event,cb){
- if(cb.checked){
- DokuCookie.setValue('keepopen',1);
- media_manager.keepopen = true;
- }else{
- DokuCookie.setValue('keepopen','');
- media_manager.keepopen = false;
+ if(!dw_mediamanager.keepopen) {
+ window.close();
}
+ opener.focus();
+ return false;
},
/**
- * Toggles the hide details state
+ * Prefills the wikiname.
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
- togglehide: function(event,cb){
- if(cb.checked){
- DokuCookie.setValue('hide',1);
- media_manager.hide = true;
- }else{
- DokuCookie.setValue('hide','');
- media_manager.hide = false;
+ suggest: function(){
+ var $file, $name, text;
+
+ $file = jQuery(this);
+ $name = jQuery('#upload__name');
+
+ if ($name.val() != '') return;
+
+ if(!$file.length || !$name.length) {
+ return;
}
- media_manager.updatehide();
+
+ text = $file.val();
+ text = text.substr(text.lastIndexOf('/')+1);
+ text = text.substr(text.lastIndexOf('\\')+1);
+ $name.val(text);
},
/**
- * Sets the visibility of the image details accordingly to the
- * chosen hide state
+ * list the content of a namespace using AJAX
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @author Pierre Spring <pierre.spring@caillou.ch>
*/
- updatehide: function(){
- var obj = $('media__content');
- if(!obj) return;
- var details = getElementsByClass('detail',obj,'div');
- for(var i=0; i<details.length; i++){
- if(media_manager.hide){
- details[i].style.display = 'none';
- }else{
- details[i].style.display = '';
- }
+ list: function (event) {
+ var $link, $content, params;
+
+ if (event) {
+ event.preventDefault();
}
- },
- /**
- * shows the popup for a image link
- */
- select: function(event,link){
- var id = link.name.substr(2);
+ jQuery('div.success, div.info, div.error, div.notify').remove();
- media_manager.id = id;
- if(!opener){
- // if we don't run in popup display example
- var ex = $('ex'+id.replace(/:/g,'_'));
- if(ex.style.display == ''){
- ex.style.display = 'none';
- } else {
- ex.style.display = '';
- }
- return false;
- }
+ $link = jQuery(this);
- media_manager.ext = false;
- var dot = id.lastIndexOf(".");
- if (dot != -1) {
- var ext = id.substr(dot,id.length);
+ //popup
+ $content = jQuery('#media__content');
- if (ext != '.jpg' && ext != '.jpeg' && ext != '.png' && ext != '.gif' && ext != '.swf') {
- media_manager.insert(null);
- return false;
+ if ($content.length === 0) {
+ //fullscreen media manager
+ $content = jQuery('div.filelist');
+
+ if ($link.hasClass('idx_dir')) {
+ //changing namespace
+ jQuery('div.file').empty();
+ jQuery('div.namespaces .selected').removeClass('selected');
+ $link.addClass('selected');
}
- } else {
- media_manager.insert(null);
- return false;
}
- media_manager.popup.style.display = 'inline';
- media_manager.popup.style.left = event.pageX + 'px';
- media_manager.popup.style.top = event.pageY + 'px';
+ params = 'call=medialist&';
- // set all buttons to outset
- for (var i = 1; i < 5; i++) {
- media_manager.outSet('media__linkbtn' + i);
- media_manager.outSet('media__alignbtn' + i);
- media_manager.outSet('media__sizebtn' + i);
+ if ($link[0].search) {
+ params += $link[0].search.substr(1);
+ } else if ($link.is('form')) {
+ params += dw_mediamanager.form_params($link);
+ } else if ($link.closest('form').length > 0) {
+ params += dw_mediamanager.form_params($link.closest('form'));
}
- if (ext == '.swf') {
- media_manager.ext = 'swf';
-
- // disable display buttons for detail and linked image
- $('media__linkbtn1').style.display = 'none';
- $('media__linkbtn2').style.display = 'none';
+ // fetch the subtree
+ dw_mediamanager.update_content($content, params);
+ },
- // set the link button to default
- if (media_manager.link !== false) {
- if ( media_manager.link == '2' || media_manager.link == '1') {
- media_manager.inSet('media__linkbtn3');
- media_manager.link = '3';
- DokuCookie.setValue('link','3');
- } else {
- media_manager.inSet('media__linkbtn'+media_manager.link);
- }
- } else if (DokuCookie.getValue('link')) {
- if ( DokuCookie.getValue('link') == '2' || DokuCookie.getValue('link') == '1') {
- // this options are not availible
- media_manager.inSet('media__linkbtn3');
- media_manager.link = '3';
- DokuCookie.setValue('link','3');
- } else {
- media_manager.inSet('media__linkbtn'+DokuCookie.getValue('link'));
- media_manager.link = DokuCookie.getValue('link');
- }
- } else {
- // default case
- media_manager.link = '3';
- media_manager.inSet('media__linkbtn3');
- DokuCookie.setValue('link','3');
- }
+ /**
+ * Returns form parameters
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+ form_params: function ($form) {
+ if (!$form.length) return;
+ var action = '';
+ var i = $form[0].action.indexOf('?');
+ if (i >= 0) action = $form[0].action.substr(i+1);
+ return action+'&'+$form.serialize();
+ },
- // disable button for original size
- $('media__sizebtn4').style.display = 'none';
- if (media_manager.size == 4) {
- media_manager.size = 2;
- DokuCookie.setValue('size', '2');
- media_manager.inSet('media__sizebtn2');
- }
+ set_fileview_list: function (new_type) {
+ dw_mediamanager.set_fileview_opt(['list', 'listType', function (new_type) {
+ jQuery('div.filelist div.panelContent ul')
+ .toggleClass('rows', new_type === 'rows')
+ .toggleClass('thumbs', new_type === 'thumbs');
+ }], new_type);
- } else {
- media_manager.ext = 'img';
+ // FIXME: Move to onchange handler (opt[2])?
+ dw_mediamanager.resize();
+ },
- // ensure that the display buttons are there
- $('media__linkbtn1').style.display = 'inline';
- $('media__linkbtn2').style.display = 'inline';
- $('media__sizebtn4').style.display = 'inline';
+ set_fileview_sort: function (new_sort) {
+ dw_mediamanager.set_fileview_opt(['sort', 'sortBy', function (new_sort) {
+ // FIXME
+ }], new_sort);
+ },
- // set the link button to default
- if (DokuCookie.getValue('link')) {
- media_manager.link = DokuCookie.getValue('link');
- }
- if (!media_manager.link) {
- // default case
- media_manager.link = '1';
- DokuCookie.setValue('link','1');
- }
- media_manager.inSet('media__linkbtn'+media_manager.link);
+ set_fileview_opt: function (opt, new_val) {
+ if (typeof new_val === 'undefined') {
+ new_val = jQuery('form.options li.' + opt[1] + ' input')
+ .filter(':checked').val();
}
- if (media_manager.link == '4') {
- media_manager.align = false;
- media_manager.size = false;
- $('media__align').style.display = 'none';
- $('media__size').style.display = 'none';
- } else {
- $('media__align').style.display = 'block';
- $('media__size').style.display = 'block';
-
- // set the align button to default
- if (media_manager.align !== false) {
- media_manager.inSet('media__alignbtn'+media_manager.align);
- } else if (DokuCookie.getValue('align')) {
- media_manager.inSet('media__alignbtn'+DokuCookie.getValue('align'));
- media_manager.align = DokuCookie.getValue('align');
- } else {
- // default case
- media_manager.align = '1';
- media_manager.inSet('media__alignbtn1');
- DokuCookie.setValue('align','1');
- }
+ if (new_val !== dw_mediamanager.view_opts[opt[0]]) {
+ opt[2](new_val);
- // set the size button to default
- if (DokuCookie.getValue('size')) {
- media_manager.size = DokuCookie.getValue('size');
- }
- if (!media_manager.size || (media_manager.size === '4' && ext === '.swf')) {
- // default case
- media_manager.size = '2';
- DokuCookie.setValue('size','2');
- }
- media_manager.inSet('media__sizebtn'+media_manager.size);
+ DokuCookie.setValue(opt[0], new_val);
- $('media__sendbtn').focus();
+ dw_mediamanager.view_opts[opt[0]] = new_val;
}
-
- return false;
},
- /**
- * build the popup window
+ /**
+ * Lists the content of the right column (image details) using AJAX
*
- * @author Dominik Eckelmann <eckelmann@cosmocode.de>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
- initpopup: function() {
-
- media_manager.popup = document.createElement('div');
- media_manager.popup.setAttribute('id','media__popup');
- media_manager.popup.style.display = 'none';
-
- var root = document.getElementById('media__manager');
- if (root === null) return;
- root.appendChild(media_manager.popup);
-
- var headline = document.createElement('h1');
- headline.innerHTML = LANG.mediatitle;
- var headlineimg = document.createElement('img');
- headlineimg.src = DOKU_BASE + 'lib/images/close.png';
- headlineimg.id = 'media__closeimg';
- addEvent(headlineimg,'click',function(event){ return media_manager.closePopup(event,this); });
- headline.insertBefore(headlineimg, headline.firstChild);
- media_manager.popup.appendChild(headline);
- drag.attach(media_manager.popup,headline);
+ details: function (event) {
+ var $link, $content, params, update_list;
+ $link = jQuery(this);
+ event.preventDefault();
- // link
+ jQuery('div.success, div.info, div.error, div.notify').remove();
- var linkp = document.createElement('p');
-
- linkp.id = "media__linkstyle";
- if (media_manager.display == "2") {
- linkp.style.display = "none";
+ if ($link[0].id == 'mediamanager__btn_delete' && !confirm(LANG.del_confirm)) {
+ return false;
}
-
- var linkl = document.createElement('label');
- linkl.innerHTML = LANG.mediatarget;
- linkp.appendChild(linkl);
-
- var linkbtns = ['lnk', 'direct', 'nolnk', 'displaylnk'];
- for (var i = 0 ; i < linkbtns.length ; ++i) {
- var linkbtn = document.createElement('button');
- linkbtn.className = 'button';
- linkbtn.id = "media__linkbtn" + (i+1);
- linkbtn.title = LANG['media' + linkbtns[i]];
- linkbtn.style.borderStyle = 'outset';
- addEvent(linkbtn,'click',function(event){ return media_manager.setlink(event,this); });
-
- var linkimg = document.createElement('img');
- linkimg.src = DOKU_BASE + 'lib/images/media_link_' + linkbtns[i] + '.png';
-
- linkbtn.appendChild(linkimg);
- linkp.appendChild(linkbtn);
+ if ($link[0].id == 'mediamanager__btn_restore' && !confirm(LANG.restore_confirm)) {
+ return false;
}
- media_manager.popup.appendChild(linkp);
-
- // align
-
- var alignp = document.createElement('p');
- var alignl = document.createElement('label');
+ $content = jQuery('div.file');
+ params = 'call=mediadetails&';
- alignp.appendChild(alignl);
- alignp.id = 'media__align';
- if (media_manager.display == "2") {
- alignp.style.display = "none";
+ if ($link[0].search) {
+ params += $link[0].search.substr(1);
+ } else if ($link.is('form')) {
+ params += dw_mediamanager.form_params($link);
+ } else if ($link.closest('form').length > 0) {
+ params += dw_mediamanager.form_params($link.closest('form'));
}
- alignl.innerHTML = LANG['mediaalign'];
- var alignbtns = ['noalign', 'left', 'center', 'right'];
- for (var n = 0 ; n < alignbtns.length ; ++n) {
- var alignbtn = document.createElement('button');
- var alignimg = document.createElement('img');
- alignimg.src = DOKU_BASE + 'lib/images/media_align_' + alignbtns[n] + '.png';
+ update_list = ($link[0].id == 'mediamanager__btn_delete' ||
+ $link[0].id == 'mediamanager__btn_restore');
- alignbtn.id = "media__alignbtn" + (n+1);
- alignbtn.title = LANG['media' + alignbtns[n]];
- alignbtn.className = 'button';
- alignbtn.appendChild(alignimg);
- alignbtn.style.borderStyle = 'outset';
- addEvent(alignbtn,'click',function(event){ return media_manager.setalign(event,this); });
+ dw_mediamanager.update_content($content, params, update_list);
+ },
- alignp.appendChild(alignbtn);
- }
+ update_content: function ($content, params, update_list) {
+ var $container;
- media_manager.popup.appendChild(alignp);
+ jQuery.post(
+ DOKU_BASE + 'lib/exe/ajax.php',
+ params,
+ function (data) {
+ dw_mediamanager.$resizables().resizable('destroy');
- // size
+ if (update_list) {
+ dw_mediamanager.list.call(jQuery('input[value="Apply"]')[0]);
+ }
- var sizep = document.createElement('p');
- var sizel = document.createElement('label');
+ $content.html(data);
- sizep.id = 'media__size';
- if (media_manager.display == "2") {
- sizep.style.display = "none";
- }
- sizep.appendChild(sizel);
- sizel.innerHTML = LANG['mediasize'];
+ dw_mediamanager.prepare_content($content);
+ dw_mediamanager.updatehide();
- var sizebtns = ['small', 'medium', 'large', 'original'];
- for (var size = 0 ; size < sizebtns.length ; ++size) {
- var sizebtn = document.createElement('button');
- var sizeimg = document.createElement('img');
+ dw_mediamanager.update_resizable();
+ dw_behaviour.revisionBoxHandler();
- sizep.appendChild(sizebtn);
- sizeimg.src = DOKU_BASE + 'lib/images/media_size_' + sizebtns[size] + '.png';
+ // Make sure that the list view style stays the same
+ dw_mediamanager.set_fileview_list(dw_mediamanager.view_opts.list);
- sizebtn.className = 'button';
- sizebtn.appendChild(sizeimg);
- sizebtn.id = 'media__sizebtn' + (size + 1);
- sizebtn.title = LANG['media' + sizebtns[size]];
- sizebtn.style.borderStyle = 'outset';
- addEvent(sizebtn,'click',function(event){ return media_manager.setsize(event,this); });
- }
+ dw_mediamanager.image_diff();
+ dw_mediamanager.init_ajax_uploader();
+ dw_mediamanager.init_options();
- media_manager.popup.appendChild(sizep);
+ },
+ 'html'
+ );
+ $container = $content.find('div.panelContent');
+ if ($container.length === 0) {
+ $container = $content;
+ }
+ $container.html('<img src="' + DOKU_BASE + 'lib/images/loading.gif" alt="..." class="load" />');
+ },
- // send and close button
+ window_resize: function () {
+ dw_mediamanager.resize();
- var btnp = document.createElement('p');
- media_manager.popup.appendChild(btnp);
- btnp.setAttribute('class','btnlbl');
+ dw_mediamanager.opacity_slider();
+ dw_mediamanager.portions_slider();
+ },
- var btn = document.createElement('input');
- btn.type = 'button';
- btn.id = 'media__sendbtn';
- btn.setAttribute('class','button');
- btn.value = LANG['mediainsert'];
- btnp.appendChild(btn);
- addEvent(btn,'click',function(event){ return media_manager.insert(event); });
+ $resizables: function () {
+ return jQuery('#mediamanager__page').find('div.namespaces, div.filelist');
},
/**
- * Insert the clicked image into the opener's textarea
+ * Updates mediamanager layout
*
- * @author Andreas Gohr <andi@splitbrain.org>
- * @author Dominik Eckelmann <eckelmann@cosmocode.de>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
- insert: function(event){
- var id = media_manager.id;
- // set syntax options
- $('media__popup').style.display = 'none';
-
- var opts = '';
- var optsstart = '';
- var alignleft = '';
- var alignright = '';
-
- if (media_manager.ext == 'img' || media_manager.ext == 'swf') {
+ update_resizable: function () {
+ $resizables = dw_mediamanager.$resizables();
+
+ $resizables.resizable({
+ handles: 'e',
+ resize: function(event, ui){
+ var widthFull = jQuery('#mediamanager__page').width();
+ var widthResizables = 0;
+ $resizables.each(function() {
+ widthResizables += jQuery(this).width();
+ });
+ var $filePanel = jQuery('#mediamanager__page div.panel.file');
+
+ // set max width of resizable column
+ var widthOtherResizable = widthResizables - jQuery(this).width();
+ var minWidthNonResizable = parseFloat($filePanel.css("min-width"));
+ var maxWidth = widthFull - (widthOtherResizable + minWidthNonResizable);
+ $resizables.resizable( "option", "maxWidth", maxWidth );
+
+ // width of file panel in % = 100% - width of resizables in %
+ // this calculates with 99.99 and not 100 to overcome rounding errors
+ var relWidthNonResizable = 99.99 - (100 * widthResizables / widthFull);
+ // set width of file panel
+ $filePanel.width(relWidthNonResizable+'%');
+
+ // FIXME: please fix without browser sniffing
+ if (!jQuery.browser.webkit) {
+ $resizables.each(function() {
+ w = jQuery(this).width();
+ w = (99.99 * w / widthFull);
+ w += "%";
+ jQuery(this).width(w);
+ });
+ }
- if (media_manager.link == '4') {
- opts = '?linkonly';
- } else {
+ dw_mediamanager.opacity_slider();
+ dw_mediamanager.portions_slider();
+ }
+ });
- if (media_manager.link == "3" && media_manager.ext == 'img') {
- opts = '?nolink';
- optsstart = true;
- } else if (media_manager.link == "2" && media_manager.ext == 'img') {
- opts = '?direct';
- optsstart = true;
- }
+ dw_mediamanager.resize();
+ },
- var s = parseInt(media_manager.size, 10);
+ resize: function () {
+ var $contents = jQuery('#mediamanager__page div.panelContent'),
+ height = jQuery(window).height() - jQuery(document.body).height() +
+ Math.max.apply(null, jQuery.map($contents, function (v) {
+ return jQuery(v).height();
+ }));
- if (s && s >= 1) {
- opts += (optsstart)?'&':'?';
- if (s=="1") {
- opts += '100';
- if (media_manager.ext == 'swf') {
- opts += 'x62';
- }
- } else if (s=="2") {
- opts += '200';
- if (media_manager.ext == 'swf') {
- opts += 'x123';
- }
- } else if (s=="3"){
- opts += '300';
- if (media_manager.ext == 'swf') {
- opts += 'x185';
- }
- }
- }
- if (media_manager.align == '2') {
- alignleft = '';
- alignright = ' ';
- }
- if (media_manager.align == '3') {
- alignleft = ' ';
- alignright = ' ';
- }
- if (media_manager.align == '4') {
- alignleft = ' ';
- alignright = '';
- }
- }
+ // If the screen is too small, don’t try to resize
+ if (height < dw_mediamanager.minHeights[dw_mediamanager.view_opts.list]) {
+ $contents.add(dw_mediamanager.$resizables()).height('auto');
+ } else {
+ $contents.height(height);
+ dw_mediamanager.$resizables().each(function () {
+ var $this = jQuery(this);
+ $this.height(height + $this.find('div.panelContent').offset().top -
+ $this.offset().top);
+ });
}
- var edid = String.prototype.match.call(document.location, /&edid=([^&]+)/);
- edid = edid ? edid[1] : 'wiki__text';
- opener.insertTags(edid,'{{'+alignleft+id+opts+alignright+'|','}}','');
+ },
- if(!media_manager.keepopen) window.close();
- opener.focus();
- return false;
+ /**
+ * Prints 'select' for image difference representation type
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+ image_diff: function () {
+ if (jQuery('#mediamanager__difftype').length) return;
+
+ $form = jQuery('#mediamanager__form_diffview');
+ if (!$form.length) return;
+
+ $label = jQuery(document.createElement('label'));
+ $label.append('<span>'+LANG.media_diff+'</span> ');
+ $select = jQuery(document.createElement('select'))
+ .attr('id', 'mediamanager__difftype')
+ .attr('name', 'difftype')
+ .change(dw_mediamanager.change_diff_type);
+ $select.append(new Option(LANG.media_diff_both, "both"));
+ $select.append(new Option(LANG.media_diff_opacity, "opacity"));
+ $select.append(new Option(LANG.media_diff_portions, "portions"));
+ $label.append($select);
+ $form.append($label);
+
+ // for IE
+ var select = document.getElementById('mediamanager__difftype');
+ select.options[0].text = LANG.media_diff_both;
+ select.options[1].text = LANG.media_diff_opacity;
+ select.options[2].text = LANG.media_diff_portions;
},
/**
- * list the content of a namespace using AJAX
+ * Handles selection of image difference representation type
*
- * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
- list: function(event,link){
- // prepare an AJAX call to fetch the subtree
- var ajax = new sack(DOKU_BASE + 'lib/exe/ajax.php');
- ajax.AjaxFailedAlert = '';
- ajax.encodeURIString = false;
- if(ajax.failed) return true;
-
- cleanMsgArea();
-
- var content = $('media__content');
- content.innerHTML = '<img src="'+DOKU_BASE+'lib/images/loading.gif" alt="..." class="load" />';
-
- ajax.elementObj = content;
- ajax.afterCompletion = function(){
- media_manager.selectorattach(content);
- media_manager.confirmattach(content);
- media_manager.updatehide();
- media_manager.initFlashUpload();
- };
- ajax.runAJAX(link.search.substr(1)+'&call=medialist');
- return false;
+ change_diff_type: function () {
+ $select = jQuery('#mediamanager__difftype');
+ $content = jQuery('#mediamanager__diff');
+
+ params = dw_mediamanager.form_params($select.closest('form'))+'&call=mediadiff';
+ jQuery.post(
+ DOKU_BASE + 'lib/exe/ajax.php',
+ params,
+ function (data) {
+ $content.html(data);
+ dw_mediamanager.portions_slider();
+ dw_mediamanager.opacity_slider();
+ },
+ 'html'
+ );
},
-
/**
- * Open or close a subtree using AJAX
+ * Sets options for opacity diff slider
*
- * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
- toggle: function(event,clicky){
- var listitem = clicky.parentNode;
-
- // if already open, close by removing the sublist
- var sublists = listitem.getElementsByTagName('ul');
- if(sublists.length){
- listitem.removeChild(sublists[0]);
- clicky.src = DOKU_BASE+'lib/images/plus.gif';
- return false;
- }
+ opacity_slider: function () {
+ var $slider = jQuery( "#mediamanager__diff div.slider" );
+ if (!$slider.length) return;
+
+ var $image = jQuery('#mediamanager__diff div.imageDiff.opacity div.image1 img');
+ if (!$image.length) return;
+ $slider.width($image.width()-20);
+
+ $slider.slider();
+ $slider.slider("option", "min", 0);
+ $slider.slider("option", "max", 0.999);
+ $slider.slider("option", "step", 0.001);
+ $slider.slider("option", "value", 0.5);
+ $slider.bind("slide", function(event, ui) {
+ jQuery('#mediamanager__diff div.imageDiff.opacity div.image2 img').css({ opacity: $slider.slider("option", "value")});
+ });
+ },
- // get the enclosed link (is always the first one)
- var link = listitem.getElementsByTagName('a')[0];
+ /**
+ * Sets options for red line diff slider
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+ portions_slider: function () {
+ var $image1 = jQuery('#mediamanager__diff div.imageDiff.portions div.image1 img');
+ var $image2 = jQuery('#mediamanager__diff div.imageDiff.portions div.image2 img');
+ if (!$image1.length || !$image2.length) return;
- // prepare an AJAX call to fetch the subtree
- var ajax = new sack(DOKU_BASE + 'lib/exe/ajax.php');
- ajax.AjaxFailedAlert = '';
- ajax.encodeURIString = false;
- if(ajax.failed) return true;
+ var $div = jQuery("#mediamanager__diff");
+ if (!$div.length) return;
- //prepare the new ul
- var ul = document.createElement('ul');
- //fixme add classname here
- listitem.appendChild(ul);
- ajax.elementObj = ul;
- ajax.afterCompletion = function(){ media_manager.treeattach(ul); };
- ajax.runAJAX(link.search.substr(1)+'&call=medians');
- clicky.src = DOKU_BASE+'lib/images/minus.gif';
- return false;
+ $div.width('100%');
+ $image2.parent().width('97%');
+ $image1.width('100%');
+ $image2.width('100%');
+
+ if ($image1.width() < $div.width()) {
+ $div.width($image1.width());
+ }
+
+ $image2.parent().width('50%');
+ $image2.width($image1.width());
+ $image1.width($image1.width());
+
+ var $slider = jQuery("#mediamanager__diff div.slider");
+ if (!$slider.length) return;
+ $slider.width($image1.width()-20);
+
+ $slider.slider();
+ $slider.slider("option", "min", 0);
+ $slider.slider("option", "max", 97);
+ $slider.slider("option", "step", 1);
+ $slider.slider("option", "value", 50);
+ $slider.bind("slide", function(event, ui) {
+ jQuery('#mediamanager__diff div.imageDiff.portions div.image2').css({ width: $slider.slider("option", "value")+'%'});
+ });
},
/**
- * Prefills the wikiname.
+ * Parse a URI query string to an associative array
*
- * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Kate Arzamastseva <pshns@ukr.net>
*/
- suggest: function(){
- var file = $('upload__file');
- var name = $('upload__name');
- if(!file || !name) return;
-
- var text = file.value;
- text = text.substr(text.lastIndexOf('/')+1);
- text = text.substr(text.lastIndexOf('\\')+1);
- name.value = text;
+ params_toarray: function (str) {
+ var vars = [], hash;
+ var hashes = str.split('&');
+ for(var i = 0; i < hashes.length; i++) {
+ hash = hashes[i].split('=');
+ vars[decodeURIComponent(hash[0])] = decodeURIComponent(hash[1]);
+ }
+ return vars;
},
+ init_ajax_uploader: function () {
+ if (!jQuery('#mediamanager__uploader').length) return;
+ if (jQuery('.qq-upload-list').length) return;
- initFlashUpload: function(){
- if(!hasFlash(8)) return;
- var oform = $('dw__upload');
- var oflash = $('dw__flashupload');
- if(!oform || !oflash) return;
+ var params = dw_mediamanager.form_params(jQuery('#dw__upload'))+'&call=mediaupload';
+ params = dw_mediamanager.params_toarray(params);
- var clicky = document.createElement('img');
- clicky.src = DOKU_BASE+'lib/images/multiupload.png';
- clicky.title = LANG['mu_btn'];
- clicky.alt = LANG['mu_btn'];
- clicky.style.cursor = 'pointer';
- clicky.onclick = function(){
- oform.style.display = 'none';
- oflash.style.display = '';
- };
- oform.appendChild(clicky);
+ var uploader = new qq.FileUploaderExtended({
+ element: document.getElementById('mediamanager__uploader'),
+ action: DOKU_BASE + 'lib/exe/ajax.php',
+ params: params
+ });
},
- /**
- * closes the link type popup
- */
- closePopup: function(event) {
- $('media__popup').style.display = 'none';
+ prepare_content: function ($content) {
+ // hide syntax example
+ $content.find('div.example:visible').hide();
},
/**
- * set the align
- *
- * @author Dominik Eckelmann <eckelmann@cosmocode.de>
+ * shows the popup for a image link
*/
- setalign: function(event,cb){
-
- var id = cb.id.substring(cb.id.length -1);
- if(id){
- DokuCookie.setValue('align',id);
- media_manager.align = id;
- for (var i = 1; i<=4; i++) {
- media_manager.outSet("media__alignbtn" + i);
- }
- media_manager.inSet("media__alignbtn"+id);
- }else{
- DokuCookie.setValue('align','');
- media_manager.align = false;
+ select: function(event){
+ var $link, id, dot, ext;
+
+ event.preventDefault();
+
+ $link = jQuery(this);
+ id = $link.attr('name').substr(2);
+
+ if(!opener){
+ // if we don't run in popup display example
+ // the id's are a bit wierd and jQuery('#ex_wiki_dokuwiki-128.png')
+ // will not be found by Sizzle (the CSS Selector Engine
+ // used by jQuery), hence the document.getElementById() call
+ jQuery(document.getElementById('ex_'+id.replace(/:/g,'_').replace(/^_/,''))).dw_toggle();
+ return;
+ }
+
+ dw_mediamanager.ext = false;
+ dot = id.lastIndexOf(".");
+
+ if (-1 === dot) {
+ dw_mediamanager.insert(id);
+ return;
}
+
+ ext = id.substr(dot);
+
+ if ({'.jpg':1, '.jpeg':1, '.png':1, '.gif':1, '.swf':1}[ext] !== 1) {
+ dw_mediamanager.insert(id);
+ return;
+ }
+
+ // remove old callback from the insert button and set the new one.
+ jQuery('#media__sendbtn').unbind().click(bind(dw_mediamanager.insert, id));
+
+ dw_mediamanager.unforbid('ext');
+ if (ext === '.swf') {
+ dw_mediamanager.ext = 'swf';
+ dw_mediamanager.forbid('ext', {link: ['1', '2'],
+ size: ['4']});
+ } else {
+ dw_mediamanager.ext = 'img';
+ }
+
+ // Set to defaults
+ dw_mediamanager.setOpt('link');
+ dw_mediamanager.setOpt('align');
+ dw_mediamanager.setOpt('size');
+
+ // toggle buttons for detail and linked image, original size
+ jQuery('#media__linkbtn1, #media__linkbtn2, #media__sizebtn4')
+ .toggle(dw_mediamanager.ext === 'img');
+
+ dw_mediamanager.$popup.dialog('open');
+
+ jQuery('#media__sendbtn').focus();
},
+
/**
- * set the link type
+ * Deletion confirmation dialog to the delete buttons.
*
- * @author Dominik Eckelmann <eckelmann@cosmocode.de>
+ * @author Michael Klier <chi@chimeric.de>
+ * @author Pierre Spring <pierre.spring@caillou.ch>
*/
- setlink: function(event,cb){
- var id = cb.id.substring(cb.id.length -1);
- if(id){
- DokuCookie.setValue('link',id);
- for (var i = 1; i<=4; i++) {
- media_manager.outSet("media__linkbtn"+i);
- }
- media_manager.inSet("media__linkbtn"+id);
-
- var size = document.getElementById("media__size");
- var align = document.getElementById("media__align");
- if (id != '4') {
- size.style.display = "block";
- align.style.display = "block";
- if (media_manager.link == '4') {
- media_manager.align = '1';
- DokuCookie.setValue('align', '1');
- media_manager.inSet('media__alignbtn1');
-
- media_manager.size = '2';
- DokuCookie.setValue('size', '2');
- media_manager.inSet('media__sizebtn2');
- }
-
- } else {
- size.style.display = "none";
- align.style.display = "none";
- }
- media_manager.link = id;
- }else{
- DokuCookie.setValue('link','');
- media_manager.link = false;
+ confirmattach: function(e){
+ if(!confirm(LANG.del_confirm + "\n" + jQuery(this).attr('title'))) {
+ e.preventDefault();
}
},
/**
- * set the display type
+ * Creates checkboxes for additional options
*
- * @author Dominik Eckelmann <eckelmann@cosmocode.de>
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Pierre Spring <pierre.spring@caillou.ch>
*/
- setdisplay: function(event,cb){
- if(cb.value){
- DokuCookie.setValue('display',cb.value);
- media_manager.display = cb.value;
- media_manager.outSet("media__displaybtn1");
- media_manager.outSet("media__displaybtn2");
- media_manager.inSet("media__displaybtn"+cb.value);
+ attachoptions: function(){
+ var $obj, opts;
- }else{
- DokuCookie.setValue('display','');
- media_manager.align = false;
+ $obj = jQuery('#media__opts');
+ if($obj.length === 0) {
+ return;
+ }
+
+ opts = [];
+ // keep open
+ if(opener){
+ opts.push(['keepopen', 'keepopen']);
}
+ opts.push(['hide', 'hidedetails']);
+
+ jQuery.each(opts,
+ function(_, opt) {
+ var $box, $lbl;
+ $box = jQuery(document.createElement('input'))
+ .attr('type', 'checkbox')
+ .attr('id', 'media__' + opt[0])
+ .click(bind(dw_mediamanager.toggleOption,
+ opt[0]));
+
+ if(DokuCookie.getValue(opt[0])){
+ $box.prop('checked', true);
+ dw_mediamanager[opt[0]] = true;
+ }
+
+ $lbl = jQuery(document.createElement('label'))
+ .attr('for', 'media__' + opt[0])
+ .text(LANG[opt[1]]);
+
+ $obj.append($box, $lbl, document.createElement('br'));
+ });
+
+ dw_mediamanager.updatehide();
},
/**
- * sets the border to outset
+ * Generalized toggler
+ *
+ * @author Pierre Spring <pierre.spring@caillou.ch>
*/
- outSet: function(id) {
- var ele = document.getElementById(id);
- if (ele == null) return;
- ele.style.borderStyle = "outset";
+ toggleOption: function (variable) {
+ if (jQuery(this).prop('checked')) {
+ DokuCookie.setValue(variable, 1);
+ dw_mediamanager[variable] = true;
+ } else {
+ DokuCookie.setValue(variable, '');
+ dw_mediamanager[variable] = false;
+ }
+ if (variable === 'hide') {
+ dw_mediamanager.updatehide();
+ }
},
+
/**
- * sets the border to inset
+ * Sets the visibility of the image details accordingly to the
+ * chosen hide state
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
*/
- inSet: function(id) {
- var ele = document.getElementById(id);
- if (ele == null) return;
- ele.style.borderStyle = "inset";
+ updatehide: function(){
+ jQuery('#media__content div.detail').dw_toggle(!dw_mediamanager.hide);
},
/**
- * set the image size
+ * set media insertion option
*
* @author Dominik Eckelmann <eckelmann@cosmocode.de>
*/
- setsize: function(event,cb){
- var id = cb.id.substring(cb.id.length -1);
- if (id) {
- DokuCookie.setValue('size',id);
- media_manager.size = id;
- for (var i = 1 ; i <=4 ; ++i) {
- media_manager.outSet("media__sizebtn" + i);
- }
- media_manager.inSet("media__sizebtn"+id);
+ setOpt: function(opt, e){
+ var val, i;
+ if (typeof e !== 'undefined') {
+ val = this.id.substring(this.id.length - 1);
} else {
- DokuCookie.setValue('size','');
- media_manager.width = false;
+ val = dw_mediamanager.getOpt(opt);
+ }
+
+ if (val === false) {
+ DokuCookie.setValue(opt,'');
+ dw_mediamanager[opt] = false;
+ return;
+ }
+
+ if (opt === 'link') {
+ if (val !== '4' && dw_mediamanager.link === '4') {
+ dw_mediamanager.unforbid('linkonly');
+ dw_mediamanager.setOpt('align');
+ dw_mediamanager.setOpt('size');
+ } else if (val === '4') {
+ dw_mediamanager.forbid('linkonly', {align: false, size: false});
+ }
+
+ jQuery("#media__size, #media__align").dw_toggle(val !== '4');
+ }
+
+ DokuCookie.setValue(opt, val);
+ dw_mediamanager[opt] = val;
+
+ for (i = 1; i <= 4; i++) {
+ jQuery("#media__" + opt + "btn" + i).removeClass('selected');
+ }
+ jQuery('#media__' + opt + 'btn' + val).addClass('selected');
+ },
+
+ unforbid: function (group) {
+ delete dw_mediamanager.forbidden_opts[group];
+ },
+
+ forbid: function (group, forbids) {
+ dw_mediamanager.forbidden_opts[group] = forbids;
+ },
+
+ allowedOpt: function (opt, val) {
+ var ret = true;
+ jQuery.each(dw_mediamanager.forbidden_opts,
+ function (_, forbids) {
+ ret = forbids[opt] !== false &&
+ jQuery.inArray(val, forbids[opt]) === -1;
+ return ret;
+ });
+ return ret;
+ },
+
+ getOpt: function (opt) {
+ var allowed = bind(dw_mediamanager.allowedOpt, opt);
+
+ // Current value
+ if (dw_mediamanager[opt] !== false && allowed(dw_mediamanager[opt])) {
+ return dw_mediamanager[opt];
+ }
+
+ // From cookie
+ if (DokuCookie.getValue(opt) && allowed(DokuCookie.getValue(opt))) {
+ return DokuCookie.getValue(opt);
+ }
+
+ // size default
+ if (opt === 'size' && allowed('2')) {
+ return '2';
}
+
+ // Whatever is allowed, and be it false
+ return jQuery.grep(['1', '2', '3', '4'], allowed)[0] || false;
}
};
-addInitEvent(function(){
- media_manager.treeattach($('media__tree'));
- media_manager.selectorattach($('media__content'));
- media_manager.confirmattach($('media__content'));
- media_manager.attachoptions($('media__opts'));
- media_manager.initpopup();
- media_manager.initFlashUpload();
-});
+// moved from helpers.js temporarily here
+/**
+ * Very simplistic Flash plugin check, probably works for Flash 8 and higher only
+ *
+ */
+function hasFlash(version){
+ var ver = 0, axo;
+ try{
+ if(navigator.plugins !== null && navigator.plugins.length > 0){
+ ver = navigator.plugins["Shockwave Flash"].description.split(' ')[2].split('.')[0];
+ }else{
+ axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
+ ver = axo.GetVariable("$version").split(' ')[1].split(',')[0];
+ }
+ }catch(e){ }
+
+ return ver >= version;
+}
+
+jQuery(dw_mediamanager.init);
diff --git a/lib/scripts/page.js b/lib/scripts/page.js
new file mode 100644
index 000000000..e4033b76d
--- /dev/null
+++ b/lib/scripts/page.js
@@ -0,0 +1,141 @@
+/**
+ * Page behaviours
+ *
+ * This class adds various behaviours to the rendered page
+ */
+dw_page = {
+ /**
+ * initialize page behaviours
+ */
+ init: function(){
+ dw_page.sectionHighlight();
+ jQuery('a.fn_top').mouseover(dw_page.footnoteDisplay);
+ dw_page.initTocToggle();
+ },
+
+ /**
+ * Highlight the section when hovering over the appropriate section edit button
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+ sectionHighlight: function() {
+ jQuery('form.btn_secedit')
+ .mouseover(function(){
+ var $tgt = jQuery(this).parent(),
+ nr = $tgt.attr('class').match(/(\s+|^)editbutton_(\d+)(\s+|$)/)[2];
+
+ // Walk the DOM tree up (first previous siblings, then parents)
+ // until boundary element
+ while($tgt.length > 0 && !$tgt.hasClass('sectionedit' + nr)) {
+ // $.last gives the DOM-ordered last element:
+ // prev if present, else parent.
+ $tgt = $tgt.prev().add($tgt.parent()).last();
+ $tgt.addClass('section_highlight');
+ }
+ })
+ .mouseout(function(){
+ jQuery('.section_highlight').removeClass('section_highlight');
+ });
+ },
+
+ /**
+ * Create/get a insitu popup used by the footnotes
+ *
+ * @param target - the DOM element at which the popup should be aligned at
+ * @param popup_id - the ID of the (new) DOM popup
+ * @return the Popup JQuery object
+ */
+ insituPopup: function(target, popup_id) {
+ // get or create the popup div
+ var $fndiv = jQuery('#' + popup_id);
+
+ // popup doesn't exist, yet -> create it
+ if($fndiv.length === 0){
+ $fndiv = jQuery(document.createElement('div'))
+ .attr('id', popup_id)
+ .addClass('insitu-footnote JSpopup')
+ .mouseleave(function () {jQuery(this).hide();});
+ jQuery('div.dokuwiki:first').append($fndiv);
+ }
+
+ // position() does not support hidden elements
+ $fndiv.show().position({
+ my: 'left top',
+ at: 'left center',
+ of: target
+ }).hide();
+
+ return $fndiv;
+ },
+
+ /**
+ * Display an insitu footnote popup
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Chris Smith <chris@jalakai.co.uk>
+ */
+ footnoteDisplay: function () {
+ var content = jQuery(jQuery(this).attr('href')) // Footnote text anchor
+ .closest('div.fn').html();
+
+ if (content === null){
+ return;
+ }
+
+ // strip the leading content anchors and their comma separators
+ content = content.replace(/((^|\s*,\s*)<sup>.*?<\/sup>)+\s*/gi, '');
+
+ // prefix ids on any elements with "insitu__" to ensure they remain unique
+ content = content.replace(/\bid=(['"])([^"']+)\1/gi,'id="insitu__$2');
+
+ // now put the content into the wrapper
+ dw_page.insituPopup(this, 'insitu__fn').html(content).show();
+ },
+
+ /**
+ * Adds the toggle switch to the TOC
+ */
+ initTocToggle: function() {
+ var $header, $clicky, $toc, $tocul, setClicky;
+ $header = jQuery('#toc__header');
+ if(!$header.length) {
+ return;
+ }
+ $toc = jQuery('#toc__inside');
+ $tocul = $toc.children('ul.toc');
+
+ setClicky = function(hiding){
+ if(hiding){
+ $clicky.html('<span>+</span>');
+ $clicky[0].className = 'toc_open';
+ }else{
+ $clicky.html('<span>&minus;</span>');
+ $clicky[0].className = 'toc_close';
+ }
+ };
+
+ $clicky = jQuery(document.createElement('span'))
+ .attr('id','toc__toggle');
+ $header.css('cursor','pointer')
+ .click(function () {
+ var hidden;
+
+ // Assert that $toc instantly takes the whole TOC space
+ $toc.css('height', $toc.height()).show();
+
+ hidden = $tocul.stop(true, true).is(':hidden');
+
+ setClicky(!hidden);
+
+ // Start animation and assure that $toc is hidden/visible
+ $tocul.dw_toggle(hidden, function () {
+ $toc.toggle(hidden);
+ });
+ })
+ .prepend($clicky);
+
+ setClicky();
+ }
+};
+
+jQuery(dw_page.init);
diff --git a/lib/scripts/qsearch.js b/lib/scripts/qsearch.js
new file mode 100644
index 000000000..c7128b9e3
--- /dev/null
+++ b/lib/scripts/qsearch.js
@@ -0,0 +1,146 @@
+/**
+ * AJAX functions for the pagename quicksearch
+ *
+ * @license GPL2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Adrian Lang <lang@cosmocode.de>
+ * @author Michal Rezler <m.rezler@centrum.cz>
+ */
+
+var dw_qsearch = {
+
+ $inObj: null,
+ $outObj: null,
+ timer: null,
+
+ /**
+ * initialize the quick search
+ *
+ * Attaches the event handlers
+ *
+ * @param input element (JQuery selector/DOM obj)
+ * @param output element (JQuery selector/DOM obj)
+ */
+ init: function (input, output) {
+ var do_qsearch;
+
+ dw_qsearch.$inObj = jQuery(input);
+ dw_qsearch.$outObj = jQuery(output);
+
+ // objects found?
+ if (dw_qsearch.$inObj.length === 0 ||
+ dw_qsearch.$outObj.length === 0) {
+ return;
+ }
+
+ // attach eventhandler to search field
+ do_qsearch = function () {
+ dw_qsearch.clear_results();
+ var value = dw_qsearch.$inObj.val();
+ if (value === '') {
+ return;
+ }
+ jQuery.post(
+ DOKU_BASE + 'lib/exe/ajax.php',
+ {
+ call: 'qsearch',
+ q: encodeURI(value)
+ },
+ dw_qsearch.onCompletion,
+ 'html'
+ );
+ };
+
+ dw_qsearch.$inObj.keyup(
+ function() {
+ if(dw_qsearch.timer){
+ window.clearTimeout(dw_qsearch.timer);
+ dw_qsearch.timer = null;
+ }
+ dw_qsearch.clear_results();
+ dw_qsearch.timer = window.setTimeout(do_qsearch, 500);
+ }
+ );
+
+ // attach eventhandler to output field
+ dw_qsearch.$outObj.click(dw_qsearch.clear_results);
+ },
+
+ /**
+ * Empty and hide the output div
+ */
+ clear_results: function(){
+ dw_qsearch.$outObj.hide();
+ dw_qsearch.$outObj.text('');
+ },
+
+ /**
+ * Callback. Reformat and display the results.
+ *
+ * Namespaces are shortened here to keep the results from overflowing
+ * or wrapping
+ *
+ * @param data The result HTML
+ */
+ onCompletion: function(data) {
+ var max, $links, too_big;
+
+ if (data === '') { return; }
+
+ dw_qsearch.$outObj
+ .html(data)
+ .show()
+ .css('white-space', 'nowrap');
+
+ // shorten namespaces if too long
+ max = dw_qsearch.$outObj[0].clientWidth;
+ $links = dw_qsearch.$outObj.find('a');
+ too_big = (document.documentElement.dir === 'rtl')
+ ? function (l) { return l.offsetLeft < 0; }
+ : function (l) { return l.offsetWidth + l.offsetLeft > max; };
+
+ $links.each(function () {
+ var start, length, replace, nsL, nsR, eli, runaway;
+
+ if (!too_big(this)) {
+ return;
+ }
+
+ nsL = this.innerText.indexOf('(');
+ nsR = this.innerText.indexOf(')');
+ eli = 0;
+ runaway = 0;
+
+ while((nsR - nsL > 3) && too_big(this) && runaway++ < 500) {
+ if(eli !== 0){
+ // elipsis already inserted
+ if( (eli - nsL) > (nsR - eli) ){
+ // cut left
+ start = eli - 2;
+ length = 2;
+ }else{
+ // cut right
+ start = eli + 1;
+ length = 1;
+ }
+ replace = '';
+ }else{
+ // replace middle with ellipsis
+ start = Math.floor( nsL + ((nsR-nsL)/2) );
+ length = 1;
+ replace = '…';
+ }
+ this.innerText = substr_replace(this.innerText,
+ replace, start, length);
+
+ eli = this.innerText.indexOf('…');
+ nsL = this.innerText.indexOf('(');
+ nsR = this.innerText.indexOf(')');
+ }
+ });
+ }
+};
+
+jQuery(function () {
+ dw_qsearch.init('#qsearch__in','#qsearch__out');
+});
diff --git a/lib/scripts/script.js b/lib/scripts/script.js
index 2cc1246f9..5fddb0431 100644
--- a/lib/scripts/script.js
+++ b/lib/scripts/script.js
@@ -1,6 +1,7 @@
-/**
- * Some of these scripts were taken from wikipedia.org and were modified for DokuWiki
- */
+// if jQuery was loaded, let's make it noConflict here.
+if ('function' === typeof jQuery && 'function' === typeof jQuery.noConflict) {
+ jQuery.noConflict();
+}
/**
* Some browser detection
@@ -18,160 +19,6 @@ if (clientPC.indexOf('opera')!=-1) {
}
/**
- * Handy shortcut to document.getElementById
- *
- * This function was taken from the prototype library
- *
- * @link http://prototype.conio.net/
- */
-function $() {
- var elements = new Array();
-
- for (var i = 0; i < arguments.length; i++) {
- var element = arguments[i];
- if (typeof element == 'string')
- element = document.getElementById(element);
-
- if (arguments.length == 1)
- return element;
-
- elements.push(element);
- }
-
- return elements;
-}
-
-/**
- * Simple function to check if a global var is defined
- *
- * @author Kae Verens
- * @link http://verens.com/archives/2005/07/25/isset-for-javascript/#comment-2835
- */
-function isset(varname){
- return(typeof(window[varname])!='undefined');
-}
-
-/**
- * Select elements by their class name
- *
- * @author Dustin Diaz <dustin [at] dustindiaz [dot] com>
- * @link http://www.dustindiaz.com/getelementsbyclass/
- */
-function getElementsByClass(searchClass,node,tag) {
- var classElements = new Array();
- if ( node == null )
- node = document;
- if ( tag == null )
- tag = '*';
- var els = node.getElementsByTagName(tag);
- var elsLen = els.length;
- var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
- for (var i = 0, j = 0; i < elsLen; i++) {
- if ( pattern.test(els[i].className) ) {
- classElements[j] = els[i];
- j++;
- }
- }
- return classElements;
-}
-
-/**
- * Get the X offset of the top left corner of the given object
- *
- * @link http://www.quirksmode.org/js/findpos.html
- */
-function findPosX(object){
- var curleft = 0;
- var obj = $(object);
- if (obj.offsetParent){
- do {
- curleft += obj.offsetLeft;
- } while (obj = obj.offsetParent);
- }
- else if (obj.x){
- curleft += obj.x;
- }
- return curleft;
-} //end findPosX function
-
-/**
- * Get the Y offset of the top left corner of the given object
- *
- * @link http://www.quirksmode.org/js/findpos.html
- */
-function findPosY(object){
- var curtop = 0;
- var obj = $(object);
- if (obj.offsetParent){
- do {
- curtop += obj.offsetTop;
- } while (obj = obj.offsetParent);
- }
- else if (obj.y){
- curtop += obj.y;
- }
- return curtop;
-} //end findPosY function
-
-/**
- * Get the computed style of a node.
- *
- * @link https://acidmartin.wordpress.com/2008/08/26/style-get-any-css-property-value-of-an-object/
- * @link http://svn.dojotoolkit.org/src/dojo/trunk/_base/html.js
- */
-function gcs(node){
- if(node.currentStyle){
- return node.currentStyle;
- }else{
- return node.ownerDocument.defaultView.getComputedStyle(node, null);
- }
-}
-
-/**
- * Escape special chars in JavaScript
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-function jsEscape(text){
- var re=new RegExp("\\\\","g");
- text=text.replace(re,"\\\\");
- re=new RegExp("'","g");
- text=text.replace(re,"\\'");
- re=new RegExp('"',"g");
- text=text.replace(re,'&quot;');
- re=new RegExp("\\\\\\\\n","g");
- text=text.replace(re,"\\n");
- return text;
-}
-
-/**
- * This function escapes some special chars
- * @deprecated by above function
- */
-function escapeQuotes(text) {
- var re=new RegExp("'","g");
- text=text.replace(re,"\\'");
- re=new RegExp('"',"g");
- text=text.replace(re,'&quot;');
- re=new RegExp("\\n","g");
- text=text.replace(re,"\\n");
- return text;
-}
-
-/**
- * Adds a node as the first childenode to the given parent
- *
- * @see appendChild()
- */
-function prependChild(parent,element) {
- if(!parent.firstChild){
- parent.appendChild(element);
- }else{
- parent.insertBefore(element,parent.firstChild);
- }
-}
-
-/**
* Prints a animated gif to show the search is performed
*
* Because we need to modify the DOM here before the document is loaded
@@ -201,386 +48,16 @@ function showLoadBar(){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function hideLoadBar(id){
- obj = $(id);
- if(obj) obj.style.display="none";
-}
-
-/**
- * Adds the toggle switch to the TOC
- */
-function addTocToggle() {
- if(!document.getElementById) return;
- var header = $('toc__header');
- if(!header) return;
- var toc = $('toc__inside');
-
- var obj = document.createElement('span');
- obj.id = 'toc__toggle';
- obj.style.cursor = 'pointer';
- if (toc && toc.style.display == 'none') {
- obj.innerHTML = '<span>+</span>';
- obj.className = 'toc_open';
- } else {
- obj.innerHTML = '<span>&minus;</span>';
- obj.className = 'toc_close';
- }
-
- prependChild(header,obj);
- obj.parentNode.onclick = toggleToc;
- obj.parentNode.style.cursor = 'pointer';
-}
-
-/**
- * This toggles the visibility of the Table of Contents
- */
-function toggleToc() {
- var toc = $('toc__inside');
- var obj = $('toc__toggle');
- if(toc.style.display == 'none') {
- toc.style.display = '';
- obj.innerHTML = '<span>&minus;</span>';
- obj.className = 'toc_close';
- } else {
- toc.style.display = 'none';
- obj.innerHTML = '<span>+</span>';
- obj.className = 'toc_open';
- }
-}
-
-/**
- * Create JavaScript mouseover popup
- */
-function insitu_popup(target, popup_id) {
-
- // get or create the popup div
- var fndiv = $(popup_id);
- if(!fndiv){
- fndiv = document.createElement('div');
- fndiv.id = popup_id;
- fndiv.className = 'insitu-footnote JSpopup dokuwiki';
-
- // autoclose on mouseout - ignoring bubbled up events
- addEvent(fndiv,'mouseout',function(e){
- var p = e.relatedTarget || e.toElement;
- while (p && p !== this) {
- p = p.parentNode;
- }
- if (p === this) {
- return;
- }
- // okay, hide it
- this.style.display='none';
- });
- getElementsByClass('dokuwiki', document.body, 'div')[0].appendChild(fndiv);
- }
-
- var non_static_parent = fndiv.parentNode;
- while (non_static_parent != document && gcs(non_static_parent)['position'] == 'static') {
- non_static_parent = non_static_parent.parentNode;
- }
-
- var fixed_target_parent = target;
- while (fixed_target_parent != document && gcs(fixed_target_parent)['position'] != 'fixed') {
- fixed_target_parent = fixed_target_parent.parentNode;
- }
-
- // position the div and make it visible
- if (fixed_target_parent != document) {
- // the target has position fixed, that means the footnote needs to be fixed, too
- fndiv.style.position = 'fixed';
- } else {
- fndiv.style.position = 'absolute';
- }
-
- if (fixed_target_parent != document || non_static_parent == document) {
- fndiv.style.left = findPosX(target)+'px';
- fndiv.style.top = (findPosY(target)+target.offsetHeight * 1.5) + 'px';
- } else {
- fndiv.style.left = (findPosX(target) - findPosX(non_static_parent)) +'px';
- fndiv.style.top = (findPosY(target)+target.offsetHeight * 1.5 - findPosY(non_static_parent)) + 'px';
- }
-
- fndiv.style.display = '';
- return fndiv;
-}
-
-/**
- * Display an insitu footnote popup
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @author Chris Smith <chris@jalakai.co.uk>
- */
-function footnote(e){
- var fndiv = insitu_popup(e.target, 'insitu__fn');
-
- // locate the footnote anchor element
- var a = $("fn__" + e.target.id.substr(5));
- if (!a){ return; }
-
- // anchor parent is the footnote container, get its innerHTML
- var content = new String (a.parentNode.parentNode.innerHTML);
-
- // strip the leading content anchors and their comma separators
- content = content.replace(/<sup>.*<\/sup>/gi, '');
- content = content.replace(/^\s+(,\s+)+/,'');
-
- // prefix ids on any elements with "insitu__" to ensure they remain unique
- content = content.replace(/\bid=(['"])([^"']+)\1/gi,'id="insitu__$2');
-
- // now put the content into the wrapper
- fndiv.innerHTML = content;
-}
-
-/**
- * Add the event handlers to footnotes
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-addInitEvent(function(){
- var elems = getElementsByClass('fn_top',null,'a');
- for(var i=0; i<elems.length; i++){
- addEvent(elems[i],'mouseover',function(e){footnote(e);});
- }
-});
-
-/**
- * Add the edit window size controls
- */
-function initSizeCtl(ctlid,edid){
- if(!document.getElementById){ return; }
-
- var ctl = $(ctlid);
- var textarea = $(edid);
- if(!ctl || !textarea) return;
-
- var hgt = DokuCookie.getValue('sizeCtl');
- if(hgt){
- textarea.style.height = hgt;
- }else{
- textarea.style.height = '300px';
- }
-
- var wrp = DokuCookie.getValue('wrapCtl');
- if(wrp){
- setWrap(textarea, wrp);
- } // else use default value
-
- var l = document.createElement('img');
- var s = document.createElement('img');
- var w = document.createElement('img');
- l.src = DOKU_BASE+'lib/images/larger.gif';
- s.src = DOKU_BASE+'lib/images/smaller.gif';
- w.src = DOKU_BASE+'lib/images/wrap.gif';
- addEvent(l,'click',function(){sizeCtl(edid,100);});
- addEvent(s,'click',function(){sizeCtl(edid,-100);});
- addEvent(w,'click',function(){toggleWrap(edid);});
- ctl.appendChild(l);
- ctl.appendChild(s);
- ctl.appendChild(w);
-}
-
-/**
- * This sets the vertical size of the editbox
- */
-function sizeCtl(edid,val){
- var textarea = $(edid);
- var height = parseInt(textarea.style.height.substr(0,textarea.style.height.length-2));
- height += val;
- textarea.style.height = height+'px';
-
- DokuCookie.setValue('sizeCtl',textarea.style.height);
-}
-
-/**
- * Toggle the wrapping mode of a textarea
- */
-function toggleWrap(edid){
- var textarea = $(edid);
- var wrap = textarea.getAttribute('wrap');
- if(wrap && wrap.toLowerCase() == 'off'){
- setWrap(textarea, 'soft');
- }else{
- setWrap(textarea, 'off');
- }
-
- DokuCookie.setValue('wrapCtl',textarea.getAttribute('wrap'));
-}
-
-/**
- * Set the wrapping mode of a textarea
- *
- * @author Fluffy Convict <fluffyconvict@hotmail.com>
- * @author <shutdown@flashmail.com>
- * @link http://news.hping.org/comp.lang.javascript.archive/12265.html
- * @link https://bugzilla.mozilla.org/show_bug.cgi?id=41464
- */
-function setWrap(textarea, wrapAttrValue){
- textarea.setAttribute('wrap', wrapAttrValue);
-
- // Fix display for mozilla
- var parNod = textarea.parentNode;
- var nxtSib = textarea.nextSibling;
- parNod.removeChild(textarea);
- parNod.insertBefore(textarea, nxtSib);
+ jQuery('#' + id).hide();
}
/**
* Handler to close all open Popups
*/
function closePopups(){
- if(!document.getElementById){ return; }
-
- var divs = document.getElementsByTagName('div');
- for(var i=0; i < divs.length; i++){
- if(divs[i].className.indexOf('JSpopup') != -1){
- divs[i].style.display = 'none';
- }
- }
+ jQuery('div.JSpopup').hide();
}
-/**
- * Looks for an element with the ID scroll__here at scrolls to it
- */
-function scrollToMarker(){
- var obj = $('scroll__here');
- if(obj) obj.scrollIntoView();
-}
-
-/**
- * Looks for an element with the ID focus__this at sets focus to it
- */
-function focusMarker(){
- var obj = $('focus__this');
- if(obj) obj.focus();
-}
-
-/**
- * Remove messages
- */
-function cleanMsgArea(){
- var elems = getElementsByClass('(success|info|error)',document,'div');
- if(elems){
- for(var i=0; i<elems.length; i++){
- elems[i].style.display = 'none';
- }
- }
-}
-
-/**
- * disable multiple revisions checkboxes if two are checked
- *
- * @author Anika Henke <anika@selfthinker.org>
- */
-addInitEvent(function(){
- var revForm = $('page__revisions');
- if (!revForm) return;
- var elems = revForm.elements;
- var countTicks = 0;
- for (var i=0; i<elems.length; i++) {
- var input1 = elems[i];
- if (input1.type=='checkbox') {
- addEvent(input1,'click',function(e){
- if (this.checked) countTicks++;
- else countTicks--;
- for (var j=0; j<elems.length; j++) {
- var input2 = elems[j];
- if (countTicks >= 2) input2.disabled = (input2.type=='checkbox' && !input2.checked);
- else input2.disabled = (input2.type!='checkbox');
- }
- });
- input1.checked = false; // chrome reselects on back button which messes up the logic
- } else if(input1.type=='submit'){
- input1.disabled = true;
- }
- }
-});
-
-/**
- * Autosubmit quick select forms
- *
- * When a <select> tag has the class "quickselect", this script will
- * automatically submit its parent form when the select value changes.
- * It also hides the submit button of the form.
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-addInitEvent(function(){
- var selects = getElementsByClass('quickselect',document,'select');
- for(var i=0; i<selects.length; i++){
- // auto submit on change
- addEvent(selects[i],'change',function(e){
- this.form.submit();
- });
- // hide submit buttons
- var btns = selects[i].form.getElementsByTagName('input');
- for(var j=0; j<btns.length; j++){
- if(btns[j].type == 'submit'){
- btns[j].style.display = 'none';
- }
- }
- }
-});
-
-/**
- * Display error for Windows Shares on browsers other than IE
- *
- * @author Michael Klier <chi@chimeric.de>
- */
-function checkWindowsShares() {
- if(!LANG['nosmblinks']) return true;
- if(document.all != null) return true;
-
- var elems = getElementsByClass('windows',document,'a');
- if(elems){
- for(var i=0; i<elems.length; i++){
- var share = elems[i];
- addEvent(share,'click',function(){
- alert(LANG['nosmblinks']);
- });
- }
- }
-}
-
-/**
- * Add the event handler for the Windows Shares check
- *
- * @author Michael Klier <chi@chimeric.de>
- */
-addInitEvent(function(){
- checkWindowsShares();
-});
-
-/**
- * Highlight the section when hovering over the appropriate section edit button
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-addInitEvent(function(){
- var btns = getElementsByClass('btn_secedit',document,'form');
- for(var i=0; i<btns.length; i++){
- addEvent(btns[i],'mouseover',function(e){
- var tgt = this.parentNode;
- var nr = tgt.className.match(/(\s+|^)editbutton_(\d+)(\s+|$)/)[2];
- do {
- tgt = tgt.previousSibling;
- } while (tgt !== null && typeof tgt.tagName === 'undefined');
- if (tgt === null) return;
- while(typeof tgt.className === 'undefined' ||
- tgt.className.match('(\\s+|^)sectionedit' + nr + '(\\s+|$)') === null) {
- if (typeof tgt.className !== 'undefined') {
- tgt.className += ' section_highlight';
- }
- tgt = (tgt.previousSibling !== null) ? tgt.previousSibling : tgt.parentNode;
- }
- if (typeof tgt.className !== 'undefined') tgt.className += ' section_highlight';
- });
-
- addEvent(btns[i],'mouseout',function(e){
- var secs = getElementsByClass('section_highlight');
- for(var j=0; j<secs.length; j++){
- secs[j].className = secs[j].className.replace(/section_highlight/g,'');
- }
- });
- }
+jQuery(function () {
+ jQuery(document).click(closePopups);
});
-
diff --git a/lib/scripts/subscriptions.js b/lib/scripts/subscriptions.js
deleted file mode 100644
index d701f258f..000000000
--- a/lib/scripts/subscriptions.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Hide list subscription style if target is a page
- *
- * @author Adrian Lang <lang@cosmocode.de>
- */
-
-addInitEvent(function () {
- var form = $('subscribe__form');
- if (!form) {
- return;
- }
-
- var styleradios = {};
-
- function update_state() {
- if (!this.checked) {
- return;
- }
- if (this.value.match(/:$/)) {
- styleradios.list.parentNode.style.display = '';
- } else {
- styleradios.list.parentNode.style.display = 'none';
- if (styleradios.list.checked) {
- styleradios.digest.checked = 'checked';
- }
- }
- }
-
- var cur_sel = null;
-
- var inputs = form.getElementsByTagName('input');
- for (var i = 0; i < inputs.length ; ++i) {
- switch (inputs[i].name) {
- case 'sub_target':
- addEvent(inputs[i], 'click', update_state);
- if (inputs[i].checked) {
- cur_sel = inputs[i];
- }
- break;
- case 'sub_style':
- styleradios[inputs[i].value] = inputs[i];
- break;
- }
- }
- update_state.call(cur_sel);
-});
diff --git a/lib/scripts/textselection.js b/lib/scripts/textselection.js
index 742338785..bd80e9341 100644
--- a/lib/scripts/textselection.js
+++ b/lib/scripts/textselection.js
@@ -22,8 +22,7 @@ function selection_class(){
};
this.getText = function(){
- if(!this.obj) return '';
- return this.obj.value.substring(this.start,this.end);
+ return (!this.obj) ? '' : this.obj.value.substring(this.start,this.end);
};
}
@@ -188,7 +187,7 @@ function pasteText(selection,text,opts){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function insertTags(textAreaID, tagOpen, tagClose, sampleText){
- var txtarea = $(textAreaID);
+ var txtarea = jQuery('#' + textAreaID)[0];
var selection = getSelection(txtarea);
var text = selection.getText();
@@ -227,7 +226,7 @@ function insertTags(textAreaID, tagOpen, tagClose, sampleText){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function insertAtCarret(textAreaID, text){
- var txtarea = $(textAreaID);
+ var txtarea = jQuery('#' + textAreaID)[0];
var selection = getSelection(txtarea);
pasteText(selection,text,{nosel: true});
}
diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js
index d458960ab..04d30c1a6 100644
--- a/lib/scripts/toolbar.js
+++ b/lib/scripts/toolbar.js
@@ -1,4 +1,3 @@
-
// used to identify pickers
var pickercounter=0;
@@ -12,54 +11,55 @@ var pickercounter=0;
* @author Andreas Gohr <andi@splitbrain.org>
*/
function initToolbar(tbid,edid,tb, allowblock){
- var toolbar = $(tbid);
- if(!toolbar) return;
- var edit = $(edid);
- if(!edit) return;
- if(edit.readOnly) return;
+ var $toolbar, $edit;
+ if (typeof tbid == 'string') {
+ $toolbar = jQuery('#' + tbid);
+ } else {
+ $toolbar = jQuery(tbid);
+ }
+
+ $edit = jQuery('#' + edid);
+
+ if ($toolbar.length == 0 || $edit.length == 0 || $edit.attr('readOnly')) {
+ return;
+ }
if (typeof allowblock === 'undefined') {
allowblock = true;
}
//empty the toolbar area:
- toolbar.innerHTML='';
+ $toolbar.html('');
- var cnt = tb.length;
- for(var i=0; i<cnt; i++){
- if (!allowblock && tb[i].block === true) {
- continue;
+ jQuery.each(tb, function (k, val) {
+ if (!tb.hasOwnProperty(k) || (!allowblock && val.block === true)) {
+ return;
}
- var actionFunc;
-
- // create new button
- var btn = createToolButton(tb[i]['icon'],
- tb[i]['title'],
- tb[i]['key'],
- tb[i]['id'],
- tb[i]['class']);
+ var actionFunc, $btn;
+ // create new button (jQuery object)
+ $btn = jQuery(createToolButton(val.icon, val.title, val.key, val.id,
+ val['class']));
// type is a tb function -> assign it as onclick
- actionFunc = 'tb_'+tb[i]['type'];
- if( isFunction(window[actionFunc]) ){
- addEvent(btn,'click', bind(window[actionFunc],btn,tb[i],edid));
- toolbar.appendChild(btn);
- continue;
+ actionFunc = 'tb_'+val.type;
+ if( jQuery.isFunction(window[actionFunc]) ){
+ $btn.bind('click', bind(window[actionFunc],$btn,val,edid) );
+ $toolbar.append($btn);
+ return;
}
// type is a init function -> execute it
- actionFunc = 'addBtnAction'+tb[i]['type'].charAt(0).toUpperCase()+tb[i]['type'].substring(1);
- if( isFunction(window[actionFunc]) ){
- if(window[actionFunc](btn, tb[i], edid)){
- toolbar.appendChild(btn);
+ actionFunc = 'addBtnAction'+val.type.charAt(0).toUpperCase()+val.type.substring(1);
+ if( jQuery.isFunction(window[actionFunc]) ){
+ if(window[actionFunc]($btn, val, edid)){
+ $toolbar.append($btn);
}
- continue;
+ return;
}
- alert('unknown toolbar type: '+tb[i]['type']+' '+actionFunc);
- } // end for
-
+ alert('unknown toolbar type: '+val.type+' '+actionFunc);
+ });
}
/**
@@ -72,13 +72,10 @@ function initToolbar(tbid,edid,tb, allowblock){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function tb_format(btn, props, edid) {
- var sample = props['title'];
- if(props['sample']){
- sample = props['sample'];
- }
+ var sample = props.title || props.sample;
insertTags(edid,
- fixtxt(props['open']),
- fixtxt(props['close']),
+ fixtxt(props.open),
+ fixtxt(props.close),
fixtxt(sample));
pickerClose();
return false;
@@ -97,30 +94,27 @@ function tb_format(btn, props, edid) {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function tb_formatln(btn, props, edid) {
- var sample = props['title'];
- if(props['sample']){
- sample = props['sample'];
- }
- sample = fixtxt(sample);
+ var sample = props.title || props.sample,
+ opts,
+ selection = getSelection(jQuery('#'+edid)[0]);
- props['open'] = fixtxt(props['open']);
- props['close'] = fixtxt(props['close']);
+ sample = fixtxt(sample);
+ props.open = fixtxt(props.open);
+ props.close = fixtxt(props.close);
// is something selected?
- var opts;
- var selection = getSelection($(edid));
if(selection.getLength()){
sample = selection.getText();
opts = {nosel: true};
}else{
opts = {
- startofs: props['open'].length,
- endofs: props['close'].length
+ startofs: props.open.length,
+ endofs: props.close.length
};
}
- sample = sample.split("\n").join(props['close']+"\n"+props['open']);
- sample = props['open']+sample+props['close'];
+ sample = sample.split("\n").join(props.close+"\n"+props.open);
+ sample = props.open+sample+props.close;
pasteText(selection,sample,opts);
@@ -138,7 +132,7 @@ function tb_formatln(btn, props, edid) {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function tb_insert(btn, props, edid) {
- insertAtCarret(edid,fixtxt(props['insert']));
+ insertAtCarret(edid,fixtxt(props.insert));
pickerClose();
return false;
}
@@ -153,9 +147,9 @@ function tb_insert(btn, props, edid) {
*/
function tb_mediapopup(btn, props, edid) {
window.open(
- DOKU_BASE+props['url']+encodeURIComponent(NS)+'&edid='+encodeURIComponent(edid),
- props['name'],
- props['options']);
+ DOKU_BASE+props.url+encodeURIComponent(NS)+'&edid='+encodeURIComponent(edid),
+ props.name,
+ props.options);
return false;
}
@@ -170,16 +164,16 @@ function tb_mediapopup(btn, props, edid) {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function tb_autohead(btn, props, edid){
- var lvl = currentHeadlineLevel(edid);
+ var lvl = currentHeadlineLevel(edid),
+ tags;
// determine new level
- lvl += props['mod'];
+ lvl += props.mod;
if(lvl < 1) lvl = 1;
if(lvl > 5) lvl = 5;
- var tags = '=';
- for(var i=0; i<=5-lvl; i++) tags += '=';
- insertTags(edid, tags+' ', ' '+tags+"\n", props['text']);
+ tags = (new Array(8 - lvl)).join('=');
+ insertTags(edid, tags+' ', ' '+tags+"\n", props.text);
pickerClose();
return false;
}
@@ -188,19 +182,23 @@ function tb_autohead(btn, props, edid){
/**
* Add button action for picker buttons and create picker element
*
- * @param DOMElement btn Button element to add the action to
+ * @param jQuery btn Button element to add the action to
* @param array props Associative array of button properties
* @param string edid ID of the editor textarea
* @return boolean If button should be appended
* @author Gabriel Birke <birke@d-scribe.de>
*/
-function addBtnActionPicker(btn, props, edid) {
+function addBtnActionPicker($btn, props, edid) {
var pickerid = 'picker'+(pickercounter++);
createPicker(pickerid, props, edid);
- addEvent(btn,'click',function(){
- pickerToggle(pickerid,btn);
- return false;
- });
+
+ $btn.click(
+ function() {
+ pickerToggle(pickerid,$btn);
+ return false;
+ }
+ );
+
return true;
}
@@ -214,32 +212,25 @@ function addBtnActionPicker(btn, props, edid) {
* @author Andreas Gohr <gohr@cosmocode.de>
*/
function addBtnActionLinkwiz(btn, props, edid) {
- linkwiz.init($(edid));
- addEvent(btn,'click',function(){
- linkwiz.toggle();
+ dw_linkwiz.init(jQuery('#'+edid));
+ jQuery(btn).click(function(){
+ dw_linkwiz.toggle();
return false;
});
return true;
}
+
/**
* Show/Hide a previosly created picker window
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
-function pickerToggle(pickerid,btn){
- var picker = $(pickerid);
- if(picker.style.marginLeft == '-10000px'){
- var x = findPosX(btn);
- var y = findPosY(btn);
- picker.style.left = (x+3)+'px';
- picker.style.top = (y+btn.offsetHeight+3)+'px';
- picker.style.marginLeft = '0px';
- picker.style.marginTop = '0px';
- }else{
- picker.style.marginLeft = '-10000px';
- picker.style.marginTop = '-10000px';
- }
+function pickerToggle(pickerid,$btn){
+ var $picker = jQuery('#' + pickerid),
+ pos = $btn.offset();
+ $picker.toggleClass('a11y')
+ .offset({left: pos.left+3, top: pos.top+$btn[0].offsetHeight+3});
}
/**
@@ -248,11 +239,7 @@ function pickerToggle(pickerid,btn){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function pickerClose(){
- var pobjs = getElementsByClass('picker');
- for(var i=0; i<pobjs.length; i++){
- pobjs[i].style.marginLeft = '-10000px';
- pobjs[i].style.marginTop = '-10000px';
- }
+ jQuery('.picker').addClass('a11y');
}
@@ -263,3 +250,6 @@ function fixtxt(str){
return str.replace(/\\n/g,"\n");
}
+jQuery(function () {
+ initToolbar('tool__bar','wiki__text',toolbar);
+});
diff --git a/lib/scripts/tree.js b/lib/scripts/tree.js
new file mode 100644
index 000000000..96763053d
--- /dev/null
+++ b/lib/scripts/tree.js
@@ -0,0 +1,93 @@
+jQuery.fn.dw_tree = function(overrides) {
+ var dw_tree = {
+
+ /**
+ * Delay in ms before showing the throbber.
+ * Used to skip the throbber for fast AJAX calls.
+ */
+ throbber_delay: 500,
+
+ $obj: this,
+
+ toggle_selector: 'a.idx_dir',
+
+ init: function () {
+ this.$obj.delegate(this.toggle_selector, 'click', this,
+ this.toggle);
+ },
+
+ /**
+ * Open or close a subtree using AJAX
+ * The contents of subtrees are "cached" until the page is reloaded.
+ * A "loading" indicator is shown only when the AJAX call is slow.
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Ben Coburn <btcoburn@silicodon.net>
+ * @author Pierre Spring <pierre.spring@caillou.ch>
+ */
+ toggle: function (e) {
+ var $listitem, $sublist, timeout, $clicky, show_sublist, dw_tree, opening;
+
+ e.preventDefault();
+
+ dw_tree = e.data;
+ $clicky = jQuery(this);
+ $listitem = $clicky.closest('li');
+ $sublist = $listitem.find('ul').first();
+ opening = $listitem.hasClass('closed');
+ $listitem.toggleClass('open closed');
+ dw_tree.toggle_display($clicky, opening);
+
+ // if already open, close by hiding the sublist
+ if (!opening) {
+ $sublist.dw_hide();
+ return;
+ }
+
+ show_sublist = function (data) {
+ $sublist.hide();
+ if (typeof data !== 'undefined') {
+ $sublist.html(data);
+ }
+ if ($listitem.hasClass('open')) {
+ // Only show if user didn’t close the list since starting
+ // to load the content
+ $sublist.dw_show();
+ }
+ };
+
+ // just show if already loaded
+ if ($sublist.length > 0) {
+ show_sublist();
+ return;
+ }
+
+ //prepare the new ul
+ $sublist = jQuery('<ul class="idx"/>');
+ $listitem.append($sublist);
+
+ timeout = window.setTimeout(
+ bind(show_sublist, '<li><img src="' + DOKU_BASE + 'lib/images/throbber.gif" alt="loading..." title="loading..." /></li>'), dw_tree.throbber_delay);
+
+ dw_tree.load_data(function (data) {
+ window.clearTimeout(timeout);
+ show_sublist(data);
+ }, $clicky);
+ },
+
+ toggle_display: function ($clicky, opening) {
+ },
+
+ load_data: function (show_data, $clicky) {
+ show_data();
+ }
+ };
+
+ jQuery.extend(dw_tree, overrides);
+
+ if (!overrides.deferInit) {
+ dw_tree.init();
+ }
+
+ return dw_tree;
+};
diff --git a/lib/scripts/tw-sack.js b/lib/scripts/tw-sack.js
index b5a5c8861..cc988f5be 100644
--- a/lib/scripts/tw-sack.js
+++ b/lib/scripts/tw-sack.js
@@ -66,6 +66,8 @@ function sack(file){
};
this.runAJAX = function(urlstring){
+ DEPRECATED('Please use jQuery.post() or any other of jQuery\'s AJAX methods.');
+
this.responseStatus = new Array(2);
if(this.failed && this.AjaxFailedAlert){
alert(this.AjaxFailedAlert);
diff --git a/lib/styles/all.css b/lib/styles/all.css
index dd9f46462..5d7eb7d14 100644
--- a/lib/styles/all.css
+++ b/lib/styles/all.css
@@ -5,11 +5,28 @@
div.clearer {
clear: both;
+ font-size: 0;
line-height: 0;
height: 0;
overflow: hidden;
}
+/* one of the many clearfix versions */
+.group {
+ display: inline-block;
+}
+.group {
+ display: block;
+}
+.group:before,
+.group:after {
+ content: "";
+ display: table;
+}
+.group:after {
+ clear: both;
+}
+
div.no {
display: inline;
margin: 0;
diff --git a/lib/styles/print.css b/lib/styles/print.css
index 16543473a..76bc6d3bc 100644
--- a/lib/styles/print.css
+++ b/lib/styles/print.css
@@ -18,7 +18,6 @@ div.notify {
/* modal windows */
.JSpopup,
-#link__wiz,
-#media__popup {
+#link__wiz {
display: none;
}
diff --git a/lib/styles/screen.css b/lib/styles/screen.css
index 0a6a4f295..101ed3529 100644
--- a/lib/styles/screen.css
+++ b/lib/styles/screen.css
@@ -44,8 +44,7 @@ div.notify {
/* modal windows */
.JSpopup,
-#link__wiz,
-#media__popup {
+#link__wiz {
position: absolute;
background-color: #fff;
color: #000;
@@ -53,6 +52,31 @@ div.notify {
overflow: hidden;
}
+#link__wiz .ui-dialog-content {
+ padding-left: 0;
+ padding-right: 0;
+}
+
+/* media manager popup toggle buttons */
+
+#media__popup_content button.button {
+ border: 1px outset;
+}
+
+#media__popup_content button.selected {
+ border-style: inset;
+}
+
+/* hide something accessibly
+ (e.g. for screen readers or to keep access keys working) */
+.a11y {
+ position: absolute !important;
+ left: -10000px !important;
+ top: auto !important;
+ width: 1px !important;
+ height: 1px !important;
+ overflow: hidden !important;
+}
/* syntax highlighting code */
.code .br0 { color: #66cc66; }
@@ -77,4 +101,3 @@ div.notify {
.code .re4 { color: #009999; }
.code .st0 { color: #ff0000; }
.code .sy0 { color: #66cc66; }
-
diff --git a/lib/tpl/default/_fileuploader.css b/lib/tpl/default/_fileuploader.css
new file mode 100644
index 000000000..d06bfd519
--- /dev/null
+++ b/lib/tpl/default/_fileuploader.css
@@ -0,0 +1,111 @@
+
+.qq-uploader {
+ position: relative;
+ width: 100%;
+}
+
+.qq-uploader .error {
+ color: #f00;
+ background-color: #fff;
+}
+
+/* select file button */
+
+.qq-upload-button {
+ display: inline-block;
+ border: 1px solid __border__;
+ color: __text__;
+ background: __background__ url(images/buttonshadow.png) repeat-x bottom;
+ text-decoration: none;
+ font-size: 100%;
+ cursor: pointer;
+ margin: 1px 1px 5px;
+ padding: 0.125em 0.4em;
+}
+
+* html .qq-upload-button,
+*+html .qq-upload-button {
+ display: inline;
+}
+
+.qq-upload-button-focus {
+ outline: 1px dotted;
+}
+
+/* drop area */
+
+.qq-upload-drop-area {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ min-height: 70px;
+ z-index: 2;
+ background: __background_neu__;
+ color: __text__;
+ text-align: center;
+}
+
+.qq-upload-drop-area span {
+ display: block;
+ position: absolute;
+ top: 50%;
+ width: 100%;
+ margin-top: -8px;
+ font-size: 120%;
+}
+
+.qq-upload-drop-area-active {
+ background: __background_alt__;
+}
+
+/* list of files to upload */
+
+div.qq-uploader ul {
+ margin: 0;
+ list-style: none;
+}
+
+.qq-uploader li {
+ margin-bottom: 5px;
+ color: __text__;
+}
+
+.qq-uploader li span,
+.qq-uploader li input,
+.qq-uploader li a {
+ margin-right: 5px;
+}
+
+.qq-upload-file {
+ display: block;
+ font-weight: bold;
+}
+
+.qq-upload-spinner {
+ display: inline-block;
+ background: url("../../images/throbber.gif");
+ width: 15px;
+ height: 15px;
+ vertical-align: text-bottom;
+}
+
+.qq-upload-size,
+.qq-upload-cancel {
+ font-size: 85%;
+}
+
+.qq-upload-failed-text {
+ display: none;
+}
+.qq-upload-fail .qq-upload-failed-text {
+ display: inline;
+}
+
+.qq-action-container * {
+ vertical-align: middle;
+}
+.qq-overwrite-check input {
+ margin-left: 10px;
+}
diff --git a/lib/tpl/default/_linkwiz.css b/lib/tpl/default/_linkwiz.css
index 060707377..fd40a0019 100644
--- a/lib/tpl/default/_linkwiz.css
+++ b/lib/tpl/default/_linkwiz.css
@@ -16,6 +16,7 @@
background-color: __background_alt__;
height: 16px;
margin-bottom: 5px;
+ cursor: move;
}
#link__wiz_close {
diff --git a/lib/tpl/default/_mediamanager.css b/lib/tpl/default/_mediamanager.css
new file mode 100644
index 000000000..383a1597c
--- /dev/null
+++ b/lib/tpl/default/_mediamanager.css
@@ -0,0 +1,429 @@
+
+/*____________ Layout ____________*/
+
+#mediamanager__page h1 {
+ margin: 0 0 .5em;
+}
+
+#mediamanager__page {
+ min-width: 800px;
+ width: 100%;
+ text-align: left;
+}
+
+#mediamanager__page .panel {
+ float: left;
+}
+
+#mediamanager__page .namespaces {
+ width: 15%;
+ min-width: 120px;
+}
+#mediamanager__page .filelist {
+ width: 50%;
+ min-width: 400px;
+}
+#mediamanager__page .file {
+ width: 35%;
+ min-width: 280px;
+}
+
+#mediamanager__page .panelHeader {
+ background-color: __background_alt__;
+ margin: 0 10px 10px 0;
+ padding: 10px 10px 8px;
+ text-align: left;
+ min-height: 20px;
+ overflow: hidden;
+}
+
+#mediamanager__page .panelContent {
+ overflow-y: auto;
+ overflow-x: hidden;
+ padding: 0;
+ margin: 0 10px 10px 0;
+ position: relative;
+}
+
+#mediamanager__page .file .panelHeader,
+#mediamanager__page .file .panelContent {
+ margin-right: 0;
+}
+
+#mediamanager__page .ui-resizable-e {
+ width: 6px;
+ right: 2px;
+ background: transparent url(images/resizecol.png) center center no-repeat;
+}
+#mediamanager__page .ui-resizable-e:hover {
+ background-color: __background_alt__;
+}
+
+/*____________ Namespaces tree ____________*/
+
+#mediamanager__page .namespaces h2 {
+ font-size: 1em;
+ display: inline-block;
+ border-width: 0;
+ padding: .3em .8em;
+ margin: 0 .3em 0 0;
+ border-radius: .5em .5em 0 0;
+ font-weight: normal;
+ background-color: __background_alt__;
+ color: __text__;
+ line-height: 1.5em;
+}
+* html #mediamanager__page .namespaces h2,
+*+html #mediamanager__page .namespaces h2 {
+ display: inline;
+}
+
+#mediamanager__page .namespaces ul {
+ margin-left: .2em;
+ list-style: none;
+}
+#mediamanager__page .namespaces ul ul {
+ margin-left: 1em;
+}
+
+#mediamanager__page .namespaces ul .selected {
+ background-color: __highlight__;
+ font-weight: bold;
+}
+
+/*____________ Panel header ____________*/
+
+#mediamanager__page .panelHeader h3 {
+ float: left;
+ font-weight: normal;
+ font-size: 1em;
+ padding: 0;
+ margin: 0 0 3px;
+}
+
+#mediamanager__page .panelHeader form.options {
+ float: right;
+ margin-top: -3px;
+}
+
+#mediamanager__page .panelHeader ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+#mediamanager__page .panelHeader ul li {
+ color: __text__;
+ float: left;
+ line-height: 1;
+ padding-left: 3px;
+}
+
+#mediamanager__page .panelHeader ul li.listType {
+ padding-left: 30px;
+ background: url('../../images/icon-list.png') 3px 1px no-repeat;
+}
+#mediamanager__page .panelHeader ul li.sortBy {
+ padding-left: 30px;
+ background: url('../../images/icon-sort.png') 3px 1px no-repeat;
+}
+
+#mediamanager__page .panelHeader form.options .ui-buttonset label{
+ font-size: 90%;
+ margin-right: -0.4em;
+}
+#mediamanager__page .panelHeader form.options .ui-buttonset .ui-button-text {
+ padding: .4em .7em;
+ line-height: 1;
+}
+
+/*____________ File list ____________*/
+
+#mediamanager__page .filelist ul {
+ padding: 0;
+ margin: 0;
+}
+
+#mediamanager__page .filelist .panelContent ul li:hover {
+ background-color: __background_alt__;
+}
+
+#mediamanager__page .filelist li dt a {
+ vertical-align: middle;
+ display: table-cell;
+ overflow: hidden;
+}
+* html #mediamanager__page .filelist .thumbs li dt a,
+*+html #mediamanager__page .filelist .thumbs li dt a {
+ display: block;
+}
+* html #mediamanager__page .filelist .rows li dt a,
+*+html #mediamanager__page .filelist .rows li dt a {
+ display: inline;
+}
+
+/* thumbs */
+
+#mediamanager__page .filelist .thumbs li {
+ width: 100px;
+ min-height: 130px;
+ display: inline-block;
+ display: -moz-inline-stack;
+ /* the right margin should visually be 10px, but because of its inline-block nature the whitespace inbetween is about 4px more */
+ margin: 0 6px 10px 0;
+ background-color: __background_neu__;
+ color: __text__;
+ padding: 5px;
+ vertical-align: top;
+ text-align: center;
+ position: relative;
+ line-height: 1.2;
+}
+* html #mediamanager__page .filelist .thumbs li,
+*+html #mediamanager__page .filelist .thumbs li {
+ display: inline;
+ zoom: 1;
+}
+
+#mediamanager__page .filelist .thumbs li dt a {
+ width: 100px;
+ height: 90px;
+}
+
+#mediamanager__page .filelist .thumbs li dt a img {
+ max-width: 90px;
+ max-height: 90px;
+}
+
+#mediamanager__page .filelist .thumbs li .name,
+#mediamanager__page .filelist .thumbs li .size,
+#mediamanager__page .filelist .thumbs li .filesize,
+#mediamanager__page .filelist .thumbs li .date {
+ display: block;
+ overflow: hidden;
+ width: 90px;
+ white-space: nowrap;
+}
+#mediamanager__page .filelist .thumbs li .name {
+ padding: 5px 0;
+ font-weight: bold;
+}
+#mediamanager__page .filelist .thumbs li .date {
+ font-style: italic;
+ white-space: normal;
+}
+
+/* rows */
+
+#mediamanager__page .filelist .rows li {
+ list-style: none;
+ display: block;
+ position: relative;
+ max-height: 50px;
+ margin: 0;
+ margin-bottom: 3px;
+ background-color: __background__;
+ color: __text__;
+ overflow: hidden;
+}
+
+#mediamanager__page .filelist .rows li:nth-child(2n+1) {
+ background-color: __background_neu__;
+}
+
+#mediamanager__page .filelist .rows li dt {
+ float: left;
+ width: 10%;
+ height: 40px;
+ text-align: center;
+}
+
+#mediamanager__page .filelist .rows li dt a {
+ width: 100px;
+ height: 40px;
+}
+
+#mediamanager__page .filelist .rows li dt a img {
+ max-width: 40px;
+ max-height: 40px;
+}
+
+#mediamanager__page .filelist .rows li .name,
+#mediamanager__page .filelist .rows li .size,
+#mediamanager__page .filelist .rows li .filesize,
+#mediamanager__page .filelist .rows li .date {
+ overflow: hidden;
+ float: left;
+ margin-left: 1%;
+ white-space: nowrap;
+}
+
+#mediamanager__page .filelist .rows li .name {
+ width: 30%;
+ font-weight: bold;
+}
+#mediamanager__page .filelist .rows li .size,
+#mediamanager__page .filelist .rows li .filesize {
+ width: 15%;
+}
+#mediamanager__page .filelist .rows li .date {
+ width: 20%;
+ font-style: italic;
+ white-space: normal;
+}
+
+/*____________ Upload panel ____________*/
+
+#mediamanager__page div.upload {
+ padding-bottom: 0.5em;
+}
+
+#media__content #mediamanager__uploader {
+ border-bottom: 1px solid __border__;
+ padding-bottom: 0.5em;
+}
+
+/*____________ File preview ____________*/
+
+#mediamanager__page .file ul.actions {
+ text-align: center;
+ margin: 0 0 5px;
+ list-style: none;
+}
+#mediamanager__page .file ul.actions li {
+ display: inline;
+}
+
+#mediamanager__page .file div.image {
+ margin-bottom: 5px;
+ text-align: center;
+}
+
+#mediamanager__page .file div.image img {
+ width: 100%;
+}
+
+#mediamanager__page .file dl {
+}
+#mediamanager__page .file dl dt {
+ font-weight: bold;
+ display: block;
+ background-color: __background_alt__;
+}
+#mediamanager__page .file dl dd {
+ display: block;
+ background-color: __background_neu__;
+}
+
+
+/*____________ Meta data edit form ____________*/
+
+#mediamanager__page form.meta div.row {
+ margin-bottom: 5px;
+}
+
+#mediamanager__page form.meta label span {
+ display: block;
+}
+
+#mediamanager__page form.meta input {
+ width: 50%;
+}
+
+#mediamanager__page form.meta input.button {
+ width: auto;
+}
+
+#mediamanager__page form.meta textarea.edit {
+ height: 6em;
+ width: 95%;
+ min-width: 95%;
+ max-width: 95%;
+}
+
+/*____________ Revisions form ____________*/
+
+#mediamanager__page #page__revisions ul {
+ margin-left: 10px;
+ list-style-type: none;
+}
+
+#mediamanager__page #page__revisions ul li div.li div {
+ font-size: 90%;
+ color: __text_neu__;
+ padding-left: 18px;
+}
+
+#mediamanager__page #page__revisions ul li div.li input {
+ position: relative;
+ top: 1px;
+}
+
+/* File diff */
+
+#mediamanager__diff table {
+ table-layout: fixed;
+}
+
+#mediamanager__diff td,
+#mediamanager__diff th {
+ width: 48%;
+ margin: 0 5px 10px 0;
+ padding: 0;
+ vertical-align: top;
+ text-align: left;
+}
+
+#mediamanager__diff th {
+ font-weight: normal;
+}
+#mediamanager__diff th a {
+ font-weight: bold;
+}
+#mediamanager__diff th span {
+ font-size: 90%;
+}
+
+#mediamanager__diff dl dd strong{
+ background-color: __highlight__;
+ color: __text__;
+ font-weight: normal;
+}
+
+/* Image diff */
+
+#mediamanager__page .file form.diffView {
+ margin-bottom: 10px;
+ display: block;
+}
+
+#mediamanager__diff div.slider {
+ margin: 10px;
+ width: 95%;
+}
+
+#mediamanager__diff .imageDiff {
+ position: relative;
+}
+#mediamanager__diff .imageDiff .image1,
+#mediamanager__diff .imageDiff .image2 {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 97%;
+}
+
+#mediamanager__diff .imageDiff.opacity .image2 {
+ -moz-opacity: 0.5;
+ -khtml-opacity: 0.5;
+ opacity: 0.5;
+}
+
+#mediamanager__diff .imageDiff.portions .image2 {
+ border-right: 1px solid red;
+ overflow: hidden;
+}
+
+#mediamanager__diff .imageDiff img {
+ width: 100%;
+}
+
diff --git a/lib/tpl/default/_mediaoptions.css b/lib/tpl/default/_mediaoptions.css
index 19e2c4853..81e87aa8e 100644
--- a/lib/tpl/default/_mediaoptions.css
+++ b/lib/tpl/default/_mediaoptions.css
@@ -1,92 +1,18 @@
-/* --- popup --- */
-#media__popup {
- background-color:__background__;
- display:none;
- border: 1px solid __border__;
- position: absolute;
- width:280px;
+#media__popup_content p {
+ margin: 0 0 .5em;
}
-#media__popup h1 {
- text-align:center;
- font-weight:normal;
- background-color: __background_alt__;
- height: 16px;
- margin-bottom: 5px;
- font-size:12px;
- border-bottom: 0;
+#media__popup_content label {
+ float: left;
+ width: 9em;
}
-#media__popup p {
- display:block;
- line-height:14pt;
- margin:0.5em;
+#media__popup_content .button {
+ margin-right: 1px;
+ cursor: pointer;
}
-#media_nolink {
- padding:4px 0;
-}
-
-#media__popup label {
- float:left;
- width:9em;
-}
-
-#media__popup .button {
- margin-left:auto;
- margin-right:auto;
-}
-
-#media__popup .btnlbl {
- text-align:center;
-}
-
-#media__popup .btnlbl input {
- margin:0 1em;
-}
-
-#media__closeimg {
- float:right;
-}
-
-/* --- display options --- */
-
-#media__linkopts label,
-#media__nolnk {
- width: 80px;
- float: left;
- margin-left: 10px;
-}
-
-#media__linkopts label{
- line-height: 20px;
-}
-
-#media__nolnk,
-#media__linkopts label.long{
- margin-bottom: 8px;
- line-height: 12px;
-}
-
-#media__linkopts label.long{
- width: 150px;
- float: none;
-}
-
-#media__linkopts br {
- clear: both;
-}
-
-#media__linkopts select {
- width: 60px;
- margin-left: 10px;
-}
-
-#media__linkopts input.edit {
- width:50px;
- margin-left:10px;
-}
-#media__linkopts #media__title {
- width:150px;
+#media__popup_content input.button {
+ margin-left: 9em;
}
diff --git a/lib/tpl/default/_tabs.css b/lib/tpl/default/_tabs.css
new file mode 100644
index 000000000..8bfb676a0
--- /dev/null
+++ b/lib/tpl/default/_tabs.css
@@ -0,0 +1,37 @@
+
+.dokuwiki ul.tabs {
+ padding: 0;
+ margin: 0;
+ overflow: hidden;
+}
+.dokuwiki ul.tabs li {
+ float: left;
+ padding: 0;
+ margin: 0;
+ list-style: none;
+}
+
+.dokuwiki ul.tabs li strong,
+.dokuwiki ul.tabs li a {
+ float: left;
+ padding: .3em .8em;
+ margin: 0 .3em 0 0;
+ background-color: __background_neu__;
+ color: __text__;
+ border-radius: .5em .5em 0 0;
+}
+.dokuwiki ul.tabs li strong {
+ font-weight: normal;
+}
+
+.dokuwiki ul.tabs li a:link,
+.dokuwiki ul.tabs li a:visited {
+}
+.dokuwiki ul.tabs li a:hover,
+.dokuwiki ul.tabs li a:active,
+.dokuwiki ul.tabs li a:focus,
+.dokuwiki ul.tabs li strong {
+ background-color: __background_alt__;
+ color: __text__;
+ text-decoration: none;
+}
diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css
index 1fdf2bfac..a94f814aa 100644
--- a/lib/tpl/default/design.css
+++ b/lib/tpl/default/design.css
@@ -246,6 +246,12 @@ div.dokuwiki div.pagenav-next {
width: 49%
}
+/* ----------- type of recent changes select -------- */
+
+div.dokuwiki form#dw__recent select {
+ margin-bottom: 10px;
+}
+
/* --------------- Links ------------------ */
div.dokuwiki a:link,
diff --git a/lib/tpl/default/detail.php b/lib/tpl/default/detail.php
index 4f42b116e..503c0ef71 100644
--- a/lib/tpl/default/detail.php
+++ b/lib/tpl/default/detail.php
@@ -49,33 +49,33 @@ if (!defined('DOKU_INC')) die();
</p>
<p>&larr; <?php echo $lang['img_backto']?> <?php tpl_pagelink($ID)?></p>
+ <?php
+ $imgNS = getNS($IMG);
+ $authNS = auth_quickaclcheck("$imgNS:*");
+ if ($authNS >= AUTH_UPLOAD) {
+ echo '<p><a href="'.media_managerURL(array('ns' => $imgNS, 'image' => $IMG)).'">'.$lang['img_manager'].'</a></p>';
+ }
+ ?>
<dl class="img_tags">
<?php
- $t = tpl_img_getTag('Date.EarliestTime');
- if($t) print '<dt>'.$lang['img_date'].':</dt><dd>'.dformat($t).'</dd>';
-
- $t = tpl_img_getTag('File.Name');
- if($t) print '<dt>'.$lang['img_fname'].':</dt><dd>'.hsc($t).'</dd>';
-
- $t = tpl_img_getTag(array('Iptc.Byline','Exif.TIFFArtist','Exif.Artist','Iptc.Credit'));
- if($t) print '<dt>'.$lang['img_artist'].':</dt><dd>'.hsc($t).'</dd>';
-
- $t = tpl_img_getTag(array('Iptc.CopyrightNotice','Exif.TIFFCopyright','Exif.Copyright'));
- if($t) print '<dt>'.$lang['img_copyr'].':</dt><dd>'.hsc($t).'</dd>';
-
- $t = tpl_img_getTag('File.Format');
- if($t) print '<dt>'.$lang['img_format'].':</dt><dd>'.hsc($t).'</dd>';
-
- $t = tpl_img_getTag('File.NiceSize');
- if($t) print '<dt>'.$lang['img_fsize'].':</dt><dd>'.hsc($t).'</dd>';
-
- $t = tpl_img_getTag('Simple.Camera');
- if($t) print '<dt>'.$lang['img_camera'].':</dt><dd>'.hsc($t).'</dd>';
-
- $t = tpl_img_getTag(array('IPTC.Keywords','IPTC.Category','xmp.dc:subject'));
- if($t) print '<dt>'.$lang['img_keywords'].':</dt><dd>'.hsc($t).'</dd>';
-
+ $config_files = getConfigFiles('mediameta');
+ foreach ($config_files as $config_file) {
+ if(@file_exists($config_file)) include($config_file);
+ }
+
+ foreach($fields as $key => $tag){
+ $t = array();
+ if (!empty($tag[0])) $t = array($tag[0]);
+ if(is_array($tag[3])) $t = array_merge($t,$tag[3]);
+ $value = tpl_img_getTag($t);
+ if ($value) {
+ echo '<dt>'.$lang[$tag[1]].':</dt><dd>';
+ if ($tag[2] == 'date') echo dformat($value);
+ else echo hsc($value);
+ echo '</dd>';
+ }
+ }
?>
</dl>
<?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
diff --git a/lib/tpl/default/images/UWEB.png b/lib/tpl/default/images/UWEB.png
index bded2c76f..292ade4ed 100644
--- a/lib/tpl/default/images/UWEB.png
+++ b/lib/tpl/default/images/UWEB.png
Binary files differ
diff --git a/lib/tpl/default/images/apple-touch-icon.png b/lib/tpl/default/images/apple-touch-icon.png
new file mode 100644
index 000000000..45fa4e7b0
--- /dev/null
+++ b/lib/tpl/default/images/apple-touch-icon.png
Binary files differ
diff --git a/lib/tpl/default/images/button-cc.gif b/lib/tpl/default/images/button-cc.gif
index 5861d637f..c7a403a9e 100644
--- a/lib/tpl/default/images/button-cc.gif
+++ b/lib/tpl/default/images/button-cc.gif
Binary files differ
diff --git a/lib/tpl/default/images/button-rss.png b/lib/tpl/default/images/button-rss.png
index 0a55642ef..f2438043f 100644
--- a/lib/tpl/default/images/button-rss.png
+++ b/lib/tpl/default/images/button-rss.png
Binary files differ
diff --git a/lib/tpl/default/images/link_icon.gif b/lib/tpl/default/images/link_icon.gif
index 815ccb1b1..d0a92f2fa 100644
--- a/lib/tpl/default/images/link_icon.gif
+++ b/lib/tpl/default/images/link_icon.gif
Binary files differ
diff --git a/lib/tpl/default/images/mail_icon.gif b/lib/tpl/default/images/mail_icon.gif
index 50a87a9a0..437d28fe1 100644
--- a/lib/tpl/default/images/mail_icon.gif
+++ b/lib/tpl/default/images/mail_icon.gif
Binary files differ
diff --git a/lib/tpl/default/images/resizecol.png b/lib/tpl/default/images/resizecol.png
new file mode 100644
index 000000000..f0111507c
--- /dev/null
+++ b/lib/tpl/default/images/resizecol.png
Binary files differ
diff --git a/lib/tpl/default/images/tocdot2.gif b/lib/tpl/default/images/tocdot2.gif
index 3d39c2e73..e2b5f15cb 100644
--- a/lib/tpl/default/images/tocdot2.gif
+++ b/lib/tpl/default/images/tocdot2.gif
Binary files differ
diff --git a/lib/tpl/default/images/windows.gif b/lib/tpl/default/images/windows.gif
index 4f12acce1..64dfeb6fb 100644
--- a/lib/tpl/default/images/windows.gif
+++ b/lib/tpl/default/images/windows.gif
Binary files differ
diff --git a/lib/tpl/default/main.php b/lib/tpl/default/main.php
index 94c2322aa..3e85c58f2 100644
--- a/lib/tpl/default/main.php
+++ b/lib/tpl/default/main.php
@@ -28,8 +28,7 @@ if (!defined('DOKU_INC')) die();
</title>
<?php tpl_metaheaders()?>
-
- <link rel="shortcut icon" href="<?php echo tpl_getFavicon() ?>" />
+ <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
<?php /*old includehook*/ @include(dirname(__FILE__).'/meta.html')?>
</head>
@@ -117,6 +116,7 @@ if (!defined('DOKU_INC')) die();
</div>
<div class="bar-right" id="bar__bottomright">
<?php tpl_button('subscribe')?>
+ <?php tpl_button('media')?>
<?php tpl_button('admin')?>
<?php tpl_button('profile')?>
<?php tpl_button('login')?>
diff --git a/lib/tpl/default/media.css b/lib/tpl/default/media.css
index d412fd9cf..37369fe2f 100644
--- a/lib/tpl/default/media.css
+++ b/lib/tpl/default/media.css
@@ -32,6 +32,10 @@
margin-bottom: 0.5em;
}
+#media__manager a.select {
+ cursor: pointer;
+}
+
/* --- Tree formatting --- */
#media__tree img {
@@ -141,12 +145,16 @@ it's dirty, so any "real" fixes are welcome */
padding: 0 0.5em 0.5em 0.5em;
}
-#media__content form#dw__upload,
-#media__content div#dw__flashupload {
+#media__content #mediamanager__uploader {
display: block;
border-bottom: solid 1px __border__;
padding: 0 0.5em 1em 0.5em;
}
+
+#media__content form#dw__upload {
+ border-bottom: 0;
+}
+
#media__content form#dw__upload fieldset {
padding: 0;
margin: 0;
diff --git a/lib/tpl/default/style.ini b/lib/tpl/default/style.ini
index c5b2c31a5..7d27381c9 100644
--- a/lib/tpl/default/style.ini
+++ b/lib/tpl/default/style.ini
@@ -15,6 +15,9 @@ _mediaoptions.css = screen
_admin.css = screen
_linkwiz.css = screen
_subscription.css = screen
+_mediamanager.css = screen
+_tabs.css = screen
+_fileuploader.css = screen
rtl.css = rtl
print.css = print
diff --git a/lib/tpl/index.php b/lib/tpl/index.php
index 20abea20c..0273e5678 100644
--- a/lib/tpl/index.php
+++ b/lib/tpl/index.php
@@ -9,7 +9,7 @@
* @author Anika Henke <anika@selfthinker.org>
*/
if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../');
-if(!define('NOSESSION')) define('NOSESSION',1);
+if(!defined('NOSESSION')) define('NOSESSION',1);
require_once(DOKU_INC.'inc/init.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"