summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerry Weißbach <gerry.w@gammaproduction.de>2014-07-16 08:02:34 +0200
committerGerry Weißbach <gerry.w@gammaproduction.de>2014-07-16 08:02:34 +0200
commit0bd5b90b4c1294b3c9abc1977060f971dc2e2744 (patch)
treeac79a7402ffef718685f16dbba6692a0c9b5f458
parent1858e4d7685782550789fd8c228e55ae319bc37a (diff)
parent80679bafa1a5ed611bafc603afd0ae7b2b5954a7 (diff)
downloadrpg-0bd5b90b4c1294b3c9abc1977060f971dc2e2744.tar.gz
rpg-0bd5b90b4c1294b3c9abc1977060f971dc2e2744.tar.bz2
Merge remote-tracking branch 'splitbrain/master'
-rw-r--r--.editorconfig15
-rw-r--r--.gitattributes8
-rw-r--r--.gitignore10
-rw-r--r--.travis.yml2
-rw-r--r--_test/README56
-rw-r--r--_test/core/DokuWikiTest.php3
-rw-r--r--_test/core/TestRequest.php9
-rw-r--r--_test/phpunit.xml5
-rw-r--r--_test/tests/inc/PassHash.test.php2
-rw-r--r--_test/tests/inc/auth_password.test.php2
-rw-r--r--_test/tests/inc/cache_use.test.php83
-rw-r--r--_test/tests/inc/changelog_getRevisionsAround.test.php188
-rw-r--r--_test/tests/inc/changelog_getrelativerevision.test.php418
-rw-r--r--_test/tests/inc/changelog_getrevisioninfo.test.php56
-rw-r--r--_test/tests/inc/changelog_getrevisions.test.php114
-rw-r--r--_test/tests/inc/cli_options.test.php56
-rw-r--r--_test/tests/inc/common_pageinfo.test.php8
-rw-r--r--_test/tests/inc/common_stripsourcemaps.test.php29
-rw-r--r--_test/tests/inc/httpclient_http.test.php153
-rw-r--r--_test/tests/inc/httpclient_http_proxy.test.php5
-rw-r--r--_test/tests/inc/httpclient_https_proxy.test.php15
-rw-r--r--_test/tests/inc/httpclient_mock.php46
-rw-r--r--_test/tests/inc/input.test.php19
-rw-r--r--_test/tests/inc/io_rmdir.test.php2
-rw-r--r--_test/tests/inc/mailer.test.php5
-rw-r--r--_test/tests/inc/parser/parser.inc.php2
-rw-r--r--_test/tests/inc/parser/parser_quotes.test.php131
-rw-r--r--_test/tests/inc/parser/parser_table.test.php299
-rw-r--r--_test/tests/inc/parser/renderer_resolveinterwiki.test.php53
-rw-r--r--_test/tests/inc/parserutils_get_renderer.test.php79
-rw-r--r--_test/tests/inc/tar.test.php50
-rw-r--r--_test/tests/inc/utf8_romanize.test.php2
-rw-r--r--_test/tests/inc/utf8_strtolower.test.php23
-rw-r--r--_test/tests/lib/exe/css_css_compress.test.php54
-rw-r--r--_test/tests/test/basic.test.php16
-rwxr-xr-xbin/dwpage.php597
-rwxr-xr-xbin/gittool.php334
-rwxr-xr-xbin/indexer.php175
-rwxr-xr-xbin/render.php94
-rwxr-xr-xbin/striplangs.php214
-rwxr-xr-xbin/wantedpages.php223
-rw-r--r--conf/interwiki.conf3
-rw-r--r--conf/mediameta.php2
-rw-r--r--data/deleted.files158
-rw-r--r--data/pages/wiki/dokuwiki.txt6
-rw-r--r--data/pages/wiki/syntax.txt29
-rw-r--r--doku.php2
-rw-r--r--feed.php50
-rw-r--r--inc/EmailAddressValidator.php20
-rw-r--r--inc/HTTPClient.php57
-rw-r--r--inc/Input.class.php38
-rw-r--r--inc/JpegMeta.php3
-rw-r--r--inc/Mailer.class.php29
-rw-r--r--inc/RemoteAPICore.php11
-rw-r--r--inc/Sitemapper.php4
-rw-r--r--inc/TarLib.class.php2
-rw-r--r--inc/actions.php31
-rw-r--r--inc/auth.php78
-rw-r--r--inc/cache.php127
-rw-r--r--inc/changelog.php866
-rw-r--r--inc/cli.php647
-rw-r--r--inc/cliopts.php24
-rw-r--r--inc/common.php458
-rw-r--r--inc/confutils.php3
-rw-r--r--inc/events.php99
-rw-r--r--inc/feedcreator.class.php99
-rw-r--r--inc/fetch.functions.php2
-rw-r--r--inc/form.php50
-rw-r--r--inc/fulltext.php30
-rw-r--r--inc/html.php503
-rw-r--r--inc/httputils.php16
-rw-r--r--inc/indexer.php32
-rw-r--r--inc/infoutils.php59
-rw-r--r--inc/init.php38
-rw-r--r--inc/io.php2
-rw-r--r--inc/lang/af/lang.php10
-rw-r--r--inc/lang/ar/denied.txt2
-rw-r--r--inc/lang/ar/lang.php44
-rw-r--r--inc/lang/az/denied.txt2
-rw-r--r--inc/lang/az/lang.php36
-rw-r--r--inc/lang/bg/denied.txt2
-rw-r--r--inc/lang/bg/lang.php74
-rw-r--r--inc/lang/bg/register.txt2
-rw-r--r--inc/lang/bg/resendpwd.txt2
-rw-r--r--inc/lang/bn/denied.txt2
-rw-r--r--inc/lang/bn/lang.php51
-rw-r--r--inc/lang/ca-valencia/denied.txt2
-rw-r--r--inc/lang/ca-valencia/lang.php38
-rw-r--r--inc/lang/ca/denied.txt2
-rw-r--r--inc/lang/ca/lang.php38
-rw-r--r--inc/lang/cs/denied.txt2
-rw-r--r--inc/lang/cs/lang.php42
-rw-r--r--inc/lang/da/denied.txt2
-rw-r--r--inc/lang/da/lang.php44
-rw-r--r--inc/lang/de-informal/denied.txt2
-rw-r--r--inc/lang/de-informal/lang.php44
-rw-r--r--inc/lang/de/denied.txt2
-rw-r--r--inc/lang/de/lang.php51
-rw-r--r--inc/lang/el/denied.txt1
-rw-r--r--inc/lang/el/lang.php44
-rw-r--r--inc/lang/en/denied.txt2
-rw-r--r--inc/lang/en/lang.php50
-rw-r--r--inc/lang/eo/admin.txt2
-rw-r--r--inc/lang/eo/adminplugins.txt2
-rw-r--r--inc/lang/eo/denied.txt2
-rw-r--r--inc/lang/eo/diff.txt2
-rw-r--r--inc/lang/eo/draft.txt2
-rw-r--r--inc/lang/eo/edit.txt2
-rw-r--r--inc/lang/eo/editrev.txt2
-rw-r--r--inc/lang/eo/lang.php58
-rw-r--r--inc/lang/es/denied.txt3
-rw-r--r--inc/lang/es/edit.txt2
-rw-r--r--inc/lang/es/jquery.ui.datepicker.js4
-rw-r--r--inc/lang/es/lang.php77
-rw-r--r--inc/lang/es/uploadmail.txt3
-rw-r--r--inc/lang/et/adminplugins.txt1
-rw-r--r--inc/lang/et/denied.txt3
-rw-r--r--inc/lang/et/index.txt2
-rw-r--r--inc/lang/et/lang.php153
-rw-r--r--inc/lang/et/resetpwd.txt3
-rw-r--r--inc/lang/et/subscr_digest.txt21
-rw-r--r--inc/lang/et/subscr_form.txt3
-rw-r--r--inc/lang/et/subscr_list.txt19
-rw-r--r--inc/lang/et/subscr_single.txt23
-rw-r--r--inc/lang/et/uploadmail.txt16
-rw-r--r--inc/lang/eu/denied.txt3
-rw-r--r--inc/lang/eu/lang.php40
-rw-r--r--inc/lang/fa/denied.txt3
-rw-r--r--inc/lang/fa/lang.php42
-rw-r--r--inc/lang/fi/denied.txt3
-rw-r--r--inc/lang/fi/lang.php44
-rw-r--r--inc/lang/fo/denied.txt3
-rw-r--r--inc/lang/fo/lang.php38
-rw-r--r--inc/lang/fr/denied.txt3
-rw-r--r--inc/lang/fr/lang.php80
-rw-r--r--inc/lang/fr/subscr_form.txt4
-rw-r--r--inc/lang/gl/denied.txt2
-rw-r--r--inc/lang/gl/lang.php44
-rw-r--r--inc/lang/he/denied.txt3
-rw-r--r--inc/lang/he/lang.php46
-rw-r--r--inc/lang/hi/lang.php28
-rw-r--r--inc/lang/hr/adminplugins.txt1
-rw-r--r--inc/lang/hr/denied.txt1
-rw-r--r--inc/lang/hr/draft.txt4
-rw-r--r--inc/lang/hr/lang.php119
-rw-r--r--inc/lang/hr/pwconfirm.txt13
-rw-r--r--inc/lang/hr/registermail.txt14
-rw-r--r--inc/lang/hr/resetpwd.txt3
-rw-r--r--inc/lang/hr/subscr_digest.txt19
-rw-r--r--inc/lang/hr/subscr_form.txt3
-rw-r--r--inc/lang/hr/subscr_list.txt15
-rw-r--r--inc/lang/hr/subscr_single.txt22
-rw-r--r--inc/lang/hr/uploadmail.txt15
-rw-r--r--inc/lang/hu-formal/admin.txt3
-rw-r--r--inc/lang/hu-formal/adminplugins.txt1
-rw-r--r--inc/lang/hu-formal/backlinks.txt3
-rw-r--r--inc/lang/hu-formal/conflict.txt5
-rw-r--r--inc/lang/hu-formal/denied.txt4
-rw-r--r--inc/lang/hu-formal/diff.txt3
-rw-r--r--inc/lang/hu-formal/draft.txt5
-rw-r--r--inc/lang/hu-formal/edit.txt1
-rw-r--r--inc/lang/hu-formal/editrev.txt2
-rw-r--r--inc/lang/hu-formal/index.txt3
-rw-r--r--inc/lang/hu-formal/lang.php27
-rw-r--r--inc/lang/hu/denied.txt2
-rw-r--r--inc/lang/hu/lang.php48
-rw-r--r--inc/lang/ia/denied.txt3
-rw-r--r--inc/lang/ia/lang.php38
-rw-r--r--inc/lang/id-ni/lang.php4
-rw-r--r--inc/lang/id/denied.txt2
-rw-r--r--inc/lang/id/lang.php146
-rw-r--r--inc/lang/id/resetpwd.txt3
-rw-r--r--inc/lang/id/subscr_digest.txt17
-rw-r--r--inc/lang/is/lang.php38
-rw-r--r--inc/lang/it/denied.txt3
-rw-r--r--inc/lang/it/lang.php52
-rw-r--r--inc/lang/ja/denied.txt2
-rw-r--r--inc/lang/ja/lang.php51
-rw-r--r--inc/lang/ka/admin.txt4
-rw-r--r--inc/lang/ka/adminplugins.txt1
-rw-r--r--inc/lang/ka/backlinks.txt4
-rw-r--r--inc/lang/ka/conflict.txt5
-rw-r--r--inc/lang/ka/denied.txt3
-rw-r--r--inc/lang/ka/diff.txt3
-rw-r--r--inc/lang/ka/draft.txt3
-rw-r--r--inc/lang/ka/edit.txt2
-rw-r--r--inc/lang/ka/editrev.txt2
-rw-r--r--inc/lang/ka/index.txt1
-rw-r--r--inc/lang/ka/lang.php326
-rw-r--r--inc/lang/kk/lang.php16
-rw-r--r--inc/lang/km/denied.txt1
-rw-r--r--inc/lang/km/lang.php38
-rw-r--r--inc/lang/ko/denied.txt3
-rw-r--r--inc/lang/ko/lang.php87
-rw-r--r--inc/lang/ko/searchpage.txt2
-rw-r--r--inc/lang/ko/subscr_digest.txt2
-rw-r--r--inc/lang/ko/updateprofile.txt2
-rw-r--r--inc/lang/ku/denied.txt2
-rw-r--r--inc/lang/ku/lang.php28
-rw-r--r--inc/lang/la/denied.txt3
-rw-r--r--inc/lang/la/lang.php26
-rw-r--r--inc/lang/lb/denied.txt3
-rw-r--r--inc/lang/lb/lang.php38
-rw-r--r--inc/lang/lt/denied.txt2
-rw-r--r--inc/lang/lt/lang.php38
-rw-r--r--inc/lang/lv/denied.txt4
-rw-r--r--inc/lang/lv/lang.php66
-rw-r--r--inc/lang/mg/denied.txt2
-rw-r--r--inc/lang/mg/lang.php10
-rw-r--r--inc/lang/mk/lang.php38
-rw-r--r--inc/lang/mr/denied.txt3
-rw-r--r--inc/lang/mr/lang.php40
-rw-r--r--inc/lang/ms/lang.php8
-rw-r--r--inc/lang/ne/denied.txt3
-rw-r--r--inc/lang/ne/lang.php36
-rw-r--r--inc/lang/nl/denied.txt3
-rw-r--r--inc/lang/nl/lang.php57
-rw-r--r--inc/lang/no/denied.txt3
-rw-r--r--inc/lang/no/lang.php51
-rw-r--r--inc/lang/no/resetpwd.txt3
-rw-r--r--inc/lang/pl/denied.txt2
-rw-r--r--inc/lang/pl/lang.php48
-rw-r--r--inc/lang/pt-br/denied.txt3
-rw-r--r--inc/lang/pt-br/lang.php49
-rw-r--r--inc/lang/pt/denied.txt3
-rw-r--r--inc/lang/pt/lang.php63
-rw-r--r--inc/lang/ro/denied.txt4
-rw-r--r--inc/lang/ro/lang.php44
-rw-r--r--inc/lang/ru/admin.txt2
-rw-r--r--inc/lang/ru/denied.txt3
-rw-r--r--inc/lang/ru/lang.php82
-rw-r--r--inc/lang/ru/mailtext.txt2
-rw-r--r--inc/lang/ru/norev.txt1
-rw-r--r--inc/lang/ru/password.txt2
-rw-r--r--inc/lang/ru/pwconfirm.txt2
-rw-r--r--inc/lang/ru/registermail.txt2
-rw-r--r--inc/lang/ru/subscr_digest.txt4
-rw-r--r--inc/lang/ru/subscr_list.txt4
-rw-r--r--inc/lang/ru/subscr_single.txt4
-rw-r--r--inc/lang/ru/uploadmail.txt2
-rw-r--r--inc/lang/sk/denied.txt3
-rw-r--r--inc/lang/sk/lang.php40
-rw-r--r--inc/lang/sl/denied.txt3
-rw-r--r--inc/lang/sl/lang.php51
-rw-r--r--inc/lang/sq/denied.txt3
-rw-r--r--inc/lang/sq/lang.php38
-rw-r--r--inc/lang/sr/denied.txt2
-rw-r--r--inc/lang/sr/lang.php38
-rw-r--r--inc/lang/sv/denied.txt2
-rw-r--r--inc/lang/sv/lang.php47
-rw-r--r--inc/lang/ta/denied.txt1
-rw-r--r--inc/lang/th/denied.txt3
-rw-r--r--inc/lang/th/lang.php75
-rw-r--r--inc/lang/tr/denied.txt2
-rw-r--r--inc/lang/tr/lang.php64
-rw-r--r--inc/lang/tr/subscr_form.txt3
-rw-r--r--inc/lang/uk/denied.txt2
-rw-r--r--inc/lang/uk/lang.php38
-rw-r--r--inc/lang/vi/denied.txt3
-rw-r--r--inc/lang/vi/lang.php44
-rw-r--r--inc/lang/zh-tw/denied.txt2
-rw-r--r--inc/lang/zh-tw/lang.php44
-rw-r--r--inc/lang/zh/denied.txt3
-rw-r--r--inc/lang/zh/lang.php52
-rw-r--r--inc/load.php10
-rw-r--r--inc/mail.php9
-rw-r--r--inc/media.php74
-rw-r--r--inc/pageutils.php100
-rw-r--r--inc/parser/code.php13
-rw-r--r--inc/parser/handler.php73
-rw-r--r--inc/parser/metadata.php577
-rw-r--r--inc/parser/parser.php5
-rw-r--r--inc/parser/renderer.php795
-rw-r--r--inc/parser/xhtml.php1095
-rw-r--r--inc/parser/xhtmlsummary.php1
-rw-r--r--inc/parserutils.php56
-rw-r--r--inc/plugin.php22
-rw-r--r--inc/pluginutils.php2
-rw-r--r--inc/remote.php5
-rw-r--r--inc/search.php65
-rw-r--r--inc/subscription.php37
-rw-r--r--inc/template.php188
-rw-r--r--inc/toolbar.php4
-rw-r--r--install.php17
-rw-r--r--lib/exe/ajax.php60
-rw-r--r--lib/exe/css.php62
-rw-r--r--lib/exe/fetch.php2
-rw-r--r--lib/exe/js.php14
-rw-r--r--lib/exe/mediamanager.php4
-rw-r--r--lib/images/fileicons/32x32/7z.pngbin0 -> 992 bytes
-rw-r--r--lib/images/fileicons/32x32/asm.pngbin0 -> 989 bytes
-rw-r--r--lib/images/fileicons/32x32/bash.pngbin0 -> 993 bytes
-rw-r--r--lib/images/fileicons/32x32/bz2.pngbin0 -> 1001 bytes
-rw-r--r--lib/images/fileicons/32x32/c.pngbin0 -> 945 bytes
-rw-r--r--lib/images/fileicons/32x32/cc.pngbin0 -> 955 bytes
-rw-r--r--lib/images/fileicons/32x32/conf.pngbin0 -> 832 bytes
-rw-r--r--lib/images/fileicons/32x32/cpp.pngbin0 -> 960 bytes
-rw-r--r--lib/images/fileicons/32x32/cs.pngbin0 -> 960 bytes
-rw-r--r--lib/images/fileicons/32x32/csh.pngbin0 -> 981 bytes
-rw-r--r--lib/images/fileicons/32x32/css.pngbin0 -> 969 bytes
-rw-r--r--lib/images/fileicons/32x32/csv.pngbin0 -> 819 bytes
-rw-r--r--lib/images/fileicons/32x32/deb.pngbin0 -> 991 bytes
-rw-r--r--lib/images/fileicons/32x32/diff.pngbin0 -> 975 bytes
-rw-r--r--lib/images/fileicons/32x32/doc.pngbin0 -> 1034 bytes
-rw-r--r--lib/images/fileicons/32x32/docx.pngbin0 -> 1078 bytes
-rw-r--r--lib/images/fileicons/32x32/file.pngbin0 -> 605 bytes
-rw-r--r--lib/images/fileicons/32x32/gif.pngbin0 -> 944 bytes
-rw-r--r--lib/images/fileicons/32x32/gz.pngbin0 -> 994 bytes
-rw-r--r--lib/images/fileicons/32x32/h.pngbin0 -> 941 bytes
-rw-r--r--lib/images/fileicons/32x32/hpp.pngbin0 -> 974 bytes
-rw-r--r--lib/images/fileicons/32x32/htm.pngbin0 -> 983 bytes
-rw-r--r--lib/images/fileicons/32x32/html.pngbin0 -> 983 bytes
-rw-r--r--lib/images/fileicons/32x32/ico.pngbin0 -> 941 bytes
-rw-r--r--lib/images/fileicons/32x32/java.pngbin0 -> 992 bytes
-rw-r--r--lib/images/fileicons/32x32/jpeg.pngbin0 -> 948 bytes
-rw-r--r--lib/images/fileicons/32x32/jpg.pngbin0 -> 948 bytes
-rw-r--r--lib/images/fileicons/32x32/js.pngbin0 -> 960 bytes
-rw-r--r--lib/images/fileicons/32x32/json.pngbin0 -> 996 bytes
-rw-r--r--lib/images/fileicons/32x32/lua.pngbin0 -> 979 bytes
-rw-r--r--lib/images/fileicons/32x32/mp3.pngbin0 -> 947 bytes
-rw-r--r--lib/images/fileicons/32x32/mp4.pngbin0 -> 1197 bytes
-rw-r--r--lib/images/fileicons/32x32/odc.pngbin0 -> 1061 bytes
-rw-r--r--lib/images/fileicons/32x32/odf.pngbin0 -> 1059 bytes
-rw-r--r--lib/images/fileicons/32x32/odg.pngbin0 -> 1066 bytes
-rw-r--r--lib/images/fileicons/32x32/odi.pngbin0 -> 1058 bytes
-rw-r--r--lib/images/fileicons/32x32/odp.pngbin0 -> 1060 bytes
-rw-r--r--lib/images/fileicons/32x32/ods.pngbin0 -> 1063 bytes
-rw-r--r--lib/images/fileicons/32x32/odt.pngbin0 -> 1060 bytes
-rw-r--r--lib/images/fileicons/32x32/ogg.pngbin0 -> 950 bytes
-rw-r--r--lib/images/fileicons/32x32/ogv.pngbin0 -> 1187 bytes
-rw-r--r--lib/images/fileicons/32x32/pas.pngbin0 -> 976 bytes
-rw-r--r--lib/images/fileicons/32x32/pdf.pngbin0 -> 1076 bytes
-rw-r--r--lib/images/fileicons/32x32/php.pngbin0 -> 974 bytes
-rw-r--r--lib/images/fileicons/32x32/pl.pngbin0 -> 951 bytes
-rw-r--r--lib/images/fileicons/32x32/png.pngbin0 -> 957 bytes
-rw-r--r--lib/images/fileicons/32x32/ppt.pngbin0 -> 871 bytes
-rw-r--r--lib/images/fileicons/32x32/pptx.pngbin0 -> 924 bytes
-rw-r--r--lib/images/fileicons/32x32/ps.pngbin0 -> 1086 bytes
-rw-r--r--lib/images/fileicons/32x32/py.pngbin0 -> 966 bytes
-rw-r--r--lib/images/fileicons/32x32/rar.pngbin0 -> 1000 bytes
-rw-r--r--lib/images/fileicons/32x32/rb.pngbin0 -> 953 bytes
-rw-r--r--lib/images/fileicons/32x32/rpm.pngbin0 -> 1001 bytes
-rw-r--r--lib/images/fileicons/32x32/rtf.pngbin0 -> 867 bytes
-rw-r--r--lib/images/fileicons/32x32/sh.pngbin0 -> 962 bytes
-rw-r--r--lib/images/fileicons/32x32/sql.pngbin0 -> 827 bytes
-rw-r--r--lib/images/fileicons/32x32/swf.pngbin0 -> 1268 bytes
-rw-r--r--lib/images/fileicons/32x32/sxc.pngbin0 -> 1078 bytes
-rw-r--r--lib/images/fileicons/32x32/sxd.pngbin0 -> 1079 bytes
-rw-r--r--lib/images/fileicons/32x32/sxi.pngbin0 -> 1067 bytes
-rw-r--r--lib/images/fileicons/32x32/sxw.pngbin0 -> 1086 bytes
-rw-r--r--lib/images/fileicons/32x32/tar.pngbin0 -> 987 bytes
-rw-r--r--lib/images/fileicons/32x32/tgz.pngbin0 -> 999 bytes
-rw-r--r--lib/images/fileicons/32x32/txt.pngbin0 -> 836 bytes
-rw-r--r--lib/images/fileicons/32x32/wav.pngbin0 -> 944 bytes
-rw-r--r--lib/images/fileicons/32x32/webm.pngbin0 -> 1232 bytes
-rw-r--r--lib/images/fileicons/32x32/xls.pngbin0 -> 1137 bytes
-rw-r--r--lib/images/fileicons/32x32/xlsx.pngbin0 -> 1182 bytes
-rw-r--r--lib/images/fileicons/32x32/xml.pngbin0 -> 615 bytes
-rw-r--r--lib/images/fileicons/32x32/zip.pngbin0 -> 987 bytes
-rw-r--r--lib/images/fileicons/7z.pngbin651 -> 415 bytes
-rw-r--r--lib/images/fileicons/README2
-rw-r--r--lib/images/fileicons/asm.pngbin0 -> 427 bytes
-rw-r--r--lib/images/fileicons/audio.pngbin727 -> 0 bytes
-rw-r--r--lib/images/fileicons/bash.pngbin0 -> 433 bytes
-rw-r--r--lib/images/fileicons/bz2.pngbin641 -> 419 bytes
-rw-r--r--lib/images/fileicons/c.pngbin759 -> 412 bytes
-rw-r--r--lib/images/fileicons/cc.pngbin0 -> 411 bytes
-rw-r--r--lib/images/fileicons/conf.pngbin664 -> 402 bytes
-rw-r--r--lib/images/fileicons/cpp.pngbin822 -> 430 bytes
-rw-r--r--lib/images/fileicons/cs.pngbin771 -> 419 bytes
-rw-r--r--lib/images/fileicons/csh.pngbin0 -> 427 bytes
-rw-r--r--lib/images/fileicons/css.pngbin843 -> 427 bytes
-rw-r--r--lib/images/fileicons/csv.pngbin400 -> 409 bytes
-rw-r--r--lib/images/fileicons/deb.pngbin646 -> 421 bytes
-rw-r--r--lib/images/fileicons/diff.pngbin0 -> 425 bytes
-rw-r--r--lib/images/fileicons/doc.pngbin583 -> 410 bytes
-rw-r--r--lib/images/fileicons/docx.pngbin583 -> 415 bytes
-rw-r--r--lib/images/fileicons/file.pngbin581 -> 319 bytes
-rw-r--r--lib/images/fileicons/gif.pngbin907 -> 407 bytes
-rw-r--r--lib/images/fileicons/gz.pngbin643 -> 417 bytes
-rw-r--r--lib/images/fileicons/h.pngbin0 -> 411 bytes
-rw-r--r--lib/images/fileicons/hpp.pngbin0 -> 417 bytes
-rw-r--r--lib/images/fileicons/htm.pngbin695 -> 417 bytes
-rw-r--r--lib/images/fileicons/html.pngbin695 -> 417 bytes
-rw-r--r--lib/images/fileicons/ico.pngbin907 -> 405 bytes
-rw-r--r--lib/images/fileicons/index.php19
-rw-r--r--lib/images/fileicons/java.pngbin739 -> 420 bytes
-rw-r--r--lib/images/fileicons/jpeg.pngbin907 -> 412 bytes
-rw-r--r--lib/images/fileicons/jpg.pngbin907 -> 412 bytes
-rw-r--r--lib/images/fileicons/js.pngbin809 -> 420 bytes
-rw-r--r--lib/images/fileicons/json.pngbin0 -> 435 bytes
-rw-r--r--lib/images/fileicons/lua.pngbin440 -> 418 bytes
-rw-r--r--lib/images/fileicons/mp3.pngbin831 -> 415 bytes
-rw-r--r--lib/images/fileicons/mp4.pngbin740 -> 419 bytes
-rw-r--r--lib/images/fileicons/odc.pngbin682 -> 407 bytes
-rw-r--r--lib/images/fileicons/odf.pngbin746 -> 411 bytes
-rw-r--r--lib/images/fileicons/odg.pngbin735 -> 411 bytes
-rw-r--r--lib/images/fileicons/odi.pngbin735 -> 398 bytes
-rw-r--r--lib/images/fileicons/odp.pngbin687 -> 404 bytes
-rw-r--r--lib/images/fileicons/ods.pngbin682 -> 416 bytes
-rw-r--r--lib/images/fileicons/odt.pngbin522 -> 403 bytes
-rw-r--r--lib/images/fileicons/ogg.pngbin807 -> 408 bytes
-rw-r--r--lib/images/fileicons/ogv.pngbin740 -> 412 bytes
-rw-r--r--lib/images/fileicons/pas.pngbin0 -> 435 bytes
-rw-r--r--lib/images/fileicons/pdf.pngbin592 -> 425 bytes
-rw-r--r--lib/images/fileicons/php.pngbin749 -> 424 bytes
-rw-r--r--lib/images/fileicons/pl.pngbin685 -> 418 bytes
-rw-r--r--lib/images/fileicons/png.pngbin907 -> 417 bytes
-rw-r--r--lib/images/fileicons/ppt.pngbin697 -> 412 bytes
-rw-r--r--lib/images/fileicons/pptx.pngbin697 -> 414 bytes
-rw-r--r--lib/images/fileicons/ps.pngbin470 -> 424 bytes
-rw-r--r--lib/images/fileicons/py.pngbin683 -> 426 bytes
-rw-r--r--lib/images/fileicons/rar.pngbin557 -> 418 bytes
-rw-r--r--lib/images/fileicons/rb.pngbin802 -> 421 bytes
-rw-r--r--lib/images/fileicons/rpm.pngbin555 -> 415 bytes
-rw-r--r--lib/images/fileicons/rtf.pngbin402 -> 418 bytes
-rw-r--r--lib/images/fileicons/sh.pngbin0 -> 422 bytes
-rw-r--r--lib/images/fileicons/sql.pngbin813 -> 410 bytes
-rw-r--r--lib/images/fileicons/swf.pngbin732 -> 416 bytes
-rw-r--r--lib/images/fileicons/sxc.pngbin682 -> 420 bytes
-rw-r--r--lib/images/fileicons/sxd.pngbin735 -> 424 bytes
-rw-r--r--lib/images/fileicons/sxi.pngbin687 -> 414 bytes
-rw-r--r--lib/images/fileicons/sxw.pngbin522 -> 417 bytes
-rw-r--r--lib/images/fileicons/tar.pngbin663 -> 417 bytes
-rw-r--r--lib/images/fileicons/tgz.pngbin643 -> 417 bytes
-rw-r--r--lib/images/fileicons/txt.pngbin466 -> 407 bytes
-rw-r--r--lib/images/fileicons/wav.pngbin820 -> 415 bytes
-rw-r--r--lib/images/fileicons/webm.pngbin740 -> 412 bytes
-rw-r--r--lib/images/fileicons/xls.pngbin670 -> 415 bytes
-rw-r--r--lib/images/fileicons/xlsx.pngbin670 -> 425 bytes
-rw-r--r--lib/images/fileicons/xml.pngbin409 -> 400 bytes
-rw-r--r--lib/images/fileicons/zip.pngbin800 -> 418 bytes
-rw-r--r--lib/images/interwiki/user.pngbin0 -> 741 bytes
-rw-r--r--lib/plugins/acl/admin.php16
-rw-r--r--lib/plugins/acl/lang/ar/lang.php4
-rw-r--r--lib/plugins/acl/lang/bg/lang.php4
-rw-r--r--lib/plugins/acl/lang/ca-valencia/lang.php4
-rw-r--r--lib/plugins/acl/lang/ca/lang.php4
-rw-r--r--lib/plugins/acl/lang/cs/lang.php4
-rw-r--r--lib/plugins/acl/lang/da/lang.php4
-rw-r--r--lib/plugins/acl/lang/de-informal/lang.php4
-rw-r--r--lib/plugins/acl/lang/de/lang.php4
-rw-r--r--lib/plugins/acl/lang/el/lang.php4
-rw-r--r--lib/plugins/acl/lang/en/lang.php4
-rw-r--r--lib/plugins/acl/lang/eo/lang.php4
-rw-r--r--lib/plugins/acl/lang/es/lang.php4
-rw-r--r--lib/plugins/acl/lang/et/help.txt9
-rw-r--r--lib/plugins/acl/lang/et/lang.php19
-rw-r--r--lib/plugins/acl/lang/eu/lang.php4
-rw-r--r--lib/plugins/acl/lang/fa/lang.php4
-rw-r--r--lib/plugins/acl/lang/fi/lang.php4
-rw-r--r--lib/plugins/acl/lang/fr/lang.php4
-rw-r--r--lib/plugins/acl/lang/gl/lang.php4
-rw-r--r--lib/plugins/acl/lang/he/lang.php4
-rw-r--r--lib/plugins/acl/lang/hr/lang.php9
-rw-r--r--lib/plugins/acl/lang/ia/lang.php4
-rw-r--r--lib/plugins/acl/lang/id/lang.php4
-rw-r--r--lib/plugins/acl/lang/is/lang.php4
-rw-r--r--lib/plugins/acl/lang/it/lang.php4
-rw-r--r--lib/plugins/acl/lang/ja/lang.php4
-rw-r--r--lib/plugins/acl/lang/kk/lang.php4
-rw-r--r--lib/plugins/acl/lang/ko/help.txt6
-rw-r--r--lib/plugins/acl/lang/ko/lang.php6
-rw-r--r--lib/plugins/acl/lang/la/lang.php4
-rw-r--r--lib/plugins/acl/lang/lt/lang.php4
-rw-r--r--lib/plugins/acl/lang/lv/lang.php8
-rw-r--r--lib/plugins/acl/lang/mk/lang.php4
-rw-r--r--lib/plugins/acl/lang/mr/lang.php4
-rw-r--r--lib/plugins/acl/lang/ne/lang.php4
-rw-r--r--lib/plugins/acl/lang/nl/lang.php4
-rw-r--r--lib/plugins/acl/lang/no/lang.php4
-rw-r--r--lib/plugins/acl/lang/pl/lang.php4
-rw-r--r--lib/plugins/acl/lang/pt-br/lang.php4
-rw-r--r--lib/plugins/acl/lang/pt/lang.php4
-rw-r--r--lib/plugins/acl/lang/ro/lang.php4
-rw-r--r--lib/plugins/acl/lang/ru/help.txt2
-rw-r--r--lib/plugins/acl/lang/ru/lang.php4
-rw-r--r--lib/plugins/acl/lang/sk/lang.php4
-rw-r--r--lib/plugins/acl/lang/sl/lang.php4
-rw-r--r--lib/plugins/acl/lang/sq/lang.php4
-rw-r--r--lib/plugins/acl/lang/sr/lang.php4
-rw-r--r--lib/plugins/acl/lang/sv/lang.php4
-rw-r--r--lib/plugins/acl/lang/th/lang.php9
-rw-r--r--lib/plugins/acl/lang/tr/lang.php4
-rw-r--r--lib/plugins/acl/lang/uk/lang.php4
-rw-r--r--lib/plugins/acl/lang/vi/lang.php4
-rw-r--r--lib/plugins/acl/lang/zh-tw/lang.php4
-rw-r--r--lib/plugins/acl/lang/zh/lang.php4
-rw-r--r--lib/plugins/auth.php4
-rw-r--r--lib/plugins/authad/action.php91
-rw-r--r--lib/plugins/authad/auth.php31
-rw-r--r--lib/plugins/authad/lang/de/lang.php8
-rw-r--r--lib/plugins/authad/lang/en/lang.php10
-rw-r--r--lib/plugins/authad/lang/eo/lang.php8
-rw-r--r--lib/plugins/authad/lang/es/lang.php8
-rw-r--r--lib/plugins/authad/lang/es/settings.php10
-rw-r--r--lib/plugins/authad/lang/fr/lang.php8
-rw-r--r--lib/plugins/authad/lang/hr/lang.php8
-rw-r--r--lib/plugins/authad/lang/hr/settings.php20
-rw-r--r--lib/plugins/authad/lang/hu/lang.php8
-rw-r--r--lib/plugins/authad/lang/hu/settings.php6
-rw-r--r--lib/plugins/authad/lang/ja/lang.php8
-rw-r--r--lib/plugins/authad/lang/ja/settings.php2
-rw-r--r--lib/plugins/authad/lang/ko/lang.php8
-rw-r--r--lib/plugins/authad/lang/lv/lang.php8
-rw-r--r--lib/plugins/authad/lang/lv/settings.php11
-rw-r--r--lib/plugins/authad/lang/nl/lang.php8
-rw-r--r--lib/plugins/authad/lang/no/settings.php9
-rw-r--r--lib/plugins/authad/lang/pl/settings.php1
-rw-r--r--lib/plugins/authad/lang/pt/lang.php8
-rw-r--r--lib/plugins/authad/lang/pt/settings.php5
-rw-r--r--lib/plugins/authad/lang/ru/lang.php8
-rw-r--r--lib/plugins/authad/lang/ru/settings.php2
-rw-r--r--lib/plugins/authad/lang/sl/settings.php3
-rw-r--r--lib/plugins/authad/lang/zh/lang.php8
-rw-r--r--lib/plugins/authad/plugin.info.txt2
-rw-r--r--lib/plugins/authldap/auth.php79
-rw-r--r--lib/plugins/authldap/lang/es/settings.php14
-rw-r--r--lib/plugins/authldap/lang/et/settings.php9
-rw-r--r--lib/plugins/authldap/lang/hr/settings.php23
-rw-r--r--lib/plugins/authldap/lang/hu/settings.php7
-rw-r--r--lib/plugins/authldap/lang/it/settings.php6
-rw-r--r--lib/plugins/authldap/lang/ja/settings.php9
-rw-r--r--lib/plugins/authldap/lang/ko/settings.php4
-rw-r--r--lib/plugins/authldap/lang/lv/settings.php9
-rw-r--r--lib/plugins/authldap/lang/no/settings.php9
-rw-r--r--lib/plugins/authldap/lang/ru/settings.php8
-rw-r--r--lib/plugins/authldap/lang/sl/settings.php2
-rw-r--r--lib/plugins/authldap/lang/tr/settings.php8
-rw-r--r--lib/plugins/authmysql/auth.php9
-rw-r--r--lib/plugins/authmysql/lang/es/settings.php27
-rw-r--r--lib/plugins/authmysql/lang/hr/settings.php42
-rw-r--r--lib/plugins/authmysql/lang/hu/settings.php4
-rw-r--r--lib/plugins/authmysql/lang/it/settings.php29
-rw-r--r--lib/plugins/authmysql/lang/lv/settings.php10
-rw-r--r--lib/plugins/authmysql/lang/pl/settings.php2
-rw-r--r--lib/plugins/authmysql/lang/tr/settings.php41
-rw-r--r--lib/plugins/authpgsql/auth.php6
-rw-r--r--lib/plugins/authpgsql/lang/es/settings.php26
-rw-r--r--lib/plugins/authpgsql/lang/hr/settings.php38
-rw-r--r--lib/plugins/authpgsql/lang/it/settings.php11
-rw-r--r--lib/plugins/authpgsql/lang/lv/settings.php9
-rw-r--r--lib/plugins/authpgsql/lang/pl/settings.php9
-rw-r--r--lib/plugins/authpgsql/lang/ru/settings.php2
-rw-r--r--lib/plugins/authpgsql/lang/tr/settings.php13
-rw-r--r--lib/plugins/authplain/_test/escaping.test.php82
-rw-r--r--lib/plugins/authplain/auth.php33
-rw-r--r--lib/plugins/config/lang/bg/lang.php4
-rw-r--r--lib/plugins/config/lang/de/lang.php2
-rw-r--r--lib/plugins/config/lang/en/lang.php10
-rw-r--r--lib/plugins/config/settings/config.class.php152
-rw-r--r--lib/plugins/config/settings/config.metadata.php4
-rw-r--r--lib/plugins/extension/action.php39
-rw-r--r--lib/plugins/extension/helper/extension.php48
-rw-r--r--lib/plugins/extension/helper/list.php13
-rw-r--r--lib/plugins/extension/helper/repository.php10
-rw-r--r--lib/plugins/extension/images/disabled.pngbin1486 -> 1396 bytes
-rw-r--r--lib/plugins/extension/images/enabled.pngbin1231 -> 1398 bytes
-rw-r--r--lib/plugins/extension/images/license.txt4
-rw-r--r--lib/plugins/extension/lang/de/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/de/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/de/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/de/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/de/lang.php90
-rw-r--r--lib/plugins/extension/lang/en/lang.php4
-rw-r--r--lib/plugins/extension/lang/eo/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/eo/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/eo/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/eo/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/eo/lang.php87
-rw-r--r--lib/plugins/extension/lang/es/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/es/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/es/lang.php84
-rw-r--r--lib/plugins/extension/lang/fr/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/fr/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/fr/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/fr/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/fr/lang.php88
-rw-r--r--lib/plugins/extension/lang/hr/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/hr/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/hr/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/hr/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/hr/lang.php16
-rw-r--r--lib/plugins/extension/lang/hu/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/hu/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/hu/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/hu/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/hu/lang.php88
-rw-r--r--lib/plugins/extension/lang/it/lang.php41
-rw-r--r--lib/plugins/extension/lang/ja/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/ja/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/ja/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/ja/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/ja/lang.php89
-rw-r--r--lib/plugins/extension/lang/ko/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/ko/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/ko/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/ko/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/ko/lang.php89
-rw-r--r--lib/plugins/extension/lang/lv/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/lv/lang.php8
-rw-r--r--lib/plugins/extension/lang/nl/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/nl/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/nl/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/nl/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/nl/lang.php90
-rw-r--r--lib/plugins/extension/lang/pl/lang.php39
-rw-r--r--lib/plugins/extension/lang/ru/lang.php60
-rw-r--r--lib/plugins/extension/lang/sk/lang.php58
-rw-r--r--lib/plugins/extension/lang/tr/lang.php60
-rw-r--r--lib/plugins/extension/lang/zh/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/zh/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/zh/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/zh/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/zh/lang.php91
-rw-r--r--lib/plugins/extension/script.js50
-rw-r--r--lib/plugins/info/syntax.php4
-rw-r--r--lib/plugins/plugin/lang/cs/admin_plugin.txt3
-rw-r--r--lib/plugins/plugin/lang/cs/lang.php66
-rw-r--r--lib/plugins/plugin/lang/el/admin_plugin.txt5
-rw-r--r--lib/plugins/plugin/lang/el/lang.php58
-rw-r--r--lib/plugins/plugin/lang/fr/admin_plugin.txt4
-rw-r--r--lib/plugins/plugin/lang/fr/lang.php69
-rw-r--r--lib/plugins/plugin/lang/id/lang.php32
-rw-r--r--lib/plugins/plugin/lang/pl/admin_plugin.txt5
-rw-r--r--lib/plugins/plugin/lang/pl/lang.php63
-rw-r--r--lib/plugins/plugin/lang/sk/admin_plugin.txt4
-rw-r--r--lib/plugins/plugin/lang/sk/lang.php55
-rw-r--r--lib/plugins/plugin/lang/sl/admin_plugin.txt3
-rw-r--r--lib/plugins/plugin/lang/sl/lang.php55
-rw-r--r--lib/plugins/plugin/lang/tr/admin_plugin.txt3
-rw-r--r--lib/plugins/plugin/lang/tr/lang.php55
-rw-r--r--lib/plugins/popularity/lang/lv/lang.php5
-rw-r--r--lib/plugins/popularity/lang/ru/intro.txt4
-rw-r--r--lib/plugins/popularity/lang/th/lang.php5
-rw-r--r--lib/plugins/revert/admin.php3
-rw-r--r--lib/plugins/revert/lang/cs/lang.php1
-rw-r--r--lib/plugins/revert/lang/et/lang.php9
-rw-r--r--lib/plugins/revert/lang/lv/lang.php5
-rw-r--r--lib/plugins/revert/lang/nl/intro.txt2
-rw-r--r--lib/plugins/revert/lang/nl/lang.php3
-rw-r--r--lib/plugins/revert/lang/no/lang.php1
-rw-r--r--lib/plugins/revert/lang/sv/lang.php1
-rw-r--r--lib/plugins/revert/lang/th/lang.php5
-rw-r--r--lib/plugins/syntax.php19
-rw-r--r--lib/plugins/usermanager/admin.php79
-rw-r--r--lib/plugins/usermanager/lang/bg/lang.php6
-rw-r--r--lib/plugins/usermanager/lang/cs/import.txt2
-rw-r--r--lib/plugins/usermanager/lang/de-informal/import.txt2
-rw-r--r--lib/plugins/usermanager/lang/de/import.txt2
-rw-r--r--lib/plugins/usermanager/lang/en/import.txt2
-rw-r--r--lib/plugins/usermanager/lang/en/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/eo/import.txt2
-rw-r--r--lib/plugins/usermanager/lang/es/lang.php15
-rw-r--r--lib/plugins/usermanager/lang/et/lang.php9
-rw-r--r--lib/plugins/usermanager/lang/fr/import.txt2
-rw-r--r--lib/plugins/usermanager/lang/hu/import.txt4
-rw-r--r--lib/plugins/usermanager/lang/it/lang.php8
-rw-r--r--lib/plugins/usermanager/lang/ja/import.txt2
-rw-r--r--lib/plugins/usermanager/lang/ko/edit.txt2
-rw-r--r--lib/plugins/usermanager/lang/ko/import.txt2
-rw-r--r--lib/plugins/usermanager/lang/ko/intro.txt2
-rw-r--r--lib/plugins/usermanager/lang/ko/lang.php2
-rw-r--r--lib/plugins/usermanager/lang/lv/import.txt9
-rw-r--r--lib/plugins/usermanager/lang/lv/lang.php5
-rw-r--r--lib/plugins/usermanager/lang/nl/import.txt2
-rw-r--r--lib/plugins/usermanager/lang/nl/intro.txt2
-rw-r--r--lib/plugins/usermanager/lang/nl/lang.php3
-rw-r--r--lib/plugins/usermanager/lang/ru/import.txt8
-rw-r--r--lib/plugins/usermanager/lang/ru/lang.php3
-rw-r--r--lib/plugins/usermanager/lang/sk/import.txt2
-rw-r--r--lib/plugins/usermanager/lang/th/lang.php5
-rw-r--r--lib/plugins/usermanager/lang/zh-tw/import.txt2
-rw-r--r--lib/plugins/usermanager/lang/zh/import.txt2
-rw-r--r--lib/scripts/behaviour.js2
-rw-r--r--lib/scripts/compatibility.js29
-rw-r--r--lib/scripts/edit.js5
-rw-r--r--lib/scripts/fileuploader.js4
-rw-r--r--lib/scripts/jquery/jquery-migrate.js26
-rw-r--r--lib/scripts/jquery/jquery-migrate.min.js4
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.pngbin212 -> 264 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_75_ffffff_40x100.pngbin208 -> 260 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.pngbin335 -> 387 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_65_ffffff_1x400.pngbin207 -> 259 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_dadada_1x400.pngbin262 -> 314 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.pngbin262 -> 314 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.pngbin332 -> 384 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.pngbin280 -> 332 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-icons_222222_256x240.pngbin6922 -> 6837 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-icons_2e83ff_256x240.pngbin4549 -> 4601 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-icons_454545_256x240.pngbin6992 -> 6973 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-icons_888888_256x240.pngbin6999 -> 7044 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/images/ui-icons_cd0a0a_256x240.pngbin4549 -> 4601 bytes
-rw-r--r--lib/scripts/jquery/jquery-ui-theme/smoothness.css35
-rw-r--r--lib/scripts/jquery/jquery-ui.js11199
-rw-r--r--lib/scripts/jquery/jquery-ui.min.js17
-rw-r--r--lib/scripts/jquery/jquery.js5178
-rw-r--r--lib/scripts/jquery/jquery.min.js9
-rwxr-xr-xlib/scripts/jquery/update.sh19
-rw-r--r--lib/scripts/qsearch.js308
-rw-r--r--lib/scripts/toolbar.js6
-rw-r--r--lib/styles/geshi.less127
-rw-r--r--lib/styles/screen.css24
-rw-r--r--lib/tpl/dokuwiki/css/_diff.css62
-rw-r--r--lib/tpl/dokuwiki/css/basic.less1
-rw-r--r--lib/tpl/dokuwiki/css/content.less22
-rw-r--r--lib/tpl/dokuwiki/css/design.less94
-rw-r--r--lib/tpl/dokuwiki/css/mobile.less27
-rw-r--r--lib/tpl/dokuwiki/css/pagetools.less1
-rw-r--r--lib/tpl/dokuwiki/detail.php54
-rw-r--r--lib/tpl/dokuwiki/main.php2
-rw-r--r--lib/tpl/index.php2
712 files changed, 22019 insertions, 13072 deletions
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..9088a1657
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,15 @@
+; http://editorconfig.org/
+
+[*]
+indent_style = space
+indent_size = 4
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[inc/{geshi,phpseclib}/**]
+; Use editor default (possible autodetection).
+indent_style =
+indent_size =
+trim_trailing_whitespace = false
+insert_final_newline = false
diff --git a/.gitattributes b/.gitattributes
index 0fefdf647..1012087d4 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -4,3 +4,11 @@
*.gif binary
*.ico binary
*.xcf binary
+
+.gitattributes export-ignore
+.gitignore export-ignore
+.editorconfig export-ignore
+.travis.yml export-ignore
+_test export-ignore
+_cs export-ignore
+lib/plugins/testing export-ignore
diff --git a/.gitignore b/.gitignore
index 64816ba38..bb39ba7cf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@
/conf/lang/*
/conf/plugin_lang/*
/conf/plugins.local.*
+/conf/tpl/*
.htaccess
*.swp
*.bak
@@ -26,25 +27,23 @@
/data/media_attic/*
/data/meta/*
/data/pages/*
+/data/tmp/*
!/data/pages/wiki/dokuwiki.txt
!/data/pages/wiki/syntax.txt
!/data/pages/wiki/welcome.txt
-/data/tmp/*
/lib/tpl/*
-!/lib/tpl/default
!/lib/tpl/dokuwiki
!/lib/tpl/index.php
/lib/plugins/*
+!/lib/plugins/acl
!/lib/plugins/authad
!/lib/plugins/authldap
!/lib/plugins/authmysql
!/lib/plugins/authpgsql
!/lib/plugins/authplain
-!/lib/plugins/acl
!/lib/plugins/config
!/lib/plugins/extension
!/lib/plugins/info
-!/lib/plugins/plugin
!/lib/plugins/popularity
!/lib/plugins/revert
!/lib/plugins/safefnrecode
@@ -52,5 +51,8 @@
!/lib/plugins/usermanager
!/lib/plugins/action.php
!/lib/plugins/admin.php
+!/lib/plugins/auth.php
!/lib/plugins/index.html
+!/lib/plugins/remote.php
!/lib/plugins/syntax.php
+lib/images/*/local/*
diff --git a/.travis.yml b/.travis.yml
index 79eea48b7..93867162c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,4 +9,4 @@ notifications:
- "chat.freenode.net#dokuwiki"
on_success: change
on_failure: change
-script: cd _test && phpunit --stderr
+script: cd _test && phpunit --verbose --stderr
diff --git a/_test/README b/_test/README
index 5220248b2..f0db2a550 100644
--- a/_test/README
+++ b/_test/README
@@ -9,35 +9,28 @@ This is the test suite to automatically test various parts of DokuWiki.
===== PHPUnit Installation ======
-==== via PEAR installer ====
+You can install phpunit through your distribution's package manager or simply
+download the newest phar file into the _test directory:
- pear config-set auto_discover 1
- pear install pear.phpunit.de/PHPUnit
-
-==== via Composer ====
-
-Include a composer.json file in your project, which can be as minimal as:
-
-<code>
-{
- "require-dev": {
- "phpunit/phpunit": "3.7.*"
- }
-}
-</code>
-
-==== via PHP archive (PHAR) ====
-
-Download http://pear.phpunit.de/get/phpunit.phar and make it executable on your system.
+ cd _test/
+ wget https://phar.phpunit.de/phpunit.phar
===== Running all tests =====
-Just change to the ''_test'' directory and run phpunit:
+Just change to the ''_test'' directory and run phpunit (depending on your install
+method):
cd _test/
phpunit
+or
+
+ cd _test/
+ php phpunit.phar
+
+===== Troubleshooting =====
+
PHPUnit will fail on some systems with a //headers already sent// error.
This is a known problem with PHPUnit, the error can be avoided by passing the
'--stderr' flag to phpunit:
@@ -46,8 +39,10 @@ This is a known problem with PHPUnit, the error can be avoided by passing the
On windows you may have to enable OpenSSL support for https tests.
Some of them point to httpclient_http.tests.php on the failure.
-To enable HTTPS support copy the ''libeay32.dll'' and ''ssleay32.dll'' to your ''windows\system32'' folder
-and add the following line to your php.ini in the extension section:
+To enable HTTPS support copy the ''libeay32.dll'' and ''ssleay32.dll''
+to your ''windows\system32'' folder and add the following line to your php.ini
+in the extension section:
+
<code ini>
extension=php_openssl.dll
</code>
@@ -56,13 +51,13 @@ extension=php_openssl.dll
You can run a single test file by providing it as an argument to phpunit:
- phpunit --stderr tests/inc/common_cleanText.test.php
+ phpunit tests/inc/common_cleanText.test.php
You can also use groups to exclude certain test from running. For example use
the following command to avoid long running test or tests accessing the
Internet.
- phpunit --stderr --exclude-group slow,internet
+ phpunit --exclude-group slow,internet
===== Create new Tests =====
@@ -71,23 +66,10 @@ folder. Please respect the folder structure and naming convention. Inside the
file, implement a class, extending 'DokuWikiTest'. Every method, starting
with 'test' will be called as a test (e.g. 'testIfThisIsValid');
-
===== TODO for the test framework =====
- * test cross platform compatibility: especially test windows
- * update http://www.dokuwiki.org/devel:unittesting
* optional: add helper methods to TestRequest for easy form submission
* createForm(), ...
* check PHP Unit test_helpers https://github.com/sebastianbergmann/php-test-helpers
-===== Migration Protocol =====
-
-The following tests were not migrated:
-
- * inc/indexer_idx_indexlengths (fs dependencies)
- * inc/mail_send (integration test)
- * inc/parser/parser_formatting
- * inc/parser/xhtml_htmlphp (runkit)
- * inc/parser/xhtml_links
-
diff --git a/_test/core/DokuWikiTest.php b/_test/core/DokuWikiTest.php
index 91eb5293b..f4521256a 100644
--- a/_test/core/DokuWikiTest.php
+++ b/_test/core/DokuWikiTest.php
@@ -115,5 +115,8 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase {
// reload language
$local = $conf['lang'];
trigger_event('INIT_LANG_LOAD', $local, 'init_lang', true);
+
+ global $INPUT;
+ $INPUT = new Input();
}
}
diff --git a/_test/core/TestRequest.php b/_test/core/TestRequest.php
index 0a54910ed..060e37d28 100644
--- a/_test/core/TestRequest.php
+++ b/_test/core/TestRequest.php
@@ -44,13 +44,18 @@ class TestRequest {
* @return TestResponse the resulting output of the request
*/
public function execute($uri='/doku.php') {
+ global $INPUT;
+ global $ID;
+ global $INFO;
+
// save old environment
$server = $_SERVER;
$session = $_SESSION;
$get = $_GET;
$post = $_POST;
$request = $_REQUEST;
-
+ $input = $INPUT;
+
// prepare the right URI
$this->setUri($uri);
@@ -74,6 +79,7 @@ class TestRequest {
// now execute dokuwiki and grep the output
header_remove();
ob_start('ob_start_callback');
+ $INPUT = new Input();
include(DOKU_INC.$this->script);
ob_end_flush();
@@ -89,6 +95,7 @@ class TestRequest {
$_GET = $get;
$_POST = $post;
$_REQUEST = $request;
+ $INPUT = $input;
return $response;
}
diff --git a/_test/phpunit.xml b/_test/phpunit.xml
index fc7dd8be0..25506b1ae 100644
--- a/_test/phpunit.xml
+++ b/_test/phpunit.xml
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
bootstrap="bootstrap.php"
- convertNoticesToExceptions="false">
+ convertNoticesToExceptions="false"
+ colors="true"
+ stderr="true"
+ >
<testsuites>
<testsuite name="DokuWiki Tests">
diff --git a/_test/tests/inc/PassHash.test.php b/_test/tests/inc/PassHash.test.php
index b6cb07090..1d34aa696 100644
--- a/_test/tests/inc/PassHash.test.php
+++ b/_test/tests/inc/PassHash.test.php
@@ -5,7 +5,7 @@
*
* most tests are in auth_password.test.php
*/
-class PassHash_test extends PHPUnit_Framework_TestCase {
+class PassHash_test extends DokuWikiTest {
function test_hmac(){
// known hashes taken from https://code.google.com/p/yii/issues/detail?id=1942
diff --git a/_test/tests/inc/auth_password.test.php b/_test/tests/inc/auth_password.test.php
index 27e03be60..07b9f5bb2 100644
--- a/_test/tests/inc/auth_password.test.php
+++ b/_test/tests/inc/auth_password.test.php
@@ -1,6 +1,6 @@
<?php
-class auth_password_test extends PHPUnit_Framework_TestCase {
+class auth_password_test extends DokuWikiTest {
// hashes for the password foo$method, using abcdefgh as salt
var $passes = array(
diff --git a/_test/tests/inc/cache_use.test.php b/_test/tests/inc/cache_use.test.php
new file mode 100644
index 000000000..02fe329de
--- /dev/null
+++ b/_test/tests/inc/cache_use.test.php
@@ -0,0 +1,83 @@
+<?php
+
+/**
+ * Class cache_use_test
+ *
+ * Tests if caching can actually be used
+ */
+class cache_use_test extends DokuWikiTest {
+ /** @var cache_renderer $cache */
+ private $cache;
+
+ function setUp() {
+ global $ID, $conf;
+ parent::setUp();
+
+ $ID = 'cached';
+ $file = wikiFN($ID);
+ $conf['cachetime'] = 0; // ensure the value is not -1, which disables caching
+
+ saveWikiText($ID, 'Content', 'Created');
+
+ $this->cache = new cache_renderer($ID, $file, 'xhtml');
+ $this->cache->storeCache('Test');
+
+ // set the modification times explicitly (overcome Issue #694)
+ $time = time();
+ touch($file, $time-1);
+ touch($this->cache->cache, $time);
+ }
+
+ function test_use() {
+ $this->assertTrue($this->cache->useCache());
+ }
+
+ /**
+ * In all the following tests the cache should not be usable
+ * as such, they are meaningless if test_use didn't pass.
+ *
+ * @depends test_use
+ */
+ function test_purge() {
+ /* @var Input $INPUT */
+ global $INPUT;
+ $INPUT->set('purge',1);
+
+ $this->assertFalse($this->cache->useCache());
+ $this->assertNotEmpty($this->cache->depends['purge']);
+ }
+
+ /**
+ * @depends test_use
+ */
+ function test_filedependency() {
+ // give the dependent src file the same mtime as the cache
+ touch($this->cache->file, filemtime($this->cache->cache));
+ $this->assertFalse($this->cache->useCache());
+ }
+
+ /**
+ * @depends test_use
+ */
+ function test_age() {
+ // need to age both our source file & the cache
+ $age = 10;
+ $time = time() - $age - 1; // older than age
+
+ touch($this->cache->file, $time - 1);
+ touch($this->cache->cache, $time);
+
+ $this->assertFalse($this->cache->useCache(array('age' => $age)));
+ }
+
+ /**
+ * @depends test_use
+ */
+ function test_confnocaching() {
+ global $conf;
+ $conf['cachetime'] = -1; // disables renderer caching
+
+ $this->assertFalse($this->cache->useCache());
+ $this->assertNotEmpty($this->cache->_nocache);
+ }
+} \ No newline at end of file
diff --git a/_test/tests/inc/changelog_getRevisionsAround.test.php b/_test/tests/inc/changelog_getRevisionsAround.test.php
new file mode 100644
index 000000000..2a5cb849e
--- /dev/null
+++ b/_test/tests/inc/changelog_getRevisionsAround.test.php
@@ -0,0 +1,188 @@
+<?php
+/**
+ * Tests for requesting revisions of a page with getRevisions()
+ *
+ * This class uses the files:
+ * - data/pages/mailinglist.txt
+ * - data/meta/mailinglist.changes
+ */
+class changelog_getrevisionsaround_test extends DokuWikiTest {
+
+ /**
+ * list of revisions in mailinglist.changes
+ */
+ private $revsexpected = array(
+ 1374261194, //current page
+ 1371579614, 1368622240,
+ 1368622195, 1368622152,
+ 1368612599, 1368612506,
+ 1368609772, 1368575634,
+ 1363436892, 1362527164,
+ 1362527046, 1362526861,
+ 1362526767, 1362526167,
+ 1362526119, 1362526039,
+ 1362525926, 1362525899,
+ 1362525359, 1362525145,
+ 1362524799, 1361901536,
+ 1360110636
+ );
+ private $pageid = 'mailinglist';
+
+ function setup() {
+ parent::setup();
+ global $cache_revinfo;
+ $cache =& $cache_revinfo;
+ if(isset($cache['nonexist'])) {
+ unset($cache['nonexist']);
+ }
+ if(isset($cache['mailinglist'])) {
+ unset($cache['mailinglist']);
+ }
+ }
+
+ /**
+ * no nonexist.changes meta file available
+ */
+ function test_changemetadatanotexists() {
+ $rev1 = 1362526767;
+ $rev2 = 1362527164;
+ $max = 50;
+ $id = 'nonexist';
+ $revsexpected = array(array(), array());
+
+ $pagelog = new PageChangeLog($id, $chunk_size = 8192);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+ }
+
+ /**
+ * Surrounding revisions of rev1 and rev2 overlaps
+ */
+ function test_request_overlapping() {
+ $rev1 = 1362526767;
+ $rev2 = 1362527164;
+ $max = 10;
+ $revsexpected = array(
+ array_slice($this->revsexpected, 8, 11),
+ array_slice($this->revsexpected, 5, 11)
+ );
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 20);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+ }
+
+ /**
+ * Surrounding revisions of rev1 and rev2 don't overlap.
+ */
+ function test_request_non_overlapping() {
+ $rev1 = 1362525899;
+ $rev2 = 1368612599;
+ $max = 10;
+ $revsexpected = array(
+ array_slice($this->revsexpected, 13, 11),
+ array_slice($this->revsexpected, 0, 11)
+ );
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 20);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+ }
+
+ /**
+ * rev1 and rev2 are at start and end of the changelog.
+ * Should return still a number of revisions equal to max
+ */
+ function test_request_first_last() {
+ $rev1 = 1360110636;
+ $rev2 = 1374261194;
+ $max = 10;
+ $revsexpected = array(
+ array_slice($this->revsexpected, 13, 11),
+ array_slice($this->revsexpected, 0, 11)
+ );
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+
+ //todo: number of revisions on the left side is not (yet) completed until max number
+ $revsexpected = array(
+ array_slice($this->revsexpected, 18, 6),
+ array_slice($this->revsexpected, 0, 11)
+ );
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 20);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+ }
+
+
+ /**
+ * Number of requested revisions is larger than available revisions,
+ * so returns whole log
+ */
+ function test_request_wholelog() {
+ $rev1 = 1362525899;
+ $rev2 = 1368612599;
+ $max = 50;
+ $revsexpected = array($this->revsexpected, $this->revsexpected);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 20);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+ }
+
+ /**
+ * When rev1 > rev2, their order is changed
+ */
+ function test_request_wrong_order_revs() {
+ $rev1 = 1362527164;
+ $rev2 = 1362526767;
+ $max = 10;
+ $revsexpected = array(
+ array_slice($this->revsexpected, 8, 11),
+ array_slice($this->revsexpected, 5, 11)
+ );
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 20);
+ $revs = $pagelog->getRevisionsAround($rev1, $rev2, $max);
+ $this->assertEquals($revsexpected, $revs);
+ }
+
+} \ No newline at end of file
diff --git a/_test/tests/inc/changelog_getrelativerevision.test.php b/_test/tests/inc/changelog_getrelativerevision.test.php
new file mode 100644
index 000000000..f9962066a
--- /dev/null
+++ b/_test/tests/inc/changelog_getrelativerevision.test.php
@@ -0,0 +1,418 @@
+<?php
+
+/**
+ * Tests for requesting revisioninfo of a revision of a page with getRevisionInfo()
+ *
+ * This class uses the files:
+ * - data/pages/mailinglist.txt
+ * - data/meta/mailinglist.changes
+ */
+class changelog_getrelativerevision_test extends DokuWikiTest {
+
+ private $logline = "1362525899 127.0.0.1 E mailinglist pubcie [Data entry] \n";
+ private $pageid = 'mailinglist';
+
+ function setup() {
+ parent::setup();
+ global $cache_revinfo;
+ $cache =& $cache_revinfo;
+ if(isset($cache['nonexist'])) {
+ unset($cache['nonexist']);
+ }
+ if(isset($cache['mailinglist'])) {
+ unset($cache['mailinglist']);
+ }
+ }
+
+ /**
+ * no nonexist.changes meta file available
+ */
+ function test_changemetadatanotexists() {
+ $rev = 1362525899;
+ $dir = 1;
+ $id = 'nonexist';
+ $revsexpected = false;
+
+ $pagelog = new PageChangeLog($id, $chunk_size = 8192);
+ $revs = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revsexpected, $revs);
+ }
+
+ /**
+ * no nonexist.changes meta file available
+ */
+ function test_nodirection() {
+ $rev = 1362525899;
+ $dir = 0;
+ $revsexpected = false;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revsexpected, $revs);
+ }
+
+ /**
+ * start at exact current revision of mailinglist page
+ *
+ */
+ function test_startatexactcurrentrev() {
+ $rev = 1385051947;
+ $dir = 1;
+ $revsexpectedpos = false;
+ $revsexpectedneg = 1374261194;
+
+ //set a known timestamp
+ touch(wikiFN($this->pageid), $rev);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revsexpectedpos, $revs);
+
+ $revs = $pagelog->getRelativeRevision($rev, -$dir);
+ $this->assertEquals($revsexpectedneg, $revs);
+ }
+
+ /**
+ * start at exact last revision of mailinglist page
+ *
+ */
+ function test_startatexactlastrev() {
+ $rev = 1360110636;
+ $dir = 1;
+ $revsexpectedpos = 1361901536;
+ $revsexpectedneg = false;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revsexpectedpos, $revs);
+
+ $revs = $pagelog->getRelativeRevision($rev, -$dir);
+ $this->assertEquals($revsexpectedneg, $revs);
+ }
+
+ /**
+ * start at exact one before last revision of mailinglist page
+ *
+ */
+ function test_requestlastrevisions() {
+ $rev = 1361901536;
+ $dir = -1;
+ $revsexpectedlast = 1360110636;
+ $revsexpectedbeforelast = false;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revsexpectedlast, $revs);
+
+ $revs = $pagelog->getRelativeRevision($rev, 2 * $dir);
+ $this->assertEquals($revsexpectedbeforelast, $revs);
+ }
+
+ /**
+ * request existing rev and check cache
+ */
+ function test_requestrev_checkcache() {
+ $rev = 1362525359;
+ $dir = 1;
+ $revexpected = 1362525899;
+ $infoexpected = parseChangelogLine($this->logline);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+
+ //checked info returned from cache
+ $info = $pagelog->getRevisionInfo($revfound);
+ $this->assertEquals($infoexpected, $info);
+ }
+
+ /**
+ * request existing rev
+ */
+ function test_requestnextrev() {
+ $rev = 1362525899;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+
+ $dir = 1;
+ $revexpected = 1362525926;
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+
+ $dir = 2;
+ $revexpected = 1362526039;
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+
+ $dir = -1;
+ $revexpected = 1362525359;
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+
+ $dir = -2;
+ $revexpected = 1362525145;
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+ /**
+ * request existing rev with chucked reading
+ */
+ function test_requestnextrev_chuncked() {
+ $rev = 1362525899;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+
+ $dir = 1;
+ $revexpected = 1362525926;
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+
+ $dir = 2;
+ $revexpected = 1362526039;
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+
+ $dir = -1;
+ $revexpected = 1362525359;
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+
+ $dir = -2;
+ $revexpected = 1362525145;
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+
+ /**
+ * request existing rev with chucked reading, chunk size smaller than line length
+ */
+ function test_requestnextrev_chunkshorterthanlines() {
+ $rev = 1362525899;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 20);
+
+ $dir = 1;
+ $revexpected = 1362525926;
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+
+ $dir = 2;
+ $revexpected = 1362526039;
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+
+ $dir = -1;
+ $revexpected = 1362525359;
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+
+ $dir = -2;
+ $revexpected = 1362525145;
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+ /**
+ * request existing rev
+ */
+ function test_requestnextfifthrev() {
+ $rev = 1362525899;
+ $dir = 5;
+ $revexpected = 1362526767;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+ /**
+ * request existing rev with chucked reading
+ */
+ function test_requestnextfifthrev_chuncked() {
+ $rev = 1362525899;
+ $dir = 5;
+ $revexpected = 1362526767;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+ /**
+ * request existing rev
+ */
+ function test_requestprevrev() {
+ $rev = 1362525899;
+ $dir1 = -1;
+ $dir5 = -5;
+ $revexpected1 = 1362525359;
+ $revexpected5 = 1360110636;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revfound1 = $pagelog->getRelativeRevision($rev, $dir1);
+ $this->assertEquals($revexpected1, $revfound1);
+
+ $revfound5 = $pagelog->getRelativeRevision($rev, $dir5);
+ $this->assertEquals($revexpected5, $revfound5);
+ }
+
+ /**
+ * request existing rev with chucked reading
+ */
+ function test_requestprevrev_chuncked() {
+ $rev = 1362525899;
+ $dir1 = -1;
+ $dir5 = -5;
+ $revexpected1 = 1362525359;
+ $revexpected5 = 1360110636;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revfound1 = $pagelog->getRelativeRevision($rev, $dir1);
+ $this->assertEquals($revexpected1, $revfound1);
+
+ $revfound5 = $pagelog->getRelativeRevision($rev, $dir5);
+ $this->assertEquals($revexpected5, $revfound5);
+ }
+
+ /**
+ * request after recentest version in changelog
+ */
+ function test_requestrecentestlogline_next() {
+ $rev = 1374261194;
+ $dir = 1;
+ $revexpected = false;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+ /**
+ * request after recentest version in changelog, with chuncked reading
+ */
+ function test_requestrecentestlogline_next_chuncked() {
+ $rev = 1374261194;
+ $dir = 1;
+ $revexpected = false;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+ /**
+ * request before current version
+ */
+ function test_requestrecentestlogline_prev() {
+ $rev = 1374261194;
+ $dir = -1;
+ $revexpected = 1371579614;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+ /**
+ * request before current version, with chuncked reading
+ */
+ function test_requestrecentestlogline_prev_chuncked() {
+ $rev = 1374261194;
+ $dir = -1;
+ $revexpected = 1371579614;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+ /**
+ * Request negative revision
+ * looks in positive direction, so it catches the oldest revision
+ */
+ function test_negativerev_posdir() {
+ $rev = -10;
+ $dir = 1;
+ $revexpected = 1360110636;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+ /**
+ * Request negative revision
+ * looks in negative direction, but there is nothing
+ */
+ function test_negativerev_negdir() {
+ $rev = -10;
+ $dir = -1;
+ $revexpected = false;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+ /**
+ * Start at non existing revision somewhere between existing revisions
+ */
+ function test_startatnotexistingrev_next() {
+ $rev = 1362525890;
+ $dir = 1;
+ $revexpected = 1362525899;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+ /**
+ * Start at non existing revision somewhere between existing revisions
+ */
+ function test_startatnotexistingrev_prev() {
+ $rev = 1362525890;
+ $dir = -1;
+ $revexpected = 1362525359;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revfound = $pagelog->getRelativeRevision($rev, $dir);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+ function test_iscurrentpagerevision() {
+ $rev = 1385051947;
+ $currentexpected = true;
+
+ //set a known timestamp
+ touch(wikiFN($this->pageid), $rev);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $current = $pagelog->isCurrentRevision($rev);
+ $this->assertEquals($currentexpected, $current);
+ }
+
+ function test_isnotcurrentpagerevision() {
+ $rev = 1385051947;
+ $not_current_rev = $rev - 1;
+ $currentexpected = false;
+
+ //set a known timestamp
+ touch(wikiFN($this->pageid), $rev);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $current = $pagelog->isCurrentRevision($not_current_rev);
+ $this->assertEquals($currentexpected, $current);
+ }
+
+ function test_notexistingcurrentpage() {
+ $rev = 1385051947;
+ $currentexpected = false;
+
+ $pagelog = new PageChangeLog('nonexistingpage', $chunk_size = 8192);
+ $current = $pagelog->isCurrentRevision($rev);
+ $this->assertEquals($currentexpected, $current);
+ }
+} \ No newline at end of file
diff --git a/_test/tests/inc/changelog_getrevisioninfo.test.php b/_test/tests/inc/changelog_getrevisioninfo.test.php
index 9637d21c8..79b31d68e 100644
--- a/_test/tests/inc/changelog_getrevisioninfo.test.php
+++ b/_test/tests/inc/changelog_getrevisioninfo.test.php
@@ -21,7 +21,7 @@ class changelog_getrevisionsinfo_test extends DokuWikiTest {
unset($cache['nonexist']);
}
if(isset($cache['mailinglist'])) {
- unset($cache['nonexist']);
+ unset($cache['mailinglist']);
}
}
@@ -29,11 +29,12 @@ class changelog_getrevisionsinfo_test extends DokuWikiTest {
* no nonexist.changes meta file available
*/
function test_changemetadatanotexists() {
- $rev = 1362525899;
- $id = 'nonexist';
+ $rev = 1362525899;
+ $id = 'nonexist';
$revsexpected = false;
- $revs = getRevisionInfo($id, $rev, $chunk_size = 8192, $media = false);
+ $pagelog = new PageChangeLog($id, $chunk_size = 8192);
+ $revs = $pagelog->getRevisionInfo($rev);
$this->assertEquals($revsexpected, $revs);
}
@@ -41,13 +42,14 @@ class changelog_getrevisionsinfo_test extends DokuWikiTest {
* request existing rev
*/
function test_requestrev() {
- $rev = 1362525899;
+ $rev = 1362525899;
$infoexpected = parseChangelogLine($this->logline);
- $info = getRevisionInfo($this->pageid, $rev, $chunk_size = 8192, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $info = $pagelog->getRevisionInfo($rev);
$this->assertEquals($infoexpected, $info);
//returns cached value
- $info = getRevisionInfo($this->pageid, $rev, $chunk_size = 8192, $media = false);
+ $info = $pagelog->getRevisionInfo($rev);
$this->assertEquals($infoexpected, $info);
}
@@ -55,10 +57,23 @@ class changelog_getrevisionsinfo_test extends DokuWikiTest {
* request existing rev with chucked reading
*/
function test_requestrev_chuncked() {
- $rev = 1362525899;
+ $rev = 1362525899;
+ $infoexpected = parseChangelogLine($this->logline);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $info = $pagelog->getRevisionInfo($rev);
+ $this->assertEquals($infoexpected, $info);
+ }
+
+ /**
+ * request existing rev with chucked reading
+ */
+ function test_requestrev_chunckedsmallerthanlinelength() {
+ $rev = 1362525899;
$infoexpected = parseChangelogLine($this->logline);
- $info = getRevisionInfo($this->pageid, $rev, $chunk_size = 512, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 20);
+ $info = $pagelog->getRevisionInfo($rev);
$this->assertEquals($infoexpected, $info);
}
@@ -66,13 +81,14 @@ class changelog_getrevisionsinfo_test extends DokuWikiTest {
* request current version
*/
function test_requestrecentestlogline() {
- $rev = 1374261194;
+ $rev = 1374261194;
$infoexpected = parseChangelogLine($this->firstlogline);
- $info = getRevisionInfo($this->pageid, $rev, $chunk_size = 8192, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $info = $pagelog->getRevisionInfo($rev);
$this->assertEquals($infoexpected, $info);
//returns cached value
- $info = getRevisionInfo($this->pageid, $rev, $chunk_size = 8192, $media = false);
+ $info = $pagelog->getRevisionInfo($rev);
$this->assertEquals($infoexpected, $info);
}
@@ -80,10 +96,11 @@ class changelog_getrevisionsinfo_test extends DokuWikiTest {
* request current version, with chuncked reading
*/
function test_requestrecentestlogline_chuncked() {
- $rev = 1374261194;
+ $rev = 1374261194;
$infoexpected = parseChangelogLine($this->firstlogline);
- $info = getRevisionInfo($this->pageid, $rev, $chunk_size = 512, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $info = $pagelog->getRevisionInfo($rev);
$this->assertEquals($infoexpected, $info);
}
@@ -93,7 +110,8 @@ class changelog_getrevisionsinfo_test extends DokuWikiTest {
function test_negativerev() {
$rev = -10;
- $info = getRevisionInfo($this->pageid, $rev, $chunk_size = 8192, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $info = $pagelog->getRevisionInfo($rev);
$this->assertEquals(false, $info);
}
@@ -103,7 +121,8 @@ class changelog_getrevisionsinfo_test extends DokuWikiTest {
function test_notexistingrev() {
$rev = 1362525890;
- $info = getRevisionInfo($this->pageid, $rev, $chunk_size = 8192, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $info = $pagelog->getRevisionInfo($rev);
$this->assertEquals(false, $info);
}
@@ -111,10 +130,11 @@ class changelog_getrevisionsinfo_test extends DokuWikiTest {
* sometimes chuncksize is set to true
*/
function test_chuncksizetrue() {
- $rev = 1362525899;
+ $rev = 1362525899;
$infoexpected = parseChangelogLine($this->logline);
- $info = getRevisionInfo($this->pageid, $rev, true);
+ $pagelog = new PageChangeLog($this->pageid, true);
+ $info = $pagelog->getRevisionInfo($rev);
$this->assertEquals($infoexpected, $info);
}
} \ No newline at end of file
diff --git a/_test/tests/inc/changelog_getrevisions.test.php b/_test/tests/inc/changelog_getrevisions.test.php
index a9be26dae..b247ce3d6 100644
--- a/_test/tests/inc/changelog_getrevisions.test.php
+++ b/_test/tests/inc/changelog_getrevisions.test.php
@@ -36,7 +36,7 @@ class changelog_getrevisions_test extends DokuWikiTest {
unset($cache['nonexist']);
}
if(isset($cache['mailinglist'])) {
- unset($cache['nonexist']);
+ unset($cache['mailinglist']);
}
}
@@ -45,11 +45,12 @@ class changelog_getrevisions_test extends DokuWikiTest {
*/
function test_changemetadatanotexists() {
$first = 0;
- $num = 1;
- $id = 'nonexist';
-
- $revs = getRevisions($id, $first, $num, $chunk_size = 8192, $media = false);
+ $num = 1;
+ $id = 'nonexist';
$revsexpected = array();
+
+ $pagelog = new PageChangeLog($id, $chunk_size = 8192);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
}
@@ -58,14 +59,20 @@ class changelog_getrevisions_test extends DokuWikiTest {
* (so skips first line which belongs to the current existing page)
*/
function test_requestlastrev() {
- $first = 0;
- $num = 1;
+ $first = 0;
+ $num = 1;
$revsexpected = array($this->revsexpected[1]);
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 8192, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRevisions($first, $num);
+ $this->assertEquals($revsexpected, $revs);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 512, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 20);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
}
@@ -74,14 +81,20 @@ class changelog_getrevisions_test extends DokuWikiTest {
* (so skips first line which belongs to the current existing page)
*/
function test_requestonebutlastrev() {
- $first = 1;
- $num = 1;
+ $first = 1;
+ $num = 1;
$revsexpected = array($this->revsexpected[2]);
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 8192, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 512, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revs = $pagelog->getRevisions($first, $num);
+ $this->assertEquals($revsexpected, $revs);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 20);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
}
@@ -90,14 +103,20 @@ class changelog_getrevisions_test extends DokuWikiTest {
* (so skips first line of current existing page)
*/
function test_requestrevswithoffset() {
- $first = 10;
- $num = 5;
+ $first = 10;
+ $num = 5;
$revsexpected = array_slice($this->revsexpected, $first + 1, $num);
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 8192, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRevisions($first, $num);
+ $this->assertEquals($revsexpected, $revs);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 512, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 20);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
}
@@ -105,14 +124,16 @@ class changelog_getrevisions_test extends DokuWikiTest {
* first = -1 requests recentest logline, without skipping
*/
function test_requestrecentestlogline() {
- $first = -1;
- $num = 1;
+ $first = -1;
+ $num = 1;
$revsexpected = array($this->revsexpected[0]);
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 8192, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 512, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
}
@@ -120,11 +141,12 @@ class changelog_getrevisions_test extends DokuWikiTest {
* chunck size = 0 skips chuncked loading
*/
function test_wholefile() {
- $first = 0;
- $num = 1000;
+ $first = 0;
+ $num = 1000;
$revsexpected = array_slice($this->revsexpected, 1);
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 0, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 0);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
}
@@ -132,14 +154,16 @@ class changelog_getrevisions_test extends DokuWikiTest {
* Negative range returns no result
*/
function test_negativenum() {
- $first = 0;
- $num = -10;
+ $first = 0;
+ $num = -10;
$revsexpected = array();
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 8192, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 512, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
}
@@ -147,14 +171,16 @@ class changelog_getrevisions_test extends DokuWikiTest {
* Negative range returns no result
*/
function test_negativennumoffset() {
- $first = 2;
- $num = -10;
+ $first = 2;
+ $num = -10;
$revsexpected = array();
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 8192, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 512, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
}
@@ -162,14 +188,16 @@ class changelog_getrevisions_test extends DokuWikiTest {
* zero range returns no result
*/
function test_zeronum() {
- $first = 5;
- $num = 0;
+ $first = 5;
+ $num = 0;
$revsexpected = array();
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 8192, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 512, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 512);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
}
@@ -177,11 +205,12 @@ class changelog_getrevisions_test extends DokuWikiTest {
* get oldest revisions
*/
function test_requestlargeoffset() {
- $first = 22;
- $num = 50;
+ $first = 22;
+ $num = 50;
$revsexpected = array_slice($this->revsexpected, $first + 1);
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 8192, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
}
@@ -189,11 +218,12 @@ class changelog_getrevisions_test extends DokuWikiTest {
* request with too large offset and range
*/
function test_requesttoolargenumberrevs() {
- $first = 50;
- $num = 50;
+ $first = 50;
+ $num = 50;
$revsexpected = array();
- $revs = getRevisions($this->pageid, $first, $num, $chunk_size = 8192, $media = false);
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getRevisions($first, $num);
$this->assertEquals($revsexpected, $revs);
}
diff --git a/_test/tests/inc/cli_options.test.php b/_test/tests/inc/cli_options.test.php
new file mode 100644
index 000000000..ab03ee29b
--- /dev/null
+++ b/_test/tests/inc/cli_options.test.php
@@ -0,0 +1,56 @@
+<?php
+
+class cli_options extends DokuWikiTest {
+
+ function test_simpleshort() {
+ $options = new DokuCLI_Options();
+ $options->registerOption('exclude', 'exclude files', 'x', 'file');
+
+ $options->args = array('-x', 'foo', 'bang');
+ $options->parseOptions();
+
+ $this->assertEquals('foo', $options->getOpt('exclude'));
+ $this->assertEquals(array('bang'), $options->args);
+ $this->assertFalse($options->getOpt('nothing'));
+ }
+
+ function test_simplelong1() {
+ $options = new DokuCLI_Options();
+ $options->registerOption('exclude', 'exclude files', 'x', 'file');
+
+ $options->args = array('--exclude', 'foo', 'bang');
+ $options->parseOptions();
+
+ $this->assertEquals('foo', $options->getOpt('exclude'));
+ $this->assertEquals(array('bang'), $options->args);
+ $this->assertFalse($options->getOpt('nothing'));
+ }
+
+ function test_simplelong2() {
+ $options = new DokuCLI_Options();
+ $options->registerOption('exclude', 'exclude files', 'x', 'file');
+
+ $options->args = array('--exclude=foo', 'bang');
+ $options->parseOptions();
+
+ $this->assertEquals('foo', $options->getOpt('exclude'));
+ $this->assertEquals(array('bang'), $options->args);
+ $this->assertFalse($options->getOpt('nothing'));
+ }
+
+ function test_complex() {
+ $options = new DokuCLI_Options();
+
+ $options->registerOption('plugins', 'run on plugins only', 'p');
+ $options->registerCommand('status', 'display status info');
+ $options->registerOption('long', 'display long lines', 'l', false, 'status');
+
+ $options->args = array('-p', 'status', '--long', 'foo');
+ $options->parseOptions();
+
+ $this->assertEquals('status', $options->getCmd());
+ $this->assertTrue($options->getOpt('plugins'));
+ $this->assertTrue($options->getOpt('long'));
+ $this->assertEquals(array('foo'), $options->args);
+ }
+} \ No newline at end of file
diff --git a/_test/tests/inc/common_pageinfo.test.php b/_test/tests/inc/common_pageinfo.test.php
index 0a1ea0a8f..2b230d9ce 100644
--- a/_test/tests/inc/common_pageinfo.test.php
+++ b/_test/tests/inc/common_pageinfo.test.php
@@ -38,6 +38,7 @@ class common_pageinfo_test extends DokuWikiTest {
$info['writable'] = true;
$info['editable'] = true;
$info['lastmod'] = false;
+ $info['currentrev'] = false;
$info['meta'] = array();
$info['ip'] = null;
$info['user'] = null;
@@ -77,6 +78,7 @@ class common_pageinfo_test extends DokuWikiTest {
$info['filepath'] = $filename;
$info['exists'] = true;
$info['lastmod'] = $rev;
+ $info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID);
$this->assertEquals($info, pageinfo());
@@ -101,6 +103,7 @@ class common_pageinfo_test extends DokuWikiTest {
$info['filepath'] = $filename;
$info['exists'] = true;
$info['lastmod'] = $rev;
+ $info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID);
$info['rev'] = '';
@@ -131,6 +134,7 @@ class common_pageinfo_test extends DokuWikiTest {
$info['namespace'] = 'wiki';
$info['meta'] = p_get_metadata($ID);
$info['rev'] = $REV;
+ $info['currentrev'] = $rev;
$info['filepath'] = str_replace('pages','attic',substr($filename,0,-3).$REV.'.txt.gz');
$this->assertEquals($info, pageinfo());
@@ -153,6 +157,7 @@ class common_pageinfo_test extends DokuWikiTest {
$info['namespace'] = 'wiki';
$info['exists'] = true;
$info['lastmod'] = $rev;
+ $info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID);
$info['filepath'] = $filename;
@@ -197,6 +202,7 @@ class common_pageinfo_test extends DokuWikiTest {
$info['filepath'] = $filename;
$info['exists'] = true;
$info['lastmod'] = $rev;
+ $info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID); // need $INFO set correctly for addLogEntry()
global $INFO;
@@ -226,6 +232,7 @@ class common_pageinfo_test extends DokuWikiTest {
touch($filename,$now);
$info['lastmod'] = $now;
+ $info['currentrev'] = $now;
$info['meta']['last_change'] = false;
$info['ip'] = null;
$info['user'] = null;
@@ -251,6 +258,7 @@ class common_pageinfo_test extends DokuWikiTest {
$info['filepath'] = $filename;
$info['exists'] = true;
$info['lastmod'] = $rev;
+ $info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID);
// setup a draft, make it more recent than the current page
diff --git a/_test/tests/inc/common_stripsourcemaps.test.php b/_test/tests/inc/common_stripsourcemaps.test.php
new file mode 100644
index 000000000..c6a915dcf
--- /dev/null
+++ b/_test/tests/inc/common_stripsourcemaps.test.php
@@ -0,0 +1,29 @@
+<?php
+
+class common_stripsourcemaps_test extends DokuWikiTest {
+
+ function test_all() {
+
+ $text = <<<EOL
+//@ sourceMappingURL=/foo/bar/xxx.map
+//# sourceMappingURL=/foo/bar/xxx.map
+/*@ sourceMappingURL=/foo/bar/xxx.map */
+/*# sourceMappingURL=/foo/bar/xxx.map */
+bang
+EOL;
+
+ $expect = <<<EOL
+//
+//
+/**/
+/**/
+bang
+EOL;
+
+ stripsourcemaps($text);
+
+
+ $this->assertEquals($expect, $text);
+ }
+
+} \ No newline at end of file
diff --git a/_test/tests/inc/httpclient_http.test.php b/_test/tests/inc/httpclient_http.test.php
index 43dd4478f..3446e1184 100644
--- a/_test/tests/inc/httpclient_http.test.php
+++ b/_test/tests/inc/httpclient_http.test.php
@@ -1,15 +1,22 @@
<?php
+require_once (__DIR__ . '/httpclient_mock.php');
+
class httpclient_http_test extends DokuWikiTest {
protected $server = 'http://httpbin.org';
+
/**
* @group internet
*/
function test_simpleget(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get($this->server.'/get?foo=bar');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('args',$resp);
@@ -20,9 +27,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_dget(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->dget($this->server.'/get',array('foo'=>'bar'));
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('args',$resp);
@@ -33,9 +44,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_gzip(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get($this->server.'/gzip');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('gzipped',$resp);
@@ -46,9 +61,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_simplepost(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->post($this->server.'/post',array('foo'=>'bar'));
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('form',$resp);
@@ -59,9 +78,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_redirect(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get($this->server.'/redirect/3');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('url',$resp);
@@ -72,9 +95,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_relredirect(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get($this->server.'/relative-redirect/3');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('url',$resp);
@@ -85,9 +112,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_redirectfail(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get($this->server.'/redirect/5');
- $this->assertTrue($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertTrue($data === false, 'HTTP response '.$http->error);
$this->assertEquals('Maximum number of redirects exceeded',$http->error);
}
@@ -95,11 +126,19 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_cookies(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$http->get($this->server.'/cookies/set/foo/bar');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
$this->assertEquals(array('foo' => 'bar'), $http->cookies);
$data = $http->get($this->server.'/cookies');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('cookies',$resp);
@@ -110,9 +149,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_teapot(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get($this->server.'/status/418');
- $this->assertTrue($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertTrue($data === false, 'HTTP response '.$http->error);
$this->assertEquals(418,$http->status);
}
@@ -120,18 +163,26 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_maxbody(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$http->max_bodysize = 250;
// this should abort completely
$data = $http->get($this->server.'/stream/30');
- $this->assertTrue($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertTrue($data === false, 'HTTP response '.$http->error);
// this should read just the needed bytes
$http->max_bodysize_abort = false;
$http->keep_alive = false;
$data = $http->get($this->server.'/stream/30');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
/* should read no more than max_bodysize+1 */
$this->assertLessThanOrEqual(251,strlen($data));
}
@@ -140,24 +191,36 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_maxbodyok(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$http->max_bodysize = 500*1024;
$data = $http->get($this->server.'/stream/5');
- $this->assertTrue($data !== false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertTrue($data !== false, 'HTTP response '.$http->error);
$http->max_bodysize_abort = false;
$data = $http->get($this->server.'/stream/5');
- $this->assertTrue($data !== false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertTrue($data !== false, 'HTTP response '.$http->error);
}
/**
* @group internet
*/
function test_basicauth(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$http->user = 'user';
$http->pass = 'pass';
$data = $http->get($this->server.'/basic-auth/user/pass');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertEquals(array('authenticated'=>true,'user'=>'user'), $resp);
@@ -167,11 +230,15 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_basicauthfail(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$http->user = 'user';
$http->pass = 'invalid';
$data = $http->get($this->server.'/basic-auth/user/pass');
- $this->assertTrue($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertTrue($data === false, 'HTTP response '.$http->error);
$this->assertEquals(401,$http->status);
}
@@ -179,10 +246,10 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_timeout(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$http->timeout = 5;
$data = $http->get($this->server.'/delay/10');
- $this->assertTrue($data === false, 'HTTP response');
+ $this->assertTrue($data === false, 'HTTP response '.$http->error);
$this->assertEquals(-100,$http->status);
}
@@ -190,9 +257,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_headers(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get($this->server.'/response-headers?baz=&foo=bar');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('baz',$http->resp_headers);
@@ -204,9 +275,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_chunked(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get('http://whoopdedo.org/cgi-bin/chunked/2550');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$this->assertEquals(2550,strlen($data));
}
@@ -216,13 +291,17 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_wikimatrix(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get('http://www.wikimatrix.org/cfeed/dokuwiki/-/-');
- $this->assertTrue($data !== false, $http->error);
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertTrue($data !== false, 'HTTP response '.$http->error);
}
function test_postencode(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
// check simple data
diff --git a/_test/tests/inc/httpclient_http_proxy.test.php b/_test/tests/inc/httpclient_http_proxy.test.php
index 4aa039fcc..c44dc7ed7 100644
--- a/_test/tests/inc/httpclient_http_proxy.test.php
+++ b/_test/tests/inc/httpclient_http_proxy.test.php
@@ -1,5 +1,7 @@
<?php
+require_once (__DIR__ . '/httpclient_mock.php');
+
class httpclient_http_proxy_test extends DokuWikiTest {
protected $url = 'http://test.dokuwiki.org/README';
@@ -7,7 +9,7 @@ class httpclient_http_proxy_test extends DokuWikiTest {
* @group internet
*/
function test_simpleget(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
// proxy provided by Andrwe Lord Weber <dokuwiki@andrwe.org>
$http->proxy_host = 'proxy.andrwe.org';
$http->proxy_port = 8080;
@@ -16,5 +18,4 @@ class httpclient_http_proxy_test extends DokuWikiTest {
$this->assertFalse($data === false, 'HTTP response '.$http->error);
$this->assertTrue(strpos($data,'DokuWiki') !== false, 'response content');
}
-
} \ No newline at end of file
diff --git a/_test/tests/inc/httpclient_https_proxy.test.php b/_test/tests/inc/httpclient_https_proxy.test.php
index aca3b3be2..9402e91af 100644
--- a/_test/tests/inc/httpclient_https_proxy.test.php
+++ b/_test/tests/inc/httpclient_https_proxy.test.php
@@ -12,4 +12,19 @@ class httpclient_https_proxy_test extends httpclient_http_proxy_test {
}
parent::setUp();
}
+
+ /**
+ * @group internet
+ */
+ function test_connectfail(){
+ $http = new HTTPMockClient();
+ // proxy provided by Andrwe Lord Weber <dokuwiki@andrwe.org>
+ $http->proxy_host = 'proxy.andrwe.org';
+ $http->proxy_port = 8080;
+
+ // the proxy accepts connections to dokuwiki.org only - the connect call should fail
+ $data = $http->get('https://www.google.com');
+ $this->assertFalse($data);
+ $this->assertEquals(-150, $http->status);
+ }
} \ No newline at end of file
diff --git a/_test/tests/inc/httpclient_mock.php b/_test/tests/inc/httpclient_mock.php
new file mode 100644
index 000000000..038045c8b
--- /dev/null
+++ b/_test/tests/inc/httpclient_mock.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Class HTTPMockClient
+ *
+ * Does not really mock the client, it still does real connections but will retry failed connections
+ * to work around shaky connectivity.
+ */
+class HTTPMockClient extends HTTPClient {
+ protected $tries;
+
+ /**
+ * Sets shorter timeout
+ */
+ function __construct() {
+ parent::__construct();
+ $this->timeout = 8; // slightly faster timeouts
+ }
+
+ /**
+ * Returns true if the connection timed out
+ *
+ * @return bool
+ */
+ function noconnection() {
+ return ($this->tries === 0);
+ }
+
+ /**
+ * Retries sending the request multiple times
+ *
+ * @param string $url
+ * @param string $data
+ * @param string $method
+ * @return bool
+ */
+ function sendRequest($url, $data = '', $method = 'GET') {
+ $this->tries = 2; // configures the number of retries
+ $return = false;
+ while($this->tries) {
+ $return = parent::sendRequest($url, $data, $method);
+ if($this->status != -100) break;
+ $this->tries--;
+ }
+ return $return;
+ }
+} \ No newline at end of file
diff --git a/_test/tests/inc/input.test.php b/_test/tests/inc/input.test.php
index 59b5ea4b9..cec0b80f6 100644
--- a/_test/tests/inc/input.test.php
+++ b/_test/tests/inc/input.test.php
@@ -214,6 +214,25 @@ class input_test extends DokuWikiTest {
$this->assertEquals('bla',$test);
}
+ public function test_valid(){
+ $_REQUEST = $this->data;
+ $_POST = $this->data;
+ $_GET = $this->data;
+ $INPUT = new Input();
+
+ $valids = array(17, 'foo');
+ $this->assertSame(null, $INPUT->valid('nope', $valids));
+ $this->assertSame('bang', $INPUT->valid('nope', $valids, 'bang'));
+ $this->assertSame(17, $INPUT->valid('int', $valids));
+ $this->assertSame('foo', $INPUT->valid('string', $valids));
+ $this->assertSame(null, $INPUT->valid('array', $valids));
+
+ $valids = array(true);
+ $this->assertSame(true, $INPUT->valid('string', $valids));
+ $this->assertSame(true, $INPUT->valid('one', $valids));
+ $this->assertSame(null, $INPUT->valid('zero', $valids));
+ }
+
public function test_extract(){
$_REQUEST = $this->data;
$_POST = $this->data;
diff --git a/_test/tests/inc/io_rmdir.test.php b/_test/tests/inc/io_rmdir.test.php
index 3de57fa86..1c0eccb38 100644
--- a/_test/tests/inc/io_rmdir.test.php
+++ b/_test/tests/inc/io_rmdir.test.php
@@ -4,7 +4,7 @@ class io_rmdir_test extends DokuWikiTest {
function test_nopes(){
// set up test dir
- $dir = io_mktmpdir();
+ $dir = realpath(io_mktmpdir());
$top = dirname($dir);
$this->assertTrue($dir !== false);
$this->assertTrue(is_dir($dir));
diff --git a/_test/tests/inc/mailer.test.php b/_test/tests/inc/mailer.test.php
index 4541d9906..50d282864 100644
--- a/_test/tests/inc/mailer.test.php
+++ b/_test/tests/inc/mailer.test.php
@@ -191,7 +191,10 @@ class mailer_test extends DokuWikiTest {
// ask message lint if it is okay
$html = new HTTPClient();
$results = $html->post('http://tools.ietf.org/tools/msglint/msglint', array('msg'=>$msg));
- $this->assertTrue($results !== false);
+ if($results === false) {
+ $this->markTestSkipped('no response from validator');
+ return;
+ }
// parse the result lines
$lines = explode("\n", $results);
diff --git a/_test/tests/inc/parser/parser.inc.php b/_test/tests/inc/parser/parser.inc.php
index 61f15678b..f1207b119 100644
--- a/_test/tests/inc/parser/parser.inc.php
+++ b/_test/tests/inc/parser/parser.inc.php
@@ -3,7 +3,7 @@
require_once DOKU_INC . 'inc/parser/parser.php';
require_once DOKU_INC . 'inc/parser/handler.php';
-abstract class TestOfDoku_Parser extends PHPUnit_Framework_TestCase {
+abstract class TestOfDoku_Parser extends DokuWikiTest {
var $P;
var $H;
diff --git a/_test/tests/inc/parser/parser_quotes.test.php b/_test/tests/inc/parser/parser_quotes.test.php
index b82328212..6f174ddae 100644
--- a/_test/tests/inc/parser/parser_quotes.test.php
+++ b/_test/tests/inc/parser/parser_quotes.test.php
@@ -10,8 +10,9 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
}
function testSingleQuoteOpening() {
+ $raw = "Foo 'hello Bar";
$this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
- $this->P->parse("Foo 'hello Bar");
+ $this->P->parse($raw);
$calls = array (
array('document_start',array()),
@@ -23,12 +24,13 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls, 'wikitext => '.$raw);
}
function testSingleQuoteOpeningSpecial() {
+ $raw = "Foo said:'hello Bar";
$this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
- $this->P->parse("Foo said:'hello Bar");
+ $this->P->parse($raw);
$calls = array (
array('document_start',array()),
@@ -40,12 +42,13 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls, 'wikitext => '.$raw);
}
function testSingleQuoteClosing() {
+ $raw = "Foo hello' Bar";
$this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
- $this->P->parse("Foo hello' Bar");
+ $this->P->parse($raw);
$calls = array (
array('document_start',array()),
@@ -57,12 +60,13 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls, 'wikitext => '.$raw);
}
function testSingleQuoteClosingSpecial() {
+ $raw = "Foo hello') Bar";
$this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
- $this->P->parse("Foo hello') Bar");
+ $this->P->parse($raw);
$calls = array (
array('document_start',array()),
@@ -74,12 +78,13 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls, 'wikitext => '.$raw);
}
function testSingleQuotes() {
+ $raw = "Foo 'hello' Bar";
$this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
- $this->P->parse("Foo 'hello' Bar");
+ $this->P->parse($raw);
$calls = array (
array('document_start',array()),
@@ -93,12 +98,13 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls, 'wikitext => '.$raw);
}
function testApostrophe() {
+ $raw = "hey it's fine weather today";
$this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
- $this->P->parse("hey it's fine weather today");
+ $this->P->parse($raw);
$calls = array (
array('document_start',array()),
@@ -110,13 +116,14 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls, 'wikitext => '.$raw);
}
function testSingleQuotesSpecial() {
+ $raw = "Foo ('hello') Bar";
$this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
- $this->P->parse("Foo ('hello') Bar");
+ $this->P->parse($raw);
$calls = array (
array('document_start',array()),
@@ -130,12 +137,13 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls, 'wikitext => '.$raw);
}
function testDoubleQuoteOpening() {
+ $raw = 'Foo "hello Bar';
$this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
- $this->P->parse('Foo "hello Bar');
+ $this->P->parse($raw);
$calls = array (
array('document_start',array()),
@@ -147,12 +155,13 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls, 'wikitext => '.$raw);
}
function testDoubleQuoteOpeningSpecial() {
+ $raw = 'Foo said:"hello Bar';
$this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
- $this->P->parse('Foo said:"hello Bar');
+ $this->P->parse($raw);
$calls = array (
array('document_start',array()),
@@ -164,12 +173,14 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls, 'wikitext => '.$raw);
}
function testDoubleQuoteClosing() {
+ $raw = 'Foo hello" Bar';
$this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
- $this->P->parse('Foo hello" Bar');
+ $this->H->status['doublequote'] = 1;
+ $this->P->parse($raw);
$calls = array (
array('document_start',array()),
@@ -181,12 +192,14 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls, 'wikitext => '.$raw);
}
function testDoubleQuoteClosingSpecial() {
+ $raw = 'Foo hello") Bar';
$this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
- $this->P->parse('Foo hello") Bar');
+ $this->H->status['doublequote'] = 1;
+ $this->P->parse($raw);
$calls = array (
array('document_start',array()),
@@ -198,12 +211,31 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls, 'wikitext => '.$raw);
+ }
+ function testDoubleQuoteClosingSpecial2() {
+ $raw = 'Foo hello") Bar';
+ $this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
+ $this->H->status['doublequote'] = 0;
+ $this->P->parse($raw);
+
+ $calls = array (
+ array('document_start',array()),
+ array('p_open',array()),
+ array('cdata',array("\n".'Foo hello')),
+ array('doublequoteopening',array()),
+ array('cdata',array(') Bar')),
+ array('p_close',array()),
+ array('document_end',array()),
+ );
+
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls, 'wikitext => '.$raw);
}
function testDoubleQuotes() {
+ $raw = 'Foo "hello" Bar';
$this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
- $this->P->parse('Foo "hello" Bar');
+ $this->P->parse($raw);
$calls = array (
array('document_start',array()),
@@ -217,12 +249,13 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls, 'wikitext => '.$raw);
}
function testDoubleQuotesSpecial() {
+ $raw = 'Foo ("hello") Bar';
$this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
- $this->P->parse('Foo ("hello") Bar');
+ $this->P->parse($raw);
$calls = array (
array('document_start',array()),
@@ -236,12 +269,54 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls, 'wikitext => '.$raw);
+ }
+
+ function testDoubleQuotesEnclosingBrackets() {
+ $raw = 'Foo "{hello}" Bar';
+ $this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
+ $this->P->parse($raw);
+
+ $calls = array (
+ array('document_start',array()),
+ array('p_open',array()),
+ array('cdata',array("\n".'Foo ')),
+ array('doublequoteopening',array()),
+ array('cdata',array('{hello}')),
+ array('doublequoteclosing',array()),
+ array('cdata',array(' Bar')),
+ array('p_close',array()),
+ array('document_end',array()),
+ );
+
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls,'wikitext - '.$raw);
+ }
+
+ function testDoubleQuotesEnclosingLink() {
+ $raw = 'Foo "[[www.domain.com]]" Bar';
+ $this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
+ $this->P->parse($raw);
+
+ $calls = array (
+ array('document_start',array()),
+ array('p_open',array()),
+ array('cdata',array("\n".'Foo ')),
+ array('doublequoteopening',array()),
+ array('cdata',array('[[www.domain.com]]')),
+ array('doublequoteclosing',array()),
+ array('cdata',array(' Bar')),
+ array('p_close',array()),
+ array('document_end',array()),
+ );
+
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls,'wikitext => '.$raw);
}
+
function testAllQuotes() {
+ $raw = 'There was written "He thought \'It\'s a man\'s world\'".';
$this->P->addMode('quotes',new Doku_Parser_Mode_Quotes());
- $this->P->parse('There was written "He thought \'It\'s a man\'s world\'".');
+ $this->P->parse($raw);
$calls = array (
array('document_start',array()),
@@ -262,7 +337,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser {
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls,'wikitext => '.$raw);
}
}
diff --git a/_test/tests/inc/parser/parser_table.test.php b/_test/tests/inc/parser/parser_table.test.php
index bc19ebff9..a9b4e284c 100644
--- a/_test/tests/inc/parser/parser_table.test.php
+++ b/_test/tests/inc/parser/parser_table.test.php
@@ -44,7 +44,7 @@ def');
array('p_close',array()),
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
}
function testTableWinEOL() {
@@ -84,7 +84,7 @@ def');
array('p_close',array()),
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
}
function testEmptyTable() {
@@ -109,7 +109,7 @@ def');
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
}
function testTableHeaders() {
@@ -143,7 +143,152 @@ def');
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
+
+ }
+
+ function testTableHead() {
+ $this->P->addMode('table',new Doku_Parser_Mode_Table());
+ $this->P->parse('
+abc
+^ X ^ Y ^ Z ^
+| x | y | z |
+def');
+
+ $calls = array (
+ array('document_start',array()),
+ array('p_open',array()),
+ array('cdata',array("\n\nabc")),
+ array('p_close',array()),
+ array('table_open',array(3, 2, 6)),
+ array('tablethead_open',array()),
+ array('tablerow_open',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' X ')),
+ array('tableheader_close',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' Y ')),
+ array('tableheader_close',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' Z ')),
+ array('tableheader_close',array()),
+ array('tablerow_close',array()),
+ array('tablethead_close',array()),
+ array('tablerow_open',array()),
+ array('tablecell_open',array(1,NULL,1)),
+ array('cdata',array(' x ')),
+ array('tablecell_close',array()),
+ array('tablecell_open',array(1,NULL,1)),
+ array('cdata',array(' y ')),
+ array('tablecell_close',array()),
+ array('tablecell_open',array(1,NULL,1)),
+ array('cdata',array(' z ')),
+ array('tablecell_close',array()),
+ array('tablerow_close',array()),
+ array('table_close',array(33)),
+ array('p_open',array()),
+ array('cdata',array('def')),
+ array('p_close',array()),
+ array('document_end',array()),
+ );
+
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
+
+ }
+
+ function testTableHeadOneRowTable() {
+ $this->P->addMode('table',new Doku_Parser_Mode_Table());
+ $this->P->parse('
+abc
+^ X ^ Y ^ Z ^
+def');
+
+ $calls = array (
+ array('document_start',array()),
+ array('p_open',array()),
+ array('cdata',array("\n\nabc")),
+ array('p_close',array()),
+ array('table_open',array(3, 1, 6)),
+ array('tablerow_open',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' X ')),
+ array('tableheader_close',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' Y ')),
+ array('tableheader_close',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' Z ')),
+ array('tableheader_close',array()),
+ array('tablerow_close',array()),
+ array('table_close',array(19)),
+ array('p_open',array()),
+ array('cdata',array('def')),
+ array('p_close',array()),
+ array('document_end',array()),
+ );
+
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
+
+ }
+
+ function testTableHeadMultiline() {
+ $this->P->addMode('table',new Doku_Parser_Mode_Table());
+ $this->P->parse('
+abc
+^ X1 ^ Y1 ^ Z1 ^
+^ X2 ^ Y2 ^ Z2 ^
+| A | B | C |
+def');
+
+ $calls = array (
+ array('document_start',array()),
+ array('p_open',array()),
+ array('cdata',array("\n\nabc")),
+ array('p_close',array()),
+ array('table_open',array(3, 3, 6)),
+ array('tablethead_open',array()),
+ array('tablerow_open',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' X1 ')),
+ array('tableheader_close',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' Y1 ')),
+ array('tableheader_close',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' Z1 ')),
+ array('tableheader_close',array()),
+ array('tablerow_close',array()),
+ array('tablerow_open',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' X2 ')),
+ array('tableheader_close',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' Y2 ')),
+ array('tableheader_close',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' Z2 ')),
+ array('tableheader_close',array()),
+ array('tablerow_close',array()),
+ array('tablethead_close',array()),
+ array('tablerow_open',array()),
+ array('tablecell_open',array(1,NULL,1)),
+ array('cdata',array(' A ')),
+ array('tablecell_close',array()),
+ array('tablecell_open',array(1,NULL,1)),
+ array('cdata',array(' B ')),
+ array('tablecell_close',array()),
+ array('tablecell_open',array(1,NULL,1)),
+ array('cdata',array(' C ')),
+ array('tablecell_close',array()),
+ array('tablerow_close',array()),
+ array('table_close',array(53)),
+ array('p_open',array()),
+ array('cdata',array('def')),
+ array('p_close',array()),
+ array('document_end',array()),
+ );
+
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
}
@@ -178,7 +323,7 @@ def');
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
}
function testCellSpan() {
@@ -220,7 +365,7 @@ def');
array('p_close',array()),
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
}
function testCellRowSpan() {
@@ -268,7 +413,7 @@ def');
array('p_close',array()),
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
}
function testCellRowSpanFirstRow() {
@@ -326,9 +471,134 @@ def');
array('p_close',array()),
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
}
+ function testRowSpanTableHead() {
+ $this->P->addMode('table',new Doku_Parser_Mode_Table());
+ $this->P->parse('
+abc
+^ X1 ^ Y1 ^ Z1 ^
+^ X2 ^ ::: ^ Z2 ^
+| A3 | B3 | C3 |
+def');
+
+ $calls = array (
+ array('document_start',array()),
+ array('p_open',array()),
+ array('cdata',array("\n\nabc")),
+ array('p_close',array()),
+ array('table_open',array(3, 3, 6)),
+ array('tablethead_open',array()),
+ array('tablerow_open',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' X1 ')),
+ array('tableheader_close',array()),
+ array('tableheader_open',array(1,NULL,2)),
+ array('cdata',array(' Y1 ')),
+ array('tableheader_close',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' Z1 ')),
+ array('tableheader_close',array()),
+ array('tablerow_close',array()),
+ array('tablerow_open',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' X2 ')),
+ array('tableheader_close',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' Z2 ')),
+ array('tableheader_close',array()),
+ array('tablerow_close',array()),
+ array('tablethead_close',array()),
+ array('tablerow_open',array()),
+ array('tablecell_open',array(1,NULL,1)),
+ array('cdata',array(' A3 ')),
+ array('tablecell_close',array()),
+ array('tablecell_open',array(1,NULL,1)),
+ array('cdata',array(' B3 ')),
+ array('tablecell_close',array()),
+ array('tablecell_open',array(1,NULL,1)),
+ array('cdata',array(' C3 ')),
+ array('tablecell_close',array()),
+ array('tablerow_close',array()),
+ array('table_close',array(57)),
+ array('p_open',array()),
+ array('cdata',array('def')),
+ array('p_close',array()),
+ array('document_end',array()),
+ );
+
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
+
+ }
+
+ function testRowSpanAcrossTableHeadBoundary() {
+ $this->P->addMode('table',new Doku_Parser_Mode_Table());
+ $this->P->parse('
+abc
+^ X1 ^ Y1 ^ Z1 ^
+^ X2 ^ ::: ^ Z2 ^
+| A3 | ::: | C3 |
+| A4 | ::: | C4 |
+def');
+
+ $calls = array (
+ array('document_start',array()),
+ array('p_open',array()),
+ array('cdata',array("\n\nabc")),
+ array('p_close',array()),
+ array('table_open',array(3, 4, 6)),
+ array('tablethead_open',array()),
+ array('tablerow_open',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' X1 ')),
+ array('tableheader_close',array()),
+ array('tableheader_open',array(1,NULL,2)),
+ array('cdata',array(' Y1 ')),
+ array('tableheader_close',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' Z1 ')),
+ array('tableheader_close',array()),
+ array('tablerow_close',array()),
+ array('tablerow_open',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' X2 ')),
+ array('tableheader_close',array()),
+ array('tableheader_open',array(1,NULL,1)),
+ array('cdata',array(' Z2 ')),
+ array('tableheader_close',array()),
+ array('tablerow_close',array()),
+ array('tablethead_close',array()),
+ array('tablerow_open',array()),
+ array('tablecell_open',array(1,NULL,1)),
+ array('cdata',array(' A3 ')),
+ array('tablecell_close',array()),
+ array('tablecell_open',array(1,NULL,2)),
+ array('cdata',array('')),
+ array('tablecell_close',array()),
+ array('tablecell_open',array(1,NULL,1)),
+ array('cdata',array(' C3 ')),
+ array('tablecell_close',array()),
+ array('tablerow_close',array()),
+ array('tablerow_open',array()),
+ array('tablecell_open',array(1,NULL,1)),
+ array('cdata',array(' A4 ')),
+ array('tablecell_close',array()),
+ array('tablecell_open',array(1,NULL,1)),
+ array('cdata',array(' C4 ')),
+ array('tablecell_close',array()),
+ array('tablerow_close',array()),
+ array('table_close',array(76)),
+ array('p_open',array()),
+ array('cdata',array('def')),
+ array('p_close',array()),
+ array('document_end',array()),
+ );
+
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
+
+ }
+
function testCellAlignmentFormatting() {
$this->P->addMode('table',new Doku_Parser_Mode_Table());
$this->P->addMode('strong',new Doku_Parser_Mode_Formatting('strong'));
@@ -365,7 +635,7 @@ def');
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
}
@@ -411,7 +681,7 @@ def');
array('p_close',array()),
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
}
// This is really a failing test - formatting able to spread across cols
@@ -466,7 +736,7 @@ def');
array('p_close',array()),
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
}
// This is really a failing test - unformatted able to spread across cols
@@ -517,7 +787,7 @@ def');
array('p_close',array()),
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
}
function testTableLinebreak() {
@@ -565,7 +835,7 @@ def');
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
}
// This is really a failing test - footnote able to spread across cols
@@ -624,7 +894,7 @@ def');
array('p_close',array()),
array('document_end',array()),
);
- $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ $this->assertEquals($calls,array_map('stripbyteindex',$this->H->calls));
}
function testTable_FS1833() {
@@ -646,4 +916,3 @@ def');
}
}
-
diff --git a/_test/tests/inc/parser/renderer_resolveinterwiki.test.php b/_test/tests/inc/parser/renderer_resolveinterwiki.test.php
new file mode 100644
index 000000000..dd1ed1d3f
--- /dev/null
+++ b/_test/tests/inc/parser/renderer_resolveinterwiki.test.php
@@ -0,0 +1,53 @@
+<?php
+
+require_once DOKU_INC . 'inc/parser/renderer.php';
+
+/**
+ * Tests for Doku_Renderer::_resolveInterWiki()
+ */
+class Test_resolveInterwiki extends DokuWikiTest {
+
+ function testDefaults() {
+ $Renderer = new Doku_Renderer();
+ $Renderer->interwiki = getInterwiki();
+ $Renderer->interwiki['scheme'] = '{SCHEME}://example.com';
+ $Renderer->interwiki['withslash'] = '/test';
+ $Renderer->interwiki['onlytext'] = ':onlytext{NAME}'; //with {URL} double urlencoded
+ $Renderer->interwiki['withquery'] = ':anyns:{NAME}?do=edit';
+
+ $tests = array(
+ // shortcut, reference and expected
+ array('wp', 'foo @+%/#txt', 'http://en.wikipedia.org/wiki/foo @+%/#txt'),
+ array('amazon', 'foo @+%/#txt', 'http://www.amazon.com/exec/obidos/ASIN/foo%20%40%2B%25%2F/splitbrain-20/#txt'),
+ array('doku', 'foo @+%/#txt', 'http://www.dokuwiki.org/foo%20%40%2B%25%2F#txt'),
+ array('coral', 'http://example.com:83/path/naar/?query=foo%20%40%2B%25%2F', 'http://example.com.83.nyud.net:8090/path/naar/?query=foo%20%40%2B%25%2F'),
+ array('scheme', 'ftp://foo @+%/#txt', 'ftp://example.com#txt'),
+ //relative url
+ array('withslash', 'foo @+%/#txt', '/testfoo%20%40%2B%25%2F#txt'),
+ array('skype', 'foo @+%/#txt', 'skype:foo @+%/#txt'),
+ //dokuwiki id's
+ array('onlytext', 'foo @+%#txt', DOKU_BASE.'doku.php?id=onlytextfoo#txt'),
+ array('user', 'foo @+%#txt', DOKU_BASE.'doku.php?id=user:foo#txt'),
+ array('withquery', 'foo @+%#txt', DOKU_BASE.'doku.php?id=anyns:foo&amp;do=edit#txt')
+ );
+
+ foreach($tests as $test) {
+ $url = $Renderer->_resolveInterWiki($test[0], $test[1]);
+
+ $this->assertEquals($test[2], $url);
+ }
+ }
+
+ function testNonexisting() {
+ $Renderer = new Doku_Renderer();
+ $Renderer->interwiki = getInterwiki();
+
+ $shortcut = 'nonexisting';
+ $reference = 'foo @+%/';
+ $url = $Renderer->_resolveInterWiki($shortcut, $reference);
+ $expected = 'http://www.google.com/search?q=foo%20%40%2B%25%2F&amp;btnI=lucky';
+
+ $this->assertEquals($expected, $url);
+ }
+
+} \ No newline at end of file
diff --git a/_test/tests/inc/parserutils_get_renderer.test.php b/_test/tests/inc/parserutils_get_renderer.test.php
new file mode 100644
index 000000000..0f373227d
--- /dev/null
+++ b/_test/tests/inc/parserutils_get_renderer.test.php
@@ -0,0 +1,79 @@
+<?php
+
+class parserutils_get_renderer_test extends DokuWikiTest {
+
+ private $plugin_controller;
+
+ // test default behaviour / usual settings
+ function test_p_get_renderer_normal() {
+ global $conf;
+
+ $old_conf = $conf;
+ $conf['renderer_xhtml'] = 'xhtml';
+
+ $this->assertInstanceOf('Doku_Renderer_xhtml', p_get_renderer('xhtml'));
+
+ $conf = $old_conf;
+ }
+
+ // test get a renderer plugin
+ function test_p_get_renderer_plugin() {
+ global $conf;
+ global $plugin_controller;
+
+ $old_conf = $conf;
+ $conf['renderer_xhtml'] = 'get_renderer_test';
+ $this->plugin_controller = $plugin_controller;
+ $plugin_controller = $this;
+
+ $this->assertInstanceOf('renderer_plugin_test', p_get_renderer('xhtml'));
+
+ $conf = $old_conf;
+ $plugin_controller = $this->plugin_controller;
+ }
+
+ // test fallback succeeds
+ function test_p_get_renderer_fallback() {
+ global $conf;
+
+ $old_conf = $conf;
+ $conf['renderer_xhtml'] = 'badvalue';
+
+ $this->assertInstanceOf('Doku_Renderer_xhtml', p_get_renderer('xhtml'));
+
+ $conf = $old_conf;
+ }
+
+ // test fallback fails
+ function test_p_get_renderer_fallback_fail() {
+ global $conf;
+
+ $old_conf = $conf;
+ $conf['renderer_junk'] = 'badvalue';
+
+ $this->assertNull(p_get_renderer('junk'));
+
+ $conf = $old_conf;
+ }
+
+ // wrapper function for the fake plugin controller, return $this for the fake syntax of this test
+ function load($type,$name,$new=false,$disabled=false){
+ if ($name == 'get_renderer_test') {
+ return new renderer_plugin_test();
+ } else {
+ return $this->plugin_controller->load($type, $name, $new, $disabled);
+ }
+ }
+ }
+
+require_once DOKU_INC . 'inc/parser/xhtml.php';
+
+class renderer_plugin_test extends Doku_Renderer_xhtml {
+
+ function canRender($format) {
+ return ($format=='xhtml');
+ }
+
+}
+
+// vim:ts=4:sw=4:et:
diff --git a/_test/tests/inc/tar.test.php b/_test/tests/inc/tar.test.php
index 417f1a853..15453b16d 100644
--- a/_test/tests/inc/tar.test.php
+++ b/_test/tests/inc/tar.test.php
@@ -1,6 +1,38 @@
<?php
class Tar_TestCase extends DokuWikiTest {
+ /**
+ * file extensions that several tests use
+ */
+ protected $extensions = array('tar');
+
+ public function setUp() {
+ parent::setUp();
+ if (extension_loaded('zlib')) {
+ $this->extensions[] = 'tgz';
+ }
+ if (extension_loaded('bz2')) {
+ $this->extensions[] = 'tbz';
+ }
+ }
+
+ /*
+ * dependency for tests needing zlib extension to pass
+ */
+ public function test_ext_zlib() {
+ if (!extension_loaded('zlib')) {
+ $this->markTestSkipped('skipping all zlib tests. Need zlib extension');
+ }
+ }
+
+ /*
+ * dependency for tests needing zlib extension to pass
+ */
+ public function test_ext_bz2() {
+ if (!extension_loaded('bz2')) {
+ $this->markTestSkipped('skipping all bzip2 tests. Need bz2 extension');
+ }
+ }
/**
* simple test that checks that the given filenames and contents can be grepped from
@@ -58,8 +90,6 @@ class Tar_TestCase extends DokuWikiTest {
$tar->addData('another/testdata3.txt', 'testcontent3');
$tar->close();
-copy ($tmp, '/tmp/test.tar');
-
$this->assertTrue(filesize($tmp) > 30); //arbitrary non-zero number
$data = file_get_contents($tmp);
@@ -89,7 +119,7 @@ copy ($tmp, '/tmp/test.tar');
public function test_tarcontent() {
$dir = dirname(__FILE__).'/tar';
- foreach(array('tar', 'tgz', 'tbz') as $ext) {
+ foreach($this->extensions as $ext) {
$tar = new Tar();
$file = "$dir/test.$ext";
@@ -112,7 +142,7 @@ copy ($tmp, '/tmp/test.tar');
$dir = dirname(__FILE__).'/tar';
$out = sys_get_temp_dir().'/dwtartest'.md5(time());
- foreach(array('tar', 'tgz', 'tbz') as $ext) {
+ foreach($this->extensions as $ext) {
$tar = new Tar();
$file = "$dir/test.$ext";
@@ -138,7 +168,7 @@ copy ($tmp, '/tmp/test.tar');
$dir = dirname(__FILE__).'/tar';
$out = sys_get_temp_dir().'/dwtartest'.md5(time());
- foreach(array('tar', 'tgz', 'tbz') as $ext) {
+ foreach($this->extensions as $ext) {
$tar = new Tar();
$file = "$dir/test.$ext";
@@ -164,7 +194,7 @@ copy ($tmp, '/tmp/test.tar');
$dir = dirname(__FILE__).'/tar';
$out = sys_get_temp_dir().'/dwtartest'.md5(time());
- foreach(array('tar', 'tgz', 'tbz') as $ext) {
+ foreach($this->extensions as $ext) {
$tar = new Tar();
$file = "$dir/test.$ext";
@@ -190,7 +220,7 @@ copy ($tmp, '/tmp/test.tar');
$dir = dirname(__FILE__).'/tar';
$out = sys_get_temp_dir().'/dwtartest'.md5(time());
- foreach(array('tar', 'tgz', 'tbz') as $ext) {
+ foreach($this->extensions as $ext) {
$tar = new Tar();
$file = "$dir/test.$ext";
@@ -215,7 +245,7 @@ copy ($tmp, '/tmp/test.tar');
$dir = dirname(__FILE__).'/tar';
$out = sys_get_temp_dir().'/dwtartest'.md5(time());
- foreach(array('tar', 'tgz', 'tbz') as $ext) {
+ foreach($this->extensions as $ext) {
$tar = new Tar();
$file = "$dir/test.$ext";
@@ -249,6 +279,9 @@ copy ($tmp, '/tmp/test.tar');
$this->assertEquals(Tar::COMPRESS_BZIP, $tar->filetype('foo.tar.bz2'));
}
+ /**
+ * @depends test_ext_zlib
+ */
public function test_longpathextract() {
$dir = dirname(__FILE__).'/tar';
$out = sys_get_temp_dir().'/dwtartest'.md5(time());
@@ -338,6 +371,7 @@ copy ($tmp, '/tmp/test.tar');
/**
* Extract a tarbomomb
+ * @depends test_ext_zlib
*/
public function test_tarbomb() {
$dir = dirname(__FILE__).'/tar';
diff --git a/_test/tests/inc/utf8_romanize.test.php b/_test/tests/inc/utf8_romanize.test.php
index d08346faa..353d48c00 100644
--- a/_test/tests/inc/utf8_romanize.test.php
+++ b/_test/tests/inc/utf8_romanize.test.php
@@ -5,7 +5,7 @@ if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1);
/**
* @group slow
*/
-class utf8_romanize_test extends PHPUnit_Framework_TestCase {
+class utf8_romanize_test extends DokuWikiTest {
/**
* Check Japanese romanization
diff --git a/_test/tests/inc/utf8_strtolower.test.php b/_test/tests/inc/utf8_strtolower.test.php
new file mode 100644
index 000000000..85f5b270b
--- /dev/null
+++ b/_test/tests/inc/utf8_strtolower.test.php
@@ -0,0 +1,23 @@
+<?php
+// use no mbstring help here
+if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1);
+
+class utf8_strtolower_test extends DokuWikiTest {
+
+ function test_givens(){
+ $data = array(
+ 'Αρχιτεκτονική Μελέτη' => 'αρχιτεκτονική μελέτη', // FS#2173
+ );
+
+ foreach($data as $input => $expected) {
+ $this->assertEquals($expected, utf8_strtolower($input));
+ }
+
+ // just make sure our data was correct
+ if(function_exists('mb_strtolower')) {
+ foreach($data as $input => $expected) {
+ $this->assertEquals($expected, mb_strtolower($input, 'utf-8'));
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/_test/tests/lib/exe/css_css_compress.test.php b/_test/tests/lib/exe/css_css_compress.test.php
index a614ea2fd..807317ca6 100644
--- a/_test/tests/lib/exe/css_css_compress.test.php
+++ b/_test/tests/lib/exe/css_css_compress.test.php
@@ -10,41 +10,70 @@ class css_css_compress_test extends DokuWikiTest {
* line *test*
* check
*/';
- $this->assertEquals(css_compress($text), '');
+ $this->assertEquals('', css_compress($text));
}
function test_mlcom2(){
$text = '#comment/* */ {
color: lime;
}';
- $this->assertEquals(css_compress($text), '#comment/* */{color:lime;}');
+ $this->assertEquals('#comment/* */{color:lime;}', css_compress($text));
}
function test_slcom1(){
$text = '// this is a comment';
- $this->assertEquals(css_compress($text), '');
+ $this->assertEquals('', css_compress($text));
}
function test_slcom2(){
$text = '#foo {
color: lime; // another comment
}';
- $this->assertEquals(css_compress($text), '#foo{color:lime;}');
+ $this->assertEquals('#foo{color:lime;}', css_compress($text));
}
function test_slcom3(){
$text = '#foo {
- background-image: url(http://foo.bar/baz.jpg);
+ background-image: url(http://foo.bar/baz.jpg); // this is a comment
}';
- $this->assertEquals(css_compress($text), '#foo{background-image:url(http://foo.bar/baz.jpg);}');
+ $this->assertEquals('#foo{background-image:url(http://foo.bar/baz.jpg);}', css_compress($text));
}
+ function test_slcom4(){
+ $text = '#foo {
+ background-image: url(http://foo.bar/baz.jpg); background-image: url(http://foo.bar/baz.jpg); // this is a comment
+ }';
+ $this->assertEquals('#foo{background-image:url(http://foo.bar/baz.jpg);background-image:url(http://foo.bar/baz.jpg);}', css_compress($text));
+ }
+
+ function test_slcom5(){
+ $text = '#foo {
+ background-image: url(http://foo.bar/baz.jpg); // background-image: url(http://foo.bar/baz.jpg); this is all commented
+ }';
+ $this->assertEquals('#foo{background-image:url(http://foo.bar/baz.jpg);}', css_compress($text));
+ }
+
+ function test_slcom6(){
+ $text = '#foo {
+ background-image: url(//foo.bar/baz.jpg); // background-image: url(http://foo.bar/baz.jpg); this is all commented
+ }';
+ $this->assertEquals('#foo{background-image:url(//foo.bar/baz.jpg);}', css_compress($text));
+ }
+
+ function test_slcom7(){
+ $text = '#foo a[href ^="https://"], #foo a[href ^=\'https://\'] {
+ background-image: url(//foo.bar/baz.jpg); // background-image: url(http://foo.bar/baz.jpg); this is \'all\' "commented"
+ }';
+ $this->assertEquals('#foo a[href ^="https://"],#foo a[href ^=\'https://\']{background-image:url(//foo.bar/baz.jpg);}', css_compress($text));
+ }
+
+
function test_hack(){
$text = '/* Mac IE will not see this and continue with inline-block */
/* \\*/
display: inline;
/* */';
- $this->assertEquals(css_compress($text), '/* \\*/display:inline;/* */');
+ $this->assertEquals('/* \\*/display:inline;/* */', css_compress($text));
}
function test_hack2(){
@@ -54,12 +83,12 @@ class css_css_compress_test extends DokuWikiTest {
height: 450px;
}
/**/';
- $this->assertEquals(css_compress($text), '/*\\*/* html .page{height:450px;}/**/');
+ $this->assertEquals('/*\\*/* html .page{height:450px;}/**/', css_compress($text));
}
function test_nl1(){
$text = "a{left:20px;\ntop:20px}";
- $this->assertEquals(css_compress($text), 'a{left:20px;top:20px}');
+ $this->assertEquals('a{left:20px;top:20px}', css_compress($text));
}
function test_shortening() {
@@ -102,6 +131,13 @@ class css_css_compress_test extends DokuWikiTest {
$this->assertEquals($expected, $input);
}
+ function test_data() {
+ $input = 'list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);';
+ $expect = 'list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);';
+
+ $this->assertEquals($expect, css_compress($input));
+ }
+
}
//Setup VIM: ex: et ts=4 :
diff --git a/_test/tests/test/basic.test.php b/_test/tests/test/basic.test.php
index 86acef935..0639f0c5a 100644
--- a/_test/tests/test/basic.test.php
+++ b/_test/tests/test/basic.test.php
@@ -33,7 +33,7 @@ class InttestsBasicTest extends DokuWikiTest {
$response = $request->execute();
$this->assertTrue(
- strpos($response->getContent(), 'DokuWiki') >= 0,
+ strpos($response->getContent(), 'DokuWiki') !== false,
'DokuWiki was not a word in the output'
);
}
@@ -60,7 +60,7 @@ class InttestsBasicTest extends DokuWikiTest {
$this->assertEquals('wiki:dokuwiki', $request->getPost('id'));
// output check
- $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') >= 0);
+ $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') !== false);
}
function testPostGet() {
@@ -84,7 +84,7 @@ class InttestsBasicTest extends DokuWikiTest {
$this->assertEquals('wiki:dokuwiki', $request->getGet('id'));
// output check
- $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') >= 0);
+ $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') !== false);
}
function testGet() {
@@ -116,7 +116,7 @@ class InttestsBasicTest extends DokuWikiTest {
$this->assertEquals('bar', $request->getGet('test'));
// output check
- $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') >= 0);
+ $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') !== false);
}
function testScripts() {
@@ -168,5 +168,13 @@ class InttestsBasicTest extends DokuWikiTest {
$response = new TestResponse('',array_slice($this->some_headers,0,-2)); // slice off the last two headers to leave no status header
$this->assertNull($response->getStatusCode());
}
+
+ function testINPUT() {
+ $request = new TestRequest();
+ $response = $request->get(array('id' => 'mailinglist'), '/doku.php');
+
+ // output check
+ $this->assertTrue(strpos($response->getContent(), 'Netiquette') !== false);
+ }
}
diff --git a/bin/dwpage.php b/bin/dwpage.php
index 96f6d3ef9..a777fd3e1 100755
--- a/bin/dwpage.php
+++ b/bin/dwpage.php
@@ -1,378 +1,317 @@
#!/usr/bin/php
<?php
-#------------------------------------------------------------------------------
-if ('cli' != php_sapi_name()) die();
-
-ini_set('memory_limit','128M');
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/');
-require_once DOKU_INC.'inc/init.php';
-require_once DOKU_INC.'inc/common.php';
-require_once DOKU_INC.'inc/cliopts.php';
-
-#------------------------------------------------------------------------------
-function usage($action) {
- switch ( $action ) {
- case 'checkout':
- print "Usage: dwpage.php [opts] checkout <wiki:page> [working_file]
-
- Checks out a file from the repository, using the wiki id and obtaining
- a lock for the page.
- If a working_file is specified, this is where the page is copied to.
- Otherwise defaults to the same as the wiki page in the current
- working directory.
-
- EXAMPLE
- $ ./dwpage.php checkout wiki:syntax ./new_syntax.txt
-
- OPTIONS
- -h, --help=<action>: get help
- -f: force obtaining a lock for the page (generally bad idea)
-";
- break;
- case 'commit':
- print "Usage: dwpage.php [opts] -m \"Msg\" commit <working_file> <wiki:page>
-
- Checks in the working_file into the repository using the specified
- wiki id, archiving the previous version.
-
- EXAMPLE
- $ ./dwpage.php -m \"Some message\" commit ./new_syntax.txt wiki:syntax
-
- OPTIONS
- -h, --help=<action>: get help
- -f: force obtaining a lock for the page (generally bad idea)
- -t, trivial: minor change
- -m (required): Summary message describing the change
-";
- break;
- case 'lock':
- print "Usage: dwpage.php [opts] lock <wiki:page>
-
- Obtains or updates a lock for a wiki page
-
- EXAMPLE
- $ ./dwpage.php lock wiki:syntax
-
- OPTIONS
- -h, --help=<action>: get help
- -f: force obtaining a lock for the page (generally bad idea)
-";
- break;
- case 'unlock':
- print "Usage: dwpage.php [opts] unlock <wiki:page>
-
- Removes a lock for a wiki page.
-
- EXAMPLE
- $ ./dwpage.php unlock wiki:syntax
-
- OPTIONS
- -h, --help=<action>: get help
- -f: force obtaining a lock for the page (generally bad idea)
-";
- break;
- default:
- print "Usage: dwpage.php [opts] <action>
-
- Utility to help command line Dokuwiki page editing, allow
- pages to be checked out for editing then committed after changes
-
- Normal operation would be;
-
-
-
- ACTIONS
- checkout: see $ dwpage.php --help=checkout
- commit: see $ dwpage.php --help=commit
- lock: see $ dwpage.php --help=lock
-
- OPTIONS
- -h, --help=<action>: get help
- e.g. $ ./dwpage.php -hcommit
- e.g. $ ./dwpage.php --help=commit
-";
- break;
+if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__).'/../').'/');
+define('NOSESSION', 1);
+require_once(DOKU_INC.'inc/init.php');
+
+/**
+ * Checkout and commit pages from the command line while maintaining the history
+ */
+class PageCLI extends DokuCLI {
+
+ protected $force = false;
+ protected $username = '';
+
+ /**
+ * Register options and arguments on the given $options object
+ *
+ * @param DokuCLI_Options $options
+ * @return void
+ */
+ protected function setup(DokuCLI_Options $options) {
+ /* global */
+ $options->registerOption(
+ 'force',
+ 'force obtaining a lock for the page (generally bad idea)',
+ 'f'
+ );
+ $options->registerOption(
+ 'user',
+ 'work as this user. defaults to current CLI user',
+ 'u'
+ );
+ $options->setHelp(
+ 'Utility to help command line Dokuwiki page editing, allow '.
+ 'pages to be checked out for editing then committed after changes'
+ );
+
+ /* checkout command */
+ $options->registerCommand(
+ 'checkout',
+ 'Checks out a file from the repository, using the wiki id and obtaining '.
+ 'a lock for the page. '."\n".
+ 'If a working_file is specified, this is where the page is copied to. '.
+ 'Otherwise defaults to the same as the wiki page in the current '.
+ 'working directory.'
+ );
+ $options->registerArgument(
+ 'wikipage',
+ 'The wiki page to checkout',
+ true,
+ 'checkout'
+ );
+ $options->registerArgument(
+ 'workingfile',
+ 'How to name the local checkout',
+ false,
+ 'checkout'
+ );
+
+ /* commit command */
+ $options->registerCommand(
+ 'commit',
+ 'Checks in the working_file into the repository using the specified '.
+ 'wiki id, archiving the previous version.'
+ );
+ $options->registerArgument(
+ 'workingfile',
+ 'The local file to commit',
+ true,
+ 'commit'
+ );
+ $options->registerArgument(
+ 'wikipage',
+ 'The wiki page to create or update',
+ true,
+ 'commit'
+ );
+ $options->registerOption(
+ 'message',
+ 'Summary describing the change (required)',
+ 'm',
+ 'summary',
+ 'commit'
+ );
+ $options->registerOption(
+ 'trivial',
+ 'minor change',
+ 't',
+ false,
+ 'commit'
+ );
+
+ /* lock command */
+ $options->registerCommand(
+ 'lock',
+ 'Obtains or updates a lock for a wiki page'
+ );
+ $options->registerArgument(
+ 'wikipage',
+ 'The wiki page to lock',
+ true,
+ 'lock'
+ );
+
+ /* unlock command */
+ $options->registerCommand(
+ 'unlock',
+ 'Removes a lock for a wiki page.'
+ );
+ $options->registerArgument(
+ 'wikipage',
+ 'The wiki page to unlock',
+ true,
+ 'unlock'
+ );
}
-}
-
-#------------------------------------------------------------------------------
-function getUser() {
- $user = getenv('USER');
- if (empty ($user)) {
- $user = getenv('USERNAME');
- } else {
- return $user;
- }
- if (empty ($user)) {
- $user = 'admin';
- }
- return $user;
-}
-
-#------------------------------------------------------------------------------
-function getSuppliedArgument($OPTS, $short, $long) {
- $arg = $OPTS->get($short);
- if ( is_null($arg) ) {
- $arg = $OPTS->get($long);
- }
- return $arg;
-}
-
-#------------------------------------------------------------------------------
-function obtainLock($WIKI_ID) {
-
- global $USERNAME;
-
- if ( !file_exists(wikiFN($WIKI_ID)) ) {
- fwrite( STDERR, "$WIKI_ID does not yet exist\n");
- }
-
- $_SERVER['REMOTE_USER'] = $USERNAME;
- if ( checklock($WIKI_ID) ) {
- fwrite( STDERR, "Page $WIKI_ID is already locked by another user\n");
- exit(1);
- }
-
- lock($WIKI_ID);
-
- $_SERVER['REMOTE_USER'] = '_'.$USERNAME.'_';
-
- if ( checklock($WIKI_ID) != $USERNAME ) {
-
- fwrite( STDERR, "Unable to obtain lock for $WIKI_ID\n" );
- exit(1);
-
- }
-}
-
-#------------------------------------------------------------------------------
-function clearLock($WIKI_ID) {
-
- global $USERNAME ;
- if ( !file_exists(wikiFN($WIKI_ID)) ) {
- fwrite( STDERR, "$WIKI_ID does not yet exist\n");
- }
-
- $_SERVER['REMOTE_USER'] = $USERNAME;
- if ( checklock($WIKI_ID) ) {
- fwrite( STDERR, "Page $WIKI_ID is locked by another user\n");
- exit(1);
- }
-
- unlock($WIKI_ID);
-
- if ( file_exists(wikiLockFN($WIKI_ID)) ) {
- fwrite( STDERR, "Unable to clear lock for $WIKI_ID\n" );
- exit(1);
- }
-
-}
-
-#------------------------------------------------------------------------------
-function deleteLock($WIKI_ID) {
-
- $wikiLockFN = wikiLockFN($WIKI_ID);
-
- if ( file_exists($wikiLockFN) ) {
- if ( !unlink($wikiLockFN) ) {
- fwrite( STDERR, "Unable to delete $wikiLockFN\n" );
- exit(1);
+ /**
+ * Your main program
+ *
+ * Arguments and options have been parsed when this is run
+ *
+ * @param DokuCLI_Options $options
+ * @return void
+ */
+ protected function main(DokuCLI_Options $options) {
+ $this->force = $options->getOpt('force', false);
+ $this->username = $options->getOpt('user', $this->getUser());
+
+ $command = $options->getCmd();
+ switch($command) {
+ case 'checkout':
+ $wiki_id = array_shift($options->args);
+ $localfile = array_shift($options->args);
+ $this->commandCheckout($wiki_id, $localfile);
+ break;
+ case 'commit':
+ $localfile = array_shift($options->args);
+ $wiki_id = array_shift($options->args);
+ $this->commandCommit(
+ $localfile,
+ $wiki_id,
+ $options->getOpt('message', ''),
+ $options->getOpt('trivial', false)
+ );
+ break;
+ case 'lock':
+ $wiki_id = array_shift($options->args);
+ $this->obtainLock($wiki_id);
+ $this->success("$wiki_id locked");
+ break;
+ case 'unlock':
+ $wiki_id = array_shift($options->args);
+ $this->clearLock($wiki_id);
+ $this->success("$wiki_id unlocked");
+ break;
+ default:
+ echo $options->help();
}
}
-}
-
-#------------------------------------------------------------------------------
-$USERNAME = getUser();
-$CWD = getcwd();
-$SYSTEM_ID = '127.0.0.1';
-
-#------------------------------------------------------------------------------
-$OPTS = Doku_Cli_Opts::getOptions(
- __FILE__,
- 'h::fm:u:s:t',
- array(
- 'help==',
- 'user=',
- 'system=',
- 'trivial',
- )
-);
-
-if ( $OPTS->isError() ) {
- print $OPTS->getMessage()."\n";
- exit(1);
-}
-
-if ( $OPTS->has('h') or $OPTS->has('help') or !$OPTS->hasArgs() ) {
- usage(getSuppliedArgument($OPTS,'h','help'));
- exit(0);
-}
-
-if ( $OPTS->has('u') or $OPTS->has('user') ) {
- $USERNAME = getSuppliedArgument($OPTS,'u','user');
-}
-
-if ( $OPTS->has('s') or $OPTS->has('system') ) {
- $SYSTEM_ID = getSuppliedArgument($OPTS,'s','system');
-}
+ /**
+ * Check out a file
+ *
+ * @param string $wiki_id
+ * @param string $localfile
+ */
+ protected function commandCheckout($wiki_id, $localfile) {
+ global $conf;
-#------------------------------------------------------------------------------
-switch ( $OPTS->arg(0) ) {
+ $wiki_id = cleanID($wiki_id);
+ $wiki_fn = wikiFN($wiki_id);
- #----------------------------------------------------------------------
- case 'checkout':
-
- $WIKI_ID = $OPTS->arg(1);
-
- if ( !$WIKI_ID ) {
- fwrite( STDERR, "Wiki page ID required\n");
- exit(1);
+ if(!file_exists($wiki_fn)) {
+ $this->fatal("$wiki_id does not yet exist");
}
- $WIKI_FN = wikiFN($WIKI_ID);
-
- if ( !file_exists($WIKI_FN) ) {
- fwrite( STDERR, "$WIKI_ID does not yet exist\n");
- exit(1);
+ if(empty($localfile)) {
+ $localfile = getcwd().'/'.utf8_basename($wiki_fn);
}
- $TARGET_FN = $OPTS->arg(2);
-
- if ( empty($TARGET_FN) ) {
- $TARGET_FN = getcwd().'/'.utf8_basename($WIKI_FN);
+ if(!file_exists(dirname($localfile))) {
+ $this->fatal("Directory ".dirname($localfile)." does not exist");
}
- if ( !file_exists(dirname($TARGET_FN)) ) {
- fwrite( STDERR, "Directory ".dirname($TARGET_FN)." does not exist\n");
- exit(1);
+ if(stristr(realpath(dirname($localfile)), realpath($conf['datadir'])) !== false) {
+ $this->fatal("Attempt to check out file into data directory - not allowed");
}
- if ( stristr( realpath(dirname($TARGET_FN)), realpath($conf['datadir']) ) !== false ) {
- fwrite( STDERR, "Attempt to check out file into data directory - not allowed\n");
- exit(1);
- }
+ $this->obtainLock($wiki_id);
- if ( $OPTS->has('f') ) {
- deleteLock($WIKI_ID);
+ if(!copy($wiki_fn, $localfile)) {
+ $this->clearLock($wiki_id);
+ $this->fatal("Unable to copy $wiki_fn to $localfile");
}
- obtainLock($WIKI_ID);
+ $this->success("$wiki_id > $localfile");
+ }
- # Need to lock the file first?
- if ( !copy($WIKI_FN, $TARGET_FN) ) {
- fwrite( STDERR, "Unable to copy $WIKI_FN to $TARGET_FN\n");
- clearLock($WIKI_ID);
- exit(1);
+ /**
+ * Save a file as a new page revision
+ *
+ * @param string $localfile
+ * @param string $wiki_id
+ * @param string $message
+ * @param bool $minor
+ */
+ protected function commandCommit($localfile, $wiki_id, $message, $minor) {
+ $wiki_id = cleanID($wiki_id);
+ $message = trim($message);
+
+ if(!file_exists($localfile)) {
+ $this->fatal("$localfile does not exist");
}
- print "$WIKI_ID > $TARGET_FN\n";
- exit(0);
+ if(!is_readable($localfile)) {
+ $this->fatal("Cannot read from $localfile");
+ }
- break;
+ if(!$message) {
+ $this->fatal("Summary message required");
+ }
- #----------------------------------------------------------------------
- case 'commit':
+ $this->obtainLock($wiki_id);
- $TARGET_FN = $OPTS->arg(1);
+ saveWikiText($wiki_id, file_get_contents($localfile), $message, $minor);
- if ( !$TARGET_FN ) {
- fwrite( STDERR, "Target filename required\n");
- exit(1);
- }
+ $this->clearLock($wiki_id);
- if ( !file_exists($TARGET_FN) ) {
- fwrite( STDERR, "$TARGET_FN does not exist\n");
- exit(1);
- }
+ $this->success("$localfile > $wiki_id");
+ }
- if ( !is_readable($TARGET_FN) ) {
- fwrite( STDERR, "Cannot read from $TARGET_FN\n");
+ /**
+ * Lock the given page or exit
+ *
+ * @param string $wiki_id
+ */
+ protected function obtainLock($wiki_id) {
+ if($this->force) $this->deleteLock($wiki_id);
+
+ $_SERVER['REMOTE_USER'] = $this->username;
+ if(checklock($wiki_id)) {
+ $this->error("Page $wiki_id is already locked by another user");
exit(1);
}
- $WIKI_ID = $OPTS->arg(2);
+ lock($wiki_id);
- if ( !$WIKI_ID ) {
- fwrite( STDERR, "Wiki page ID required\n");
+ $_SERVER['REMOTE_USER'] = '_'.$this->username.'_';
+ if(checklock($wiki_id) != $this->username) {
+ $this->error("Unable to obtain lock for $wiki_id ");
+ var_dump(checklock($wiki_id));
exit(1);
}
+ }
- if ( !$OPTS->has('m') ) {
- fwrite( STDERR, "Summary message required\n");
+ /**
+ * Clear the lock on the given page
+ *
+ * @param string $wiki_id
+ */
+ protected function clearLock($wiki_id) {
+ if($this->force) $this->deleteLock($wiki_id);
+
+ $_SERVER['REMOTE_USER'] = $this->username;
+ if(checklock($wiki_id)) {
+ $this->error("Page $wiki_id is locked by another user");
exit(1);
}
- if ( $OPTS->has('f') ) {
- deleteLock($WIKI_ID);
- }
+ unlock($wiki_id);
- $_SERVER['REMOTE_USER'] = $USERNAME;
- if ( checklock($WIKI_ID) ) {
- fwrite( STDERR, "$WIKI_ID is locked by another user\n");
+ if(file_exists(wikiLockFN($wiki_id))) {
+ $this->error("Unable to clear lock for $wiki_id");
exit(1);
}
+ }
- obtainLock($WIKI_ID);
-
- saveWikiText($WIKI_ID, file_get_contents($TARGET_FN), $OPTS->get('m'), $OPTS->has('t'));
-
- clearLock($WIKI_ID);
-
- exit(0);
-
- break;
-
- #----------------------------------------------------------------------
- case 'lock':
-
- $WIKI_ID = $OPTS->arg(1);
-
- if ( !$WIKI_ID ) {
- fwrite( STDERR, "Wiki page ID required\n");
- exit(1);
- }
-
- if ( $OPTS->has('f') ) {
- deleteLock($WIKI_ID);
- }
-
- obtainLock($WIKI_ID);
-
- print "Locked : $WIKI_ID\n";
- exit(0);
-
- break;
-
- #----------------------------------------------------------------------
- case 'unlock':
-
- $WIKI_ID = $OPTS->arg(1);
-
- if ( !$WIKI_ID ) {
- fwrite( STDERR, "Wiki page ID required\n");
- exit(1);
+ /**
+ * Forcefully remove a lock on the page given
+ *
+ * @param string $wiki_id
+ */
+ protected function deleteLock($wiki_id) {
+ $wikiLockFN = wikiLockFN($wiki_id);
+
+ if(file_exists($wikiLockFN)) {
+ if(!unlink($wikiLockFN)) {
+ $this->error("Unable to delete $wikiLockFN");
+ exit(1);
+ }
}
+ }
- if ( $OPTS->has('f') ) {
- deleteLock($WIKI_ID);
+ /**
+ * Get the current user's username from the environment
+ *
+ * @return string
+ */
+ protected function getUser() {
+ $user = getenv('USER');
+ if(empty ($user)) {
+ $user = getenv('USERNAME');
} else {
- clearLock($WIKI_ID);
+ return $user;
}
-
- print "Unlocked : $WIKI_ID\n";
- exit(0);
-
- break;
-
- #----------------------------------------------------------------------
- default:
-
- fwrite( STDERR, "Invalid action ".$OPTS->arg(0)."\n" );
- exit(1);
-
- break;
-
+ if(empty ($user)) {
+ $user = 'admin';
+ }
+ return $user;
+ }
}
+
+// Main
+$cli = new PageCLI();
+$cli->run(); \ No newline at end of file
diff --git a/bin/gittool.php b/bin/gittool.php
new file mode 100755
index 000000000..6944dde57
--- /dev/null
+++ b/bin/gittool.php
@@ -0,0 +1,334 @@
+#!/usr/bin/php
+<?php
+if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__).'/../').'/');
+define('NOSESSION', 1);
+require_once(DOKU_INC.'inc/init.php');
+
+/**
+ * Easily manage DokuWiki git repositories
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+class GitToolCLI extends DokuCLI {
+
+ /**
+ * Register options and arguments on the given $options object
+ *
+ * @param DokuCLI_Options $options
+ * @return void
+ */
+ protected function setup(DokuCLI_Options $options) {
+ $options->setHelp(
+ "Manage git repositories for DokuWiki and its plugins and templates.\n\n".
+ "$> ./bin/gittool.php clone gallery template:ach\n".
+ "$> ./bin/gittool.php repos\n".
+ "$> ./bin/gittool.php origin -v"
+ );
+
+ $options->registerArgument(
+ 'command',
+ 'Command to execute. See below',
+ true
+ );
+
+ $options->registerCommand(
+ 'clone',
+ 'Tries to install a known plugin or template (prefix with template:) via git. Uses the DokuWiki.org '.
+ 'plugin repository to find the proper git repository. Multiple extensions can be given as parameters'
+ );
+ $options->registerArgument(
+ 'extension',
+ 'name of the extension to install, prefix with \'template:\' for templates',
+ true,
+ 'clone'
+ );
+
+ $options->registerCommand(
+ 'install',
+ 'The same as clone, but when no git source repository can be found, the extension is installed via '.
+ 'download'
+ );
+ $options->registerArgument(
+ 'extension',
+ 'name of the extension to install, prefix with \'template:\' for templates',
+ true,
+ 'install'
+ );
+
+ $options->registerCommand(
+ 'repos',
+ 'Lists all git repositories found in this DokuWiki installation'
+ );
+
+ $options->registerCommand(
+ '*',
+ 'Any unknown commands are assumed to be arguments to git and will be executed in all repositories '.
+ 'found within this DokuWiki installation'
+ );
+ }
+
+ /**
+ * Your main program
+ *
+ * Arguments and options have been parsed when this is run
+ *
+ * @param DokuCLI_Options $options
+ * @return void
+ */
+ protected function main(DokuCLI_Options $options) {
+ $command = $options->getCmd();
+ if(!$command) $command = array_shift($options->args);
+
+ switch($command) {
+ case '':
+ echo $options->help();
+ break;
+ case 'clone':
+ $this->cmd_clone($options->args);
+ break;
+ case 'install':
+ $this->cmd_install($options->args);
+ break;
+ case 'repo':
+ case 'repos':
+ $this->cmd_repos();
+ break;
+ default:
+ $this->cmd_git($command, $options->args);
+ }
+ }
+
+ /**
+ * Tries to install the given extensions using git clone
+ *
+ * @param $extensions
+ */
+ public function cmd_clone($extensions) {
+ $errors = array();
+ $succeeded = array();
+
+ foreach($extensions as $ext) {
+ $repo = $this->getSourceRepo($ext);
+
+ if(!$repo) {
+ $this->error("could not find a repository for $ext");
+ $errors[] = $ext;
+ } else {
+ if($this->cloneExtension($ext, $repo)) {
+ $succeeded[] = $ext;
+ } else {
+ $errors[] = $ext;
+ }
+ }
+ }
+
+ echo "\n";
+ if($succeeded) $this->success('successfully cloned the following extensions: '.join(', ', $succeeded));
+ if($errors) $this->error('failed to clone the following extensions: '.join(', ', $errors));
+ }
+
+ /**
+ * Tries to install the given extensions using git clone with fallback to install
+ *
+ * @param $extensions
+ */
+ public function cmd_install($extensions) {
+ $errors = array();
+ $succeeded = array();
+
+ foreach($extensions as $ext) {
+ $repo = $this->getSourceRepo($ext);
+
+ if(!$repo) {
+ $this->info("could not find a repository for $ext");
+ if($this->downloadExtension($ext)) {
+ $succeeded[] = $ext;
+ } else {
+ $errors[] = $ext;
+ }
+ } else {
+ if($this->cloneExtension($ext, $repo)) {
+ $succeeded[] = $ext;
+ } else {
+ $errors[] = $ext;
+ }
+ }
+ }
+
+ echo "\n";
+ if($succeeded) $this->success('successfully installed the following extensions: '.join(', ', $succeeded));
+ if($errors) $this->error('failed to install the following extensions: '.join(', ', $errors));
+ }
+
+ /**
+ * Executes the given git command in every repository
+ *
+ * @param $cmd
+ * @param $arg
+ */
+ public function cmd_git($cmd, $arg) {
+ $repos = $this->findRepos();
+
+ $shell = array_merge(array('git', $cmd), $arg);
+ $shell = array_map('escapeshellarg', $shell);
+ $shell = join(' ', $shell);
+
+ foreach($repos as $repo) {
+ if(!@chdir($repo)) {
+ $this->error("Could not change into $repo");
+ continue;
+ }
+
+ echo "\n";
+ $this->info("executing $shell in $repo");
+ $ret = 0;
+ system($shell, $ret);
+
+ if($ret == 0) {
+ $this->success("git succeeded in $repo");
+ } else {
+ $this->error("git failed in $repo");
+ }
+ }
+ }
+
+ /**
+ * Simply lists the repositories
+ */
+ public function cmd_repos() {
+ $repos = $this->findRepos();
+ foreach($repos as $repo) {
+ echo "$repo\n";
+ }
+ }
+
+ /**
+ * Install extension from the given download URL
+ *
+ * @param string $ext
+ * @return bool
+ */
+ private function downloadExtension($ext) {
+ /** @var helper_plugin_extension_extension $plugin */
+ $plugin = plugin_load('helper', 'extension_extension');
+ if(!$ext) die("extension plugin not available, can't continue");
+ $plugin->setExtension($ext);
+
+ $url = $plugin->getDownloadURL();
+ if(!$url) {
+ $this->error("no download URL for $ext");
+ return false;
+ }
+
+ $ok = false;
+ try {
+ $this->info("installing $ext via download from $url");
+ $ok = $plugin->installFromURL($url);
+ } catch(Exception $e) {
+ $this->error($e->getMessage());
+ }
+
+ if($ok) {
+ $this->success("installed $ext via download");
+ return true;
+ } else {
+ $this->success("failed to install $ext via download");
+ return false;
+ }
+ }
+
+ /**
+ * Clones the extension from the given repository
+ *
+ * @param string $ext
+ * @param string $repo
+ * @return bool
+ */
+ private function cloneExtension($ext, $repo) {
+ if(substr($ext, 0, 9) == 'template:') {
+ $target = fullpath(tpl_incdir().'../'.substr($ext, 9));
+ } else {
+ $target = DOKU_PLUGIN.$ext;
+ }
+
+ $this->info("cloning $ext from $repo to $target");
+ $ret = 0;
+ system("git clone $repo $target", $ret);
+ if($ret === 0) {
+ $this->success("cloning of $ext succeeded");
+ return true;
+ } else {
+ $this->error("cloning of $ext failed");
+ return false;
+ }
+ }
+
+ /**
+ * Returns all git repositories in this DokuWiki install
+ *
+ * Looks in root, template and plugin directories only.
+ *
+ * @return array
+ */
+ private function findRepos() {
+ $this->info('Looking for .git directories');
+ $data = array_merge(
+ glob(DOKU_INC.'.git', GLOB_ONLYDIR),
+ glob(DOKU_PLUGIN.'*/.git', GLOB_ONLYDIR),
+ glob(fullpath(tpl_incdir().'../').'/*/.git', GLOB_ONLYDIR)
+ );
+
+ if(!$data) {
+ $this->error('Found no .git directories');
+ } else {
+ $this->success('Found '.count($data).' .git directories');
+ }
+ $data = array_map('fullpath', array_map('dirname', $data));
+ return $data;
+ }
+
+ /**
+ * Returns the repository for the given extension
+ *
+ * @param $extension
+ * @return bool|string
+ */
+ private function getSourceRepo($extension) {
+ /** @var helper_plugin_extension_extension $ext */
+ $ext = plugin_load('helper', 'extension_extension');
+ if(!$ext) die("extension plugin not available, can't continue");
+ $ext->setExtension($extension);
+
+ $repourl = $ext->getSourcerepoURL();
+ if(!$repourl) return false;
+
+ // match github repos
+ if(preg_match('/github\.com\/([^\/]+)\/([^\/]+)/i', $repourl, $m)) {
+ $user = $m[1];
+ $repo = $m[2];
+ return 'https://github.com/'.$user.'/'.$repo.'.git';
+ }
+
+ // match gitorious repos
+ if(preg_match('/gitorious.org\/([^\/]+)\/([^\/]+)?/i', $repourl, $m)) {
+ $user = $m[1];
+ $repo = $m[2];
+ if(!$repo) $repo = $user;
+
+ return 'https://git.gitorious.org/'.$user.'/'.$repo.'.git';
+ }
+
+ // match bitbucket repos - most people seem to use mercurial there though
+ if(preg_match('/bitbucket\.org\/([^\/]+)\/([^\/]+)/i', $repourl, $m)) {
+ $user = $m[1];
+ $repo = $m[2];
+ return 'https://bitbucket.org/'.$user.'/'.$repo.'.git';
+ }
+
+ return false;
+ }
+}
+
+// Main
+$cli = new GitToolCLI();
+$cli->run(); \ No newline at end of file
diff --git a/bin/indexer.php b/bin/indexer.php
index 6f6b5d9fa..13895c36a 100755
--- a/bin/indexer.php
+++ b/bin/indexer.php
@@ -1,98 +1,103 @@
#!/usr/bin/php
<?php
-if ('cli' != php_sapi_name()) die();
-
-ini_set('memory_limit','128M');
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/');
+if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__).'/../').'/');
+define('NOSESSION', 1);
require_once(DOKU_INC.'inc/init.php');
-require_once(DOKU_INC.'inc/cliopts.php');
-session_write_close();
-// handle options
-$short_opts = 'hcuq';
-$long_opts = array('help', 'clear', 'update', 'quiet');
-$OPTS = Doku_Cli_Opts::getOptions(__FILE__,$short_opts,$long_opts);
-if ( $OPTS->isError() ) {
- fwrite( STDERR, $OPTS->getMessage() . "\n");
- _usage();
- exit(1);
-}
-$CLEAR = false;
-$QUIET = false;
-$INDEXER = null;
-foreach ($OPTS->options as $key => $val) {
- switch ($key) {
- case 'h':
- case 'help':
- _usage();
- exit;
- case 'c':
- case 'clear':
- $CLEAR = true;
- break;
- case 'q':
- case 'quiet':
- $QUIET = true;
- break;
+/**
+ * Update the Search Index from command line
+ */
+class IndexerCLI extends DokuCLI {
+
+ private $quiet = false;
+ private $clear = false;
+
+ /**
+ * Register options and arguments on the given $options object
+ *
+ * @param DokuCLI_Options $options
+ * @return void
+ */
+ protected function setup(DokuCLI_Options $options) {
+ $options->setHelp(
+ 'Updates the searchindex by indexing all new or changed pages. When the -c option is '.
+ 'given the index is cleared first.'
+ );
+
+ $options->registerOption(
+ 'clear',
+ 'clear the index before updating',
+ 'c'
+ );
+ $options->registerOption(
+ 'quiet',
+ 'don\'t produce any output',
+ 'q'
+ );
}
-}
-
-#------------------------------------------------------------------------------
-# Action
-
-if($CLEAR) _clearindex();
-_update();
-
-
-
-#------------------------------------------------------------------------------
-
-function _usage() {
- print "Usage: indexer.php <options>
-
- Updates the searchindex by indexing all new or changed pages
- when the -c option is given the index is cleared first.
- OPTIONS
- -h, --help show this help and exit
- -c, --clear clear the index before updating
- -q, --quiet don't produce any output
-";
-}
-
-function _update(){
- global $conf;
- $data = array();
- _quietecho("Searching pages... ");
- search($data,$conf['datadir'],'search_allpages',array('skipacl' => true));
- _quietecho(count($data)." pages found.\n");
-
- foreach($data as $val){
- _index($val['id']);
+ /**
+ * Your main program
+ *
+ * Arguments and options have been parsed when this is run
+ *
+ * @param DokuCLI_Options $options
+ * @return void
+ */
+ protected function main(DokuCLI_Options $options) {
+ $this->clear = $options->getOpt('clear');
+ $this->quiet = $options->getOpt('quiet');
+
+ if($this->clear) $this->clearindex();
+
+ $this->update();
}
-}
-function _index($id){
- global $CLEAR;
- global $QUIET;
+ /**
+ * Update the index
+ */
+ function update() {
+ global $conf;
+ $data = array();
+ $this->quietecho("Searching pages... ");
+ search($data, $conf['datadir'], 'search_allpages', array('skipacl' => true));
+ $this->quietecho(count($data)." pages found.\n");
+
+ foreach($data as $val) {
+ $this->index($val['id']);
+ }
+ }
- _quietecho("$id... ");
- idx_addPage($id, !$QUIET, $CLEAR);
- _quietecho("done.\n");
-}
+ /**
+ * Index the given page
+ *
+ * @param string $id
+ */
+ function index($id) {
+ $this->quietecho("$id... ");
+ idx_addPage($id, !$this->quiet, $this->clear);
+ $this->quietecho("done.\n");
+ }
-/**
- * Clear all index files
- */
-function _clearindex(){
- _quietecho("Clearing index... ");
- idx_get_indexer()->clear();
- _quietecho("done.\n");
-}
+ /**
+ * Clear all index files
+ */
+ function clearindex() {
+ $this->quietecho("Clearing index... ");
+ idx_get_indexer()->clear();
+ $this->quietecho("done.\n");
+ }
-function _quietecho($msg) {
- global $QUIET;
- if(!$QUIET) echo $msg;
+ /**
+ * Print message if not supressed
+ *
+ * @param string $msg
+ */
+ function quietecho($msg) {
+ if(!$this->quiet) echo $msg;
+ }
}
-//Setup VIM: ex: et ts=2 :
+// Main
+$cli = new IndexerCLI();
+$cli->run(); \ No newline at end of file
diff --git a/bin/render.php b/bin/render.php
index d30ef2958..672993223 100755
--- a/bin/render.php
+++ b/bin/render.php
@@ -1,5 +1,10 @@
#!/usr/bin/php
<?php
+if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__).'/../').'/');
+define('NOSESSION', 1);
+require_once(DOKU_INC.'inc/init.php');
+
+
/**
* A simple commandline tool to render some DokuWiki syntax with a given
* renderer.
@@ -9,59 +14,48 @@
* DokuWiki markup
*
* @license GPL2
- * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Andreas Gohr <andi@splitbrain.org>
*/
-if ('cli' != php_sapi_name()) die();
+class RenderCLI extends DokuCLI {
-ini_set('memory_limit','128M');
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/');
-define('NOSESSION',1);
-require_once(DOKU_INC.'inc/init.php');
-require_once(DOKU_INC.'inc/common.php');
-require_once(DOKU_INC.'inc/parserutils.php');
-require_once(DOKU_INC.'inc/cliopts.php');
-
-// handle options
-$short_opts = 'hr:';
-$long_opts = array('help','renderer:');
-$OPTS = Doku_Cli_Opts::getOptions(__FILE__,$short_opts,$long_opts);
-if ( $OPTS->isError() ) {
- fwrite( STDERR, $OPTS->getMessage() . "\n");
- _usage();
- exit(1);
-}
-$RENDERER = 'xhtml';
-foreach ($OPTS->options as $key => $val) {
- switch ($key) {
- case 'h':
- case 'help':
- _usage();
- exit;
- case 'r':
- case 'renderer':
- $RENDERER = $val;
+ /**
+ * Register options and arguments on the given $options object
+ *
+ * @param DokuCLI_Options $options
+ * @return void
+ */
+ protected function setup(DokuCLI_Options $options) {
+ $options->setHelp(
+ 'A simple commandline tool to render some DokuWiki syntax with a given renderer.'.
+ "\n\n".
+ 'This may not work for plugins that expect a certain environment to be '.
+ 'set up before rendering, but should work for most or even all standard '.
+ 'DokuWiki markup'
+ );
+ $options->registerOption('renderer', 'The renderer mode to use. Defaults to xhtml', 'r', 'mode');
}
-}
+ /**
+ * Your main program
+ *
+ * Arguments and options have been parsed when this is run
+ *
+ * @param DokuCLI_Options $options
+ * @throws DokuCLI_Exception
+ * @return void
+ */
+ protected function main(DokuCLI_Options $options) {
+ $renderer = $options->getOpt('renderer', 'xhtml');
-// do the action
-$source = stream_get_contents(STDIN);
-$info = array();
-$result = p_render($RENDERER,p_get_instructions($source),$info);
-if(is_null($result)) die("No such renderer $RENDERER\n");
-echo $result;
-
-/**
- * Print usage info
- */
-function _usage(){
- print "Usage: render.php <options>
-
- Reads DokuWiki syntax from STDIN and renders it with the given renderer
- to STDOUT
-
- OPTIONS
- -h, --help show this help and exit
- -r, --renderer <renderer> the render mode (default: xhtml)
-";
+ // do the action
+ $source = stream_get_contents(STDIN);
+ $info = array();
+ $result = p_render($renderer, p_get_instructions($source), $info);
+ if(is_null($result)) throw new DokuCLI_Exception("No such renderer $renderer");
+ echo $result;
+ }
}
+
+// Main
+$cli = new RenderCLI();
+$cli->run(); \ No newline at end of file
diff --git a/bin/striplangs.php b/bin/striplangs.php
index 2bfddcea4..6335bc84c 100755
--- a/bin/striplangs.php
+++ b/bin/striplangs.php
@@ -1,148 +1,110 @@
#!/usr/bin/php
<?php
-/**
- * Strip unwanted languages from the DokuWiki install
- *
- * @author Martin 'E.T.' Misuth <et.github@ethome.sk>
- */
-if ('cli' != php_sapi_name()) die();
-
-#------------------------------------------------------------------------------
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/');
-require_once DOKU_INC.'inc/cliopts.php';
-
-#------------------------------------------------------------------------------
-function usage($show_examples = false) {
- print "Usage: striplangs.php [-h [-x]] [-e] [-k lang1[,lang2]..[,langN]]
-
- Removes all languages from the installation, besides the ones
- after the -k option. English language is never removed!
+if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__).'/../').'/');
+define('NOSESSION', 1);
+require_once(DOKU_INC.'inc/init.php');
- OPTIONS
- -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\n";
- if ( $show_examples ) {
- print "\n
- EXAMPLES
- Strips all languages, but keeps 'en' and 'de':
- striplangs -k de
- Strips all but 'en','ca-valencia','cs','de','is','sk':
- striplangs --keep ca-valencia,cs,de,is,sk
-
- Strips all but 'en':
- striplangs -e
-
- No option specified, prints usage and throws error:
- striplangs\n";
- }
-}
-
-function getSuppliedArgument($OPTS, $short, $long) {
- $arg = $OPTS->get($short);
- if ( is_null($arg) ) {
- $arg = $OPTS->get($long);
+/**
+ * Remove unwanted languages from a DokuWiki install
+ */
+class StripLangsCLI extends DokuCLI {
+
+ /**
+ * Register options and arguments on the given $options object
+ *
+ * @param DokuCLI_Options $options
+ * @return void
+ */
+ protected function setup(DokuCLI_Options $options) {
+
+ $options->setHelp(
+ 'Remove all languages from the installation, besides the ones specified. English language '.
+ 'is never removed!'
+ );
+
+ $options->registerOption(
+ 'keep',
+ 'Comma separated list of languages to keep in addition to English.',
+ 'k'
+ );
+ $options->registerOption(
+ 'english-only',
+ 'Remove all languages except English',
+ 'e'
+ );
}
- return $arg;
-}
-function processPlugins($path, $keep_langs) {
- if (is_dir($path)) {
- $entries = scandir($path);
-
- foreach ($entries as $entry) {
- if ($entry != "." && $entry != "..") {
- if ( is_dir($path.'/'.$entry) ) {
+ /**
+ * Your main program
+ *
+ * Arguments and options have been parsed when this is run
+ *
+ * @param DokuCLI_Options $options
+ * @return void
+ */
+ protected function main(DokuCLI_Options $options) {
+ if($options->getOpt('keep')) {
+ $keep = explode(',', $options->getOpt('keep'));
+ if(!in_array('en', $keep)) $keep[] = 'en';
+ } elseif($options->getOpt('english-only')) {
+ $keep = array('en');
+ } else {
+ echo $options->help();
+ exit(0);
+ }
- $plugin_langs = $path.'/'.$entry.'/lang';
+ // Kill all language directories in /inc/lang and /lib/plugins besides those in $langs array
+ $this->stripDirLangs(realpath(dirname(__FILE__).'/../inc/lang'), $keep);
+ $this->processExtensions(realpath(dirname(__FILE__).'/../lib/plugins'), $keep);
+ $this->processExtensions(realpath(dirname(__FILE__).'/../lib/tpl'), $keep);
+ }
- if ( is_dir( $plugin_langs ) ) {
- stripDirLangs($plugin_langs, $keep_langs);
+ /**
+ * Strip languages from extensions
+ *
+ * @param string $path path to plugin or template dir
+ * @param array $keep_langs languages to keep
+ */
+ protected function processExtensions($path, $keep_langs) {
+ if(is_dir($path)) {
+ $entries = scandir($path);
+
+ foreach($entries as $entry) {
+ if($entry != "." && $entry != "..") {
+ if(is_dir($path.'/'.$entry)) {
+
+ $plugin_langs = $path.'/'.$entry.'/lang';
+
+ if(is_dir($plugin_langs)) {
+ $this->stripDirLangs($plugin_langs, $keep_langs);
+ }
}
}
}
}
}
-}
-function stripDirLangs($path, $keep_langs) {
- $dir = dir($path);
+ /**
+ * Strip languages from path
+ *
+ * @param string $path path to lang dir
+ * @param array $keep_langs languages to keep
+ */
+ protected function stripDirLangs($path, $keep_langs) {
+ $dir = dir($path);
- while(($cur_dir = $dir->read()) !== false) {
- if( $cur_dir != '.' and $cur_dir != '..' and is_dir($path.'/'.$cur_dir)) {
+ while(($cur_dir = $dir->read()) !== false) {
+ if($cur_dir != '.' and $cur_dir != '..' and is_dir($path.'/'.$cur_dir)) {
- if ( !in_array($cur_dir, $keep_langs, true ) ) {
- killDir($path.'/'.$cur_dir);
- }
- }
- }
- $dir->close();
-}
-
-function killDir($dir) {
- if (is_dir($dir)) {
- $entries = scandir($dir);
-
- foreach ($entries as $entry) {
- if ($entry != "." && $entry != "..") {
- if ( is_dir($dir.'/'.$entry) ) {
- killDir($dir.'/'.$entry);
- } else {
- unlink($dir.'/'.$entry);
+ if(!in_array($cur_dir, $keep_langs, true)) {
+ io_rmdir($path.'/'.$cur_dir, true);
}
}
}
- reset($entries);
- rmdir($dir);
- }
-}
-#------------------------------------------------------------------------------
-
-// handle options
-$short_opts = 'hxk:e';
-$long_opts = array('help', 'examples', 'keep=','english');
-
-$OPTS = Doku_Cli_Opts::getOptions(__FILE__, $short_opts, $long_opts);
-
-if ( $OPTS->isError() ) {
- fwrite( STDERR, $OPTS->getMessage() . "\n");
- exit(1);
-}
-
-// handle '--examples' option
-$show_examples = ( $OPTS->has('x') or $OPTS->has('examples') ) ? true : false;
-
-// handle '--help' option
-if ( $OPTS->has('h') or $OPTS->has('help') ) {
- usage($show_examples);
- exit(0);
-}
-
-// handle both '--keep' and '--english' options
-if ( $OPTS->has('k') or $OPTS->has('keep') ) {
- $preserved_langs = getSuppliedArgument($OPTS,'k','keep');
- $langs = explode(',', $preserved_langs);
-
- // ! always enforce 'en' lang when using '--keep' (DW relies on it)
- if ( !isset($langs['en']) ) {
- $langs[]='en';
+ $dir->close();
}
-} elseif ( $OPTS->has('e') or $OPTS->has('english') ) {
- // '--english' was specified strip everything besides 'en'
- $langs = array ('en');
-} else {
- // no option was specified, print usage but don't do anything as
- // this run might not be intented
- usage();
- print "\n
- ERROR
- No option specified, use either -h -x to get more info,
- or -e to strip every language besides english.\n";
- exit(1);
}
-// Kill all language directories in /inc/lang and /lib/plugins besides those in $langs array
-stripDirLangs(realpath(dirname(__FILE__).'/../inc/lang'), $langs);
-processPlugins(realpath(dirname(__FILE__).'/../lib/plugins'), $langs);
+$cli = new StripLangsCLI();
+$cli->run(); \ No newline at end of file
diff --git a/bin/wantedpages.php b/bin/wantedpages.php
index afcb6b271..8fc4ba74f 100755
--- a/bin/wantedpages.php
+++ b/bin/wantedpages.php
@@ -1,134 +1,133 @@
#!/usr/bin/php
<?php
-if ('cli' != php_sapi_name()) die();
-
-#------------------------------------------------------------------------------
-ini_set('memory_limit','128M');
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/');
-require_once DOKU_INC.'inc/init.php';
-require_once DOKU_INC.'inc/common.php';
-require_once DOKU_INC.'inc/search.php';
-require_once DOKU_INC.'inc/cliopts.php';
+if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__).'/../').'/');
+define('NOSESSION', 1);
+require_once(DOKU_INC.'inc/init.php');
+
+/**
+ * Find wanted pages
+ */
+class WantedPagesCLI extends DokuCLI {
+
+ const DIR_CONTINUE = 1;
+ const DIR_NS = 2;
+ const DIR_PAGE = 3;
+
+ /**
+ * Register options and arguments on the given $options object
+ *
+ * @param DokuCLI_Options $options
+ * @return void
+ */
+ protected function setup(DokuCLI_Options $options) {
+ $options->setHelp(
+ 'Outputs a list of wanted pages (pages which have internal links but do not yet exist).'
+ );
+ $options->registerArgument(
+ 'namespace',
+ 'The namespace to lookup. Defaults to root namespace',
+ false
+ );
+ }
-#------------------------------------------------------------------------------
-function usage() {
- print "Usage: wantedpages.php [wiki:namespace]
+ /**
+ * Your main program
+ *
+ * Arguments and options have been parsed when this is run
+ *
+ * @param DokuCLI_Options $options
+ * @return void
+ */
+ protected function main(DokuCLI_Options $options) {
+
+ if($options->args) {
+ $startdir = dirname(wikiFN($options->args[0].':xxx'));
+ } else {
+ $startdir = dirname(wikiFN('xxx'));
+ }
- Outputs a list of wanted pages (pages which have
- internal links but do not yet exist).
+ $this->info("searching $startdir");
- If the optional [wiki:namespace] is not provided,
- defaults to the root wiki namespace
+ $wanted_pages = array();
- OPTIONS
- -h, --help get help
-";
-}
-
-#------------------------------------------------------------------------------
-define ('DW_DIR_CONTINUE',1);
-define ('DW_DIR_NS',2);
-define ('DW_DIR_PAGE',3);
+ foreach($this->get_pages($startdir) as $page) {
+ $wanted_pages = array_merge($wanted_pages, $this->internal_links($page));
+ }
+ $wanted_pages = array_unique($wanted_pages);
+ sort($wanted_pages);
-#------------------------------------------------------------------------------
-function dw_dir_filter($entry, $basepath) {
- if ($entry == '.' || $entry == '..' ) {
- return DW_DIR_CONTINUE;
- }
- if ( is_dir($basepath . '/' . $entry) ) {
- if ( strpos($entry, '_') === 0 ) {
- return DW_DIR_CONTINUE;
+ foreach($wanted_pages as $page) {
+ print $page."\n";
}
- return DW_DIR_NS;
- }
- if ( preg_match('/\.txt$/',$entry) ) {
- return DW_DIR_PAGE;
}
- return DW_DIR_CONTINUE;
-}
-#------------------------------------------------------------------------------
-function dw_get_pages($dir) {
- static $trunclen = null;
- if ( !$trunclen ) {
- global $conf;
- $trunclen = strlen($conf['datadir'].':');
+ protected function dir_filter($entry, $basepath) {
+ if($entry == '.' || $entry == '..') {
+ return WantedPagesCLI::DIR_CONTINUE;
+ }
+ if(is_dir($basepath.'/'.$entry)) {
+ if(strpos($entry, '_') === 0) {
+ return WantedPagesCLI::DIR_CONTINUE;
+ }
+ return WantedPagesCLI::DIR_NS;
+ }
+ if(preg_match('/\.txt$/', $entry)) {
+ return WantedPagesCLI::DIR_PAGE;
+ }
+ return WantedPagesCLI::DIR_CONTINUE;
}
- if ( !is_dir($dir) ) {
- fwrite( STDERR, "Unable to read directory $dir\n");
- exit(1);
- }
+ protected function get_pages($dir) {
+ static $trunclen = null;
+ if(!$trunclen) {
+ global $conf;
+ $trunclen = strlen($conf['datadir'].':');
+ }
- $pages = array();
- $dh = opendir($dir);
- while ( false !== ( $entry = readdir($dh) ) ) {
- $status = dw_dir_filter($entry, $dir);
- if ( $status == DW_DIR_CONTINUE ) {
- continue;
- } else if ( $status == DW_DIR_NS ) {
- $pages = array_merge($pages, dw_get_pages($dir . '/' . $entry));
- } else {
- $page = array(
- 'id' => pathID(substr($dir.'/'.$entry,$trunclen)),
- 'file'=> $dir.'/'.$entry,
+ if(!is_dir($dir)) {
+ throw new DokuCLI_Exception("Unable to read directory $dir");
+ }
+
+ $pages = array();
+ $dh = opendir($dir);
+ while(false !== ($entry = readdir($dh))) {
+ $status = $this->dir_filter($entry, $dir);
+ if($status == WantedPagesCLI::DIR_CONTINUE) {
+ continue;
+ } else if($status == WantedPagesCLI::DIR_NS) {
+ $pages = array_merge($pages, $this->get_pages($dir.'/'.$entry));
+ } else {
+ $page = array(
+ 'id' => pathID(substr($dir.'/'.$entry, $trunclen)),
+ 'file' => $dir.'/'.$entry,
);
- $pages[] = $page;
+ $pages[] = $page;
+ }
}
+ closedir($dh);
+ return $pages;
}
- closedir($dh);
- return $pages;
-}
-#------------------------------------------------------------------------------
-function dw_internal_links($page) {
- global $conf;
- $instructions = p_get_instructions(file_get_contents($page['file']));
- $links = array();
- $cns = getNS($page['id']);
- $exists = false;
- foreach($instructions as $ins){
- if($ins[0] == 'internallink' || ($conf['camelcase'] && $ins[0] == 'camelcaselink') ){
- $mid = $ins[1][0];
- resolve_pageid($cns,$mid,$exists);
- if ( !$exists ) {
- list($mid) = explode('#',$mid); //record pages without hashs
- $links[] = $mid;
+ function internal_links($page) {
+ global $conf;
+ $instructions = p_get_instructions(file_get_contents($page['file']));
+ $links = array();
+ $cns = getNS($page['id']);
+ $exists = false;
+ foreach($instructions as $ins) {
+ if($ins[0] == 'internallink' || ($conf['camelcase'] && $ins[0] == 'camelcaselink')) {
+ $mid = $ins[1][0];
+ resolve_pageid($cns, $mid, $exists);
+ if(!$exists) {
+ list($mid) = explode('#', $mid); //record pages without hashs
+ $links[] = $mid;
+ }
}
}
+ return $links;
}
- return $links;
}
-#------------------------------------------------------------------------------
-$OPTS = Doku_Cli_Opts::getOptions(__FILE__,'h',array('help'));
-
-if ( $OPTS->isError() ) {
- fwrite( STDERR, $OPTS->getMessage() . "\n");
- exit(1);
-}
-
-if ( $OPTS->has('h') or $OPTS->has('help') ) {
- usage();
- exit(0);
-}
-
-$START_DIR = $conf['datadir'];
-
-if ( $OPTS->numArgs() == 1 ) {
- $START_DIR .= '/' . $OPTS->arg(0);
-}
-
-#------------------------------------------------------------------------------
-$WANTED_PAGES = array();
-
-foreach ( dw_get_pages($START_DIR) as $WIKI_PAGE ) {
- $WANTED_PAGES = array_merge($WANTED_PAGES,dw_internal_links($WIKI_PAGE));
-}
-$WANTED_PAGES = array_unique($WANTED_PAGES);
-sort($WANTED_PAGES);
-
-foreach ( $WANTED_PAGES as $WANTED_PAGE ) {
- print $WANTED_PAGE."\n";
-}
-exit(0);
+// Main
+$cli = new WantedPagesCLI();
+$cli->run(); \ No newline at end of file
diff --git a/conf/interwiki.conf b/conf/interwiki.conf
index 28561a4ae..d961912e5 100644
--- a/conf/interwiki.conf
+++ b/conf/interwiki.conf
@@ -24,12 +24,13 @@ amazon.de http://www.amazon.de/exec/obidos/ASIN/{URL}/splitbrain-21/
amazon.uk http://www.amazon.co.uk/exec/obidos/ASIN/
paypal https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=
phpfn http://www.php.net/{NAME}
-coral http://{HOST}.{PORT}.nyud.net:8090/{PATH}?{QUERY}
+coral http://{HOST}.{PORT}.nyud.net:8090{PATH}?{QUERY}
freecache http://freecache.org/{NAME}
sb http://www.splitbrain.org/go/
skype skype:{NAME}
google.de http://www.google.de/search?q=
go http://www.google.com/search?q={URL}&amp;btnI=lucky
+user :user:{NAME}
# To support VoIP/SIP links
callto callto://{NAME}
diff --git a/conf/mediameta.php b/conf/mediameta.php
index 0428a4b88..f75fa0821 100644
--- a/conf/mediameta.php
+++ b/conf/mediameta.php
@@ -5,7 +5,7 @@
* following contents:
* fieldname - Where data will be saved (EXIF or IPTC field)
* label - key to lookup in the $lang var, if not found printed as is
- * htmltype - 'text' or 'textarea'
+ * htmltype - 'text', 'textarea' or 'date'
* lookups - array additional fields to lookup the data (EXIF or IPTC fields)
*
* The fields are not ordered continously to make inserting additional items
diff --git a/data/deleted.files b/data/deleted.files
index 63335d3cc..cac352c9d 100644
--- a/data/deleted.files
+++ b/data/deleted.files
@@ -2,6 +2,164 @@
# but were removed later. An up to date DokuWiki should not have any of
# the files installed
+# removed in 2014-05-05
+lib/images/fileicons/audio.png
+lib/plugins/acl/lang/hi/lang.php
+lib/plugins/acl/lang/id-ni/lang.php
+lib/plugins/acl/lang/lb/lang.php
+lib/plugins/acl/lang/ms/lang.php
+lib/plugins/authad/lang/lv/settings.php
+lib/plugins/authldap/lang/lv/settings.php
+lib/plugins/authmysql/lang/fi/settings.php
+lib/plugins/authmysql/lang/lv/settings.php
+lib/plugins/authpgsql/lang/fi/settings.php
+lib/plugins/authpgsql/lang/it/settings.php
+lib/plugins/authpgsql/lang/lv/settings.php
+lib/plugins/authpgsql/lang/pl/settings.php
+lib/plugins/config/lang/hr/lang.php
+lib/plugins/config/lang/id/lang.php
+lib/plugins/config/lang/kk/lang.php
+lib/plugins/config/lang/lb/lang.php
+lib/plugins/config/lang/mk/lang.php
+lib/plugins/config/lang/ms/lang.php
+lib/plugins/config/lang/vi/lang.php
+lib/plugins/plugin/admin.php
+lib/plugins/plugin/classes/ap_delete.class.php
+lib/plugins/plugin/classes/ap_download.class.php
+lib/plugins/plugin/classes/ap_enable.class.php
+lib/plugins/plugin/classes/ap_info.class.php
+lib/plugins/plugin/classes/ap_manage.class.php
+lib/plugins/plugin/classes/ap_update.class.php
+lib/plugins/plugin/lang/af/lang.php
+lib/plugins/plugin/lang/ar/admin_plugin.txt
+lib/plugins/plugin/lang/ar/lang.php
+lib/plugins/plugin/lang/bg/admin_plugin.txt
+lib/plugins/plugin/lang/bg/lang.php
+lib/plugins/plugin/lang/ca-valencia/admin_plugin.txt
+lib/plugins/plugin/lang/ca-valencia/lang.php
+lib/plugins/plugin/lang/ca/admin_plugin.txt
+lib/plugins/plugin/lang/ca/lang.php
+lib/plugins/plugin/lang/cs/admin_plugin.txt
+lib/plugins/plugin/lang/cs/lang.php
+lib/plugins/plugin/lang/da/admin_plugin.txt
+lib/plugins/plugin/lang/da/lang.php
+lib/plugins/plugin/lang/de-informal/admin_plugin.txt
+lib/plugins/plugin/lang/de-informal/lang.php
+lib/plugins/plugin/lang/de/admin_plugin.txt
+lib/plugins/plugin/lang/de/lang.php
+lib/plugins/plugin/lang/el/admin_plugin.txt
+lib/plugins/plugin/lang/el/lang.php
+lib/plugins/plugin/lang/en/admin_plugin.txt
+lib/plugins/plugin/lang/en/lang.php
+lib/plugins/plugin/lang/eo/admin_plugin.txt
+lib/plugins/plugin/lang/eo/lang.php
+lib/plugins/plugin/lang/es/admin_plugin.txt
+lib/plugins/plugin/lang/es/lang.php
+lib/plugins/plugin/lang/et/lang.php
+lib/plugins/plugin/lang/eu/admin_plugin.txt
+lib/plugins/plugin/lang/eu/lang.php
+lib/plugins/plugin/lang/fa/admin_plugin.txt
+lib/plugins/plugin/lang/fa/lang.php
+lib/plugins/plugin/lang/fi/admin_plugin.txt
+lib/plugins/plugin/lang/fi/lang.php
+lib/plugins/plugin/lang/fr/admin_plugin.txt
+lib/plugins/plugin/lang/fr/lang.php
+lib/plugins/plugin/lang/gl/admin_plugin.txt
+lib/plugins/plugin/lang/gl/lang.php
+lib/plugins/plugin/lang/he/admin_plugin.txt
+lib/plugins/plugin/lang/he/lang.php
+lib/plugins/plugin/lang/hi/lang.php
+lib/plugins/plugin/lang/hr/lang.php
+lib/plugins/plugin/lang/hu/admin_plugin.txt
+lib/plugins/plugin/lang/hu/lang.php
+lib/plugins/plugin/lang/ia/admin_plugin.txt
+lib/plugins/plugin/lang/ia/lang.php
+lib/plugins/plugin/lang/id-ni/lang.php
+lib/plugins/plugin/lang/id/lang.php
+lib/plugins/plugin/lang/is/lang.php
+lib/plugins/plugin/lang/it/admin_plugin.txt
+lib/plugins/plugin/lang/it/lang.php
+lib/plugins/plugin/lang/ja/admin_plugin.txt
+lib/plugins/plugin/lang/ja/lang.php
+lib/plugins/plugin/lang/kk/lang.php
+lib/plugins/plugin/lang/ko/admin_plugin.txt
+lib/plugins/plugin/lang/ko/lang.php
+lib/plugins/plugin/lang/la/admin_plugin.txt
+lib/plugins/plugin/lang/la/lang.php
+lib/plugins/plugin/lang/lb/admin_plugin.txt
+lib/plugins/plugin/lang/lb/lang.php
+lib/plugins/plugin/lang/lt/admin_plugin.txt
+lib/plugins/plugin/lang/lt/lang.php
+lib/plugins/plugin/lang/lv/admin_plugin.txt
+lib/plugins/plugin/lang/lv/lang.php
+lib/plugins/plugin/lang/mk/lang.php
+lib/plugins/plugin/lang/mr/admin_plugin.txt
+lib/plugins/plugin/lang/mr/lang.php
+lib/plugins/plugin/lang/ms/lang.php
+lib/plugins/plugin/lang/ne/lang.php
+lib/plugins/plugin/lang/nl/admin_plugin.txt
+lib/plugins/plugin/lang/nl/lang.php
+lib/plugins/plugin/lang/no/admin_plugin.txt
+lib/plugins/plugin/lang/no/lang.php
+lib/plugins/plugin/lang/pl/admin_plugin.txt
+lib/plugins/plugin/lang/pl/lang.php
+lib/plugins/plugin/lang/pt-br/admin_plugin.txt
+lib/plugins/plugin/lang/pt-br/lang.php
+lib/plugins/plugin/lang/pt/admin_plugin.txt
+lib/plugins/plugin/lang/pt/lang.php
+lib/plugins/plugin/lang/ro/admin_plugin.txt
+lib/plugins/plugin/lang/ro/lang.php
+lib/plugins/plugin/lang/ru/admin_plugin.txt
+lib/plugins/plugin/lang/ru/lang.php
+lib/plugins/plugin/lang/sk/admin_plugin.txt
+lib/plugins/plugin/lang/sk/lang.php
+lib/plugins/plugin/lang/sl/admin_plugin.txt
+lib/plugins/plugin/lang/sl/lang.php
+lib/plugins/plugin/lang/sq/admin_plugin.txt
+lib/plugins/plugin/lang/sq/lang.php
+lib/plugins/plugin/lang/sr/admin_plugin.txt
+lib/plugins/plugin/lang/sr/lang.php
+lib/plugins/plugin/lang/sv/admin_plugin.txt
+lib/plugins/plugin/lang/sv/lang.php
+lib/plugins/plugin/lang/th/admin_plugin.txt
+lib/plugins/plugin/lang/th/lang.php
+lib/plugins/plugin/lang/tr/admin_plugin.txt
+lib/plugins/plugin/lang/tr/lang.php
+lib/plugins/plugin/lang/uk/admin_plugin.txt
+lib/plugins/plugin/lang/uk/lang.php
+lib/plugins/plugin/lang/vi/lang.php
+lib/plugins/plugin/lang/zh-tw/admin_plugin.txt
+lib/plugins/plugin/lang/zh-tw/lang.php
+lib/plugins/plugin/lang/zh/admin_plugin.txt
+lib/plugins/plugin/lang/zh/lang.php
+lib/plugins/plugin/plugin.info.txt
+lib/plugins/plugin/style.css
+lib/plugins/popularity/lang/et/lang.php
+lib/plugins/popularity/lang/hr/lang.php
+lib/plugins/popularity/lang/id/lang.php
+lib/plugins/popularity/lang/kk/lang.php
+lib/plugins/popularity/lang/lb/lang.php
+lib/plugins/popularity/lang/mk/lang.php
+lib/plugins/popularity/lang/ms/lang.php
+lib/plugins/popularity/lang/vi/lang.php
+lib/plugins/revert/lang/af/lang.php
+lib/plugins/revert/lang/hi/lang.php
+lib/plugins/revert/lang/hr/lang.php
+lib/plugins/revert/lang/id-ni/lang.php
+lib/plugins/revert/lang/id/lang.php
+lib/plugins/revert/lang/kk/lang.php
+lib/plugins/revert/lang/lb/lang.php
+lib/plugins/revert/lang/lt/lang.php
+lib/plugins/revert/lang/mk/lang.php
+lib/plugins/revert/lang/ms/lang.php
+lib/plugins/revert/lang/vi/lang.php
+lib/plugins/usermanager/lang/hi/lang.php
+lib/plugins/usermanager/lang/hr/lang.php
+lib/plugins/usermanager/lang/id-ni/lang.php
+lib/plugins/usermanager/lang/lb/lang.php
+lib/plugins/usermanager/lang/ms/lang.php
+lib/plugins/usermanager/lang/vi/lang.php
+
# removed in 2013-11-18
lib/images/arrow_down.gif
lib/images/arrow_up.gif
diff --git a/data/pages/wiki/dokuwiki.txt b/data/pages/wiki/dokuwiki.txt
index 808aea68a..0e08fdcd3 100644
--- a/data/pages/wiki/dokuwiki.txt
+++ b/data/pages/wiki/dokuwiki.txt
@@ -6,7 +6,7 @@ Read the [[doku>manual|DokuWiki Manual]] to unleash the full power of DokuWiki.
===== Download =====
-DokuWiki is available at http://www.splitbrain.org/go/dokuwiki
+DokuWiki is available at http://download.dokuwiki.org/
===== Read More =====
@@ -24,7 +24,7 @@ All documentation and additional information besides the [[syntax|syntax descrip
**Installing DokuWiki**
* [[doku>requirements|System Requirements]]
- * [[http://www.splitbrain.org/go/dokuwiki|Download DokuWiki]] :!:
+ * [[http://download.dokuwiki.org/|Download DokuWiki]] :!:
* [[doku>changes|Change Log]]
* [[doku>Install|How to install or upgrade]] :!:
* [[doku>config|Configuration]]
@@ -50,7 +50,7 @@ All documentation and additional information besides the [[syntax|syntax descrip
* [[doku>mailinglist|Join the mailing list]]
* [[http://forum.dokuwiki.org|Check out the user forum]]
* [[doku>irc|Talk to other users in the IRC channel]]
- * [[http://bugs.splitbrain.org/index.php?project=1|Submit bugs and feature wishes]]
+ * [[https://github.com/splitbrain/dokuwiki/issues|Submit bugs and feature wishes]]
* [[http://www.wikimatrix.org/forum/viewforum.php?id=10|Share your experiences in the WikiMatrix forum]]
* [[doku>thanks|Some humble thanks]]
diff --git a/data/pages/wiki/syntax.txt b/data/pages/wiki/syntax.txt
index 02b49dc3d..86ad815e4 100644
--- a/data/pages/wiki/syntax.txt
+++ b/data/pages/wiki/syntax.txt
@@ -121,9 +121,9 @@ By using four or more dashes, you can make a horizontal line:
----
-===== Images and Other Files =====
+===== Media Files =====
-You can include external and internal [[doku>images]] with curly brackets. Optionally you can specify the size of them.
+You can include external and internal [[doku>images|images, videos and audio files]] with curly brackets. Optionally you can specify the size of them.
Real size: {{wiki:dokuwiki-128.png}}
@@ -157,10 +157,31 @@ Of course, you can add a title (displayed as a tooltip by most browsers), too.
{{ wiki:dokuwiki-128.png |This is the caption}}
-If you specify a filename (external or internal) that is not an image (''gif, jpeg, png''), then it will be displayed as a link instead.
-
For linking an image to another page see [[#Image Links]] above.
+==== Supported Media Formats ====
+
+DokuWiki can embed the following media formats directly.
+
+| Image | ''gif'', ''jpg'', ''png'' |
+| Video | ''webm'', ''ogv'', ''mp4'' |
+| Audio | ''ogg'', ''mp3'', ''wav'' |
+| Flash | ''swf'' |
+
+If you specify a filename that is not a supported media format, then it will be displayed as a link instead.
+
+==== Fallback Formats ====
+
+Unfortunately not all browsers understand all video and audio formats. To mitigate the problem, you can upload your file in different formats for maximum browser compatibility.
+
+For example consider this embedded mp4 video:
+
+ {{video.mp4|A funny video}}
+
+When you upload a ''video.webm'' and ''video.ogv'' next to the referenced ''video.mp4'', DokuWiki will automatically add them as alternatives so that one of the three files is understood by your browser.
+
+Additionally DokuWiki supports a "poster" image which will be shown before the video has started. That image needs to have the same filename as the video and be either a jpg or png file. In the example above a ''video.jpg'' file would work.
+
===== Lists =====
Dokuwiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a ''*'' for unordered lists or a ''-'' for ordered ones.
diff --git a/doku.php b/doku.php
index d861aa4fb..da3643544 100644
--- a/doku.php
+++ b/doku.php
@@ -9,7 +9,7 @@
*/
// update message version
-$updateVersion = 43;
+$updateVersion = 45;
// xdebug_start_profiling();
diff --git a/feed.php b/feed.php
index bdce666d2..a63e22164 100644
--- a/feed.php
+++ b/feed.php
@@ -15,13 +15,19 @@ require_once(DOKU_INC.'inc/init.php');
//close session
session_write_close();
+//feed disabled?
+if(!actionOK('rss')) {
+ http_status(404);
+ echo '<error>RSS feed is disabled.</error>';
+ exit;
+}
+
// get params
$opt = rss_parseOptions();
// the feed is dynamic - we need a cache for each combo
// (but most people just use the default feed so it's still effective)
-$cache = getCacheName(join('', array_values($opt)).$_SERVER['REMOTE_USER'], '.feed');
-$key = join('', array_values($opt)).$_SERVER['REMOTE_USER'];
+$key = join('', array_values($opt)).'$'.$_SERVER['REMOTE_USER'].'$'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'];
$cache = new cache($key, '.feed');
// prepare cache depends
@@ -121,6 +127,8 @@ function rss_parseOptions() {
'items' => array('int', 'num', $conf['recent']),
// Boolean, only used in rc mode
'show_minor' => array('bool', 'minor', false),
+ // String, only used in list mode
+ 'sort' => array('str', 'sort', 'natural'),
// String, only used in search mode
'search_query' => array('str', 'q', null),
// One of: pages, media, both
@@ -132,15 +140,14 @@ function rss_parseOptions() {
$opt['items'] = max(0, (int) $opt['items']);
$opt['show_minor'] = (bool) $opt['show_minor'];
+ $opt['sort'] = valid_input_set('sort', array('default' => 'natural', 'date'), $opt);
$opt['guardmail'] = ($conf['mailguard'] != '' && $conf['mailguard'] != 'none');
- $type = valid_input_set(
- 'type', array(
- 'rss', 'rss2', 'atom', 'atom1', 'rss1',
- 'default' => $conf['rss_type']
- ),
- $_REQUEST
+ $type = $INPUT->valid(
+ 'type',
+ array( 'rss', 'rss2', 'atom', 'atom1', 'rss1'),
+ $conf['rss_type']
);
switch($type) {
case 'rss':
@@ -182,7 +189,7 @@ function rss_parseOptions() {
function rss_buildItems(&$rss, &$data, $opt) {
global $conf;
global $lang;
- /* @var auth_basic $auth */
+ /* @var DokuWiki_Auth_Plugin $auth */
global $auth;
$eventData = array(
@@ -293,18 +300,19 @@ function rss_buildItems(&$rss, &$data, $opt) {
case 'diff':
case 'htmldiff':
if($ditem['media']) {
- $revs = getRevisions($id, 0, 1, 8192, true);
+ $medialog = new MediaChangeLog($id);
+ $revs = $medialog->getRevisions(0, 1);
$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);
+ $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
+ $src_r = ml($id, $more, true, '&amp;', true);
}
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);
+ $src_l = ml($id, $more, true, '&amp;', true);
}
$content = '';
if($src_r) {
@@ -318,7 +326,8 @@ function rss_buildItems(&$rss, &$data, $opt) {
} else {
require_once(DOKU_INC.'inc/DifferenceEngine.php');
- $revs = getRevisions($id, 0, 1);
+ $pagelog = new PageChangeLog($id);
+ $revs = $pagelog->getRevisions(0, 1);
$rev = $revs[0];
if($rev) {
@@ -347,8 +356,8 @@ function rss_buildItems(&$rss, &$data, $opt) {
case 'html':
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);
+ $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
+ $src = ml($id, $more, true, '&amp;', true);
$content = '<img src="'.$src.'" alt="'.$id.'" />';
} else {
$content = '';
@@ -378,8 +387,8 @@ function rss_buildItems(&$rss, &$data, $opt) {
default:
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);
+ $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
+ $src = ml($id, $more, true, '&amp;', true);
$content = '<img src="'.$src.'" alt="'.$id.'" />';
} else {
$content = '';
@@ -399,6 +408,7 @@ function rss_buildItems(&$rss, &$data, $opt) {
if($userInfo) {
switch($conf['showuseras']) {
case 'username':
+ case 'username_link':
$item->author = $userInfo['name'];
break;
default:
@@ -473,7 +483,7 @@ function rssListNamespace($opt) {
global $conf;
$ns = ':'.cleanID($opt['namespace']);
- $ns = str_replace(':', '/', $ns);
+ $ns = utf8_encodeFN(str_replace(':', '/', $ns));
$data = array();
$search_opts = array(
@@ -481,7 +491,7 @@ function rssListNamespace($opt) {
'pagesonly' => true,
'listfiles' => true
);
- search($data, $conf['datadir'], 'search_universal', $search_opts, $ns);
+ search($data, $conf['datadir'], 'search_universal', $search_opts, $ns, $lvl = 1, $opt['sort']);
return $data;
}
diff --git a/inc/EmailAddressValidator.php b/inc/EmailAddressValidator.php
index bb4ef0ca9..fd6f3275b 100644
--- a/inc/EmailAddressValidator.php
+++ b/inc/EmailAddressValidator.php
@@ -15,8 +15,8 @@ class EmailAddressValidator {
/**
* Check email address validity
- * @param strEmailAddress Email address to be checked
- * @return True if email is valid, false if not
+ * @param string $strEmailAddress Email address to be checked
+ * @return bool True if email is valid, false if not
*/
public function check_email_address($strEmailAddress) {
@@ -82,8 +82,8 @@ class EmailAddressValidator {
/**
* Checks email section before "@" symbol for validity
- * @param strLocalPortion Text to be checked
- * @return True if local portion is valid, false if not
+ * @param string $strLocalPortion Text to be checked
+ * @return bool True if local portion is valid, false if not
*/
protected function check_local_portion($strLocalPortion) {
// Local portion can only be from 1 to 64 characters, inclusive.
@@ -113,8 +113,8 @@ class EmailAddressValidator {
/**
* Checks email section after "@" symbol for validity
- * @param strDomainPortion Text to be checked
- * @return True if domain portion is valid, false if not
+ * @param string $strDomainPortion Text to be checked
+ * @return bool True if domain portion is valid, false if not
*/
protected function check_domain_portion($strDomainPortion) {
// Total domain can only be from 1 to 255 characters, inclusive
@@ -172,10 +172,10 @@ class EmailAddressValidator {
/**
* Check given text length is between defined bounds
- * @param strText Text to be checked
- * @param intMinimum Minimum acceptable length
- * @param intMaximum Maximum acceptable length
- * @return True if string is within bounds (inclusive), false if not
+ * @param string $strText Text to be checked
+ * @param int $intMinimum Minimum acceptable length
+ * @param int $intMaximum Maximum acceptable length
+ * @return bool True if string is within bounds (inclusive), false if not
*/
protected function check_text_length($strText, $intMinimum, $intMaximum) {
// Minimum and maximum are both inclusive
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index 96954fb47..6ac67f159 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -35,6 +35,19 @@ class DokuHTTPClient extends HTTPClient {
$this->proxy_pass = conf_decodeString($conf['proxy']['pass']);
$this->proxy_ssl = $conf['proxy']['ssl'];
$this->proxy_except = $conf['proxy']['except'];
+
+ // allow enabling debugging via URL parameter (if debugging allowed)
+ if($conf['allowdebug']) {
+ if(
+ isset($_REQUEST['httpdebug']) ||
+ (
+ isset($_SERVER['HTTP_REFERER']) &&
+ strpos($_SERVER['HTTP_REFERER'], 'httpdebug') !== false
+ )
+ ) {
+ $this->debug = true;
+ }
+ }
}
@@ -61,6 +74,9 @@ class DokuHTTPClient extends HTTPClient {
}
+/**
+ * Class HTTPClientException
+ */
class HTTPClientException extends Exception { }
/**
@@ -249,12 +265,17 @@ class HTTPClient {
if (empty($port)) $port = 8080;
}else{
$request_url = $path;
- $server = $server;
if (!isset($port)) $port = ($uri['scheme'] == 'https') ? 443 : 80;
}
// add SSL stream prefix if needed - needs SSL support in PHP
- if($port == 443 || $this->proxy_ssl) $server = 'ssl://'.$server;
+ if($port == 443 || $this->proxy_ssl) {
+ if(!in_array('ssl', stream_get_transports())) {
+ $this->status = -200;
+ $this->error = 'This PHP version does not support SSL - cannot connect to server';
+ }
+ $server = 'ssl://'.$server;
+ }
// prepare headers
$headers = $this->headers;
@@ -274,7 +295,6 @@ class HTTPClient {
}
}
$headers['Content-Length'] = strlen($data);
- $rmethod = 'POST';
}elseif($method == 'GET'){
$data = ''; //no data allowed on GET requests
}
@@ -304,11 +324,18 @@ class HTTPClient {
}
// try establish a CONNECT tunnel for SSL
- if($this->_ssltunnel($socket, $request_url)){
- // no keep alive for tunnels
- $this->keep_alive = false;
- // tunnel is authed already
- if(isset($headers['Proxy-Authentication'])) unset($headers['Proxy-Authentication']);
+ try {
+ if($this->_ssltunnel($socket, $request_url)){
+ // no keep alive for tunnels
+ $this->keep_alive = false;
+ // tunnel is authed already
+ if(isset($headers['Proxy-Authentication'])) unset($headers['Proxy-Authentication']);
+ }
+ } catch (HTTPClientException $e) {
+ $this->status = $e->getCode();
+ $this->error = $e->getMessage();
+ fclose($socket);
+ return false;
}
// keep alive?
@@ -330,7 +357,7 @@ class HTTPClient {
try {
//set non-blocking
- stream_set_blocking($socket, false);
+ stream_set_blocking($socket, 0);
// build request
$request = "$method $request_url HTTP/".$this->http.HTTP_NL;
@@ -363,7 +390,7 @@ class HTTPClient {
// get Status
if (!preg_match('/^HTTP\/(\d\.\d)\s*(\d+).*?\n/', $r_headers, $m))
- throw new HTTPClientException('Server returned bad answer');
+ throw new HTTPClientException('Server returned bad answer '.$r_headers);
$this->status = $m[2];
@@ -445,7 +472,7 @@ class HTTPClient {
if ($chunk_size > 0) {
$r_body .= $this->_readData($socket, $chunk_size, 'chunk');
- $byte = $this->_readData($socket, 2, 'chunk'); // read trailing \r\n
+ $this->_readData($socket, 2, 'chunk'); // read trailing \r\n
}
} while ($chunk_size && !$abort);
}elseif(isset($this->resp_headers['content-length']) && !isset($this->resp_headers['transfer-encoding'])){
@@ -467,7 +494,6 @@ class HTTPClient {
$r_body = $this->_readData($socket, $this->max_bodysize, 'response (content-length limited)', true);
}else{
// read entire socket
- $r_size = 0;
while (!feof($socket)) {
$r_body .= $this->_readData($socket, 4096, 'response (unlimited)', true);
}
@@ -496,7 +522,6 @@ class HTTPClient {
if (!$this->keep_alive ||
(isset($this->resp_headers['connection']) && $this->resp_headers['connection'] == 'Close')) {
// close socket
- $status = socket_get_status($socket);
fclose($socket);
unset(self::$connections[$connectionId]);
}
@@ -526,6 +551,7 @@ class HTTPClient {
*
* @param resource &$socket
* @param string &$requesturl
+ * @throws HTTPClientException when a tunnel is needed but could not be established
* @return bool true if a tunnel was established
*/
function _ssltunnel(&$socket, &$requesturl){
@@ -538,7 +564,7 @@ class HTTPClient {
$request = "CONNECT {$requestinfo['host']}:{$requestinfo['port']} HTTP/1.0".HTTP_NL;
$request .= "Host: {$requestinfo['host']}".HTTP_NL;
if($this->proxy_user) {
- 'Proxy-Authorization Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass).HTTP_NL;
+ $request .= 'Proxy-Authorization: Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass).HTTP_NL;
}
$request .= HTTP_NL;
@@ -559,7 +585,8 @@ class HTTPClient {
return true;
}
}
- return false;
+
+ throw new HTTPClientException('Failed to establish secure proxy connection', -150);
}
/**
diff --git a/inc/Input.class.php b/inc/Input.class.php
index 7434d2b2c..e7eef1c29 100644
--- a/inc/Input.class.php
+++ b/inc/Input.class.php
@@ -15,6 +15,8 @@ class Input {
public $post;
/** @var GetInput Access $_GET parameters */
public $get;
+ /** @var ServerInput Access $_SERVER parameters */
+ public $server;
protected $access;
@@ -25,6 +27,7 @@ class Input {
$this->access = &$_REQUEST;
$this->post = new PostInput();
$this->get = new GetInput();
+ $this->server = new ServerInput();
}
/**
@@ -141,6 +144,26 @@ class Input {
}
/**
+ * Access a request parameter and make sure it is has a valid value
+ *
+ * Please note that comparisons to the valid values are not done typesafe (request vars
+ * are always strings) however the function will return the correct type from the $valids
+ * array when an match was found.
+ *
+ * @param string $name Parameter name
+ * @param array $valids Array of valid values
+ * @param mixed $default Default to return if parameter isn't set or not valid
+ * @return null|mixed
+ */
+ public function valid($name, $valids, $default = null) {
+ if(!isset($this->access[$name])) return $default;
+ if(is_array($this->access[$name])) return $default; // we don't allow arrays
+ $found = array_search($this->access[$name], $valids);
+ if($found !== false) return $valids[$found]; // return the valid value for type safety
+ return $default;
+ }
+
+ /**
* Access a request parameter as bool
*
* Note: $nonempty is here for interface consistency and makes not much sense for booleans
@@ -260,3 +283,18 @@ class GetInput extends Input {
$_REQUEST[$name] = $value;
}
}
+
+/**
+ * Internal class used for $_SERVER access in Input class
+ */
+class ServerInput extends Input {
+ protected $access;
+
+ /**
+ * Initialize the $access array, remove subclass members
+ */
+ function __construct() {
+ $this->access = &$_SERVER;
+ }
+
+}
diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php
index cb1772736..a35ec3ed0 100644
--- a/inc/JpegMeta.php
+++ b/inc/JpegMeta.php
@@ -2929,7 +2929,8 @@ class JpegMeta {
$length = strlen($data) - $pos;
}
- return substr($data, $pos, $length);
+ $rv = substr($data, $pos, $length);
+ return $rv;
}
/*************************************************************/
diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php
index 2ac2c1d60..e90b45f99 100644
--- a/inc/Mailer.class.php
+++ b/inc/Mailer.class.php
@@ -39,6 +39,8 @@ class Mailer {
*/
public function __construct() {
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
$server = parse_url(DOKU_URL, PHP_URL_HOST);
if(strpos($server,'.') === false) $server = $server.'.localhost';
@@ -53,7 +55,7 @@ class Mailer {
// add some default headers for mailfiltering FS#2247
$this->setHeader('X-Mailer', 'DokuWiki');
- $this->setHeader('X-DokuWiki-User', $_SERVER['REMOTE_USER']);
+ $this->setHeader('X-DokuWiki-User', $INPUT->server->str('REMOTE_USER'));
$this->setHeader('X-DokuWiki-Title', $conf['title']);
$this->setHeader('X-DokuWiki-Server', $server);
$this->setHeader('X-Auto-Response-Suppress', 'OOF');
@@ -181,6 +183,9 @@ class Mailer {
public function setBody($text, $textrep = null, $htmlrep = null, $html = null, $wrap = true) {
global $INFO;
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
+
$htmlrep = (array)$htmlrep;
$textrep = (array)$textrep;
@@ -218,24 +223,24 @@ class Mailer {
$cip = gethostsbyaddrs($ip);
$trep = array(
'DATE' => dformat(),
- 'BROWSER' => $_SERVER['HTTP_USER_AGENT'],
+ 'BROWSER' => $INPUT->server->str('HTTP_USER_AGENT'),
'IPADDRESS' => $ip,
'HOSTNAME' => $cip,
'TITLE' => $conf['title'],
'DOKUWIKIURL' => DOKU_URL,
- 'USER' => $_SERVER['REMOTE_USER'],
+ 'USER' => $INPUT->server->str('REMOTE_USER'),
'NAME' => $INFO['userinfo']['name'],
'MAIL' => $INFO['userinfo']['mail'],
);
$trep = array_merge($trep, (array)$textrep);
$hrep = array(
'DATE' => '<i>'.hsc(dformat()).'</i>',
- 'BROWSER' => hsc($_SERVER['HTTP_USER_AGENT']),
+ 'BROWSER' => hsc($INPUT->server->str('HTTP_USER_AGENT')),
'IPADDRESS' => '<code>'.hsc($ip).'</code>',
'HOSTNAME' => '<code>'.hsc($cip).'</code>',
'TITLE' => hsc($conf['title']),
'DOKUWIKIURL' => '<a href="'.DOKU_URL.'">'.DOKU_URL.'</a>',
- 'USER' => hsc($_SERVER['REMOTE_USER']),
+ 'USER' => hsc($INPUT->server->str('REMOTE_USER')),
'NAME' => hsc($INFO['userinfo']['name']),
'MAIL' => '<a href="mailto:"'.hsc($INFO['userinfo']['mail']).'">'.
hsc($INFO['userinfo']['mail']).'</a>',
@@ -277,7 +282,7 @@ class Mailer {
/**
* Add the To: recipients
*
- * @see setAddress
+ * @see cleanAddress
* @param string|array $address Multiple adresses separated by commas or as array
*/
public function to($address) {
@@ -287,7 +292,7 @@ class Mailer {
/**
* Add the Cc: recipients
*
- * @see setAddress
+ * @see cleanAddress
* @param string|array $address Multiple adresses separated by commas or as array
*/
public function cc($address) {
@@ -297,7 +302,7 @@ class Mailer {
/**
* Add the Bcc: recipients
*
- * @see setAddress
+ * @see cleanAddress
* @param string|array $address Multiple adresses separated by commas or as array
*/
public function bcc($address) {
@@ -310,7 +315,7 @@ class Mailer {
* This is set to $conf['mailfrom'] when not specified so you shouldn't need
* to call this function
*
- * @see setAddress
+ * @see cleanAddress
* @param string $address from address
*/
public function from($address) {
@@ -333,9 +338,9 @@ class Mailer {
* for headers. Addresses may not contain Non-ASCII data!
*
* Example:
- * setAddress("föö <foo@bar.com>, me@somewhere.com","TBcc");
+ * cc("föö <foo@bar.com>, me@somewhere.com","TBcc");
*
- * @param string|array $address Multiple adresses separated by commas or as array
+ * @param string|array $addresses Multiple adresses separated by commas or as array
* @return bool|string the prepared header (can contain multiple lines)
*/
public function cleanAddress($addresses) {
@@ -522,7 +527,7 @@ class Mailer {
// clean up addresses
if(empty($this->headers['From'])) $this->from($conf['mailfrom']);
- $addrs = array('To', 'From', 'Cc', 'Bcc');
+ $addrs = array('To', 'From', 'Cc', 'Bcc', 'Reply-To', 'Sender');
foreach($addrs as $addr) {
if(isset($this->headers[$addr])) {
$this->headers[$addr] = $this->cleanAddress($this->headers[$addr]);
diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php
index a26c2d0de..ffa03ee93 100644
--- a/inc/RemoteAPICore.php
+++ b/inc/RemoteAPICore.php
@@ -378,7 +378,8 @@ class RemoteAPICore {
throw new RemoteException('The requested page does not exist', 121);
}
- $info = getRevisionInfo($id, $time, 1024);
+ $pagelog = new PageChangeLog($id, 1024);
+ $info = $pagelog->getRevisionInfo($time);
$data = array(
'name' => $id,
@@ -650,11 +651,12 @@ class RemoteAPICore {
throw new RemoteException('Empty page ID', 131);
}
- $revisions = getRevisions($id, $first, $conf['recent']+1);
+ $pagelog = new PageChangeLog($id);
+ $revisions = $pagelog->getRevisions($first, $conf['recent']+1);
if(count($revisions)==0 && $first!=0) {
$first=0;
- $revisions = getRevisions($id, $first, $conf['recent']+1);
+ $revisions = $pagelog->getRevisions($first, $conf['recent']+1);
}
if(count($revisions)>0 && $first==0) {
@@ -676,7 +678,8 @@ class RemoteAPICore {
// case this can lead to less pages being returned than
// specified via $conf['recent']
if($time){
- $info = getRevisionInfo($id, $time, 1024);
+ $pagelog->setChunkSize(1024);
+ $info = $pagelog->getRevisionInfo($time);
if(!empty($info)) {
$data['user'] = $info['user'];
$data['ip'] = $info['ip'];
diff --git a/inc/Sitemapper.php b/inc/Sitemapper.php
index bf89a311c..6332746a6 100644
--- a/inc/Sitemapper.php
+++ b/inc/Sitemapper.php
@@ -131,9 +131,9 @@ class Sitemapper {
$encoded_sitemap_url = urlencode(wl('', array('do' => 'sitemap'), true, '&'));
$ping_urls = array(
- 'google' => 'http://www.google.com/webmasters/sitemaps/ping?sitemap='.$encoded_sitemap_url,
- 'yahoo' => 'http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=dokuwiki&url='.$encoded_sitemap_url,
+ 'google' => 'http://www.google.com/webmasters/sitemaps/ping?sitemap='.$encoded_sitemap_url,
'microsoft' => 'http://www.bing.com/webmaster/ping.aspx?siteMap='.$encoded_sitemap_url,
+ 'yandex' => 'http://blogs.yandex.ru/pings/?status=success&url='.$encoded_sitemap_url
);
$data = array('ping_urls' => $ping_urls,
diff --git a/inc/TarLib.class.php b/inc/TarLib.class.php
index ae08039ec..dd319a79a 100644
--- a/inc/TarLib.class.php
+++ b/inc/TarLib.class.php
@@ -26,6 +26,8 @@ class TarLib {
public $_result = true;
function __construct($file, $comptype = TarLib::COMPRESS_AUTO, $complevel = 9) {
+ dbg_deprecated('class Tar');
+
if(!$file) $this->error('__construct', '$file');
$this->file = $file;
diff --git a/inc/actions.php b/inc/actions.php
index 50cbe369f..ef09a0dc7 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -20,6 +20,7 @@ function act_dispatch(){
global $ID;
global $INFO;
global $QUERY;
+ /* @var Input $INPUT */
global $INPUT;
global $lang;
global $conf;
@@ -94,7 +95,7 @@ function act_dispatch(){
// user profile changes
if (in_array($ACT, array('profile','profile_delete'))) {
- if(!$_SERVER['REMOTE_USER']) {
+ if(!$INPUT->server->str('REMOTE_USER')) {
$ACT = 'login';
} else {
switch ($ACT) {
@@ -190,7 +191,7 @@ function act_dispatch(){
unset($evt);
// when action 'show', the intial not 'show' and POST, do a redirect
- if($ACT == 'show' && $preact != 'show' && strtolower($_SERVER['REQUEST_METHOD']) == 'post'){
+ if($ACT == 'show' && $preact != 'show' && strtolower($INPUT->server->str('REQUEST_METHOD')) == 'post'){
act_redirect($ID,$preact);
}
@@ -414,6 +415,8 @@ function act_revert($act){
global $ID;
global $REV;
global $lang;
+ /* @var Input $INPUT */
+ global $INPUT;
// FIXME $INFO['writable'] currently refers to the attic version
// global $INFO;
// if (!$INFO['writable']) {
@@ -445,7 +448,7 @@ function act_revert($act){
session_write_close();
// when done, show current page
- $_SERVER['REQUEST_METHOD'] = 'post'; //should force a redirect
+ $INPUT->server->set('REQUEST_METHOD','post'); //should force a redirect
$REV = '';
return 'show';
}
@@ -493,17 +496,20 @@ function act_redirect_execute($opts){
function act_auth($act){
global $ID;
global $INFO;
+ /* @var Input $INPUT */
+ global $INPUT;
//already logged in?
- if(isset($_SERVER['REMOTE_USER']) && $act=='login'){
+ if($INPUT->server->has('REMOTE_USER') && $act=='login'){
return 'show';
}
//handle logout
if($act=='logout'){
$lockedby = checklock($ID); //page still locked?
- if($lockedby == $_SERVER['REMOTE_USER'])
+ if($lockedby == $INPUT->server->str('REMOTE_USER')){
unlock($ID); //try to unlock
+ }
// do the logout stuff
auth_logoff();
@@ -697,7 +703,7 @@ function act_sitemap($act) {
// Send file
//use x-sendfile header to pass the delivery to compatible webservers
- if (http_sendfile($sitemap)) exit;
+ http_sendfile($sitemap);
readfile($sitemap);
exit;
@@ -719,10 +725,11 @@ function act_subscription($act){
global $lang;
global $INFO;
global $ID;
+ /* @var Input $INPUT */
global $INPUT;
// subcriptions work for logged in users only
- if(!$_SERVER['REMOTE_USER']) return 'show';
+ if(!$INPUT->server->str('REMOTE_USER')) return 'show';
// get and preprocess data.
$params = array();
@@ -733,7 +740,7 @@ function act_subscription($act){
}
// any action given? if not just return and show the subscription page
- if(!$params['action'] || !checkSecurityToken()) return $act;
+ if(empty($params['action']) || !checkSecurityToken()) return $act;
// Handle POST data, may throw exception.
trigger_event('ACTION_HANDLE_SUBSCRIBE', $params, 'subscription_handle_post');
@@ -745,9 +752,9 @@ function act_subscription($act){
// Perform action.
$sub = new Subscription();
if($action == 'unsubscribe'){
- $ok = $sub->remove($target, $_SERVER['REMOTE_USER'], $style);
+ $ok = $sub->remove($target, $INPUT->server->str('REMOTE_USER'), $style);
}else{
- $ok = $sub->add($target, $_SERVER['REMOTE_USER'], $style);
+ $ok = $sub->add($target, $INPUT->server->str('REMOTE_USER'), $style);
}
if($ok) {
@@ -776,6 +783,8 @@ function act_subscription($act){
function subscription_handle_post(&$params) {
global $INFO;
global $lang;
+ /* @var Input $INPUT */
+ global $INPUT;
// Get and validate parameters.
if (!isset($params['target'])) {
@@ -806,7 +815,7 @@ function subscription_handle_post(&$params) {
}
if ($is === false) {
throw new Exception(sprintf($lang['subscr_not_subscribed'],
- $_SERVER['REMOTE_USER'],
+ $INPUT->server->str('REMOTE_USER'),
prettyprint_id($target)));
}
// subscription_set deletes a subscription if style = null.
diff --git a/inc/auth.php b/inc/auth.php
index 6000ea6d7..2bdc3eb00 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -131,6 +131,8 @@ function auth_setup() {
function auth_loadACL() {
global $config_cascade;
global $USERINFO;
+ /* @var Input $INPUT */
+ global $INPUT;
if(!is_readable($config_cascade['acl']['default'])) return array();
@@ -145,10 +147,10 @@ function auth_loadACL() {
// substitute user wildcard first (its 1:1)
if(strstr($line, '%USER%')){
// if user is not logged in, this ACL line is meaningless - skip it
- if (!isset($_SERVER['REMOTE_USER'])) continue;
+ if (!$INPUT->server->has('REMOTE_USER')) continue;
- $id = str_replace('%USER%',cleanID($_SERVER['REMOTE_USER']),$id);
- $rest = str_replace('%USER%',auth_nameencode($_SERVER['REMOTE_USER']),$rest);
+ $id = str_replace('%USER%',cleanID($INPUT->server->str('REMOTE_USER')),$id);
+ $rest = str_replace('%USER%',auth_nameencode($INPUT->server->str('REMOTE_USER')),$rest);
}
// substitute group wildcard (its 1:m)
@@ -217,6 +219,8 @@ function auth_login($user, $pass, $sticky = false, $silent = false) {
global $lang;
/* @var DokuWiki_Auth_Plugin $auth */
global $auth;
+ /* @var Input $INPUT */
+ global $INPUT;
$sticky ? $sticky = true : $sticky = false; //sanity check
@@ -226,7 +230,7 @@ function auth_login($user, $pass, $sticky = false, $silent = false) {
//usual login
if($auth->checkPass($user, $pass)) {
// make logininfo globally available
- $_SERVER['REMOTE_USER'] = $user;
+ $INPUT->server->set('REMOTE_USER', $user);
$secret = auth_cookiesalt(!$sticky, true); //bind non-sticky to session
auth_setCookie($user, auth_encrypt($pass, $secret), $sticky);
return true;
@@ -253,7 +257,7 @@ function auth_login($user, $pass, $sticky = false, $silent = false) {
) {
// he has session, cookie and browser right - let him in
- $_SERVER['REMOTE_USER'] = $user;
+ $INPUT->server->set('REMOTE_USER', $user);
$USERINFO = $session['info']; //FIXME move all references to session
return true;
}
@@ -288,7 +292,10 @@ function auth_validateToken($token) {
}
// still here? trust the session data
global $USERINFO;
- $_SERVER['REMOTE_USER'] = $_SESSION[DOKU_COOKIE]['auth']['user'];
+ /* @var Input $INPUT */
+ global $INPUT;
+
+ $INPUT->server->set('REMOTE_USER',$_SESSION[DOKU_COOKIE]['auth']['user']);
$USERINFO = $_SESSION[DOKU_COOKIE]['auth']['info'];
return true;
}
@@ -321,11 +328,14 @@ function auth_createToken() {
* @return string a MD5 sum of various browser headers
*/
function auth_browseruid() {
+ /* @var Input $INPUT */
+ global $INPUT;
+
$ip = clientIP(true);
$uid = '';
- $uid .= $_SERVER['HTTP_USER_AGENT'];
- $uid .= $_SERVER['HTTP_ACCEPT_ENCODING'];
- $uid .= $_SERVER['HTTP_ACCEPT_CHARSET'];
+ $uid .= $INPUT->server->str('HTTP_USER_AGENT');
+ $uid .= $INPUT->server->str('HTTP_ACCEPT_ENCODING');
+ $uid .= $INPUT->server->str('HTTP_ACCEPT_CHARSET');
$uid .= substr($ip, 0, strpos($ip, '.'));
$uid = strtolower($uid);
return md5($uid);
@@ -511,6 +521,8 @@ function auth_logoff($keepbc = false) {
global $USERINFO;
/* @var DokuWiki_Auth_Plugin $auth */
global $auth;
+ /* @var Input $INPUT */
+ global $INPUT;
// make sure the session is writable (it usually is)
@session_start();
@@ -523,16 +535,11 @@ function auth_logoff($keepbc = false) {
unset($_SESSION[DOKU_COOKIE]['auth']['info']);
if(!$keepbc && isset($_SESSION[DOKU_COOKIE]['bc']))
unset($_SESSION[DOKU_COOKIE]['bc']);
- if(isset($_SERVER['REMOTE_USER']))
- unset($_SERVER['REMOTE_USER']);
+ $INPUT->server->remove('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, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true);
- } else {
- setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl()));
- }
+ setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true);
if($auth) $auth->logOff();
}
@@ -557,13 +564,16 @@ function auth_ismanager($user = null, $groups = null, $adminonly = false) {
global $USERINFO;
/* @var DokuWiki_Auth_Plugin $auth */
global $auth;
+ /* @var Input $INPUT */
+ global $INPUT;
+
if(!$auth) return false;
if(is_null($user)) {
- if(!isset($_SERVER['REMOTE_USER'])) {
+ if(!$INPUT->server->has('REMOTE_USER')) {
return false;
} else {
- $user = $_SERVER['REMOTE_USER'];
+ $user = $INPUT->server->str('REMOTE_USER');
}
}
if(is_null($groups)) {
@@ -655,9 +665,11 @@ function auth_isMember($memberlist, $user, array $groups) {
function auth_quickaclcheck($id) {
global $conf;
global $USERINFO;
+ /* @var Input $INPUT */
+ global $INPUT;
# if no ACL is used always return upload rights
if(!$conf['useacl']) return AUTH_UPLOAD;
- return auth_aclcheck($id, $_SERVER['REMOTE_USER'], $USERINFO['grps']);
+ return auth_aclcheck($id, $INPUT->server->str('REMOTE_USER'), $USERINFO['grps']);
}
/**
@@ -845,6 +857,12 @@ function auth_nameencode($name, $skip_group = false) {
return $cache[$name][$skip_group];
}
+/**
+ * callback encodes the matches
+ *
+ * @param array $matches first complete match, next matching subpatterms
+ * @return string
+ */
function auth_nameencode_callback($matches) {
return '%'.dechex(ord(substr($matches[1],-1)));
}
@@ -1056,18 +1074,18 @@ function updateprofile() {
}
if($conf['profileconfirm']) {
- if(!$auth->checkPass($_SERVER['REMOTE_USER'], $INPUT->post->str('oldpass'))) {
+ if(!$auth->checkPass($INPUT->server->str('REMOTE_USER'), $INPUT->post->str('oldpass'))) {
msg($lang['badpassconfirm'], -1);
return false;
}
}
- if($result = $auth->triggerUserMod('modify', array($_SERVER['REMOTE_USER'], $changes))) {
+ if($result = $auth->triggerUserMod('modify', array($INPUT->server->str('REMOTE_USER'), $changes))) {
// update cookie and session with the changed data
if($changes['pass']) {
list( /*user*/, $sticky, /*pass*/) = auth_getCookie();
$pass = auth_encrypt($changes['pass'], auth_cookiesalt(!$sticky, true));
- auth_setCookie($_SERVER['REMOTE_USER'], $pass, (bool) $sticky);
+ auth_setCookie($INPUT->server->str('REMOTE_USER'), $pass, (bool) $sticky);
}
return true;
}
@@ -1075,6 +1093,11 @@ function updateprofile() {
return false;
}
+/**
+ * Delete the current logged-in user
+ *
+ * @return bool true on success, false on any error
+ */
function auth_deleteprofile(){
global $conf;
global $lang;
@@ -1098,13 +1121,13 @@ function auth_deleteprofile(){
}
if($conf['profileconfirm']) {
- if(!$auth->checkPass($_SERVER['REMOTE_USER'], $INPUT->post->str('oldpass'))) {
+ if(!$auth->checkPass($INPUT->server->str('REMOTE_USER'), $INPUT->post->str('oldpass'))) {
msg($lang['badpassconfirm'], -1);
return false;
}
}
- $deleted[] = $_SERVER['REMOTE_USER'];
+ $deleted[] = $INPUT->server->str('REMOTE_USER');
if($auth->triggerUserMod('delete', array($deleted))) {
// force and immediate logout including removing the sticky cookie
auth_logoff();
@@ -1308,11 +1331,8 @@ function auth_setCookie($user, $pass, $sticky) {
$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, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true);
- } else {
- setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl()));
- }
+ setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true);
+
// set session
$_SESSION[DOKU_COOKIE]['auth']['user'] = $user;
$_SESSION[DOKU_COOKIE]['auth']['pass'] = sha1($pass);
diff --git a/inc/cache.php b/inc/cache.php
index 5eac94934..6817e771b 100644
--- a/inc/cache.php
+++ b/inc/cache.php
@@ -8,16 +8,25 @@
if(!defined('DOKU_INC')) die('meh.');
+/**
+ * Generic handling of caching
+ */
class cache {
- var $key = ''; // primary identifier for this item
- var $ext = ''; // file ext for cache data, secondary identifier for this item
- var $cache = ''; // cache file name
- var $depends = array(); // array containing cache dependency information,
- // used by _useCache to determine cache validity
+ public $key = ''; // primary identifier for this item
+ public $ext = ''; // file ext for cache data, secondary identifier for this item
+ public $cache = ''; // cache file name
+ public $depends = array(); // array containing cache dependency information,
+ // used by _useCache to determine cache validity
var $_event = ''; // event to be triggered during useCache
+ var $_time;
+ var $_nocache = false; // if set to true, cache will not be used or stored
- function cache($key,$ext) {
+ /**
+ * @param string $key primary identifier
+ * @param string $ext file extension
+ */
+ public function cache($key,$ext) {
$this->key = $key;
$this->ext = $ext;
$this->cache = getCacheName($key,$ext);
@@ -26,7 +35,7 @@ class cache {
/**
* public method to determine whether the cache can be used
*
- * to assist in cetralisation of event triggering and calculation of cache statistics,
+ * to assist in centralisation of event triggering and calculation of cache statistics,
* don't override this function override _useCache()
*
* @param array $depends array of cache dependencies, support dependecies:
@@ -36,7 +45,7 @@ class cache {
*
* @return bool true if cache can be used, false otherwise
*/
- function useCache($depends=array()) {
+ public function useCache($depends=array()) {
$this->depends = $depends;
$this->_addDependencies();
@@ -55,12 +64,15 @@ class cache {
* age - expire cache if older than age (seconds)
* files - expire cache if any file in this array was updated more recently than the cache
*
+ * Note that this function needs to be public as it is used as callback for the event handler
+ *
* can be overridden
*
* @return bool see useCache()
*/
- function _useCache() {
+ public function _useCache() {
+ if ($this->_nocache) return false; // caching turned off
if (!empty($this->depends['purge'])) return false; // purge requested?
if (!($this->_time = @filemtime($this->cache))) return false; // cache exists?
@@ -83,7 +95,7 @@ class cache {
* it should not remove any existing dependencies and
* it should only overwrite a dependency when the new value is more stringent than the old
*/
- function _addDependencies() {
+ protected function _addDependencies() {
global $INPUT;
if ($INPUT->has('purge')) $this->depends['purge'] = true; // purge requested
}
@@ -94,7 +106,7 @@ class cache {
* @param bool $clean true to clean line endings, false to leave line endings alone
* @return string cache contents
*/
- function retrieveCache($clean=true) {
+ public function retrieveCache($clean=true) {
return io_readFile($this->cache, $clean);
}
@@ -104,14 +116,16 @@ class cache {
* @param string $data the data to be cached
* @return bool true on success, false otherwise
*/
- function storeCache($data) {
+ public function storeCache($data) {
+ if ($this->_nocache) return false;
+
return io_savefile($this->cache, $data);
}
/**
* remove any cached data associated with this cache instance
*/
- function removeCache() {
+ public function removeCache() {
@unlink($this->cache);
}
@@ -122,7 +136,7 @@ class cache {
* @param bool $success result of this cache use attempt
* @return bool pass-thru $success value
*/
- function _stats($success) {
+ protected function _stats($success) {
global $conf;
static $stats = null;
static $file;
@@ -157,14 +171,24 @@ class cache {
}
}
+/**
+ * Parser caching
+ */
class cache_parser extends cache {
- var $file = ''; // source file for cache
- var $mode = ''; // input mode (represents the processing the input file will undergo)
+ public $file = ''; // source file for cache
+ public $mode = ''; // input mode (represents the processing the input file will undergo)
+ public $page = '';
var $_event = 'PARSER_CACHE_USE';
- function cache_parser($id, $file, $mode) {
+ /**
+ *
+ * @param string $id page id
+ * @param string $file source file for cache
+ * @param string $mode input mode
+ */
+ public function cache_parser($id, $file, $mode) {
if ($id) $this->page = $id;
$this->file = $file;
$this->mode = $mode;
@@ -172,24 +196,25 @@ class cache_parser extends cache {
parent::cache($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.'.$mode);
}
- function _useCache() {
+ /**
+ * method contains cache use decision logic
+ *
+ * @return bool see useCache()
+ */
+ public function _useCache() {
if (!@file_exists($this->file)) return false; // source exists?
return parent::_useCache();
}
- function _addDependencies() {
- global $conf, $config_cascade;
-
- $this->depends['age'] = isset($this->depends['age']) ?
- min($this->depends['age'],$conf['cachetime']) : $conf['cachetime'];
+ protected function _addDependencies() {
// parser cache file dependencies ...
- $files = array($this->file, // ... source
+ $files = array($this->file, // ... source
DOKU_INC.'inc/parser/parser.php', // ... parser
DOKU_INC.'inc/parser/handler.php', // ... handler
);
- $files = array_merge($files, getConfigFiles('main')); // ... wiki settings
+ $files = array_merge($files, getConfigFiles('main')); // ... wiki settings
$this->depends['files'] = !empty($this->depends['files']) ? array_merge($files, $this->depends['files']) : $files;
parent::_addDependencies();
@@ -197,8 +222,17 @@ class cache_parser extends cache {
}
+/**
+ * Caching of data of renderer
+ */
class cache_renderer extends cache_parser {
- function _useCache() {
+
+ /**
+ * method contains cache use decision logic
+ *
+ * @return bool see useCache()
+ */
+ public function _useCache() {
global $conf;
if (!parent::_useCache()) return false;
@@ -231,7 +265,19 @@ class cache_renderer extends cache_parser {
return true;
}
- function _addDependencies() {
+ protected function _addDependencies() {
+ global $conf;
+
+ // default renderer cache file 'age' is dependent on 'cachetime' setting, two special values:
+ // -1 : do not cache (should not be overridden)
+ // 0 : cache never expires (can be overridden) - no need to set depends['age']
+ if ($conf['cachetime'] == -1) {
+ $this->_nocache = true;
+ return;
+ } elseif ($conf['cachetime'] > 0) {
+ $this->depends['age'] = isset($this->depends['age']) ?
+ min($this->depends['age'],$conf['cachetime']) : $conf['cachetime'];
+ }
// renderer cache file dependencies ...
$files = array(
@@ -253,18 +299,39 @@ class cache_renderer extends cache_parser {
}
}
+/**
+ * Caching of parser instructions
+ */
class cache_instructions extends cache_parser {
- function cache_instructions($id, $file) {
+ /**
+ * @param string $id page id
+ * @param string $file source file for cache
+ */
+ public function cache_instructions($id, $file) {
parent::cache_parser($id, $file, 'i');
}
- function retrieveCache($clean=true) {
+ /**
+ * retrieve the cached data
+ *
+ * @param bool $clean true to clean line endings, false to leave line endings alone
+ * @return string cache contents
+ */
+ public function retrieveCache($clean=true) {
$contents = io_readFile($this->cache, false);
return !empty($contents) ? unserialize($contents) : array();
}
- function storeCache($instructions) {
+ /**
+ * cache $instructions
+ *
+ * @param string $instructions the instruction to be cached
+ * @return bool true on success, false otherwise
+ */
+ public function storeCache($instructions) {
+ if ($this->_nocache) return false;
+
return io_savefile($this->cache,serialize($instructions));
}
}
diff --git a/inc/changelog.php b/inc/changelog.php
index 6ff1e0eca..8c14f21b0 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -18,6 +18,9 @@ define('DOKU_CHANGE_TYPE_REVERT', 'R');
* parses a changelog line into it's components
*
* @author Ben Coburn <btcoburn@silicodon.net>
+ *
+ * @param string $line changelog line
+ * @return array|bool parsed line or false
*/
function parseChangelogLine($line) {
$tmp = explode("\t", $line);
@@ -43,7 +46,7 @@ function parseChangelogLine($line) {
* @param String $summary Summary of the change
* @param mixed $extra In case of a revert the revision (timestmp) of the reverted page
* @param array $flags Additional flags in a key value array.
- * Availible flags:
+ * Available flags:
* - ExternalEdit - mark as an external edit.
*
* @author Andreas Gohr <andi@splitbrain.org>
@@ -52,6 +55,8 @@ function parseChangelogLine($line) {
*/
function addLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extra='', $flags=null){
global $conf, $INFO;
+ /** @var Input $INPUT */
+ global $INPUT;
// check for special flags as keys
if (!is_array($flags)) { $flags = array(); }
@@ -65,7 +70,7 @@ function addLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extr
if(!$date) $date = time(); //use current time if none supplied
$remote = (!$flagExternalEdit)?clientIP(true):'127.0.0.1';
- $user = (!$flagExternalEdit)?$_SERVER['REMOTE_USER']:'';
+ $user = (!$flagExternalEdit)?$INPUT->server->str('REMOTE_USER'):'';
$strip = array("\t", "\n");
$logline = array(
@@ -114,15 +119,26 @@ function addLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extr
* @author Andreas Gohr <andi@splitbrain.org>
* @author Esther Brunner <wikidesign@gmail.com>
* @author Ben Coburn <btcoburn@silicodon.net>
+ *
+ * @param int $date Timestamp of the change
+ * @param String $id Name of the affected page
+ * @param String $type Type of the change see DOKU_CHANGE_TYPE_*
+ * @param String $summary Summary of the change
+ * @param mixed $extra In case of a revert the revision (timestmp) of the reverted page
+ * @param array $flags Additional flags in a key value array.
+ * Available flags:
+ * - (none, so far)
*/
function addMediaLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extra='', $flags=null){
global $conf;
+ /** @var Input $INPUT */
+ global $INPUT;
$id = cleanid($id);
if(!$date) $date = time(); //use current time if none supplied
$remote = clientIP(true);
- $user = $_SERVER['REMOTE_USER'];
+ $user = $INPUT->server->str('REMOTE_USER');
$strip = array("\t", "\n");
$logline = array(
@@ -290,6 +306,12 @@ function getRecentsSince($from,$to=null,$ns='',$flags=0){
* @see getRecents()
* @author Andreas Gohr <andi@splitbrain.org>
* @author Ben Coburn <btcoburn@silicodon.net>
+ *
+ * @param string $line changelog line
+ * @param string $ns restrict to given namespace
+ * @param int $flags flags to control which changes are included
+ * @param array $seen listing of seen pages
+ * @return array|bool false or array with info about a change
*/
function _handleRecent($line,$ns,$flags,&$seen){
if(empty($line)) return false; //skip empty lines
@@ -334,95 +356,685 @@ function _handleRecent($line,$ns,$flags,&$seen){
}
/**
- * Get the changelog information for a specific page id
- * and revision (timestamp). Adjacent changelog lines
- * are optimistically parsed and cached to speed up
- * consecutive calls to getRevisionInfo. For large
- * changelog files, only the chunk containing the
- * requested changelog line is read.
- *
- * @author Ben Coburn <btcoburn@silicodon.net>
- * @author Kate Arzamastseva <pshns@ukr.net>
+ * Class ChangeLog
+ * methods for handling of changelog of pages or media files
*/
-function getRevisionInfo($id, $rev, $chunk_size=8192, $media=false) {
- global $cache_revinfo;
- $cache =& $cache_revinfo;
- if (!isset($cache[$id])) { $cache[$id] = array(); }
- $rev = max($rev, 0);
-
- // check if it's already in the memory cache
- if (isset($cache[$id]) && isset($cache[$id][$rev])) {
- return $cache[$id][$rev];
+abstract class ChangeLog {
+
+ /** @var string */
+ protected $id;
+ /** @var int */
+ protected $chunk_size;
+ /** @var array */
+ protected $cache;
+
+ /**
+ * Constructor
+ *
+ * @param string $id page id
+ * @param int $chunk_size maximum block size read from file
+ */
+ public function __construct($id, $chunk_size = 8192) {
+ global $cache_revinfo;
+
+ $this->cache =& $cache_revinfo;
+ if(!isset($this->cache[$id])) {
+ $this->cache[$id] = array();
+ }
+
+ $this->id = $id;
+ $this->setChunkSize($chunk_size);
+
}
- if ($media) {
- $file = mediaMetaFN($id, '.changes');
- } else {
- $file = metaFN($id, '.changes');
+ /**
+ * Set chunk size for file reading
+ * Chunk size zero let read whole file at once
+ *
+ * @param int $chunk_size maximum block size read from file
+ */
+ public function setChunkSize($chunk_size) {
+ if(!is_numeric($chunk_size)) $chunk_size = 0;
+
+ $this->chunk_size = (int) max($chunk_size, 0);
}
- if (!@file_exists($file)) { return false; }
- if (filesize($file)<$chunk_size || $chunk_size==0) {
- // read whole file
- $lines = file($file);
- if ($lines===false) { return false; }
- } else {
- // read by chunk
- $fp = fopen($file, 'rb'); // "file pointer"
- if ($fp===false) { return false; }
- $head = 0;
- fseek($fp, 0, SEEK_END);
- $tail = ftell($fp);
- $finger = 0;
- $finger_rev = 0;
-
- // find chunk
- while ($tail-$head>$chunk_size) {
- $finger = $head+floor(($tail-$head)/2.0);
- fseek($fp, $finger);
- fgets($fp); // slip the finger forward to a new line
- $finger = ftell($fp);
- $tmp = fgets($fp); // then read at that location
- $tmp = parseChangelogLine($tmp);
- $finger_rev = $tmp['date'];
- if ($finger==$head || $finger==$tail) { break; }
- if ($finger_rev>$rev) {
- $tail = $finger;
- } else {
- $head = $finger;
+
+ /**
+ * Returns path to changelog
+ *
+ * @return string path to file
+ */
+ abstract protected function getChangelogFilename();
+
+ /**
+ * Returns path to current page/media
+ *
+ * @return string path to file
+ */
+ abstract protected function getFilename();
+
+ /**
+ * Get the changelog information for a specific page id and revision (timestamp)
+ *
+ * Adjacent changelog lines are optimistically parsed and cached to speed up
+ * consecutive calls to getRevisionInfo. For large changelog files, only the chunk
+ * containing the requested changelog line is read.
+ *
+ * @param int $rev revision timestamp
+ * @return bool|array false or array with entries:
+ * - date: unix timestamp
+ * - ip: IPv4 address (127.0.0.1)
+ * - type: log line type
+ * - id: page id
+ * - user: user name
+ * - sum: edit summary (or action reason)
+ * - extra: extra data (varies by line type)
+ *
+ * @author Ben Coburn <btcoburn@silicodon.net>
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+ public function getRevisionInfo($rev) {
+ $rev = max($rev, 0);
+
+ // check if it's already in the memory cache
+ if(isset($this->cache[$this->id]) && isset($this->cache[$this->id][$rev])) {
+ return $this->cache[$this->id][$rev];
+ }
+
+ //read lines from changelog
+ list($fp, $lines) = $this->readloglines($rev);
+ if($fp) {
+ fclose($fp);
+ }
+ if(empty($lines)) return false;
+
+ // parse and cache changelog lines
+ foreach($lines as $value) {
+ $tmp = parseChangelogLine($value);
+ if($tmp !== false) {
+ $this->cache[$this->id][$tmp['date']] = $tmp;
}
}
+ if(!isset($this->cache[$this->id][$rev])) {
+ return false;
+ }
+ return $this->cache[$this->id][$rev];
+ }
+
+ /**
+ * Return a list of page revisions numbers
+ *
+ * Does not guarantee that the revision exists in the attic,
+ * only that a line with the date exists in the changelog.
+ * By default the current revision is skipped.
+ *
+ * The current revision is automatically skipped when the page exists.
+ * See $INFO['meta']['last_change'] for the current revision.
+ * A negative $first let read the current revision too.
+ *
+ * For efficiency, the log lines are parsed and cached for later
+ * calls to getRevisionInfo. Large changelog files are read
+ * backwards in chunks until the requested number of changelog
+ * lines are recieved.
+ *
+ * @param int $first skip the first n changelog lines
+ * @param int $num number of revisions to return
+ * @return array with the revision timestamps
+ *
+ * @author Ben Coburn <btcoburn@silicodon.net>
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+ public function getRevisions($first, $num) {
+ $revs = array();
+ $lines = array();
+ $count = 0;
+
+ $num = max($num, 0);
+ if($num == 0) {
+ return $revs;
+ }
- if ($tail-$head<1) {
- // cound not find chunk, assume requested rev is missing
+ if($first < 0) {
+ $first = 0;
+ } else if(@file_exists($this->getFilename())) {
+ // skip current revision if the page exists
+ $first = max($first + 1, 0);
+ }
+
+ $file = $this->getChangelogFilename();
+
+ if(!@file_exists($file)) {
+ return $revs;
+ }
+ if(filesize($file) < $this->chunk_size || $this->chunk_size == 0) {
+ // read whole file
+ $lines = file($file);
+ if($lines === false) {
+ return $revs;
+ }
+ } else {
+ // read chunks backwards
+ $fp = fopen($file, 'rb'); // "file pointer"
+ if($fp === false) {
+ return $revs;
+ }
+ fseek($fp, 0, SEEK_END);
+ $tail = ftell($fp);
+
+ // chunk backwards
+ $finger = max($tail - $this->chunk_size, 0);
+ while($count < $num + $first) {
+ $nl = $this->getNewlinepointer($fp, $finger);
+
+ // was the chunk big enough? if not, take another bite
+ if($nl > 0 && $tail <= $nl) {
+ $finger = max($finger - $this->chunk_size, 0);
+ continue;
+ } else {
+ $finger = $nl;
+ }
+
+ // read chunk
+ $chunk = '';
+ $read_size = max($tail - $finger, 0); // found chunk size
+ $got = 0;
+ while($got < $read_size && !feof($fp)) {
+ $tmp = @fread($fp, max(min($this->chunk_size, $read_size - $got), 0));
+ if($tmp === false) {
+ break;
+ } //error state
+ $got += strlen($tmp);
+ $chunk .= $tmp;
+ }
+ $tmp = explode("\n", $chunk);
+ array_pop($tmp); // remove trailing newline
+
+ // combine with previous chunk
+ $count += count($tmp);
+ $lines = array_merge($tmp, $lines);
+
+ // next chunk
+ if($finger == 0) {
+ break;
+ } // already read all the lines
+ else {
+ $tail = $finger;
+ $finger = max($tail - $this->chunk_size, 0);
+ }
+ }
+ fclose($fp);
+ }
+
+ // skip parsing extra lines
+ $num = max(min(count($lines) - $first, $num), 0);
+ if ($first > 0 && $num > 0) { $lines = array_slice($lines, max(count($lines) - $first - $num, 0), $num); }
+ else if($first > 0 && $num == 0) { $lines = array_slice($lines, 0, max(count($lines) - $first, 0)); }
+ else if($first == 0 && $num > 0) { $lines = array_slice($lines, max(count($lines) - $num, 0)); }
+
+ // handle lines in reverse order
+ for($i = count($lines) - 1; $i >= 0; $i--) {
+ $tmp = parseChangelogLine($lines[$i]);
+ if($tmp !== false) {
+ $this->cache[$this->id][$tmp['date']] = $tmp;
+ $revs[] = $tmp['date'];
+ }
+ }
+
+ return $revs;
+ }
+
+ /**
+ * Get the nth revision left or right handside for a specific page id and revision (timestamp)
+ *
+ * For large changelog files, only the chunk containing the
+ * reference revision $rev is read and sometimes a next chunck.
+ *
+ * Adjacent changelog lines are optimistically parsed and cached to speed up
+ * consecutive calls to getRevisionInfo.
+ *
+ * @param int $rev revision timestamp used as startdate (doesn't need to be revisionnumber)
+ * @param int $direction give position of returned revision with respect to $rev; positive=next, negative=prev
+ * @return bool|int
+ * timestamp of the requested revision
+ * otherwise false
+ */
+ public function getRelativeRevision($rev, $direction) {
+ $rev = max($rev, 0);
+ $direction = (int) $direction;
+
+ //no direction given or last rev, so no follow-up
+ if(!$direction || ($direction > 0 && $this->isCurrentRevision($rev))) {
+ return false;
+ }
+
+ //get lines from changelog
+ list($fp, $lines, $head, $tail, $eof) = $this->readloglines($rev);
+ if(empty($lines)) return false;
+
+ // look for revisions later/earlier then $rev, when founded count till the wanted revision is reached
+ // also parse and cache changelog lines for getRevisionInfo().
+ $revcounter = 0;
+ $relativerev = false;
+ $checkotherchunck = true; //always runs once
+ while(!$relativerev && $checkotherchunck) {
+ $tmp = array();
+ //parse in normal or reverse order
+ $count = count($lines);
+ if($direction > 0) {
+ $start = 0;
+ $step = 1;
+ } else {
+ $start = $count - 1;
+ $step = -1;
+ }
+ for($i = $start; $i >= 0 && $i < $count; $i = $i + $step) {
+ $tmp = parseChangelogLine($lines[$i]);
+ if($tmp !== false) {
+ $this->cache[$this->id][$tmp['date']] = $tmp;
+ //look for revs older/earlier then reference $rev and select $direction-th one
+ if(($direction > 0 && $tmp['date'] > $rev) || ($direction < 0 && $tmp['date'] < $rev)) {
+ $revcounter++;
+ if($revcounter == abs($direction)) {
+ $relativerev = $tmp['date'];
+ }
+ }
+ }
+ }
+
+ //true when $rev is found, but not the wanted follow-up.
+ $checkotherchunck = $fp
+ && ($tmp['date'] == $rev || ($revcounter > 0 && !$relativerev))
+ && !(($tail == $eof && $direction > 0) || ($head == 0 && $direction < 0));
+
+ if($checkotherchunck) {
+ list($lines, $head, $tail) = $this->readAdjacentChunk($fp, $head, $tail, $direction);
+
+ if(empty($lines)) break;
+ }
+ }
+ if($fp) {
fclose($fp);
+ }
+
+ return $relativerev;
+ }
+
+ /**
+ * Returns revisions around rev1 and rev2
+ * When available it returns $max entries for each revision
+ *
+ * @param int $rev1 oldest revision timestamp
+ * @param int $rev2 newest revision timestamp (0 looks up last revision)
+ * @param int $max maximum number of revisions returned
+ * @return array with two arrays with revisions surrounding rev1 respectively rev2
+ */
+ public function getRevisionsAround($rev1, $rev2, $max = 50) {
+ $max = floor(abs($max) / 2)*2 + 1;
+ $rev1 = max($rev1, 0);
+ $rev2 = max($rev2, 0);
+
+ if($rev2) {
+ if($rev2 < $rev1) {
+ $rev = $rev2;
+ $rev2 = $rev1;
+ $rev1 = $rev;
+ }
+ } else {
+ //empty right side means a removed page. Look up last revision.
+ $revs = $this->getRevisions(-1, 1);
+ $rev2 = $revs[0];
+ }
+ //collect revisions around rev2
+ list($revs2, $allrevs, $fp, $lines, $head, $tail) = $this->retrieveRevisionsAround($rev2, $max);
+
+ if(empty($revs2)) return array(array(), array());
+
+ //collect revisions around rev1
+ $index = array_search($rev1, $allrevs);
+ if($index === false) {
+ //no overlapping revisions
+ list($revs1,,,,,) = $this->retrieveRevisionsAround($rev1, $max);
+ if(empty($revs1)) $revs1 = array();
+ } else {
+ //revisions overlaps, reuse revisions around rev2
+ $revs1 = $allrevs;
+ while($head > 0) {
+ for($i = count($lines) - 1; $i >= 0; $i--) {
+ $tmp = parseChangelogLine($lines[$i]);
+ if($tmp !== false) {
+ $this->cache[$this->id][$tmp['date']] = $tmp;
+ $revs1[] = $tmp['date'];
+ $index++;
+
+ if($index > floor($max / 2)) break 2;
+ }
+ }
+
+ list($lines, $head, $tail) = $this->readAdjacentChunk($fp, $head, $tail, -1);
+ }
+ sort($revs1);
+ //return wanted selection
+ $revs1 = array_slice($revs1, max($index - floor($max/2), 0), $max);
+ }
+
+ return array(array_reverse($revs1), array_reverse($revs2));
+ }
+
+ /**
+ * Returns lines from changelog.
+ * If file larger than $chuncksize, only chunck is read that could contain $rev.
+ *
+ * @param int $rev revision timestamp
+ * @return array(fp, array(changeloglines), $head, $tail, $eof)|bool
+ * returns false when not succeed. fp only defined for chuck reading, needs closing.
+ */
+ protected function readloglines($rev) {
+ $file = $this->getChangelogFilename();
+
+ if(!@file_exists($file)) {
return false;
}
- // read chunk
+ $fp = null;
+ $head = 0;
+ $tail = 0;
+ $eof = 0;
+
+ if(filesize($file) < $this->chunk_size || $this->chunk_size == 0) {
+ // read whole file
+ $lines = file($file);
+ if($lines === false) {
+ return false;
+ }
+ } else {
+ // read by chunk
+ $fp = fopen($file, 'rb'); // "file pointer"
+ if($fp === false) {
+ return false;
+ }
+ $head = 0;
+ fseek($fp, 0, SEEK_END);
+ $eof = ftell($fp);
+ $tail = $eof;
+
+ // find chunk
+ while($tail - $head > $this->chunk_size) {
+ $finger = $head + floor(($tail - $head) / 2.0);
+ $finger = $this->getNewlinepointer($fp, $finger);
+ $tmp = fgets($fp);
+ if($finger == $head || $finger == $tail) {
+ break;
+ }
+ $tmp = parseChangelogLine($tmp);
+ $finger_rev = $tmp['date'];
+
+ if($finger_rev > $rev) {
+ $tail = $finger;
+ } else {
+ $head = $finger;
+ }
+ }
+
+ if($tail - $head < 1) {
+ // cound not find chunk, assume requested rev is missing
+ fclose($fp);
+ return false;
+ }
+
+ $lines = $this->readChunk($fp, $head, $tail);
+ }
+ return array(
+ $fp,
+ $lines,
+ $head,
+ $tail,
+ $eof
+ );
+ }
+
+ /**
+ * Read chunk and return array with lines of given chunck.
+ * Has no check if $head and $tail are really at a new line
+ *
+ * @param resource $fp resource filepointer
+ * @param int $head start point chunck
+ * @param int $tail end point chunck
+ * @return array lines read from chunck
+ */
+ protected function readChunk($fp, $head, $tail) {
$chunk = '';
- $chunk_size = max($tail-$head, 0); // found chunk size
+ $chunk_size = max($tail - $head, 0); // found chunk size
$got = 0;
fseek($fp, $head);
- while ($got<$chunk_size && !feof($fp)) {
- $tmp = @fread($fp, max($chunk_size-$got, 0));
- if ($tmp===false) { break; } //error state
+ while($got < $chunk_size && !feof($fp)) {
+ $tmp = @fread($fp, max(min($this->chunk_size, $chunk_size - $got), 0));
+ if($tmp === false) { //error state
+ break;
+ }
$got += strlen($tmp);
$chunk .= $tmp;
}
$lines = explode("\n", $chunk);
array_pop($lines); // remove trailing newline
- fclose($fp);
+ return $lines;
}
- // parse and cache changelog lines
- foreach ($lines as $value) {
- $tmp = parseChangelogLine($value);
- if ($tmp!==false) {
- $cache[$id][$tmp['date']] = $tmp;
+ /**
+ * Set pointer to first new line after $finger and return its position
+ *
+ * @param resource $fp filepointer
+ * @param int $finger a pointer
+ * @return int pointer
+ */
+ protected function getNewlinepointer($fp, $finger) {
+ fseek($fp, $finger);
+ $nl = $finger;
+ if($finger > 0) {
+ fgets($fp); // slip the finger forward to a new line
+ $nl = ftell($fp);
}
+ return $nl;
+ }
+
+ /**
+ * Check whether given revision is the current page
+ *
+ * @param int $rev timestamp of current page
+ * @return bool true if $rev is current revision, otherwise false
+ */
+ public function isCurrentRevision($rev) {
+ return $rev == @filemtime($this->getFilename());
+ }
+
+ /**
+ * Returns the next lines of the changelog of the chunck before head or after tail
+ *
+ * @param resource $fp filepointer
+ * @param int $head position head of last chunk
+ * @param int $tail position tail of last chunk
+ * @param int $direction positive forward, negative backward
+ * @return array with entries:
+ * - $lines: changelog lines of readed chunk
+ * - $head: head of chunk
+ * - $tail: tail of chunk
+ */
+ protected function readAdjacentChunk($fp, $head, $tail, $direction) {
+ if(!$fp) return array(array(), $head, $tail);
+
+ if($direction > 0) {
+ //read forward
+ $head = $tail;
+ $tail = $head + floor($this->chunk_size * (2 / 3));
+ $tail = $this->getNewlinepointer($fp, $tail);
+ } else {
+ //read backward
+ $tail = $head;
+ $head = max($tail - $this->chunk_size, 0);
+ while(true) {
+ $nl = $this->getNewlinepointer($fp, $head);
+ // was the chunk big enough? if not, take another bite
+ if($nl > 0 && $tail <= $nl) {
+ $head = max($head - $this->chunk_size, 0);
+ } else {
+ $head = $nl;
+ break;
+ }
+ }
+ }
+
+ //load next chunck
+ $lines = $this->readChunk($fp, $head, $tail);
+ return array($lines, $head, $tail);
+ }
+
+ /**
+ * Collect the $max revisions near to the timestamp $rev
+ *
+ * @param int $rev revision timestamp
+ * @param int $max maximum number of revisions to be returned
+ * @return bool|array
+ * return array with entries:
+ * - $requestedrevs: array of with $max revision timestamps
+ * - $revs: all parsed revision timestamps
+ * - $fp: filepointer only defined for chuck reading, needs closing.
+ * - $lines: non-parsed changelog lines before the parsed revisions
+ * - $head: position of first readed changelogline
+ * - $lasttail: position of end of last readed changelogline
+ * otherwise false
+ */
+ protected function retrieveRevisionsAround($rev, $max) {
+ //get lines from changelog
+ list($fp, $lines, $starthead, $starttail, /* $eof */) = $this->readloglines($rev);
+ if(empty($lines)) return false;
+
+ //parse chunk containing $rev, and read forward more chunks until $max/2 is reached
+ $head = $starthead;
+ $tail = $starttail;
+ $revs = array();
+ $aftercount = $beforecount = 0;
+ while(count($lines) > 0) {
+ foreach($lines as $line) {
+ $tmp = parseChangelogLine($line);
+ if($tmp !== false) {
+ $this->cache[$this->id][$tmp['date']] = $tmp;
+ $revs[] = $tmp['date'];
+ if($tmp['date'] >= $rev) {
+ //count revs after reference $rev
+ $aftercount++;
+ if($aftercount == 1) $beforecount = count($revs);
+ }
+ //enough revs after reference $rev?
+ if($aftercount > floor($max / 2)) break 2;
+ }
+ }
+ //retrieve next chunk
+ list($lines, $head, $tail) = $this->readAdjacentChunk($fp, $head, $tail, 1);
+ }
+ if($aftercount == 0) return false;
+
+ $lasttail = $tail;
+
+ //read additional chuncks backward until $max/2 is reached and total number of revs is equal to $max
+ $lines = array();
+ $i = 0;
+ if($aftercount > 0) {
+ $head = $starthead;
+ $tail = $starttail;
+ while($head > 0) {
+ list($lines, $head, $tail) = $this->readAdjacentChunk($fp, $head, $tail, -1);
+
+ for($i = count($lines) - 1; $i >= 0; $i--) {
+ $tmp = parseChangelogLine($lines[$i]);
+ if($tmp !== false) {
+ $this->cache[$this->id][$tmp['date']] = $tmp;
+ $revs[] = $tmp['date'];
+ $beforecount++;
+ //enough revs before reference $rev?
+ if($beforecount > max(floor($max / 2), $max - $aftercount)) break 2;
+ }
+ }
+ }
+ }
+ sort($revs);
+
+ //keep only non-parsed lines
+ $lines = array_slice($lines, 0, $i);
+ //trunk desired selection
+ $requestedrevs = array_slice($revs, -$max, $max);
+
+ return array($requestedrevs, $revs, $fp, $lines, $head, $lasttail);
}
- if (!isset($cache[$id][$rev])) { return false; }
- return $cache[$id][$rev];
+}
+
+/**
+ * Class PageChangelog handles changelog of a wiki page
+ */
+class PageChangelog extends ChangeLog {
+
+ /**
+ * Returns path to changelog
+ *
+ * @return string path to file
+ */
+ protected function getChangelogFilename() {
+ return metaFN($this->id, '.changes');
+ }
+
+ /**
+ * Returns path to current page/media
+ *
+ * @return string path to file
+ */
+ protected function getFilename() {
+ return wikiFN($this->id);
+ }
+}
+
+/**
+ * Class MediaChangelog handles changelog of a media file
+ */
+class MediaChangelog extends ChangeLog {
+
+ /**
+ * Returns path to changelog
+ *
+ * @return string path to file
+ */
+ protected function getChangelogFilename() {
+ return mediaMetaFN($this->id, '.changes');
+ }
+
+ /**
+ * Returns path to current page/media
+ *
+ * @return string path to file
+ */
+ protected function getFilename() {
+ return mediaFN($this->id);
+ }
+}
+
+/**
+ * Get the changelog information for a specific page id
+ * and revision (timestamp). Adjacent changelog lines
+ * are optimistically parsed and cached to speed up
+ * consecutive calls to getRevisionInfo. For large
+ * changelog files, only the chunk containing the
+ * requested changelog line is read.
+ *
+ * @deprecated 2013-11-20
+ *
+ * @author Ben Coburn <btcoburn@silicodon.net>
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ */
+function getRevisionInfo($id, $rev, $chunk_size = 8192, $media = false) {
+ dbg_deprecated('class PageChangeLog or class MediaChangelog');
+ if($media) {
+ $changelog = new MediaChangeLog($id, $chunk_size);
+ } else {
+ $changelog = new PageChangeLog($id, $chunk_size);
+ }
+ return $changelog->getRevisionInfo($rev);
}
/**
@@ -431,10 +1043,6 @@ function getRevisionInfo($id, $rev, $chunk_size=8192, $media=false) {
* only that a line with the date exists in the changelog.
* By default the current revision is skipped.
*
- * id: the page of interest
- * first: skip the first n changelog lines
- * num: number of revisions to return
- *
* The current revision is automatically skipped when the page exists.
* See $INFO['meta']['last_change'] for the current revision.
*
@@ -443,106 +1051,24 @@ function getRevisionInfo($id, $rev, $chunk_size=8192, $media=false) {
* backwards in chunks until the requested number of changelog
* lines are recieved.
*
+ * @deprecated 2013-11-20
+ *
* @author Ben Coburn <btcoburn@silicodon.net>
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $id the page of interest
+ * @param int $first skip the first n changelog lines
+ * @param int $num number of revisions to return
+ * @param int $chunk_size
+ * @param bool $media
+ * @return array
*/
-function getRevisions($id, $first, $num, $chunk_size=8192, $media=false) {
- global $cache_revinfo;
- $cache =& $cache_revinfo;
- if (!isset($cache[$id])) { $cache[$id] = array(); }
-
- $revs = array();
- $lines = array();
- $count = 0;
- if ($media) {
- $file = mediaMetaFN($id, '.changes');
+function getRevisions($id, $first, $num, $chunk_size = 8192, $media = false) {
+ dbg_deprecated('class PageChangeLog or class MediaChangelog');
+ if($media) {
+ $changelog = new MediaChangeLog($id, $chunk_size);
} else {
- $file = metaFN($id, '.changes');
+ $changelog = new PageChangeLog($id, $chunk_size);
}
- $num = max($num, 0);
- if ($num == 0) { return $revs; }
-
- $chunk_size = max($chunk_size, 0);
- 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);
- }
-
- if (!@file_exists($file)) { return $revs; }
- if (filesize($file)<$chunk_size || $chunk_size==0) {
- // read whole file
- $lines = file($file);
- if ($lines===false) { return $revs; }
- } else {
- // read chunks backwards
- $fp = fopen($file, 'rb'); // "file pointer"
- if ($fp===false) { return $revs; }
- fseek($fp, 0, SEEK_END);
- $tail = ftell($fp);
-
- // chunk backwards
- $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
- $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
- $chunk = '';
- $read_size = max($tail-$finger, 0); // found chunk size
- $got = 0;
- while ($got<$read_size && !feof($fp)) {
- $tmp = @fread($fp, max($read_size-$got, 0));
- if ($tmp===false) { break; } //error state
- $got += strlen($tmp);
- $chunk .= $tmp;
- }
- $tmp = explode("\n", $chunk);
- array_pop($tmp); // remove trailing newline
-
- // combine with previous chunk
- $count += count($tmp);
- $lines = array_merge($tmp, $lines);
-
- // next chunk
- if ($finger==0) { break; } // already read all the lines
- else {
- $tail = $finger;
- $finger = max($tail-$chunk_size, 0);
- }
- }
- fclose($fp);
- }
-
- // skip parsing extra lines
- $num = max(min(count($lines)-$first, $num), 0);
- if ($first>0 && $num>0) { $lines = array_slice($lines, max(count($lines)-$first-$num, 0), $num); }
- else if ($first>0 && $num==0) { $lines = array_slice($lines, 0, max(count($lines)-$first, 0)); }
- else if ($first==0 && $num>0) { $lines = array_slice($lines, max(count($lines)-$num, 0)); }
-
- // handle lines in reverse order
- for ($i = count($lines)-1; $i >= 0; $i--) {
- $tmp = parseChangelogLine($lines[$i]);
- if ($tmp!==false) {
- $cache[$id][$tmp['date']] = $tmp;
- $revs[] = $tmp['date'];
- }
- }
-
- return $revs;
+ return $changelog->getRevisions($first, $num);
}
-
-
diff --git a/inc/cli.php b/inc/cli.php
new file mode 100644
index 000000000..25bfddf7d
--- /dev/null
+++ b/inc/cli.php
@@ -0,0 +1,647 @@
+<?php
+
+/**
+ * Class DokuCLI
+ *
+ * All DokuWiki commandline scripts should inherit from this class and implement the abstract methods.
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+abstract class DokuCLI {
+ /** @var string the executed script itself */
+ protected $bin;
+ /** @var DokuCLI_Options the option parser */
+ protected $options;
+ /** @var DokuCLI_Colors */
+ public $colors;
+
+ /**
+ * constructor
+ *
+ * Initialize the arguments, set up helper classes and set up the CLI environment
+ */
+ public function __construct() {
+ set_exception_handler(array($this, 'fatal'));
+
+ $this->options = new DokuCLI_Options();
+ $this->colors = new DokuCLI_Colors();
+ }
+
+ /**
+ * Register options and arguments on the given $options object
+ *
+ * @param DokuCLI_Options $options
+ * @return void
+ */
+ abstract protected function setup(DokuCLI_Options $options);
+
+ /**
+ * Your main program
+ *
+ * Arguments and options have been parsed when this is run
+ *
+ * @param DokuCLI_Options $options
+ * @return void
+ */
+ abstract protected function main(DokuCLI_Options $options);
+
+ /**
+ * Execute the CLI program
+ *
+ * Executes the setup() routine, adds default options, initiate the options parsing and argument checking
+ * and finally executes main()
+ */
+ public function run() {
+ if('cli' != php_sapi_name()) throw new DokuCLI_Exception('This has to be run from the command line');
+
+ // setup
+ $this->setup($this->options);
+ $this->options->registerOption(
+ 'no-colors',
+ 'Do not use any colors in output. Useful when piping output to other tools or files.'
+ );
+ $this->options->registerOption(
+ 'help',
+ 'Display this help screen and exit immeadiately.',
+ 'h'
+ );
+
+ // parse
+ $this->options->parseOptions();
+
+ // handle defaults
+ if($this->options->getOpt('no-colors')) {
+ $this->colors->disable();
+ }
+ if($this->options->getOpt('help')) {
+ echo $this->options->help();
+ exit(0);
+ }
+
+ // check arguments
+ $this->options->checkArguments();
+
+ // execute
+ $this->main($this->options);
+
+ exit(0);
+ }
+
+ /**
+ * Exits the program on a fatal error
+ *
+ * @param Exception|string $error either an exception or an error message
+ */
+ public function fatal($error) {
+ $code = 0;
+ if(is_object($error) && is_a($error, 'Exception')) {
+ /** @var Exception $error */
+ $code = $error->getCode();
+ $error = $error->getMessage();
+ }
+ if(!$code) $code = DokuCLI_Exception::E_ANY;
+
+ $this->error($error);
+ exit($code);
+ }
+
+ /**
+ * Print an error message
+ *
+ * @param $string
+ */
+ public function error($string) {
+ $this->colors->ptln("E: $string", 'red', STDERR);
+ }
+
+ /**
+ * Print a success message
+ *
+ * @param $string
+ */
+ public function success($string) {
+ $this->colors->ptln("S: $string", 'green', STDERR);
+ }
+
+ /**
+ * Print an info message
+ *
+ * @param $string
+ */
+ public function info($string) {
+ $this->colors->ptln("I: $string", 'cyan', STDERR);
+ }
+
+}
+
+/**
+ * Class DokuCLI_Colors
+ *
+ * Handles color output on (Linux) terminals
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+class DokuCLI_Colors {
+ /** @var array known color names */
+ protected $colors = array(
+ 'reset' => "\33[0m",
+ 'black' => "\33[0;30m",
+ 'darkgray' => "\33[1;30m",
+ 'blue' => "\33[0;34m",
+ 'lightblue' => "\33[1;34m",
+ 'green' => "\33[0;32m",
+ 'lightgreen' => "\33[1;32m",
+ 'cyan' => "\33[0;36m",
+ 'lightcyan' => "\33[1;36m",
+ 'red' => "\33[0;31m",
+ 'lightred' => "\33[1;31m",
+ 'purple' => "\33[0;35m",
+ 'lightpurple' => "\33[1;35m",
+ 'brown' => "\33[0;33m",
+ 'yellow' => "\33[1;33m",
+ 'lightgray' => "\33[0;37m",
+ 'white' => "\33[1;37m",
+ );
+
+ /** @var bool should colors be used? */
+ protected $enabled = true;
+
+ /**
+ * Constructor
+ *
+ * Tries to disable colors for non-terminals
+ */
+ public function __construct() {
+ if(function_exists('posix_isatty') && !posix_isatty(STDOUT)) {
+ $this->enabled = false;
+ return;
+ }
+ if(!getenv('TERM')) {
+ $this->enabled = false;
+ return;
+ }
+ }
+
+ /**
+ * enable color output
+ */
+ public function enable() {
+ $this->enabled = true;
+ }
+
+ /**
+ * disable color output
+ */
+ public function disable() {
+ $this->enabled = false;
+ }
+
+ /**
+ * Convenience function to print a line in a given color
+ *
+ * @param $line
+ * @param $color
+ * @param resource $channel
+ */
+ public function ptln($line, $color, $channel = STDOUT) {
+ $this->set($color);
+ fwrite($channel, rtrim($line)."\n");
+ $this->reset();
+ }
+
+ /**
+ * Set the given color for consecutive output
+ *
+ * @param string $color one of the supported color names
+ * @throws DokuCLI_Exception
+ */
+ public function set($color) {
+ if(!$this->enabled) return;
+ if(!isset($this->colors[$color])) throw new DokuCLI_Exception("No such color $color");
+ echo $this->colors[$color];
+ }
+
+ /**
+ * reset the terminal color
+ */
+ public function reset() {
+ $this->set('reset');
+ }
+}
+
+/**
+ * Class DokuCLI_Options
+ *
+ * Parses command line options passed to the CLI script. Allows CLI scripts to easily register all accepted options and
+ * commands and even generates a help text from this setup.
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+class DokuCLI_Options {
+ /** @var array keeps the list of options to parse */
+ protected $setup;
+
+ /** @var array store parsed options */
+ protected $options = array();
+
+ /** @var string current parsed command if any */
+ protected $command = '';
+
+ /** @var array passed non-option arguments */
+ public $args = array();
+
+ /** @var string the executed script */
+ protected $bin;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ $this->setup = array(
+ '' => array(
+ 'opts' => array(),
+ 'args' => array(),
+ 'help' => ''
+ )
+ ); // default command
+
+ $this->args = $this->readPHPArgv();
+ $this->bin = basename(array_shift($this->args));
+
+ $this->options = array();
+ }
+
+ /**
+ * Sets the help text for the tool itself
+ *
+ * @param string $help
+ */
+ public function setHelp($help) {
+ $this->setup['']['help'] = $help;
+ }
+
+ /**
+ * Register the names of arguments for help generation and number checking
+ *
+ * This has to be called in the order arguments are expected
+ *
+ * @param string $arg argument name (just for help)
+ * @param string $help help text
+ * @param bool $required is this a required argument
+ * @param string $command if theses apply to a sub command only
+ * @throws DokuCLI_Exception
+ */
+ public function registerArgument($arg, $help, $required = true, $command = '') {
+ if(!isset($this->setup[$command])) throw new DokuCLI_Exception("Command $command not registered");
+
+ $this->setup[$command]['args'][] = array(
+ 'name' => $arg,
+ 'help' => $help,
+ 'required' => $required
+ );
+ }
+
+ /**
+ * This registers a sub command
+ *
+ * Sub commands have their own options and use their own function (not main()).
+ *
+ * @param string $command
+ * @param string $help
+ * @throws DokuCLI_Exception
+ */
+ public function registerCommand($command, $help) {
+ if(isset($this->setup[$command])) throw new DokuCLI_Exception("Command $command already registered");
+
+ $this->setup[$command] = array(
+ 'opts' => array(),
+ 'args' => array(),
+ 'help' => $help
+ );
+
+ }
+
+ /**
+ * Register an option for option parsing and help generation
+ *
+ * @param string $long multi character option (specified with --)
+ * @param string $help help text for this option
+ * @param string|null $short one character option (specified with -)
+ * @param bool|string $needsarg does this option require an argument? give it a name here
+ * @param string $command what command does this option apply to
+ * @throws DokuCLI_Exception
+ */
+ public function registerOption($long, $help, $short = null, $needsarg = false, $command = '') {
+ if(!isset($this->setup[$command])) throw new DokuCLI_Exception("Command $command not registered");
+
+ $this->setup[$command]['opts'][$long] = array(
+ 'needsarg' => $needsarg,
+ 'help' => $help,
+ 'short' => $short
+ );
+
+ if($short) {
+ if(strlen($short) > 1) throw new DokuCLI_Exception("Short options should be exactly one ASCII character");
+
+ $this->setup[$command]['short'][$short] = $long;
+ }
+ }
+
+ /**
+ * Checks the actual number of arguments against the required number
+ *
+ * Throws an exception if arguments are missing. Called from parseOptions()
+ *
+ * @throws DokuCLI_Exception
+ */
+ public function checkArguments() {
+ $argc = count($this->args);
+
+ $req = 0;
+ foreach($this->setup[$this->command]['args'] as $arg) {
+ if(!$arg['required']) break; // last required arguments seen
+ $req++;
+ }
+
+ if($req > $argc) throw new DokuCLI_Exception("Not enough arguments", DokuCLI_Exception::E_OPT_ARG_REQUIRED);
+ }
+
+ /**
+ * Parses the given arguments for known options and command
+ *
+ * The given $args array should NOT contain the executed file as first item anymore! The $args
+ * array is stripped from any options and possible command. All found otions can be accessed via the
+ * getOpt() function
+ *
+ * Note that command options will overwrite any global options with the same name
+ *
+ * @throws DokuCLI_Exception
+ */
+ public function parseOptions() {
+ $non_opts = array();
+
+ $argc = count($this->args);
+ for($i = 0; $i < $argc; $i++) {
+ $arg = $this->args[$i];
+
+ // The special element '--' means explicit end of options. Treat the rest of the arguments as non-options
+ // and end the loop.
+ if($arg == '--') {
+ $non_opts = array_merge($non_opts, array_slice($this->args, $i + 1));
+ break;
+ }
+
+ // '-' is stdin - a normal argument
+ if($arg == '-') {
+ $non_opts = array_merge($non_opts, array_slice($this->args, $i));
+ break;
+ }
+
+ // first non-option
+ if($arg{0} != '-') {
+ $non_opts = array_merge($non_opts, array_slice($this->args, $i));
+ break;
+ }
+
+ // long option
+ if(strlen($arg) > 1 && $arg{1} == '-') {
+ list($opt, $val) = explode('=', substr($arg, 2), 2);
+
+ if(!isset($this->setup[$this->command]['opts'][$opt])) {
+ throw new DokuCLI_Exception("No such option $arg", DokuCLI_Exception::E_UNKNOWN_OPT);
+ }
+
+ // argument required?
+ if($this->setup[$this->command]['opts'][$opt]['needsarg']) {
+ if(is_null($val) && $i + 1 < $argc && !preg_match('/^--?[\w]/', $this->args[$i + 1])) {
+ $val = $this->args[++$i];
+ }
+ if(is_null($val)) {
+ throw new DokuCLI_Exception("Option $arg requires an argument", DokuCLI_Exception::E_OPT_ARG_REQUIRED);
+ }
+ $this->options[$opt] = $val;
+ } else {
+ $this->options[$opt] = true;
+ }
+
+ continue;
+ }
+
+ // short option
+ $opt = substr($arg, 1);
+ if(!isset($this->setup[$this->command]['short'][$opt])) {
+ throw new DokuCLI_Exception("No such option $arg", DokuCLI_Exception::E_UNKNOWN_OPT);
+ } else {
+ $opt = $this->setup[$this->command]['short'][$opt]; // store it under long name
+ }
+
+ // argument required?
+ if($this->setup[$this->command]['opts'][$opt]['needsarg']) {
+ $val = null;
+ if($i + 1 < $argc && !preg_match('/^--?[\w]/', $this->args[$i + 1])) {
+ $val = $this->args[++$i];
+ }
+ if(is_null($val)) {
+ throw new DokuCLI_Exception("Option $arg requires an argument", DokuCLI_Exception::E_OPT_ARG_REQUIRED);
+ }
+ $this->options[$opt] = $val;
+ } else {
+ $this->options[$opt] = true;
+ }
+ }
+
+ // parsing is now done, update args array
+ $this->args = $non_opts;
+
+ // if not done yet, check if first argument is a command and reexecute argument parsing if it is
+ if(!$this->command && $this->args && isset($this->setup[$this->args[0]])) {
+ // it is a command!
+ $this->command = array_shift($this->args);
+ $this->parseOptions(); // second pass
+ }
+ }
+
+ /**
+ * Get the value of the given option
+ *
+ * Please note that all options are accessed by their long option names regardless of how they were
+ * specified on commandline.
+ *
+ * Can only be used after parseOptions() has been run
+ *
+ * @param string $option
+ * @param mixed $default what to return if the option was not set
+ * @return mixed
+ */
+ public function getOpt($option, $default = false) {
+ if(isset($this->options[$option])) return $this->options[$option];
+ return $default;
+ }
+
+ /**
+ * Return the found command if any
+ *
+ * @return string
+ */
+ public function getCmd() {
+ return $this->command;
+ }
+
+ /**
+ * Builds a help screen from the available options. You may want to call it from -h or on error
+ *
+ * @return string
+ */
+ public function help() {
+ $text = '';
+
+ $hascommands = (count($this->setup) > 1);
+ foreach($this->setup as $command => $config) {
+ $hasopts = (bool) $this->setup[$command]['opts'];
+ $hasargs = (bool) $this->setup[$command]['args'];
+
+ if(!$command) {
+ $text .= 'USAGE: '.$this->bin;
+ } else {
+ $text .= "\n$command";
+ }
+
+ if($hasopts) $text .= ' <OPTIONS>';
+
+ foreach($this->setup[$command]['args'] as $arg) {
+ if($arg['required']) {
+ $text .= ' <'.$arg['name'].'>';
+ } else {
+ $text .= ' [<'.$arg['name'].'>]';
+ }
+ }
+ $text .= "\n";
+
+ if($this->setup[$command]['help']) {
+ $text .= "\n";
+ $text .= $this->tableFormat(
+ array(2, 72),
+ array('', $this->setup[$command]['help']."\n")
+ );
+ }
+
+ if($hasopts) {
+ $text .= "\n OPTIONS\n\n";
+ foreach($this->setup[$command]['opts'] as $long => $opt) {
+
+ $name = '';
+ if($opt['short']) {
+ $name .= '-'.$opt['short'];
+ if($opt['needsarg']) $name .= ' <'.$opt['needsarg'].'>';
+ $name .= ', ';
+ }
+ $name .= "--$long";
+ if($opt['needsarg']) $name .= ' <'.$opt['needsarg'].'>';
+
+ $text .= $this->tableFormat(
+ array(2, 20, 52),
+ array('', $name, $opt['help'])
+ );
+ $text .= "\n";
+ }
+ }
+
+ if($hasargs) {
+ $text .= "\n";
+ foreach($this->setup[$command]['args'] as $arg) {
+ $name = '<'.$arg['name'].'>';
+
+ $text .= $this->tableFormat(
+ array(2, 20, 52),
+ array('', $name, $arg['help'])
+ );
+ }
+ }
+
+ if($command == '' && $hascommands) {
+ $text .= "\nThis tool accepts a command as first parameter as outlined below:\n";
+ }
+ }
+
+ return $text;
+ }
+
+ /**
+ * Safely read the $argv PHP array across different PHP configurations.
+ * Will take care on register_globals and register_argc_argv ini directives
+ *
+ * @throws DokuCLI_Exception
+ * @return array the $argv PHP array or PEAR error if not registered
+ */
+ private function readPHPArgv() {
+ global $argv;
+ if(!is_array($argv)) {
+ if(!@is_array($_SERVER['argv'])) {
+ if(!@is_array($GLOBALS['HTTP_SERVER_VARS']['argv'])) {
+ throw new DokuCLI_Exception(
+ "Could not read cmd args (register_argc_argv=Off?)",
+ DOKU_CLI_OPTS_ARG_READ
+ );
+ }
+ return $GLOBALS['HTTP_SERVER_VARS']['argv'];
+ }
+ return $_SERVER['argv'];
+ }
+ return $argv;
+ }
+
+ /**
+ * Displays text in multiple word wrapped columns
+ *
+ * @param array $widths list of column widths (in characters)
+ * @param array $texts list of texts for each column
+ * @return string
+ */
+ private function tableFormat($widths, $texts) {
+ $wrapped = array();
+ $maxlen = 0;
+
+ foreach($widths as $col => $width) {
+ $wrapped[$col] = explode("\n", wordwrap($texts[$col], $width - 1, "\n", true)); // -1 char border
+ $len = count($wrapped[$col]);
+ if($len > $maxlen) $maxlen = $len;
+
+ }
+
+ $out = '';
+ for($i = 0; $i < $maxlen; $i++) {
+ foreach($widths as $col => $width) {
+ if(isset($wrapped[$col][$i])) {
+ $val = $wrapped[$col][$i];
+ } else {
+ $val = '';
+ }
+ $out .= sprintf('%-'.$width.'s', $val);
+ }
+ $out .= "\n";
+ }
+ return $out;
+ }
+}
+
+/**
+ * Class DokuCLI_Exception
+ *
+ * The code is used as exit code for the CLI tool. This should probably be extended. Many cases just fall back to the
+ * E_ANY code.
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+class DokuCLI_Exception extends Exception {
+ const E_ANY = -1; // no error code specified
+ const E_UNKNOWN_OPT = 1; //Unrecognized option
+ const E_OPT_ARG_REQUIRED = 2; //Option requires argument
+ const E_OPT_ARG_DENIED = 3; //Option not allowed argument
+ const E_OPT_ABIGUOUS = 4; //Option abiguous
+ const E_ARG_READ = 5; //Could not read argv
+
+ public function __construct($message = "", $code = 0, Exception $previous = null) {
+ if(!$code) $code = DokuCLI_Exception::E_ANY;
+ parent::__construct($message, $code, $previous);
+ }
+}
diff --git a/inc/cliopts.php b/inc/cliopts.php
index 9cea686a2..c75a5a93b 100644
--- a/inc/cliopts.php
+++ b/inc/cliopts.php
@@ -68,15 +68,16 @@ define('DOKU_CLI_OPTS_ARG_READ',5);//Could not read argv
*
* @author Andrei Zmievski <andrei@php.net>
*
+ * @deprecated 2014-05-16
*/
class Doku_Cli_Opts {
/**
* <?php ?>
* @see http://www.sitepoint.com/article/php-command-line-1/3
- * @param string executing file name - this MUST be passed the __FILE__ constant
- * @param string short options
- * @param array (optional) long options
+ * @param string $bin_file executing file name - this MUST be passed the __FILE__ constant
+ * @param string $short_options short options
+ * @param array $long_options (optional) long options
* @return Doku_Cli_Opts_Container or Doku_Cli_Opts_Error
*/
function & getOptions($bin_file, $short_options, $long_options = null) {
@@ -233,12 +234,12 @@ class Doku_Cli_Opts {
* Parse short option
*
* @param string $arg Argument
- * @param string[] $short_options Available short options
+ * @param string $short_options Available short options
* @param string[][] &$opts
* @param string[] &$args
*
* @access private
- * @return void
+ * @return void|Doku_Cli_Opts_Error
*/
function _parseShortOption($arg, $short_options, &$opts, &$args) {
$len = strlen($arg);
@@ -324,7 +325,7 @@ class Doku_Cli_Opts {
* @param string[] &$args
*
* @access private
- * @return void|PEAR_Error
+ * @return void|Doku_Cli_Opts_Error
*/
function _parseLongOption($arg, $long_options, &$opts, &$args) {
@list($opt, $opt_arg) = explode('=', $arg, 2);
@@ -402,7 +403,7 @@ class Doku_Cli_Opts {
* Will take care on register_globals and register_argc_argv ini directives
*
* @access public
- * @return mixed the $argv PHP array or PEAR error if not registered
+ * @return array|Doku_Cli_Opts_Error the $argv PHP array or PEAR error if not registered
*/
function readPHPArgv() {
global $argv;
@@ -421,10 +422,19 @@ class Doku_Cli_Opts {
return $argv;
}
+ /**
+ * @param $code
+ * @param $msg
+ * @return Doku_Cli_Opts_Error
+ */
function raiseError($code, $msg) {
return new Doku_Cli_Opts_Error($code, $msg);
}
+ /**
+ * @param $obj
+ * @return bool
+ */
function isError($obj) {
return is_a($obj, 'Doku_Cli_Opts_Error');
}
diff --git a/inc/common.php b/inc/common.php
index 32771285b..0fe33c5b1 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -22,6 +22,9 @@ define('RECENTS_MEDIA_PAGES_MIXED', 32);
*
* @author Andreas Gohr <andi@splitbrain.org>
* @see htmlspecialchars()
+ *
+ * @param string $string the string being converted
+ * @return string converted string
*/
function hsc($string) {
return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
@@ -33,6 +36,9 @@ function hsc($string) {
* You can give an indention as optional parameter
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $string line of text
+ * @param int $indent number of spaces indention
*/
function ptln($string, $indent = 0) {
echo str_repeat(' ', $indent)."$string\n";
@@ -42,6 +48,9 @@ function ptln($string, $indent = 0) {
* strips control characters (<32) from the given string
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param $string string being stripped
+ * @return string
*/
function stripctl($string) {
return preg_replace('/[\x00-\x1F]+/s', '', $string);
@@ -56,15 +65,21 @@ function stripctl($string) {
* @return string
*/
function getSecurityToken() {
- return PassHash::hmac('md5', session_id().$_SERVER['REMOTE_USER'], auth_cookiesalt());
+ /** @var Input $INPUT */
+ global $INPUT;
+ return PassHash::hmac('md5', session_id().$INPUT->server->str('REMOTE_USER'), auth_cookiesalt());
}
/**
* Check the secret CSRF token
+ *
+ * @param null|string $token security token or null to read it from request variable
+ * @return bool success if the token matched
*/
function checkSecurityToken($token = null) {
+ /** @var Input $INPUT */
global $INPUT;
- if(empty($_SERVER['REMOTE_USER'])) return true; // no logged in user, no need for a check
+ if(!$INPUT->server->str('REMOTE_USER')) return true; // no logged in user, no need for a check
if(is_null($token)) $token = $INPUT->str('sectok');
if(getSecurityToken() != $token) {
@@ -78,6 +93,9 @@ function checkSecurityToken($token = null) {
* Print a hidden form field with a secret CSRF token
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param bool $print if true print the field, otherwise html of the field is returned
+ * @return void|string html of hidden form field
*/
function formSecurityToken($print = true) {
$ret = '<div class="no"><input type="hidden" name="sectok" value="'.getSecurityToken().'" /></div>'."\n";
@@ -90,17 +108,24 @@ function formSecurityToken($print = true) {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Chris Smith <chris@jalakai.co.uk>
+ *
+ * @param string $id pageid
+ * @param bool $htmlClient add info about whether is mobile browser
+ * @return array with info for a request of $id
+ *
*/
function basicinfo($id, $htmlClient=true){
global $USERINFO;
+ /* @var Input $INPUT */
+ global $INPUT;
// set info about manager/admin status.
$info['isadmin'] = false;
$info['ismanager'] = false;
- if(isset($_SERVER['REMOTE_USER'])) {
+ if($INPUT->server->has('REMOTE_USER')) {
$info['userinfo'] = $USERINFO;
$info['perm'] = auth_quickaclcheck($id);
- $info['client'] = $_SERVER['REMOTE_USER'];
+ $info['client'] = $INPUT->server->str('REMOTE_USER');
if($info['perm'] == AUTH_ADMIN) {
$info['isadmin'] = true;
@@ -111,7 +136,7 @@ function basicinfo($id, $htmlClient=true){
// if some outside auth were used only REMOTE_USER is set
if(!$info['userinfo']['name']) {
- $info['userinfo']['name'] = $_SERVER['REMOTE_USER'];
+ $info['userinfo']['name'] = $INPUT->server->str('REMOTE_USER');
}
} else {
@@ -134,12 +159,16 @@ function basicinfo($id, $htmlClient=true){
* array.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @return array with info about current document
*/
function pageinfo() {
global $ID;
global $REV;
global $RANGE;
global $lang;
+ /* @var Input $INPUT */
+ global $INPUT;
$info = basicinfo($ID);
@@ -148,19 +177,20 @@ function pageinfo() {
$info['id'] = $ID;
$info['rev'] = $REV;
- if(isset($_SERVER['REMOTE_USER'])) {
+ if($INPUT->server->has('REMOTE_USER')) {
$sub = new Subscription();
$info['subscribed'] = $sub->user_subscription();
} else {
$info['subscribed'] = false;
}
- $info['locked'] = checklock($ID);
- $info['filepath'] = fullpath(wikiFN($ID));
- $info['exists'] = @file_exists($info['filepath']);
+ $info['locked'] = checklock($ID);
+ $info['filepath'] = fullpath(wikiFN($ID));
+ $info['exists'] = @file_exists($info['filepath']);
+ $info['currentrev'] = @filemtime($info['filepath']);
if($REV) {
//check if current revision was meant
- if($info['exists'] && (@filemtime($info['filepath']) == $REV)) {
+ if($info['exists'] && ($info['currentrev'] == $REV)) {
$REV = '';
} elseif($RANGE) {
//section editing does not work with old revisions!
@@ -187,13 +217,14 @@ function pageinfo() {
$info['meta'] = p_get_metadata($ID);
//who's the editor
+ $pagelog = new PageChangeLog($ID, 1024);
if($REV) {
- $revinfo = getRevisionInfo($ID, $REV, 1024);
+ $revinfo = $pagelog->getRevisionInfo($REV);
} else {
- if(is_array($info['meta']['last_change'])) {
+ if(!empty($info['meta']['last_change']) && is_array($info['meta']['last_change'])) {
$revinfo = $info['meta']['last_change'];
} else {
- $revinfo = getRevisionInfo($ID, $info['lastmod'], 1024);
+ $revinfo = $pagelog->getRevisionInfo($info['lastmod']);
// cache most recent changelog line in metadata if missing and still valid
if($revinfo !== false) {
$info['meta']['last_change'] = $revinfo;
@@ -237,6 +268,8 @@ function pageinfo() {
/**
* Return information about the current media item as an associative array.
+ *
+ * @return array with info about current media item
*/
function mediainfo(){
global $NS;
@@ -252,6 +285,10 @@ function mediainfo(){
* Build an string of URL parameters
*
* @author Andreas Gohr
+ *
+ * @param array $params array with key-value pairs
+ * @param string $sep series of pairs are separated by this character
+ * @return string query string
*/
function buildURLparams($params, $sep = '&amp;') {
$url = '';
@@ -272,6 +309,10 @@ function buildURLparams($params, $sep = '&amp;') {
* Skips keys starting with '_', values get HTML encoded
*
* @author Andreas Gohr
+ *
+ * @param array $params array with (attribute name-attribute value) pairs
+ * @param bool $skipempty skip empty string values?
+ * @return string
*/
function buildAttributes($params, $skipempty = false) {
$url = '';
@@ -293,6 +334,8 @@ function buildAttributes($params, $skipempty = false) {
* This builds the breadcrumb trail and returns it as array
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @return array(pageid=>name, ... )
*/
function breadcrumbs() {
// we prepare the breadcrumbs early for quick session closing
@@ -352,14 +395,21 @@ function breadcrumbs() {
* Urlencoding is ommitted when the second parameter is false
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id pageid being filtered
+ * @param bool $ue apply urlencoding?
+ * @return string
*/
function idfilter($id, $ue = true) {
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
+
if($conf['useslash'] && $conf['userewrite']) {
$id = strtr($id, ':', '/');
} elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' &&
$conf['userewrite'] &&
- strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') === false
+ strpos($INPUT->server->str('SERVER_SOFTWARE'), 'Microsoft-IIS') === false
) {
$id = strtr($id, ':', ';');
}
@@ -374,10 +424,15 @@ function idfilter($id, $ue = true) {
/**
* This builds a link to a wikipage
*
- * It handles URL rewriting and adds additional parameter if
- * given in $more
+ * It handles URL rewriting and adds additional parameters
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id page id, defaults to start page
+ * @param string|array $urlParameters URL parameters, associative array recommended
+ * @param bool $absolute request an absolute URL instead of relative
+ * @param string $separator parameter separator
+ * @return string
*/
function wl($id = '', $urlParameters = '', $absolute = false, $separator = '&amp;') {
global $conf;
@@ -419,13 +474,19 @@ function wl($id = '', $urlParameters = '', $absolute = false, $separator = '&amp
* Handles URL rewriting if enabled. Follows the style of wl().
*
* @author Ben Coburn <btcoburn@silicodon.net>
+ * @param string $id page id, defaults to start page
+ * @param string $format the export renderer to use
+ * @param string|array $urlParameters URL parameters, associative array recommended
+ * @param bool $abs request an absolute URL instead of relative
+ * @param string $sep parameter separator
+ * @return string
*/
-function exportlink($id = '', $format = 'raw', $more = '', $abs = false, $sep = '&amp;') {
+function exportlink($id = '', $format = 'raw', $urlParameters = '', $abs = false, $sep = '&amp;') {
global $conf;
- if(is_array($more)) {
- $more = buildURLparams($more, $sep);
+ if(is_array($urlParameters)) {
+ $urlParameters = buildURLparams($urlParameters, $sep);
} else {
- $more = str_replace(',', $sep, $more);
+ $urlParameters = str_replace(',', $sep, $urlParameters);
}
$format = rawurlencode($format);
@@ -438,13 +499,13 @@ function exportlink($id = '', $format = 'raw', $more = '', $abs = false, $sep =
if($conf['userewrite'] == 2) {
$xlink .= DOKU_SCRIPT.'/'.$id.'?do=export_'.$format;
- if($more) $xlink .= $sep.$more;
+ if($urlParameters) $xlink .= $sep.$urlParameters;
} elseif($conf['userewrite'] == 1) {
$xlink .= '_export/'.$format.'/'.$id;
- if($more) $xlink .= '?'.$more;
+ if($urlParameters) $xlink .= '?'.$urlParameters;
} else {
$xlink .= DOKU_SCRIPT.'?do=export_'.$format.$sep.'id='.$id;
- if($more) $xlink .= $sep.$more;
+ if($urlParameters) $xlink .= $sep.$urlParameters;
}
return $xlink;
@@ -551,6 +612,8 @@ function ml($id = '', $more = '', $direct = true, $sep = '&amp;', $abs = false)
* Consider using wl() instead, unless you absoutely need the doku.php endpoint
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @return string
*/
function script() {
return DOKU_BASE.DOKU_SCRIPT;
@@ -577,6 +640,7 @@ function script() {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Michael Klier <chi@chimeric.de>
+ *
* @param string $text - optional text to check, if not given the globals are used
* @return bool - true if a spam word was found
*/
@@ -587,6 +651,8 @@ function checkwordblock($text = '') {
global $SUM;
global $conf;
global $INFO;
+ /* @var Input $INPUT */
+ global $INPUT;
if(!$conf['usewordblock']) return false;
@@ -619,9 +685,9 @@ function checkwordblock($text = '') {
if(count($re) && preg_match('#('.join('|', $re).')#si', $text, $matches)) {
// prepare event data
$data['matches'] = $matches;
- $data['userinfo']['ip'] = $_SERVER['REMOTE_ADDR'];
- if($_SERVER['REMOTE_USER']) {
- $data['userinfo']['user'] = $_SERVER['REMOTE_USER'];
+ $data['userinfo']['ip'] = $INPUT->server->str('REMOTE_ADDR');
+ if($INPUT->server->str('REMOTE_USER')) {
+ $data['userinfo']['user'] = $INPUT->server->str('REMOTE_USER');
$data['userinfo']['name'] = $INFO['userinfo']['name'];
$data['userinfo']['mail'] = $INFO['userinfo']['mail'];
}
@@ -643,16 +709,22 @@ function checkwordblock($text = '') {
* headers
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param boolean $single If set only a single IP is returned
* @return string
*/
function clientIP($single = false) {
+ /* @var Input $INPUT */
+ global $INPUT;
+
$ip = array();
- $ip[] = $_SERVER['REMOTE_ADDR'];
- if(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
- $ip = array_merge($ip, explode(',', str_replace(' ', '', $_SERVER['HTTP_X_FORWARDED_FOR'])));
- if(!empty($_SERVER['HTTP_X_REAL_IP']))
- $ip = array_merge($ip, explode(',', str_replace(' ', '', $_SERVER['HTTP_X_REAL_IP'])));
+ $ip[] = $INPUT->server->str('REMOTE_ADDR');
+ if($INPUT->server->str('HTTP_X_FORWARDED_FOR')) {
+ $ip = array_merge($ip, explode(',', str_replace(' ', '', $INPUT->server->str('HTTP_X_FORWARDED_FOR'))));
+ }
+ if($INPUT->server->str('HTTP_X_REAL_IP')) {
+ $ip = array_merge($ip, explode(',', str_replace(' ', '', $INPUT->server->str('HTTP_X_REAL_IP'))));
+ }
// some IPv4/v6 regexps borrowed from Feyd
// see: http://forums.devnetwork.net/viewtopic.php?f=38&t=53479
@@ -709,18 +781,22 @@ function clientIP($single = false) {
* Adapted from the example code at url below
*
* @link http://www.brainhandles.com/2007/10/15/detecting-mobile-browsers/#code
+ *
+ * @return bool if true, client is mobile browser; otherwise false
*/
function clientismobile() {
+ /* @var Input $INPUT */
+ global $INPUT;
- if(isset($_SERVER['HTTP_X_WAP_PROFILE'])) return true;
+ if($INPUT->server->has('HTTP_X_WAP_PROFILE')) return true;
- if(preg_match('/wap\.|\.wap/i', $_SERVER['HTTP_ACCEPT'])) return true;
+ if(preg_match('/wap\.|\.wap/i', $INPUT->server->str('HTTP_ACCEPT'))) return true;
- if(!isset($_SERVER['HTTP_USER_AGENT'])) return false;
+ if(!$INPUT->server->has('HTTP_USER_AGENT')) return false;
$uamatches = 'midp|j2me|avantg|docomo|novarra|palmos|palmsource|240x320|opwv|chtml|pda|windows ce|mmp\/|blackberry|mib\/|symbian|wireless|nokia|hand|mobi|phone|cdm|up\.b|audio|SIE\-|SEC\-|samsung|HTC|mot\-|mitsu|sagem|sony|alcatel|lg|erics|vx|NEC|philips|mmm|xx|panasonic|sharp|wap|sch|rover|pocket|benq|java|pt|pg|vox|amoi|bird|compal|kg|voda|sany|kdd|dbt|sendo|sgh|gradi|jb|\d\d\di|moto';
- if(preg_match("/$uamatches/i", $_SERVER['HTTP_USER_AGENT'])) return true;
+ if(preg_match("/$uamatches/i", $INPUT->server->str('HTTP_USER_AGENT'))) return true;
return false;
}
@@ -731,6 +807,7 @@ function clientismobile() {
* If $conf['dnslookups'] is disabled it simply returns the input string
*
* @author Glen Harris <astfgl@iamnota.org>
+ *
* @param string $ips comma separated list of IP addresses
* @return string a comma separated list of hostnames
*/
@@ -757,9 +834,15 @@ function gethostsbyaddrs($ips) {
* removes stale lockfiles
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id page id
+ * @return bool page is locked?
*/
function checklock($id) {
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
+
$lock = wikiLockFN($id);
//no lockfile
@@ -772,8 +855,8 @@ function checklock($id) {
}
//my own lock
- list($ip, $session) = explode("\n", io_readFile($lock));
- if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()) {
+ @list($ip, $session) = explode("\n", io_readFile($lock));
+ if($ip == $INPUT->server->str('REMOTE_USER') || $ip == clientIP() || (session_id() && $session == session_id())) {
return false;
}
@@ -784,17 +867,21 @@ function checklock($id) {
* Lock a page for editing
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id page id to lock
*/
function lock($id) {
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
if($conf['locktime'] == 0) {
return;
}
$lock = wikiLockFN($id);
- if($_SERVER['REMOTE_USER']) {
- io_saveFile($lock, $_SERVER['REMOTE_USER']);
+ if($INPUT->server->str('REMOTE_USER')) {
+ io_saveFile($lock, $INPUT->server->str('REMOTE_USER'));
} else {
io_saveFile($lock, clientIP()."\n".session_id());
}
@@ -804,14 +891,18 @@ function lock($id) {
* Unlock a page if it was locked by the user
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param string $id page id to unlock
* @return bool true if a lock was removed
*/
function unlock($id) {
+ /* @var Input $INPUT */
+ global $INPUT;
+
$lock = wikiLockFN($id);
if(@file_exists($lock)) {
- list($ip, $session) = explode("\n", io_readFile($lock));
- if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()) {
+ @list($ip, $session) = explode("\n", io_readFile($lock));
+ if($ip == $INPUT->server->str('REMOTE_USER') || $ip == clientIP() || $session == session_id()) {
@unlink($lock);
return true;
}
@@ -826,6 +917,9 @@ function unlock($id) {
*
* @see formText() for 2crlf conversion
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $text
+ * @return string
*/
function cleanText($text) {
$text = preg_replace("/(\015\012)|(\015)/", "\012", $text);
@@ -845,6 +939,9 @@ function cleanText($text) {
*
* @see cleanText() for 2unix conversion
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $text
+ * @return string
*/
function formText($text) {
$text = str_replace("\012", "\015\012", $text);
@@ -855,6 +952,10 @@ function formText($text) {
* Returns the specified local text in raw format
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id page id
+ * @param string $ext extension of file being read, default 'txt'
+ * @return string
*/
function rawLocale($id, $ext = 'txt') {
return io_readFile(localeFN($id, $ext));
@@ -864,6 +965,10 @@ function rawLocale($id, $ext = 'txt') {
* Returns the raw WikiText
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id page id
+ * @param string $rev timestamp when a revision of wikitext is desired
+ * @return string
*/
function rawWiki($id, $rev = '') {
return io_readWikiPage(wikiFN($id, $rev), $id, $rev);
@@ -874,6 +979,9 @@ function rawWiki($id, $rev = '') {
*
* @triggers COMMON_PAGETPL_LOAD
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id the id of the page to be created
+ * @return string parsed pagetemplate content
*/
function pageTemplate($id) {
global $conf;
@@ -925,6 +1033,9 @@ function pageTemplate($id) {
* This works on data from COMMON_PAGETPL_LOAD
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $data array with event data
+ * @return string
*/
function parsePageTemplate(&$data) {
/**
@@ -937,6 +1048,8 @@ function parsePageTemplate(&$data) {
global $USERINFO;
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
// replace placeholders
$file = noNS($id);
@@ -968,7 +1081,7 @@ function parsePageTemplate(&$data) {
utf8_ucfirst($page),
utf8_ucwords($page),
utf8_strtoupper($page),
- $_SERVER['REMOTE_USER'],
+ $INPUT->server->str('REMOTE_USER'),
$USERINFO['name'],
$USERINFO['mail'],
$conf['dformat'],
@@ -990,6 +1103,11 @@ function parsePageTemplate(&$data) {
* The returned order is prefix, section and suffix.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $range in form "from-to"
+ * @param string $id page id
+ * @param string $rev optional, the revision timestamp
+ * @return array with three slices
*/
function rawWikiSlices($range, $id, $rev = '') {
$text = io_readWikiPage(wikiFN($id, $rev), $id, $rev);
@@ -1014,6 +1132,12 @@ function rawWikiSlices($range, $id, $rev = '') {
* lines between sections if needed (used on saving).
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $pre prefix
+ * @param string $text text in the middle
+ * @param string $suf suffix
+ * @param bool $pretty add additional empty lines between sections
+ * @return string
*/
function con($pre, $text, $suf, $pretty = false) {
if($pretty) {
@@ -1038,6 +1162,11 @@ function con($pre, $text, $suf, $pretty = false) {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Ben Coburn <btcoburn@silicodon.net>
+ *
+ * @param string $id page id
+ * @param string $text wikitext being saved
+ * @param string $summary summary of text update
+ * @param bool $minor mark this saved version as minor update
*/
function saveWikiText($id, $text, $summary, $minor = false) {
/* Note to developers:
@@ -1049,6 +1178,9 @@ function saveWikiText($id, $text, $summary, $minor = false) {
global $conf;
global $lang;
global $REV;
+ /* @var Input $INPUT */
+ global $INPUT;
+
// ignore if no changes were made
if($text == rawWiki($id, '')) {
return;
@@ -1059,8 +1191,9 @@ function saveWikiText($id, $text, $summary, $minor = false) {
$wasRemoved = (trim($text) == ''); // check for empty or whitespace only
$wasCreated = !@file_exists($file);
$wasReverted = ($REV == true);
+ $pagelog = new PageChangeLog($id, 1024);
$newRev = false;
- $oldRev = getRevisions($id, -1, 1, 1024); // from changelog
+ $oldRev = $pagelog->getRevisions(-1, 1); // from changelog
$oldRev = (int) (empty($oldRev) ? 0 : $oldRev[0]);
if(!@file_exists(wikiFN($id, $old)) && @file_exists($file) && $old >= $oldRev) {
// add old revision to the attic if missing
@@ -1111,7 +1244,7 @@ function saveWikiText($id, $text, $summary, $minor = false) {
$type = DOKU_CHANGE_TYPE_CREATE;
} else if($wasRemoved) {
$type = DOKU_CHANGE_TYPE_DELETE;
- } else if($minor && $conf['useacl'] && $_SERVER['REMOTE_USER']) {
+ } else if($minor && $conf['useacl'] && $INPUT->server->str('REMOTE_USER')) {
$type = DOKU_CHANGE_TYPE_MINOR_EDIT;
} //minor edits only for logged in users
@@ -1138,9 +1271,11 @@ function saveWikiText($id, $text, $summary, $minor = false) {
* revision date
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id page id
+ * @return int|string revision timestamp
*/
function saveOldRevision($id) {
- global $conf;
$oldf = wikiFN($id);
if(!@file_exists($oldf)) return '';
$date = filemtime($oldf);
@@ -1158,12 +1293,14 @@ function saveOldRevision($id) {
* @param string $summary What changed
* @param boolean $minor Is this a minor edit?
* @param array $replace Additional string substitutions, @KEY@ to be replaced by value
- *
* @return bool
+ *
* @author Andreas Gohr <andi@splitbrain.org>
*/
function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace = array()) {
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
// decide if there is something to do, eg. whom to mail
if($who == 'admin') {
@@ -1172,8 +1309,8 @@ function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace =
$to = $conf['notify'];
} elseif($who == 'subscribers') {
if(!actionOK('subscribe')) return false; //subscribers enabled?
- if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return false; //skip minors
- $data = array('id' => $id, 'addresslist' => '', 'self' => false);
+ if($conf['useacl'] && $INPUT->server->str('REMOTE_USER') && $minor) return false; //skip minors
+ $data = array('id' => $id, 'addresslist' => '', 'self' => false, 'replacements' => $replace);
trigger_event(
'COMMON_NOTIFY_ADDRESSLIST', $data,
array(new Subscription(), 'notifyaddresses')
@@ -1195,12 +1332,17 @@ function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace =
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Todd Augsburger <todd@rollerorgans.com>
+ *
+ * @return array|string
*/
function getGoogleQuery() {
- if(!isset($_SERVER['HTTP_REFERER'])) {
+ /* @var Input $INPUT */
+ global $INPUT;
+
+ if(!$INPUT->server->has('HTTP_REFERER')) {
return '';
}
- $url = parse_url($_SERVER['HTTP_REFERER']);
+ $url = parse_url($INPUT->server->str('HTTP_REFERER'));
// only handle common SEs
if(!preg_match('/(google|bing|yahoo|ask|duckduckgo|babylon|aol|yandex)/',$url['host'])) return '';
@@ -1230,8 +1372,10 @@ function getGoogleQuery() {
/**
* Return the human readable size of a file
*
- * @param int $size A file size
- * @param int $dec A number of decimal places
+ * @param int $size A file size
+ * @param int $dec A number of decimal places
+ * @return string human readable size
+ *
* @author Martin Benjamin <b.martin@cybernet.ch>
* @author Aidan Lister <aidan@php.net>
* @version 1.0.0
@@ -1253,6 +1397,9 @@ function filesize_h($size, $dec = 1) {
* Return the given timestamp as human readable, fuzzy age
*
* @author Andreas Gohr <gohr@cosmocode.de>
+ *
+ * @param int $dt timestamp
+ * @return string
*/
function datetime_h($dt) {
global $lang;
@@ -1287,6 +1434,10 @@ function datetime_h($dt) {
*
* @see datetime_h
* @author Andreas Gohr <gohr@cosmocode.de>
+ *
+ * @param int|null $dt timestamp when given, null will take current timestamp
+ * @param string $format empty default to $conf['dformat'], or provide format as recognized by strftime()
+ * @return string
*/
function dformat($dt = null, $format = '') {
global $conf;
@@ -1304,6 +1455,7 @@ function dformat($dt = null, $format = '') {
*
* @author <ungu at terong dot com>
* @link http://www.php.net/manual/en/function.date.php#54072
+ *
* @param int $int_date: current date in UNIX timestamp
* @return string
*/
@@ -1320,6 +1472,9 @@ function date_iso8601($int_date) {
*
* @author Harry Fuecks <hfuecks@gmail.com>
* @author Christopher Smith <chris@jalakai.co.uk>
+ *
+ * @param string $email email address
+ * @return string
*/
function obfuscate($email) {
global $conf;
@@ -1347,6 +1502,10 @@ function obfuscate($email) {
* Removes quoting backslashes
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $string
+ * @param string $char backslashed character
+ * @return string
*/
function unslash($string, $char = "'") {
return str_replace('\\'.$char, $char, $string);
@@ -1357,19 +1516,27 @@ function unslash($string, $char = "'") {
*
* @author <gilthans dot NO dot SPAM at gmail dot com>
* @link http://de3.php.net/manual/en/ini.core.php#79564
+ *
+ * @param string $v shorthands
+ * @return int|string
*/
function php_to_byte($v) {
$l = substr($v, -1);
$ret = substr($v, 0, -1);
switch(strtoupper($l)) {
+ /** @noinspection PhpMissingBreakStatementInspection */
case 'P':
$ret *= 1024;
+ /** @noinspection PhpMissingBreakStatementInspection */
case 'T':
$ret *= 1024;
+ /** @noinspection PhpMissingBreakStatementInspection */
case 'G':
$ret *= 1024;
+ /** @noinspection PhpMissingBreakStatementInspection */
case 'M':
$ret *= 1024;
+ /** @noinspection PhpMissingBreakStatementInspection */
case 'K':
$ret *= 1024;
break;
@@ -1382,6 +1549,9 @@ function php_to_byte($v) {
/**
* Wrapper around preg_quote adding the default delimiter
+ *
+ * @param string $string
+ * @return string
*/
function preg_quote_cb($string) {
return preg_quote($string, '/');
@@ -1415,37 +1585,135 @@ function shorten($keep, $short, $max, $min = 9, $char = '…') {
* Return the users realname or e-mail address for use
* in page footer and recent changes pages
*
+ * @param string|null $username or null when currently logged-in user should be used
+ * @param bool $textonly true returns only plain text, true allows returning html
+ * @return string html or plain text(not escaped) of formatted user name
+ *
* @author Andy Webber <dokuwiki AT andywebber DOT com>
*/
-function editorinfo($username) {
- global $conf;
+function editorinfo($username, $textonly = false) {
+ return userlink($username, $textonly);
+}
+
+/**
+ * Returns users realname w/o link
+ *
+ * @param string|null $username or null when currently logged-in user should be used
+ * @param bool $textonly true returns only plain text, true allows returning html
+ * @return string html or plain text(not escaped) of formatted user name
+ *
+ * @triggers COMMON_USER_LINK
+ */
+function userlink($username = null, $textonly = false) {
+ global $conf, $INFO;
+ /** @var DokuWiki_Auth_Plugin $auth */
global $auth;
+ /** @var Input $INPUT */
+ global $INPUT;
- switch($conf['showuseras']) {
- case 'username':
- case 'email':
- case 'email_link':
- if($auth) $info = $auth->getUserData($username);
- break;
- default:
- return hsc($username);
- }
-
- if(isset($info) && $info) {
- switch($conf['showuseras']) {
- case 'username':
- return hsc($info['name']);
- case 'email':
- return obfuscate($info['mail']);
- case 'email_link':
- $mail = obfuscate($info['mail']);
- return '<a href="mailto:'.$mail.'">'.$mail.'</a>';
- default:
- return hsc($username);
+ // prepare initial event data
+ $data = array(
+ 'username' => $username, // the unique user name
+ 'name' => '',
+ 'link' => array( //setting 'link' to false disables linking
+ 'target' => '',
+ 'pre' => '',
+ 'suf' => '',
+ 'style' => '',
+ 'more' => '',
+ 'url' => '',
+ 'title' => '',
+ 'class' => ''
+ ),
+ 'userlink' => '', // formatted user name as will be returned
+ 'textonly' => $textonly
+ );
+ if($username === null) {
+ $data['username'] = $username = $INPUT->server->str('REMOTE_USER');
+ if($textonly){
+ $data['name'] = $INFO['userinfo']['name']. ' (' . $INPUT->server->str('REMOTE_USER') . ')';
+ }else {
+ $data['name'] = '<bdi>' . hsc($INFO['userinfo']['name']) . '</bdi> (<bdi>' . hsc($INPUT->server->str('REMOTE_USER')) . '</bdi>)';
+ }
+ }
+
+ $evt = new Doku_Event('COMMON_USER_LINK', $data);
+ if($evt->advise_before(true)) {
+ if(empty($data['name'])) {
+ if($conf['showuseras'] == 'loginname') {
+ $data['name'] = $textonly ? $data['username'] : hsc($data['username']);
+ } else {
+ if($auth) $info = $auth->getUserData($username);
+ if(isset($info) && $info) {
+ switch($conf['showuseras']) {
+ case 'username':
+ case 'username_link':
+ $data['name'] = $textonly ? $info['name'] : hsc($info['name']);
+ break;
+ case 'email':
+ case 'email_link':
+ $data['name'] = obfuscate($info['mail']);
+ break;
+ }
+ }
+ }
+ }
+
+ /** @var Doku_Renderer_xhtml $xhtml_renderer */
+ static $xhtml_renderer = null;
+
+ if(!$data['textonly'] && empty($data['link']['url'])) {
+
+ if(in_array($conf['showuseras'], array('email_link', 'username_link'))) {
+ if(!isset($info)) {
+ if($auth) $info = $auth->getUserData($username);
+ }
+ if(isset($info) && $info) {
+ if($conf['showuseras'] == 'email_link') {
+ $data['link']['url'] = 'mailto:' . obfuscate($info['mail']);
+ } else {
+ if(is_null($xhtml_renderer)) {
+ $xhtml_renderer = p_get_renderer('xhtml');
+ }
+ if(empty($xhtml_renderer->interwiki)) {
+ $xhtml_renderer->interwiki = getInterwiki();
+ }
+ $shortcut = 'user';
+ $exists = null;
+ $data['link']['url'] = $xhtml_renderer->_resolveInterWiki($shortcut, $username, $exists);
+ $data['link']['class'] .= ' interwiki iw_user';
+ if($exists !== null) {
+ if($exists) {
+ $data['link']['class'] .= ' wikilink1';
+ } else {
+ $data['link']['class'] .= ' wikilink2';
+ $data['link']['rel'] = 'nofollow';
+ }
+ }
+ }
+ } else {
+ $data['textonly'] = true;
+ }
+
+ } else {
+ $data['textonly'] = true;
+ }
+ }
+
+ if($data['textonly']) {
+ $data['userlink'] = $data['name'];
+ } else {
+ $data['link']['name'] = $data['name'];
+ if(is_null($xhtml_renderer)) {
+ $xhtml_renderer = p_get_renderer('xhtml');
+ }
+ $data['userlink'] = $xhtml_renderer->_formatLink($data['link']);
}
- } else {
- return hsc($username);
}
+ $evt->advise_after();
+ unset($evt);
+
+ return $data['userlink'];
}
/**
@@ -1453,6 +1721,7 @@ function editorinfo($username) {
* When no image exists, returns an empty string
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param string $type - type of image 'badge' or 'button'
* @return string
*/
@@ -1461,7 +1730,6 @@ function license_img($type) {
global $conf;
if(!$conf['license']) return '';
if(!is_array($license[$conf['license']])) return '';
- $lic = $license[$conf['license']];
$try = array();
$try[] = 'lib/images/license/'.$type.'/'.$conf['license'].'.png';
$try[] = 'lib/images/license/'.$type.'/'.$conf['license'].'.gif';
@@ -1483,9 +1751,8 @@ function license_img($type) {
* @author Filip Oscadal <webmaster@illusionsoftworks.cz>
* @author Andreas Gohr <andi@splitbrain.org>
*
- * @param int $mem Size of memory you want to allocate in bytes
- * @param int $bytes
- * @internal param int $used already allocated memory (see above)
+ * @param int $mem Size of memory you want to allocate in bytes
+ * @param int $bytes already allocated memory (see above)
* @return bool
*/
function is_mem_available($mem, $bytes = 1048576) {
@@ -1516,8 +1783,13 @@ function is_mem_available($mem, $bytes = 1048576) {
*
* @link http://support.microsoft.com/kb/q176113/
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $url url being directed to
*/
function send_redirect($url) {
+ /* @var Input $INPUT */
+ global $INPUT;
+
//are there any undisplayed messages? keep them in session for display
global $MSG;
if(isset($MSG) && count($MSG) && !defined('NOSESSION')) {
@@ -1531,7 +1803,7 @@ function send_redirect($url) {
// work around IE bug
// http://www.ianhoar.com/2008/11/16/internet-explorer-6-and-redirected-anchor-links/
- list($url, $hash) = explode('#', $url);
+ @list($url, $hash) = explode('#', $url);
if($hash) {
if(strpos($url, '?')) {
$url = $url.'&#'.$hash;
@@ -1541,9 +1813,9 @@ function send_redirect($url) {
}
// check if running on IIS < 6 with CGI-PHP
- if(isset($_SERVER['SERVER_SOFTWARE']) && isset($_SERVER['GATEWAY_INTERFACE']) &&
- (strpos($_SERVER['GATEWAY_INTERFACE'], 'CGI') !== false) &&
- (preg_match('|^Microsoft-IIS/(\d)\.\d$|', trim($_SERVER['SERVER_SOFTWARE']), $matches)) &&
+ if($INPUT->server->has('SERVER_SOFTWARE') && $INPUT->server->has('GATEWAY_INTERFACE') &&
+ (strpos($INPUT->server->str('GATEWAY_INTERFACE'), 'CGI') !== false) &&
+ (preg_match('|^Microsoft-IIS/(\d)\.\d$|', trim($INPUT->server->str('SERVER_SOFTWARE')), $matches)) &&
$matches[1] < 6
) {
header('Refresh: 0;url='.$url);
@@ -1584,6 +1856,10 @@ function valid_input_set($param, $valid_values, $array, $exc = '') {
/**
* Read a preference from the DokuWiki cookie
* (remembering both keys & values are urlencoded)
+ *
+ * @param string $pref preference key
+ * @param mixed $default value returned when preference not found
+ * @return string preference value
*/
function get_doku_pref($pref, $default) {
$enc_pref = urlencode($pref);
@@ -1602,6 +1878,9 @@ function get_doku_pref($pref, $default) {
/**
* Add a preference to the DokuWiki cookie
* (remembering $_COOKIE['DOKU_PREFS'] is urlencoded)
+ *
+ * @param string $pref preference key
+ * @param string $val preference value
*/
function set_doku_pref($pref, $val) {
global $conf;
@@ -1630,4 +1909,13 @@ function set_doku_pref($pref, $val) {
}
}
+/**
+ * Strips source mapping declarations from given text #601
+ *
+ * @param &string $text reference to the CSS or JavaScript code to clean
+ */
+function stripsourcemaps(&$text){
+ $text = preg_replace('/^(\/\/|\/\*)[@#]\s+sourceMappingURL=.*?(\*\/)?$/im', '\\1\\2', $text);
+}
+
//Setup VIM: ex: et ts=2 :
diff --git a/inc/confutils.php b/inc/confutils.php
index 0ac003b72..31371d41f 100644
--- a/inc/confutils.php
+++ b/inc/confutils.php
@@ -237,13 +237,14 @@ function getConfigFiles($type) {
* check if the given action was disabled in config
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @param string $action
* @returns boolean true if enabled, false if disabled
*/
function actionOK($action){
static $disabled = null;
if(is_null($disabled) || defined('SIMPLE_TEST')){
global $conf;
- /** @var auth_basic $auth */
+ /** @var DokuWiki_Auth_Plugin $auth */
global $auth;
// prepare disabled actions array and handle legacy options
diff --git a/inc/events.php b/inc/events.php
index f7b1a7a16..318a7617e 100644
--- a/inc/events.php
+++ b/inc/events.php
@@ -8,15 +8,18 @@
if(!defined('DOKU_INC')) die('meh.');
+/**
+ * The event
+ */
class Doku_Event {
// public properties
- var $name = ''; // READONLY event name, objects must register against this name to see the event
- var $data = null; // READWRITE data relevant to the event, no standardised format (YET!)
- var $result = null; // READWRITE the results of the event action, only relevant in "_AFTER" advise
+ public $name = ''; // READONLY event name, objects must register against this name to see the event
+ public $data = null; // READWRITE data relevant to the event, no standardised format (YET!)
+ public $result = null; // READWRITE the results of the event action, only relevant in "_AFTER" advise
// event handlers may modify this if they are preventing the default action
// to provide the after event handlers with event results
- var $canPreventDefault = true; // READONLY if true, event handlers can prevent the events default action
+ public $canPreventDefault = true; // READONLY if true, event handlers can prevent the events default action
// private properties, event handlers can effect these through the provided methods
var $_default = true; // whether or not to carry out the default action associated with the event
@@ -33,6 +36,13 @@ class Doku_Event {
}
/**
+ * @return string
+ */
+ function __toString() {
+ return $this->name;
+ }
+
+ /**
* advise functions
*
* advise all registered handlers of this event
@@ -47,7 +57,8 @@ class Doku_Event {
* $evt->advise_after();
* unset($evt);
*
- * @return results of processing the event, usually $this->_default
+ * @param bool $enablePreventDefault
+ * @return bool results of processing the event, usually $this->_default
*/
function advise_before($enablePreventDefault=true) {
global $EVENT_HANDLER;
@@ -73,14 +84,21 @@ class Doku_Event {
* $this->_default, all of which may have been modified by the event handlers.
* - advise all registered (<event>_AFTER) handlers that the event has taken place
*
- * @return $event->results
+ * @param null|callable $action
+ * @param bool $enablePrevent
+ * @return mixed $event->results
* the value set by any <event>_before or <event> handlers if the default action is prevented
* or the results of the default action (as modified by <event>_after handlers)
* or NULL no action took place and no handler modified the value
*/
function trigger($action=null, $enablePrevent=true) {
- if (!is_callable($action)) $enablePrevent = false;
+ if (!is_callable($action)) {
+ $enablePrevent = false;
+ if (!is_null($action)) {
+ trigger_error('The default action of '.$this.' is not null but also not callable. Maybe the method is not public?', E_USER_WARNING);
+ }
+ }
if ($this->advise_before($enablePrevent) && is_callable($action)) {
if (is_array($action)) {
@@ -112,12 +130,15 @@ class Doku_Event {
function preventDefault() { $this->_default = false; }
}
+/**
+ * Controls the registration and execution of all events,
+ */
class Doku_Event_Handler {
// public properties: none
// private properties
- var $_hooks = array(); // array of events and their registered handlers
+ protected $_hooks = array(); // array of events and their registered handlers
/**
* event_handler
@@ -128,6 +149,7 @@ class Doku_Event_Handler {
function Doku_Event_Handler() {
// load action plugins
+ /** @var DokuWiki_Action_Plugin $plugin */
$plugin = null;
$pluginlist = plugin_list('action');
@@ -143,34 +165,47 @@ class Doku_Event_Handler {
*
* register a hook for an event
*
- * @param $event (string) name used by the event, (incl '_before' or '_after' for triggers)
- * @param $obj (obj) object in whose scope method is to be executed,
+ * @param $event string name used by the event, (incl '_before' or '_after' for triggers)
+ * @param $advise string
+ * @param $obj object object in whose scope method is to be executed,
* if NULL, method is assumed to be a globally available function
- * @param $method (function) event handler function
- * @param $param (mixed) data passed to the event handler
+ * @param $method string event handler function
+ * @param $param mixed data passed to the event handler
+ * @param $seq int sequence number for ordering hook execution (ascending)
*/
- function register_hook($event, $advise, $obj, $method, $param=null) {
- $this->_hooks[$event.'_'.$advise][] = array($obj, $method, $param);
+ function register_hook($event, $advise, $obj, $method, $param=null, $seq=0) {
+ $seq = (int)$seq;
+ $doSort = !isset($this->_hooks[$event.'_'.$advise][$seq]);
+ $this->_hooks[$event.'_'.$advise][$seq][] = array($obj, $method, $param);
+
+ if ($doSort) {
+ ksort($this->_hooks[$event.'_'.$advise]);
+ }
}
- function process_event(&$event,$advise='') {
+ /**
+ * process the before/after event
+ *
+ * @param Doku_Event $event
+ * @param string $advise BEFORE or AFTER
+ */
+ function process_event($event,$advise='') {
$evt_name = $event->name . ($advise ? '_'.$advise : '_BEFORE');
if (!empty($this->_hooks[$evt_name])) {
- foreach ($this->_hooks[$evt_name] as $hook) {
- // list($obj, $method, $param) = $hook;
- $obj =& $hook[0];
- $method = $hook[1];
- $param = $hook[2];
-
- if (is_null($obj)) {
- $method($event, $param);
- } else {
- $obj->$method($event, $param);
- }
+ foreach ($this->_hooks[$evt_name] as $sequenced_hooks) {
+ foreach ($sequenced_hooks as $hook) {
+ list($obj, $method, $param) = $hook;
- if (!$event->_continue) break;
+ if (is_null($obj)) {
+ $method($event, $param);
+ } else {
+ $obj->$method($event, $param);
+ }
+
+ if (!$event->_continue) return;
+ }
}
}
}
@@ -181,12 +216,12 @@ class Doku_Event_Handler {
*
* function wrapper to process (create, trigger and destroy) an event
*
- * @param $name (string) name for the event
- * @param $data (mixed) event data
- * @param $action (callback) (optional, default=NULL) default action, a php callback function
- * @param $canPreventDefault (bool) (optional, default=true) can hooks prevent the default action
+ * @param $name string name for the event
+ * @param $data mixed event data
+ * @param $action callback (optional, default=NULL) default action, a php callback function
+ * @param $canPreventDefault bool (optional, default=true) can hooks prevent the default action
*
- * @return (mixed) the event results value after all event processing is complete
+ * @return mixed the event results value after all event processing is complete
* by default this is the return value of the default action however
* it can be set or modified by event handler hooks
*/
diff --git a/inc/feedcreator.class.php b/inc/feedcreator.class.php
index 670a1bc29..b90da5724 100644
--- a/inc/feedcreator.class.php
+++ b/inc/feedcreator.class.php
@@ -185,6 +185,8 @@ class HtmlDescribable {
*/
var $descriptionTruncSize;
+ var $description;
+
/**
* Returns a formatted description field, depending on descriptionHtmlSyndicated and
* $descriptionTruncSize properties
@@ -222,7 +224,7 @@ class FeedHtmlField {
/**
* Creates a new instance of FeedHtmlField.
- * @param $string: if given, sets the rawFieldContent property
+ * @param string $parFieldContent: if given, sets the rawFieldContent property
*/
function FeedHtmlField($parFieldContent) {
if ($parFieldContent) {
@@ -267,8 +269,14 @@ class FeedHtmlField {
* @author Kai Blankenhorn <kaib@bitfolge.de>
*/
class UniversalFeedCreator extends FeedCreator {
+ /** @var FeedCreator */
var $_feed;
+ /**
+ * Sets format
+ *
+ * @param string $format
+ */
function _setFormat($format) {
switch (strtoupper($format)) {
@@ -344,7 +352,7 @@ class UniversalFeedCreator extends FeedCreator {
* Creates a syndication feed based on the items previously added.
*
* @see FeedCreator::addItem()
- * @param string format format the feed should comply to. Valid values are:
+ * @param string $format format the feed should comply to. Valid values are:
* "PIE0.1", "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3", "HTML", "JS"
* @return string the contents of the feed.
*/
@@ -358,10 +366,10 @@ class UniversalFeedCreator extends FeedCreator {
* header may be sent to redirect the use to the newly created file.
* @since 1.4
*
- * @param string format format the feed should comply to. Valid values are:
+ * @param string $format format the feed should comply to. Valid values are:
* "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM", "ATOM0.3", "HTML", "JS"
- * @param string filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
- * @param boolean displayContents optional send the content of the file or not. If true, the file will be sent in the body of the response.
+ * @param string $filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
+ * @param boolean $displayContents optional send the content of the file or not. If true, the file will be sent in the body of the response.
*/
function saveFeed($format="RSS0.91", $filename="", $displayContents=true) {
$this->_setFormat($format);
@@ -376,10 +384,10 @@ class UniversalFeedCreator extends FeedCreator {
* before anything else, especially before you do the time consuming task to build the feed
* (web fetching, for example).
*
- * @param string format format the feed should comply to. Valid values are:
+ * @param string $format format the feed should comply to. Valid values are:
* "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3".
- * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
- * @param timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)
+ * @param string $filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
+ * @param int $timeout optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)
*/
function useCached($format="RSS0.91", $filename="", $timeout=3600) {
$this->_setFormat($format);
@@ -390,7 +398,7 @@ class UniversalFeedCreator extends FeedCreator {
/**
* Outputs feed to the browser - needed for on-the-fly feed generation (like it is done in WordPress, etc.)
*
- * @param format string format the feed should comply to. Valid values are:
+ * @param $format string format the feed should comply to. Valid values are:
* "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3".
*/
function outputFeed($format='RSS0.91') {
@@ -422,7 +430,13 @@ class FeedCreator extends HtmlDescribable {
/**
* Optional attributes of a feed.
*/
- var $syndicationURL, $image, $language, $copyright, $pubDate, $lastBuildDate, $editor, $editorEmail, $webmaster, $category, $docs, $ttl, $rating, $skipHours, $skipDays;
+ var $syndicationURL, $language, $copyright, $pubDate, $lastBuildDate, $editor, $editorEmail, $webmaster, $category, $docs, $ttl, $rating, $skipHours, $skipDays;
+ /**
+ * Optional attribute of a feed
+ *
+ * @var FeedImage
+ */
+ var $image = null;
/**
* The url of the external xsl stylesheet used to format the naked rss feed.
@@ -430,13 +444,18 @@ class FeedCreator extends HtmlDescribable {
*/
var $xslStyleSheet = "";
+ /**
+ * Style sheet for rss feed
+ */
+ var $cssStyleSheet = "";
+
/**
* @access private
+ * @var FeedItem[]
*/
var $items = Array();
-
/**
* This feed's MIME content type.
* @since 1.4
@@ -466,7 +485,7 @@ class FeedCreator extends HtmlDescribable {
/**
* Adds an FeedItem to the feed.
*
- * @param object FeedItem $item The FeedItem to add to the feed.
+ * @param FeedItem $item The FeedItem to add to the feed.
* @access public
*/
function addItem($item) {
@@ -482,8 +501,8 @@ class FeedCreator extends HtmlDescribable {
* If the string is already shorter than $length, it is returned unchanged.
*
* @static
- * @param string string A string to be truncated.
- * @param int length the maximum length the string should be truncated to
+ * @param string $string A string to be truncated.
+ * @param int $length the maximum length the string should be truncated to
* @return string the truncated string
*/
function iTrunc($string, $length) {
@@ -527,8 +546,8 @@ class FeedCreator extends HtmlDescribable {
/**
* Creates a string containing all additional elements specified in
* $additionalElements.
- * @param elements array an associative array containing key => value pairs
- * @param indentString string a string that will be inserted before every generated line
+ * @param $elements array an associative array containing key => value pairs
+ * @param $indentString string a string that will be inserted before every generated line
* @return string the XML tags corresponding to $additionalElements
*/
function _createAdditionalElements($elements, $indentString="") {
@@ -541,6 +560,9 @@ class FeedCreator extends HtmlDescribable {
return $ae;
}
+ /**
+ * Create elements for stylesheets
+ */
function _createStylesheetReferences() {
$xml = "";
if ($this->cssStyleSheet) $xml .= "<?xml-stylesheet href=\"".$this->cssStyleSheet."\" type=\"text/css\"?>\n";
@@ -610,8 +632,8 @@ class FeedCreator extends HtmlDescribable {
* before anything else, especially before you do the time consuming task to build the feed
* (web fetching, for example).
* @since 1.4
- * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
- * @param timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)
+ * @param $filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
+ * @param $timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)
*/
function useCached($filename="", $timeout=3600) {
$this->_timeout = $timeout;
@@ -629,8 +651,8 @@ class FeedCreator extends HtmlDescribable {
* header may be sent to redirect the user to the newly created file.
* @since 1.4
*
- * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
- * @param redirect boolean optional send an HTTP redirect header or not. If true, the user will be automatically redirected to the created file.
+ * @param $filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
+ * @param $displayContents boolean optional send an HTTP redirect header or not. If true, the user will be automatically redirected to the created file.
*/
function saveFeed($filename="", $displayContents=true) {
if ($filename=="") {
@@ -667,6 +689,7 @@ class FeedCreator extends HtmlDescribable {
* Usually, you won't need to use this.
*/
class FeedDate {
+ /** @var int */
var $unix;
/**
@@ -726,7 +749,7 @@ class FeedDate {
/**
* Gets the date stored in this FeedDate as an RFC 822 date.
*
- * @return a date in RFC 822 format
+ * @return string a date in RFC 822 format
*/
function rfc822() {
//return gmdate("r",$this->unix);
@@ -738,7 +761,7 @@ class FeedDate {
/**
* Gets the date stored in this FeedDate as an ISO 8601 date.
*
- * @return a date in ISO 8601 (RFC 3339) format
+ * @return string a date in ISO 8601 (RFC 3339) format
*/
function iso8601() {
$date = gmdate("Y-m-d\TH:i:sO",$this->unix);
@@ -751,7 +774,7 @@ class FeedDate {
/**
* Gets the date stored in this FeedDate as unix time stamp.
*
- * @return a date as a unix time stamp
+ * @return int a date as a unix time stamp
*/
function unix() {
return $this->unix;
@@ -777,7 +800,7 @@ class RSSCreator10 extends FeedCreator {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createGeneratorComment();
if ($this->cssStyleSheet=="") {
- $cssStyleSheet = "http://www.w3.org/2000/08/w3c-synd/style.css";
+ $this->cssStyleSheet = "http://www.w3.org/2000/08/w3c-synd/style.css";
}
$feed.= $this->_createStylesheetReferences();
$feed.= "<rdf:RDF\n";
@@ -1032,12 +1055,16 @@ class PIECreator01 extends FeedCreator {
$this->encoding = "utf-8";
}
+ /**
+ * Build content
+ * @return string
+ */
function createFeed() {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createStylesheetReferences();
$feed.= "<feed version=\"0.1\" xmlns=\"http://example.com/newformat#\">\n";
$feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."</title>\n";
- $this->truncSize = 500;
+ $this->descriptionTruncSize = 500;
$feed.= " <subtitle>".$this->getDescription()."</subtitle>\n";
$feed.= " <link>".$this->link."</link>\n";
$icnt = count($this->items);
@@ -1091,6 +1118,10 @@ class AtomCreator10 extends FeedCreator {
$this->encoding = "utf-8";
}
+ /**
+ * Build content
+ * @return string
+ */
function createFeed() {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createGeneratorComment();
@@ -1174,6 +1205,10 @@ class AtomCreator03 extends FeedCreator {
$this->encoding = "utf-8";
}
+ /**
+ * Build content
+ * @return string
+ */
function createFeed() {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createGeneratorComment();
@@ -1281,6 +1316,7 @@ class MBOXCreator extends FeedCreator {
*/
function createFeed() {
$icnt = count($this->items);
+ $feed = "";
for ($i=0; $i<$icnt; $i++) {
if ($this->items[$i]->author!="") {
$from = $this->items[$i]->author;
@@ -1331,6 +1367,10 @@ class OPMLCreator extends FeedCreator {
$this->encoding = "utf-8";
}
+ /**
+ * Build content
+ * @return string
+ */
function createFeed() {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createGeneratorComment();
@@ -1441,6 +1481,7 @@ class HTMLCreator extends FeedCreator {
}
//set an openInNewWindow_token_to be inserted or not
+ $targetInsert = "";
if ($this->openInNewWindow) {
$targetInsert = " target='_blank'";
}
@@ -1568,6 +1609,14 @@ class JSCreator extends HTMLCreator {
* @author Andreas Gohr <andi@splitbrain.org>
*/
class DokuWikiFeedCreator extends UniversalFeedCreator{
+
+ /**
+ * Build content
+ *
+ * @param string $format
+ * @param string $encoding
+ * @return string
+ */
function createFeed($format = "RSS0.91",$encoding='iso-8859-15') {
$this->_setFormat($format);
$this->_feed->encoding = $encoding;
diff --git a/inc/fetch.functions.php b/inc/fetch.functions.php
index 3eacaa2fe..c61c54503 100644
--- a/inc/fetch.functions.php
+++ b/inc/fetch.functions.php
@@ -77,7 +77,7 @@ function sendFile($file, $mime, $dl, $cache, $public = false, $orig = null) {
}
//use x-sendfile header to pass the delivery to compatible webservers
- if(http_sendfile($file)) exit;
+ http_sendfile($file);
// send file contents
$fp = @fopen($file, "rb");
diff --git a/inc/form.php b/inc/form.php
index a4cd2e682..fadc71d3e 100644
--- a/inc/form.php
+++ b/inc/form.php
@@ -47,15 +47,11 @@ class Doku_Form {
* with up to four parameters is deprecated, instead the first parameter
* should be an array with parameters.
*
- * @param mixed $params Parameters for the HTML form element; Using the
- * deprecated calling convention this is the ID
- * attribute of the form
- * @param string $action (optional, deprecated) submit URL, defaults to
- * current page
- * @param string $method (optional, deprecated) 'POST' or 'GET', default
- * is POST
- * @param string $enctype (optional, deprecated) Encoding type of the
- * data
+ * @param mixed $params Parameters for the HTML form element; Using the deprecated
+ * calling convention this is the ID attribute of the form
+ * @param bool|string $action (optional, deprecated) submit URL, defaults to current page
+ * @param bool|string $method (optional, deprecated) 'POST' or 'GET', default is POST
+ * @param bool|string $enctype (optional, deprecated) Encoding type of the data
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function Doku_Form($params, $action=false, $method=false, $enctype=false) {
@@ -135,7 +131,7 @@ class Doku_Form {
* The element can be either a pseudo-tag or string.
* If string, it is printed without escaping special chars. *
*
- * @param string $elem Pseudo-tag or string to add to the form.
+ * @param string|array $elem Pseudo-tag or string to add to the form.
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function addElement($elem) {
@@ -147,8 +143,8 @@ class Doku_Form {
*
* Inserts a content element at a position.
*
- * @param string $pos 0-based index where the element will be inserted.
- * @param string $elem Pseudo-tag or string to add to the form.
+ * @param string $pos 0-based index where the element will be inserted.
+ * @param string|array $elem Pseudo-tag or string to add to the form.
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function insertElement($pos, $elem) {
@@ -160,8 +156,8 @@ class Doku_Form {
*
* Replace with NULL to remove an element.
*
- * @param int $pos 0-based index the element will be placed at.
- * @param string $elem Pseudo-tag or string to add to the form.
+ * @param int $pos 0-based index the element will be placed at.
+ * @param string|array $elem Pseudo-tag or string to add to the form.
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function replaceElement($pos, $elem) {
@@ -176,7 +172,7 @@ class Doku_Form {
* Gets the position of the first of a type of element.
*
* @param string $type Element type to look for.
- * @return array pseudo-element if found, false otherwise
+ * @return int position of element if found, otherwise false
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function findElementByType($type) {
@@ -193,7 +189,7 @@ class Doku_Form {
* Gets the position of the element with an ID attribute.
*
* @param string $id ID of the element to find.
- * @return array pseudo-element if found, false otherwise
+ * @return int position of element if found, otherwise false
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function findElementById($id) {
@@ -211,7 +207,7 @@ class Doku_Form {
*
* @param string $name Attribute name.
* @param string $value Attribute value.
- * @return array pseudo-element if found, false otherwise
+ * @return int position of element if found, otherwise false
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function findElementByAttribute($name, $value) {
@@ -230,7 +226,7 @@ class Doku_Form {
* first (underflow) or last (overflow) element.
*
* @param int $pos 0-based index
- * @return arrayreference pseudo-element
+ * @return array reference pseudo-element
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function &getElementAt($pos) {
@@ -565,10 +561,11 @@ function form_makeListboxField($name, $values, $selected='', $label=null, $id=''
if (is_null($label)) $label = $name;
$options = array();
reset($values);
- if (is_null($selected) || $selected == '')
+ if (is_null($selected) || $selected == '') {
$selected = array();
- elseif (!is_array($selected))
+ } elseif (!is_array($selected)) {
$selected = array($selected);
+ }
// FIXME: php doesn't know the difference between a string and an integer
if (is_string(key($values))) {
foreach ($values as $val=>$text) {
@@ -576,11 +573,13 @@ function form_makeListboxField($name, $values, $selected='', $label=null, $id=''
}
} else {
foreach ($values as $val) {
- if (is_array($val))
- @list($val,$text) = $val;
- else
+ $disabled = false;
+ if (is_array($val)) {
+ @list($val,$text,$disabled) = $val;
+ } else {
$text = null;
- $options[] = array($val,$text,in_array($val,$selected));
+ }
+ $options[] = array($val,$text,in_array($val,$selected),$disabled);
}
}
$elem = array('_elem'=>'listboxfield', '_options'=>$options, '_text'=>$label, '_class'=>$class,
@@ -934,11 +933,12 @@ function form_listboxfield($attrs) {
$s .= '<select '.buildAttributes($attrs,true).'>'.DOKU_LF;
if (!empty($attrs['_options'])) {
foreach ($attrs['_options'] as $opt) {
- @list($value,$text,$select) = $opt;
+ @list($value,$text,$select,$disabled) = $opt;
$p = '';
if(is_null($text)) $text = $value;
$p .= ' value="'.formText($value).'"';
if (!empty($select)) $p .= ' selected="selected"';
+ if ($disabled) $p .= ' disabled="disabled"';
$s .= '<option'.$p.'>'.formText($text).'</option>';
}
} else {
diff --git a/inc/fulltext.php b/inc/fulltext.php
index bd8e6b866..dd918f214 100644
--- a/inc/fulltext.php
+++ b/inc/fulltext.php
@@ -72,8 +72,20 @@ function _ft_pageSearch(&$data) {
$pages = end($stack);
$pages_matched = array();
foreach(array_keys($pages) as $id){
- $text = utf8_strtolower(rawWiki($id));
- if (strpos($text, $phrase) !== false) {
+ $evdata = array(
+ 'id' => $id,
+ 'phrase' => $phrase,
+ 'text' => rawWiki($id)
+ );
+ $evt = new Doku_Event('FULLTEXT_PHRASE_MATCH',$evdata);
+ if ($evt->advise_before() && $evt->result !== true) {
+ $text = utf8_strtolower($evdata['text']);
+ if (strpos($text, $phrase) !== false) {
+ $evt->result = true;
+ }
+ }
+ $evt->advise_after();
+ if ($evt->result === true) {
$pages_matched[$id] = 0; // phrase: always 0 hit
}
}
@@ -333,7 +345,7 @@ function ft_snippet($id,$highlight){
$pre = min($pre,100-$post);
} else if ($post>50) {
$post = min($post, 100-$pre);
- } else {
+ } else if ($offset == 0) {
// both are less than 50, means the context is the whole string
// make it so and break out of this loop - there is no need for the
// complex snippet calculations
@@ -354,12 +366,12 @@ function ft_snippet($id,$highlight){
}
// set $offset for next match attempt
- // substract strlen to avoid splitting a potential search success,
- // this is an approximation as the search pattern may match strings
- // of varying length and it will fail if the context snippet
- // boundary breaks a matching string longer than the current match
- $utf8_offset = $utf8_idx + $post;
- $offset = $idx + strlen(utf8_substr($text,$utf8_idx,$post));
+ // continue matching after the current match
+ // if the current match is not the longest possible match starting at the current offset
+ // this prevents further matching of this snippet but for possible matches of length
+ // smaller than match length + context (at least 50 characters) this match is part of the context
+ $utf8_offset = $utf8_idx + $utf8_len;
+ $offset = $idx + strlen(utf8_substr($text,$utf8_idx,$utf8_len));
$offset = utf8_correctIdx($text,$offset);
}
diff --git a/inc/html.php b/inc/html.php
index 5941a9af2..bda6fb398 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -19,6 +19,7 @@ if(!defined('NL')) define('NL',"\n");
* @return string the HTML code of the link
*/
function html_wikilink($id,$name=null,$search=''){
+ /** @var Doku_Renderer_xhtml $xhtml_renderer */
static $xhtml_renderer = null;
if(is_null($xhtml_renderer)){
$xhtml_renderer = p_get_renderer('xhtml');
@@ -64,6 +65,20 @@ function html_login(){
print '</div>'.NL;
}
+
+/**
+ * Denied page content
+ *
+ * @return string html
+ */
+function html_denied() {
+ print p_locale_xhtml('denied');
+
+ if(!$_SERVER['REMOTE_USER']){
+ html_login();
+ }
+}
+
/**
* inserts section edit buttons if wanted or removes the markers
*
@@ -396,8 +411,8 @@ function html_locked(){
print p_locale_xhtml('locked');
print '<ul>';
- print '<li><div class="li"><strong>'.$lang['lockedby'].':</strong> '.editorinfo($INFO['locked']).'</div></li>';
- print '<li><div class="li"><strong>'.$lang['lockexpire'].':</strong> '.$expire.' ('.$min.' min)</div></li>';
+ print '<li><div class="li"><strong>'.$lang['lockedby'].'</strong> '.editorinfo($INFO['locked']).'</div></li>';
+ print '<li><div class="li"><strong>'.$lang['lockexpire'].'</strong> '.$expire.' ('.$min.' min)</div></li>';
print '</ul>';
}
@@ -414,20 +429,23 @@ function html_revisions($first=0, $media_id = false){
global $conf;
global $lang;
$id = $ID;
+ if ($media_id) {
+ $id = $media_id;
+ $changelog = new MediaChangeLog($id);
+ } else {
+ $changelog = new PageChangeLog($id);
+ }
+
/* we need to get one additional log entry to be able to
* decide if this is the last page or is there another one.
* see html_recent()
*/
- if (!$media_id) $revisions = getRevisions($ID, $first, $conf['recent']+1);
- else {
- $revisions = getRevisions($media_id, $first, $conf['recent']+1, 8192, true);
- $id = $media_id;
- }
+
+ $revisions = $changelog->getRevisions($first, $conf['recent']+1);
if(count($revisions)==0 && $first!=0){
$first=0;
- if (!$media_id) $revisions = getRevisions($ID, $first, $conf['recent']+1);
- else $revisions = getRevisions($media_id, $first, $conf['recent']+1, 8192, true);
+ $revisions = $changelog->getRevisions($first, $conf['recent']+1);
}
$hasNext = false;
if (count($revisions)>$conf['recent']) {
@@ -486,15 +504,18 @@ function html_revisions($first=0, $media_id = false){
$form->addElement(form_makeCloseTag('span'));
}
+ $changelog->setChunkSize(1024);
+
$form->addElement(form_makeOpenTag('span', array('class' => 'user')));
- if (!$media_id) $editor = $INFO['editor'];
- else {
- $revinfo = getRevisionInfo($id, @filemtime(fullpath(mediaFN($id))), 1024, true);
- if($revinfo['user']){
+ if($media_id) {
+ $revinfo = $changelog->getRevisionInfo(@filemtime(fullpath(mediaFN($id))));
+ if($revinfo['user']) {
$editor = $revinfo['user'];
- }else{
+ } else {
$editor = $revinfo['ip'];
}
+ } else {
+ $editor = $INFO['editor'];
}
$form->addElement((empty($editor))?('('.$lang['external_edit'].')'):editorinfo($editor));
$form->addElement(form_makeCloseTag('span'));
@@ -509,12 +530,11 @@ function html_revisions($first=0, $media_id = false){
foreach($revisions as $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));
+ $info = $changelog->getRevisionInfo($rev);
+ if($media_id) {
+ $exists = @file_exists(mediaFN($id, $rev));
+ } else {
+ $exists = page_exists($id, $rev);
}
if ($info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT)
@@ -691,7 +711,7 @@ function html_recent($first=0, $show_changes='both'){
$form->addElement(form_makeOpenTag('div', array('class' => 'li')));
- if ($recent['media']) {
+ if (!empty($recent['media'])) {
$form->addElement(media_printicon($recent['id']));
} else {
$icon = DOKU_BASE.'lib/images/fileicons/file.png';
@@ -705,7 +725,7 @@ function html_recent($first=0, $show_changes='both'){
$diff = false;
$href = '';
- if ($recent['media']) {
+ if (!empty($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',
@@ -715,7 +735,7 @@ function html_recent($first=0, $show_changes='both'){
$href = wl($recent['id'],"do=diff", false, '&');
}
- if ($recent['media'] && !$diff) {
+ if (!empty($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)));
@@ -729,7 +749,7 @@ function html_recent($first=0, $show_changes='both'){
$form->addElement(form_makeCloseTag('a'));
}
- if ($recent['media']) {
+ if (!empty($recent['media'])) {
$href = media_managerURL(array('tab_details' => 'history',
'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&');
} else {
@@ -745,7 +765,7 @@ function html_recent($first=0, $show_changes='both'){
)));
$form->addElement(form_makeCloseTag('a'));
- if ($recent['media']) {
+ if (!empty($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)));
@@ -902,6 +922,14 @@ function html_li_default($item){
* a member of an object.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $data array with item arrays
+ * @param string $class class of ul wrapper
+ * @param callable $func callback to print an list item
+ * @param string $lifunc callback to the opening li tag
+ * @param bool $forcewrapper Trigger building a wrapper ul if the first level is
+ 0 (we have a root object) or 1 (just the root content)
+ * @return string html of an unordered list
*/
function html_buildlist($data,$class,$func,$lifunc='html_li_default',$forcewrapper=false){
if (count($data) === 0) {
@@ -1008,10 +1036,15 @@ function html_diff_head($l_rev, $r_rev, $id = null, $media = false, $inline = fa
$ml_or_wl = $media ? 'ml' : 'wl';
$l_minor = $r_minor = '';
+ if($media) {
+ $changelog = new MediaChangeLog($id);
+ } else {
+ $changelog = new PageChangeLog($id);
+ }
if(!$l_rev){
$l_head = '&mdash;';
}else{
- $l_info = getRevisionInfo($id,$l_rev,true, $media);
+ $l_info = $changelog->getRevisionInfo($l_rev);
if($l_info['user']){
$l_user = '<bdi>'.editorinfo($l_info['user']).'</bdi>';
if(auth_ismanager()) $l_user .= ' <bdo dir="ltr">('.$l_info['ip'].')</bdo>';
@@ -1029,7 +1062,7 @@ function html_diff_head($l_rev, $r_rev, $id = null, $media = false, $inline = fa
}
if($r_rev){
- $r_info = getRevisionInfo($id,$r_rev,true, $media);
+ $r_info = $changelog->getRevisionInfo($r_rev);
if($r_info['user']){
$r_user = '<bdi>'.editorinfo($r_info['user']).'</bdi>';
if(auth_ismanager()) $r_user .= ' <bdo dir="ltr">('.$r_info['ip'].')</bdo>';
@@ -1045,7 +1078,7 @@ function html_diff_head($l_rev, $r_rev, $id = null, $media = false, $inline = fa
$r_head_title.'</a></bdi>'.
$head_separator.$r_user.' '.$r_sum;
}elseif($_rev = @filemtime($media_or_wikiFN($id))){
- $_info = getRevisionInfo($id,$_rev,true, $media);
+ $_info = $changelog->getRevisionInfo($_rev);
if($_info['user']){
$_user = '<bdi>'.editorinfo($_info['user']).'</bdi>';
if(auth_ismanager()) $_user .= ' <bdo dir="ltr">('.$_info['ip'].')</bdo>';
@@ -1069,162 +1102,386 @@ function html_diff_head($l_rev, $r_rev, $id = null, $media = false, $inline = fa
}
/**
- * show diff
+ * Show diff
+ * between current page version and provided $text
+ * or between the revisions provided via GET or POST
*
* @author Andreas Gohr <andi@splitbrain.org>
- * @param string $text - compare with this text with most current version
- * @param bool $intro - display the intro text
- * @param string $type type of the diff (inline or sidebyside)
+ * @param string $text when non-empty: compare with this text with most current version
+ * @param bool $intro display the intro text
+ * @param string $type type of the diff (inline or sidebyside)
*/
-function html_diff($text='',$intro=true,$type=null){
+function html_diff($text = '', $intro = true, $type = null) {
global $ID;
global $REV;
global $lang;
global $INPUT;
global $INFO;
+ $pagelog = new PageChangeLog($ID);
+ /*
+ * Determine diff type
+ */
if(!$type) {
$type = $INPUT->str('difftype');
- if (empty($type)) {
+ if(empty($type)) {
$type = get_doku_pref('difftype', $type);
- if (empty($type) && $INFO['ismobile']) {
+ if(empty($type) && $INFO['ismobile']) {
$type = 'inline';
}
}
}
if($type != 'inline') $type = 'sidebyside';
+ /*
+ * Determine requested revision(s)
+ */
// we're trying to be clever here, revisions to compare can be either
// given as rev and rev2 parameters, with rev2 being optional. Or in an
// array in rev2.
$rev1 = $REV;
$rev2 = $INPUT->ref('rev2');
- if(is_array($rev2)){
+ if(is_array($rev2)) {
$rev1 = (int) $rev2[0];
$rev2 = (int) $rev2[1];
- if(!$rev1){
+ if(!$rev1) {
$rev1 = $rev2;
unset($rev2);
}
- }else{
+ } else {
$rev2 = $INPUT->int('rev2');
}
+ /*
+ * Determine left and right revision, its texts and the header
+ */
$r_minor = '';
$l_minor = '';
- if($text){ // compare text to the most current revision
- $l_rev = '';
- $l_text = rawWiki($ID,'');
- $l_head = '<a class="wikilink1" href="'.wl($ID).'">'.
- $ID.' '.dformat((int) @filemtime(wikiFN($ID))).'</a> '.
+ if($text) { // compare text to the most current revision
+ $l_rev = '';
+ $l_text = rawWiki($ID, '');
+ $l_head = '<a class="wikilink1" href="' . wl($ID) . '">' .
+ $ID . ' ' . dformat((int) @filemtime(wikiFN($ID))) . '</a> ' .
$lang['current'];
- $r_rev = '';
- $r_text = cleanText($text);
- $r_head = $lang['yours'];
- }else{
- if($rev1 && isset($rev2) && $rev2){ // two specific revisions wanted
+ $r_rev = '';
+ $r_text = cleanText($text);
+ $r_head = $lang['yours'];
+ } else {
+ if($rev1 && isset($rev2) && $rev2) { // two specific revisions wanted
// make sure order is correct (older on the left)
- if($rev1 < $rev2){
+ if($rev1 < $rev2) {
$l_rev = $rev1;
$r_rev = $rev2;
- }else{
+ } else {
$l_rev = $rev2;
$r_rev = $rev1;
}
- }elseif($rev1){ // single revision given, compare to current
+ } elseif($rev1) { // single revision given, compare to current
$r_rev = '';
$l_rev = $rev1;
- }else{ // no revision was given, compare previous to current
+ } else { // no revision was given, compare previous to current
$r_rev = '';
- $revs = getRevisions($ID, 0, 1);
+ $revs = $pagelog->getRevisions(0, 1);
$l_rev = $revs[0];
$REV = $l_rev; // store revision back in $REV
}
// when both revisions are empty then the page was created just now
- if(!$l_rev && !$r_rev){
+ if(!$l_rev && !$r_rev) {
$l_text = '';
- }else{
- $l_text = rawWiki($ID,$l_rev);
+ } else {
+ $l_text = rawWiki($ID, $l_rev);
}
- $r_text = rawWiki($ID,$r_rev);
+ $r_text = rawWiki($ID, $r_rev);
list($l_head, $r_head, $l_minor, $r_minor) = html_diff_head($l_rev, $r_rev, null, false, $type == 'inline');
}
- $df = new Diff(explode("\n",$l_text),explode("\n",$r_text));
+ /*
+ * Build navigation
+ */
+ $l_nav = '';
+ $r_nav = '';
+ if(!$text) {
+ list($l_nav, $r_nav) = html_diff_navigation($pagelog, $type, $l_rev, $r_rev);
+ }
+ /*
+ * Create diff object and the formatter
+ */
+ $diff = new Diff(explode("\n", $l_text), explode("\n", $r_text));
- if($type == 'inline'){
- $tdf = new InlineDiffFormatter();
+ if($type == 'inline') {
+ $diffformatter = new InlineDiffFormatter();
} else {
- $tdf = new TableDiffFormatter();
+ $diffformatter = new TableDiffFormatter();
}
-
+ /*
+ * Display intro
+ */
if($intro) print p_locale_xhtml('diff');
- if (!$text) {
- ptln('<div class="diffoptions">');
-
- $form = new Doku_Form(array('action'=>wl()));
- $form->addHidden('id',$ID);
- $form->addHidden('rev2[0]',$l_rev);
- $form->addHidden('rev2[1]',$r_rev);
- $form->addHidden('do','diff');
- $form->addElement(form_makeListboxField(
- 'difftype',
- array(
- 'sidebyside' => $lang['diff_side'],
- 'inline' => $lang['diff_inline']),
- $type,
- $lang['diff_type'],
- '','',
- array('class'=>'quickselect')));
- $form->addElement(form_makeButton('submit', 'diff','Go'));
+ /*
+ * Display type and exact reference
+ */
+ if(!$text) {
+ ptln('<div class="diffoptions group">');
+
+
+ $form = new Doku_Form(array('action' => wl()));
+ $form->addHidden('id', $ID);
+ $form->addHidden('rev2[0]', $l_rev);
+ $form->addHidden('rev2[1]', $r_rev);
+ $form->addHidden('do', 'diff');
+ $form->addElement(
+ form_makeListboxField(
+ 'difftype',
+ array(
+ 'sidebyside' => $lang['diff_side'],
+ 'inline' => $lang['diff_inline']
+ ),
+ $type,
+ $lang['diff_type'],
+ '', '',
+ array('class' => 'quickselect')
+ )
+ );
+ $form->addElement(form_makeButton('submit', 'diff', 'Go'));
$form->printForm();
- $diffurl = wl($ID, array(
- 'do' => 'diff',
- 'rev2[0]' => $l_rev,
- 'rev2[1]' => $r_rev,
- 'difftype' => $type,
- ));
- ptln('<p><a class="wikilink1" href="'.$diffurl.'">'.$lang['difflink'].'</a></p>');
- ptln('</div>');
+ ptln('<p>');
+ // link to exactly this view FS#2835
+ echo html_diff_navigationlink($type, 'difflink', $l_rev, $r_rev ? $r_rev : $INFO['currentrev']);
+ ptln('</p>');
+
+ ptln('</div>'); // .diffoptions
}
+
+ /*
+ * Display diff view table
+ */
?>
<div class="table">
- <table class="diff diff_<?php echo $type?>">
- <?php if ($type == 'inline') { ?>
- <tr>
- <th class="diff-lineheader">-</th><th <?php echo $l_minor?>>
- <?php echo $l_head?>
- </th>
- </tr>
- <tr>
- <th class="diff-lineheader">+</th><th <?php echo $r_minor?>>
- <?php echo $r_head?>
- </th>
- </tr>
- <?php } else { ?>
- <tr>
- <th colspan="2" <?php echo $l_minor?>>
- <?php echo $l_head?>
- </th>
- <th colspan="2" <?php echo $r_minor?>>
- <?php echo $r_head?>
- </th>
- </tr>
- <?php }
- echo html_insert_softbreaks($tdf->format($df)); ?>
+ <table class="diff diff_<?php echo $type ?>">
+
+ <?php
+ //navigation and header
+ if($type == 'inline') {
+ if(!$text) { ?>
+ <tr>
+ <td class="diff-lineheader">-</td>
+ <td class="diffnav"><?php echo $l_nav ?></td>
+ </tr>
+ <tr>
+ <th class="diff-lineheader">-</th>
+ <th <?php echo $l_minor ?>>
+ <?php echo $l_head ?>
+ </th>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td class="diff-lineheader">+</td>
+ <td class="diffnav"><?php echo $r_nav ?></td>
+ </tr>
+ <tr>
+ <th class="diff-lineheader">+</th>
+ <th <?php echo $r_minor ?>>
+ <?php echo $r_head ?>
+ </th>
+ </tr>
+ <?php } else {
+ if(!$text) { ?>
+ <tr>
+ <td colspan="2" class="diffnav"><?php echo $l_nav ?></td>
+ <td colspan="2" class="diffnav"><?php echo $r_nav ?></td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <th colspan="2" <?php echo $l_minor ?>>
+ <?php echo $l_head ?>
+ </th>
+ <th colspan="2" <?php echo $r_minor ?>>
+ <?php echo $r_head ?>
+ </th>
+ </tr>
+ <?php }
+
+ //diff view
+ echo html_insert_softbreaks($diffformatter->format($diff)); ?>
+
</table>
</div>
- <?php
+<?php
+}
+
+/**
+ * Create html for revision navigation
+ *
+ * @param PageChangeLog $pagelog changelog object of current page
+ * @param string $type inline vs sidebyside
+ * @param int $l_rev left revision timestamp
+ * @param int $r_rev right revision timestamp
+ * @return string[] html of left and right navigation elements
+ */
+function html_diff_navigation($pagelog, $type, $l_rev, $r_rev) {
+ global $INFO, $ID;
+
+ // last timestamp is not in changelog, retrieve timestamp from metadata
+ // note: when page is removed, the metadata timestamp is zero
+ $r_rev = $r_rev ? $r_rev : $INFO['meta']['last_change']['date'];
+
+ //retrieve revisions with additional info
+ list($l_revs, $r_revs) = $pagelog->getRevisionsAround($l_rev, $r_rev);
+ $l_revisions = array();
+ if(!$l_rev) {
+ $l_revisions[0] = array(0, "", false); //no left revision given, add dummy
+ }
+ foreach($l_revs as $rev) {
+ $info = $pagelog->getRevisionInfo($rev);
+ $l_revisions[$rev] = array(
+ $rev,
+ dformat($info['date']) . ' ' . editorinfo($info['user'], true) . ' ' . $info['sum'],
+ $r_rev ? $rev >= $r_rev : false //disable?
+ );
+ }
+ $r_revisions = array();
+ if(!$r_rev) {
+ $r_revisions[0] = array(0, "", false); //no right revision given, add dummy
+ }
+ foreach($r_revs as $rev) {
+ $info = $pagelog->getRevisionInfo($rev);
+ $r_revisions[$rev] = array(
+ $rev,
+ dformat($info['date']) . ' ' . editorinfo($info['user'], true) . ' ' . $info['sum'],
+ $rev <= $l_rev //disable?
+ );
+ }
+
+ //determine previous/next revisions
+ $l_index = array_search($l_rev, $l_revs);
+ $l_prev = $l_revs[$l_index + 1];
+ $l_next = $l_revs[$l_index - 1];
+ if($r_rev) {
+ $r_index = array_search($r_rev, $r_revs);
+ $r_prev = $r_revs[$r_index + 1];
+ $r_next = $r_revs[$r_index - 1];
+ } else {
+ //removed page
+ if($l_next) {
+ $r_prev = $r_revs[0];
+ } else {
+ $r_prev = null;
+ }
+ $r_next = null;
+ }
+
+ /*
+ * Left side:
+ */
+ $l_nav = '';
+ //move back
+ if($l_prev) {
+ $l_nav .= html_diff_navigationlink($type, 'diffbothprevrev', $l_prev, $r_prev);
+ $l_nav .= html_diff_navigationlink($type, 'diffprevrev', $l_prev, $r_rev);
+ }
+ //dropdown
+ $form = new Doku_Form(array('action' => wl()));
+ $form->addHidden('id', $ID);
+ $form->addHidden('difftype', $type);
+ $form->addHidden('rev2[1]', $r_rev);
+ $form->addHidden('do', 'diff');
+ $form->addElement(
+ form_makeListboxField(
+ 'rev2[0]',
+ $l_revisions,
+ $l_rev,
+ '', '', '',
+ array('class' => 'quickselect')
+ )
+ );
+ $form->addElement(form_makeButton('submit', 'diff', 'Go'));
+ $l_nav .= $form->getForm();
+ //move forward
+ if($l_next && ($l_next < $r_rev || !$r_rev)) {
+ $l_nav .= html_diff_navigationlink($type, 'diffnextrev', $l_next, $r_rev);
+ }
+
+ /*
+ * Right side:
+ */
+ $r_nav = '';
+ //move back
+ if($l_rev < $r_prev) {
+ $r_nav .= html_diff_navigationlink($type, 'diffprevrev', $l_rev, $r_prev);
+ }
+ //dropdown
+ $form = new Doku_Form(array('action' => wl()));
+ $form->addHidden('id', $ID);
+ $form->addHidden('rev2[0]', $l_rev);
+ $form->addHidden('difftype', $type);
+ $form->addHidden('do', 'diff');
+ $form->addElement(
+ form_makeListboxField(
+ 'rev2[1]',
+ $r_revisions,
+ $r_rev,
+ '', '', '',
+ array('class' => 'quickselect')
+ )
+ );
+ $form->addElement(form_makeButton('submit', 'diff', 'Go'));
+ $r_nav .= $form->getForm();
+ //move forward
+ if($r_next) {
+ if($pagelog->isCurrentRevision($r_next)) {
+ $r_nav .= html_diff_navigationlink($type, 'difflastrev', $l_rev); //last revision is diff with current page
+ } else {
+ $r_nav .= html_diff_navigationlink($type, 'diffnextrev', $l_rev, $r_next);
+ }
+ $r_nav .= html_diff_navigationlink($type, 'diffbothnextrev', $l_next, $r_next);
+ }
+ return array($l_nav, $r_nav);
}
+/**
+ * Create html link to a diff defined by two revisions
+ *
+ * @param string $difftype display type
+ * @param string $linktype
+ * @param int $lrev oldest revision
+ * @param int $rrev newest revision or null for diff with current revision
+ * @return string html of link to a diff
+ */
+function html_diff_navigationlink($difftype, $linktype, $lrev, $rrev = null) {
+ global $ID, $lang;
+ if(!$rrev) {
+ $urlparam = array(
+ 'do' => 'diff',
+ 'rev' => $lrev,
+ 'difftype' => $difftype,
+ );
+ } else {
+ $urlparam = array(
+ 'do' => 'diff',
+ 'rev2[0]' => $lrev,
+ 'rev2[1]' => $rrev,
+ 'difftype' => $difftype,
+ );
+ }
+ return '<a class="' . $linktype . '" href="' . wl($ID, $urlparam) . '" title="' . $lang[$linktype] . '">' .
+ '<span>' . $lang[$linktype] . '</span>' .
+ '</a>' . "\n";
+}
+
+/**
+ * Insert soft breaks in diff html
+ *
+ * @param $diffhtml
+ * @return string
+ */
function html_insert_softbreaks($diffhtml) {
// search the diff html string for both:
// - html tags, so these can be ignored
@@ -1232,6 +1489,12 @@ function html_insert_softbreaks($diffhtml) {
return preg_replace_callback('/<[^>]*>|[^<> ]{12,}/','html_softbreak_callback',$diffhtml);
}
+/**
+ * callback which adds softbreaks
+ *
+ * @param array $match array with first the complete match
+ * @return string the replacement
+ */
function html_softbreak_callback($match){
// if match is an html tag, return it intact
if ($match[0]{0} == '<') return $match[0];
@@ -1343,7 +1606,7 @@ function html_updateprofile(){
global $conf;
global $INPUT;
global $INFO;
- /** @var auth_basic $auth */
+ /** @var DokuWiki_Auth_Plugin $auth */
global $auth;
print p_locale_xhtml('updateprofile');
@@ -1517,6 +1780,7 @@ function html_edit(){
* Display the default edit form
*
* Is the default action for HTML_EDIT_FORMSELECTION.
+ * @param mixed[] $param
*/
function html_edit_form($param) {
global $TEXT;
@@ -1559,7 +1823,7 @@ function html_minoredit(){
function html_debug(){
global $conf;
global $lang;
- /** @var auth_basic $auth */
+ /** @var DokuWiki_Auth_Plugin $auth */
global $auth;
global $INFO;
@@ -1634,6 +1898,17 @@ function html_debug(){
print_r($inis);
print '</pre>';
+ if (function_exists('apache_get_version')) {
+ $apache['version'] = apache_get_version();
+
+ if (function_exists('apache_get_modules')) {
+ $apache['modules'] = apache_get_modules();
+ }
+ print '<b>Apache</b><pre>';
+ print_r($apache);
+ print '</pre>';
+ }
+
print '</body></html>';
}
diff --git a/inc/httputils.php b/inc/httputils.php
index ca60ed509..efeb2a56c 100644
--- a/inc/httputils.php
+++ b/inc/httputils.php
@@ -64,12 +64,13 @@ function http_conditionalRequest($timestamp){
* Let the webserver send the given file via x-sendfile method
*
* @author Chris Smith <chris@jalakai.co.uk>
- * @returns void or exits with previously header() commands executed
+ * @param string $file absolute path of file to send
+ * @returns void or exits with previous header() commands executed
*/
function http_sendfile($file) {
global $conf;
- //use x-sendfile header to pass the delivery to compatible webservers
+ //use x-sendfile header to pass the delivery to compatible web servers
if($conf['xsendfile'] == 1){
header("X-LIGHTTPD-send-file: $file");
ob_end_clean();
@@ -79,12 +80,12 @@ function http_sendfile($file) {
ob_end_clean();
exit;
}elseif($conf['xsendfile'] == 3){
+ // FS#2388 nginx just needs the relative path.
+ $file = DOKU_REL.substr($file, strlen(fullpath(DOKU_INC)) + 1);
header("X-Accel-Redirect: $file");
ob_end_clean();
exit;
}
-
- return false;
}
/**
@@ -92,7 +93,7 @@ function http_sendfile($file) {
*
* This function exits the running script
*
- * @param ressource $fh - file handle for an already open file
+ * @param resource $fh - file handle for an already open file
* @param int $size - size of the whole file
* @param int $mime - MIME type of the file
*
@@ -204,7 +205,7 @@ function http_gzip_valid($uncompressed_file) {
*
* 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.
+ * and the script is terminated.
*/
function http_cached($cache, $cache_ok) {
global $conf;
@@ -223,7 +224,8 @@ function http_cached($cache, $cache_ok) {
header('Content-Encoding: gzip');
readfile($cache.".gz");
} else {
- if (!http_sendfile($cache)) readfile($cache);
+ http_sendfile($cache);
+ readfile($cache);
}
exit;
}
diff --git a/inc/indexer.php b/inc/indexer.php
index 07f29b542..5ca2f0bb1 100644
--- a/inc/indexer.php
+++ b/inc/indexer.php
@@ -270,8 +270,9 @@ class Doku_Indexer {
// Special handling for titles so the index file is simpler
if (array_key_exists('title', $key)) {
$value = $key['title'];
- if (is_array($value))
+ if (is_array($value)) {
$value = $value[0];
+ }
$this->saveIndexKey('title', '', $pid, $value);
unset($key['title']);
}
@@ -299,20 +300,24 @@ class Doku_Indexer {
if ($val !== "") {
$id = array_search($val, $metawords, true);
if ($id === false) {
+ // didn't find $val, so we'll add it to the end of metawords and create a placeholder in metaidx
$id = count($metawords);
$metawords[$id] = $val;
+ $metaidx[$id] = '';
$addwords = true;
}
// test if value is already in the index
- if (isset($val_idx[$id]) && $val_idx[$id] <= 0)
+ if (isset($val_idx[$id]) && $val_idx[$id] <= 0){
$val_idx[$id] = 0;
- else // else add it
+ } else { // else add it
$val_idx[$id] = 1;
+ }
}
}
- if ($addwords)
+ if ($addwords) {
$this->saveIndex($metaname.'_w', '', $metawords);
+ }
$vals_changed = false;
foreach ($val_idx as $id => $action) {
if ($action == -1) {
@@ -1213,17 +1218,18 @@ class Doku_Indexer {
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
protected function updateTuple($line, $id, $count) {
- $newLine = $line;
- if ($newLine !== '')
- $newLine = preg_replace('/(^|:)'.preg_quote($id,'/').'\*\d*/', '', $newLine);
- $newLine = trim($newLine, ':');
+ if ($line != ''){
+ $line = preg_replace('/(^|:)'.preg_quote($id,'/').'\*\d*/', '', $line);
+ }
+ $line = trim($line, ':');
if ($count) {
- if (strlen($newLine) > 0)
- return "$id*$count:".$newLine;
- else
- return "$id*$count".$newLine;
+ if ($line) {
+ return "$id*$count:".$line;
+ } else {
+ return "$id*$count";
+ }
}
- return $newLine;
+ return $line;
}
/**
diff --git a/inc/infoutils.php b/inc/infoutils.php
index 7358955a0..db856141f 100644
--- a/inc/infoutils.php
+++ b/inc/infoutils.php
@@ -102,15 +102,21 @@ function getVersion(){
function check(){
global $conf;
global $INFO;
+ /* @var Input $INPUT */
+ global $INPUT;
if ($INFO['isadmin'] || $INFO['ismanager']){
msg('DokuWiki version: '.getVersion(),1);
- }
- if(version_compare(phpversion(),'5.2.0','<')){
- msg('Your PHP version is too old ('.phpversion().' vs. 5.2.0+ needed)',-1);
- }else{
- msg('PHP version '.phpversion(),1);
+ if(version_compare(phpversion(),'5.2.0','<')){
+ msg('Your PHP version is too old ('.phpversion().' vs. 5.2.0+ needed)',-1);
+ }else{
+ msg('PHP version '.phpversion(),1);
+ }
+ } else {
+ if(version_compare(phpversion(),'5.2.0','<')){
+ msg('Your PHP version is too old',-1);
+ }
}
$mem = (int) php_to_byte(ini_get('memory_limit'));
@@ -200,7 +206,7 @@ function check(){
}
if($INFO['userinfo']['name']){
- msg('You are currently logged in as '.$_SERVER['REMOTE_USER'].' ('.$INFO['userinfo']['name'].')',0);
+ msg('You are currently logged in as '.$INPUT->server->str('REMOTE_USER').' ('.$INFO['userinfo']['name'].')',0);
msg('You are part of the groups '.join($INFO['userinfo']['grps'],', '),0);
}else{
msg('You are currently not logged in',0);
@@ -274,6 +280,15 @@ define('MSG_USERS_ONLY', 1);
define('MSG_MANAGERS_ONLY',2);
define('MSG_ADMINS_ONLY',4);
+/**
+ * Display a message to the user
+ *
+ * @param string $message
+ * @param int $lvl -1 = error, 0 = info, 1 = success, 2 = notify
+ * @param string $line line number
+ * @param string $file file number
+ * @param int $allow who's allowed to see the message, see MSG_* constants
+ */
function msg($message,$lvl=0,$line='',$file='',$allow=MSG_PUBLIC){
global $MSG, $MSG_shown;
$errors[-1] = 'error';
@@ -303,6 +318,7 @@ function msg($message,$lvl=0,$line='',$file='',$allow=MSG_PUBLIC){
* lvl => int, level of the message (see msg() function)
* allow => int, flag used to determine who is allowed to see the message
* see MSG_* constants
+ * @return bool
*/
function info_msg_allowed($msg){
global $INFO, $auth;
@@ -357,6 +373,9 @@ function dbg($msg,$hidden=false){
*/
function dbglog($msg,$header=''){
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
+
// The debug log isn't automatically cleaned thus only write it when
// debugging has been enabled by the user.
if($conf['allowdebug'] !== 1) return;
@@ -369,12 +388,38 @@ function dbglog($msg,$header=''){
$file = $conf['cachedir'].'/debug.log';
$fh = fopen($file,'a');
if($fh){
- fwrite($fh,date('H:i:s ').$_SERVER['REMOTE_ADDR'].': '.$msg."\n");
+ fwrite($fh,date('H:i:s ').$INPUT->server->str('REMOTE_ADDR').': '.$msg."\n");
fclose($fh);
}
}
/**
+ * Log accesses to deprecated fucntions to the debug log
+ *
+ * @param string $alternative The function or method that should be used instead
+ */
+function dbg_deprecated($alternative = '') {
+ global $conf;
+ if(!$conf['allowdebug']) return;
+
+ $backtrace = debug_backtrace();
+ array_shift($backtrace);
+ $self = array_shift($backtrace);
+ $call = array_shift($backtrace);
+
+ $called = trim($self['class'].'::'.$self['function'].'()', ':');
+ $caller = trim($call['class'].'::'.$call['function'].'()', ':');
+
+ $msg = $called.' is deprecated. It was called from ';
+ $msg .= $caller.' in '.$call['file'].':'.$call['line'];
+ if($alternative) {
+ $msg .= ' '.$alternative.' should be used instead!';
+ }
+
+ dbglog($msg);
+}
+
+/**
* Print a reversed, prettyprinted backtrace
*
* @author Gary Owen <gary_owen@bigfoot.com>
diff --git a/inc/init.php b/inc/init.php
index 7340f4191..df38326c0 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -140,18 +140,21 @@ 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,$cookieDir,'',($conf['securecookie'] && is_ssl()),true);
- }else{
- session_set_cookie_params(0,$cookieDir,'',($conf['securecookie'] && is_ssl()));
+if(!headers_sent() && !defined('NOSESSION')) {
+ if(!defined('DOKU_SESSION_NAME')) define ('DOKU_SESSION_NAME', "DokuWiki");
+ if(!defined('DOKU_SESSION_LIFETIME')) define ('DOKU_SESSION_LIFETIME', 0);
+ if(!defined('DOKU_SESSION_PATH')) {
+ $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir'];
+ define ('DOKU_SESSION_PATH', $cookieDir);
}
+ if(!defined('DOKU_SESSION_DOMAIN')) define ('DOKU_SESSION_DOMAIN', '');
+
+ session_name(DOKU_SESSION_NAME);
+ session_set_cookie_params(DOKU_SESSION_LIFETIME, DOKU_SESSION_PATH, DOKU_SESSION_DOMAIN, ($conf['securecookie'] && is_ssl()), true);
session_start();
// load left over messages
- if(isset($_SESSION[DOKU_COOKIE]['msg'])){
+ if(isset($_SESSION[DOKU_COOKIE]['msg'])) {
$MSG = $_SESSION[DOKU_COOKIE]['msg'];
unset($_SESSION[DOKU_COOKIE]['msg']);
}
@@ -173,7 +176,7 @@ if(function_exists('set_magic_quotes_runtime')) @set_magic_quotes_runtime(0);
$_REQUEST = array_merge($_GET,$_POST);
// we don't want a purge URL to be digged
-if(isset($_REQUEST['purge']) && $_SERVER['HTTP_REFERER']) unset($_REQUEST['purge']);
+if(isset($_REQUEST['purge']) && !empty($_SERVER['HTTP_REFERER'])) unset($_REQUEST['purge']);
// disable gzip if not available
if($conf['compression'] == 'bz2' && !function_exists('bzopen')){
@@ -183,11 +186,6 @@ if($conf['compression'] == 'gz' && !function_exists('gzopen')){
$conf['compression'] = 0;
}
-// fix dateformat for upgraders
-if(strpos($conf['dformat'],'%') === false){
- $conf['dformat'] = '%Y/%m/%d %H:%M';
-}
-
// precalculate file creation modes
init_creationmodes();
@@ -404,6 +402,10 @@ function remove_magic_quotes(&$array) {
* Returns the full absolute URL to the directory where
* DokuWiki is installed in (includes a trailing slash)
*
+ * !! Can not access $_SERVER values through $INPUT
+ * !! here as this function is called before $INPUT is
+ * !! initialized.
+ *
* @author Andreas Gohr <andi@splitbrain.org>
*/
function getBaseURL($abs=null){
@@ -443,12 +445,12 @@ function getBaseURL($abs=null){
//split hostheader into host and port
if(isset($_SERVER['HTTP_HOST'])){
$parsed_host = parse_url('http://'.$_SERVER['HTTP_HOST']);
- $host = $parsed_host['host'];
- $port = $parsed_host['port'];
+ $host = isset($parsed_host['host']) ? $parsed_host['host'] : null;
+ $port = isset($parsed_host['port']) ? $parsed_host['port'] : null;
}elseif(isset($_SERVER['SERVER_NAME'])){
$parsed_host = parse_url('http://'.$_SERVER['SERVER_NAME']);
- $host = $parsed_host['host'];
- $port = $parsed_host['port'];
+ $host = isset($parsed_host['host']) ? $parsed_host['host'] : null;
+ $port = isset($parsed_host['port']) ? $parsed_host['port'] : null;
}else{
$host = php_uname('n');
$port = '';
diff --git a/inc/io.php b/inc/io.php
index c5225a2e0..27a34b045 100644
--- a/inc/io.php
+++ b/inc/io.php
@@ -367,8 +367,6 @@ function io_createNamespace($id, $ns_type='pages') {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function io_makeFileDir($file){
- global $conf;
-
$dir = dirname($file);
if(!@is_dir($dir)){
io_mkdir_p($dir) || msg("Creating directory $dir failed",-1);
diff --git a/inc/lang/af/lang.php b/inc/lang/af/lang.php
index 826fda6e8..70672fbdd 100644
--- a/inc/lang/af/lang.php
+++ b/inc/lang/af/lang.php
@@ -25,7 +25,7 @@ $lang['btn_back'] = 'Terug';
$lang['btn_backlink'] = 'Wat skakel hierheen';
$lang['btn_subscribe'] = 'Hou bladsy dop';
$lang['btn_register'] = 'Skep gerus \'n rekening';
-$lang['loggedinas'] = 'Ingeteken as';
+$lang['loggedinas'] = 'Ingeteken as:';
$lang['user'] = 'Gebruikernaam';
$lang['pass'] = 'Wagwoord';
$lang['newpass'] = 'Nuive wagwoord';
@@ -52,7 +52,7 @@ $lang['mediaroot'] = 'root';
$lang['toc'] = 'Inhoud';
$lang['current'] = 'huidige';
$lang['line'] = 'Streak';
-$lang['youarehere'] = 'Jy is hier';
+$lang['youarehere'] = 'Jy is hier:';
$lang['by'] = 'by';
$lang['restored'] = 'Het terug gegaan na vroeëre weergawe (%s)';
$lang['summary'] = 'Voorskou';
@@ -63,8 +63,8 @@ $lang['qb_extlink'] = 'Eksterne skakel';
$lang['qb_hr'] = 'Horisontale streep';
$lang['qb_sig'] = 'Handtekening met datum';
$lang['admin_register'] = 'Skep gerus \'n rekening';
-$lang['img_backto'] = 'Terug na';
-$lang['img_date'] = 'Datem';
-$lang['img_camera'] = 'Camera';
+$lang['btn_img_backto'] = 'Terug na %s';
+$lang['img_date'] = 'Datem:';
+$lang['img_camera'] = 'Camera:';
$lang['i_wikiname'] = 'Wiki Naam';
$lang['i_funcna'] = 'PHP funksie <code>%s</code> is nie beskibaar nie. Miskien is dit af gehaal.';
diff --git a/inc/lang/ar/denied.txt b/inc/lang/ar/denied.txt
index 11405233c..b369f7f23 100644
--- a/inc/lang/ar/denied.txt
+++ b/inc/lang/ar/denied.txt
@@ -1,3 +1,3 @@
====== لا صلاحيات ======
-عذرا، ليس مصرح لك الاستمرار، لعلك نسيت تسجيل الدخول؟ \ No newline at end of file
+عذرا، ليس مصرح لك الاستمرار \ No newline at end of file
diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php
index 157513429..a63e1ed44 100644
--- a/inc/lang/ar/lang.php
+++ b/inc/lang/ar/lang.php
@@ -53,7 +53,7 @@ $lang['btn_register'] = 'سجّل';
$lang['btn_apply'] = 'طبق';
$lang['btn_media'] = 'مدير الوسائط';
$lang['btn_deleteuser'] = 'احذف حسابي الخاص';
-$lang['loggedinas'] = 'داخل باسم';
+$lang['loggedinas'] = 'داخل باسم:';
$lang['user'] = 'اسم المستخدم';
$lang['pass'] = 'كلمة السر';
$lang['newpass'] = 'كلمة سر جديدة';
@@ -98,12 +98,12 @@ $lang['license'] = 'مالم يشر لخلاف ذلك، فإن ا
$lang['licenseok'] = 'لاحظ: بتحرير هذه الصفحة أنت توافق على ترخيص محتواها تحت الرخصة التالية:';
$lang['searchmedia'] = 'ابحث في أسماء الملفات:';
$lang['searchmedia_in'] = 'ابحث في %s';
-$lang['txt_upload'] = 'اختر ملفاً للرفع';
-$lang['txt_filename'] = 'رفع كـ (اختياري)';
+$lang['txt_upload'] = 'اختر ملفاً للرفع:';
+$lang['txt_filename'] = 'رفع كـ (اختياري):';
$lang['txt_overwrt'] = 'اكتب على ملف موجود';
$lang['maxuploadsize'] = 'الحجم الاقصى %s للملف';
-$lang['lockedby'] = 'مقفلة حاليا لـ';
-$lang['lockexpire'] = 'ينتهي القفل في';
+$lang['lockedby'] = 'مقفلة حاليا لـ:';
+$lang['lockexpire'] = 'ينتهي القفل في:';
$lang['js']['willexpire'] = 'سينتهي قفل تحرير هذه الصفحه خلال دقيقة.\nلتجنب التعارض استخدم زر المعاينة لتصفير مؤقت القفل.';
$lang['js']['notsavedyet'] = 'التعديلات غير المحفوظة ستفقد.';
$lang['js']['searchmedia'] = 'ابحث عن ملفات';
@@ -184,9 +184,9 @@ $lang['diff_type'] = 'أظهر الفروق:';
$lang['diff_inline'] = 'ضمنا';
$lang['diff_side'] = 'جنبا إلى جنب';
$lang['line'] = 'سطر';
-$lang['breadcrumb'] = 'أثر';
-$lang['youarehere'] = 'أنت هنا';
-$lang['lastmod'] = 'آخر تعديل';
+$lang['breadcrumb'] = 'أثر:';
+$lang['youarehere'] = 'أنت هنا:';
+$lang['lastmod'] = 'آخر تعديل:';
$lang['by'] = 'بواسطة';
$lang['deleted'] = 'حذفت';
$lang['created'] = 'اُنشئت';
@@ -239,20 +239,20 @@ $lang['admin_register'] = 'أضف مستخدما جديدا';
$lang['metaedit'] = 'تحرير البيانات الشمولية ';
$lang['metasaveerr'] = 'فشلت كتابة البيانات الشمولية';
$lang['metasaveok'] = 'حُفظت البيانات الشمولية';
-$lang['img_backto'] = 'عودة إلى';
-$lang['img_title'] = 'العنوان';
-$lang['img_caption'] = 'وصف';
-$lang['img_date'] = 'التاريخ';
-$lang['img_fname'] = 'اسم الملف';
-$lang['img_fsize'] = 'الحجم';
-$lang['img_artist'] = 'المصور';
-$lang['img_copyr'] = 'حقوق النسخ';
-$lang['img_format'] = 'الهيئة';
-$lang['img_camera'] = 'الكمرا';
-$lang['img_keywords'] = 'كلمات مفتاحية';
-$lang['img_width'] = 'العرض';
-$lang['img_height'] = 'الإرتفاع';
-$lang['img_manager'] = 'اعرض في مدير الوسائط';
+$lang['btn_img_backto'] = 'عودة إلى %s';
+$lang['img_title'] = 'العنوان:';
+$lang['img_caption'] = 'وصف:';
+$lang['img_date'] = 'التاريخ:';
+$lang['img_fname'] = 'اسم الملف:';
+$lang['img_fsize'] = 'الحجم:';
+$lang['img_artist'] = 'المصور:';
+$lang['img_copyr'] = 'حقوق النسخ:';
+$lang['img_format'] = 'الهيئة:';
+$lang['img_camera'] = 'الكمرا:';
+$lang['img_keywords'] = 'كلمات مفتاحية:';
+$lang['img_width'] = 'العرض:';
+$lang['img_height'] = 'الإرتفاع:';
+$lang['btn_mediaManager'] = 'اعرض في مدير الوسائط';
$lang['subscr_subscribe_success'] = 'اضيف %s لقائمة اشتراك %s';
$lang['subscr_subscribe_error'] = 'خطأ في إضافة %s لقائمة اشتراك %s';
$lang['subscr_subscribe_noaddress'] = 'ليس هناك عنوان مرتبط بولوجك، لا يمكن اضافتك لقائمة الاشتراك';
diff --git a/inc/lang/az/denied.txt b/inc/lang/az/denied.txt
index a68b08c8c..c6fddb63a 100644
--- a/inc/lang/az/denied.txt
+++ b/inc/lang/az/denied.txt
@@ -1,3 +1,3 @@
====== Müraciət qadağan edilmişdir ======
-Sizin bu əməliyyat üçün kifayət qədər haqqınız yoxdur. Bəlkə, Siz sistemə oz istifadəçi adınız ilə girməyi unutmusunuz?
+Sizin bu əməliyyat üçün kifayət qədər haqqınız yoxdur.
diff --git a/inc/lang/az/lang.php b/inc/lang/az/lang.php
index df54b4f10..5edcfbe58 100644
--- a/inc/lang/az/lang.php
+++ b/inc/lang/az/lang.php
@@ -44,7 +44,7 @@ $lang['btn_recover'] = 'Qaralamanı qaytar';
$lang['btn_draftdel'] = 'Qaralamanı sil';
$lang['btn_revert'] = 'Qaytar';
$lang['btn_register'] = 'Qeydiyyatdan keç';
-$lang['loggedinas'] = 'İstifadəcinin adı';
+$lang['loggedinas'] = 'İstifadəcinin adı:';
$lang['user'] = 'istifadəci adı';
$lang['pass'] = 'Şifrə';
$lang['newpass'] = 'Yeni şifrə';
@@ -82,10 +82,10 @@ $lang['license'] = 'Fərqli şey göstərilmiş hallardan başqa,
$lang['licenseok'] = 'Qeyd: bu səhifəni düzəliş edərək, Siz elədiyiniz düzəlişi aşağıda göstərilmiş lisenziyanın şərtlərinə uyğun istifadəsinə razılıq verirsiniz:';
$lang['searchmedia'] = 'Faylın adına görə axtarış:';
$lang['searchmedia_in'] = '%s-ın içində axtarış';
-$lang['txt_upload'] = 'Serverə yükləmək üçün fayl seçin';
-$lang['txt_filename'] = 'Faylın wiki-də olan adını daxil edin (mütləq deyil)';
+$lang['txt_upload'] = 'Serverə yükləmək üçün fayl seçin:';
+$lang['txt_filename'] = 'Faylın wiki-də olan adını daxil edin (mütləq deyil):';
$lang['txt_overwrt'] = 'Mövcud olan faylın üstündən yaz';
-$lang['lockedby'] = 'В данный момент заблокирован Bu an blokdadır';
+$lang['lockedby'] = 'В данный момент заблокирован Bu an blokdadır:';
$lang['lockexpire'] = 'Blok bitir:';
$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['rssfailed'] = 'Aşağıda göstərilmiş xəbər lentini əldə edən zaman xəta baş verdi: ';
@@ -128,9 +128,9 @@ $lang['yours'] = 'Sizin versiyanız';
$lang['diff'] = 'hazırki versiyadan fərqləri göstər';
$lang['diff2'] = 'Versiyaların arasındaki fərqləri göstər ';
$lang['line'] = 'Sətr';
-$lang['breadcrumb'] = 'Siz ziyarət etdiniz';
-$lang['youarehere'] = 'Siz burdasınız';
-$lang['lastmod'] = 'Son dəyişiklər';
+$lang['breadcrumb'] = 'Siz ziyarət etdiniz:';
+$lang['youarehere'] = 'Siz burdasınız:';
+$lang['lastmod'] = 'Son dəyişiklər:';
$lang['by'] = ' Kimdən';
$lang['deleted'] = 'silinib';
$lang['created'] = 'yaranıb';
@@ -172,17 +172,17 @@ $lang['admin_register'] = 'İstifadəçi əlavə et';
$lang['metaedit'] = 'Meta-məlumatlarda düzəliş et';
$lang['metasaveerr'] = 'Meta-məlumatları yazan zamanı xəta';
$lang['metasaveok'] = 'Meta-məlumatlar yadda saxlandı';
-$lang['img_backto'] = 'Qayıd';
-$lang['img_title'] = 'Başlıq';
-$lang['img_caption'] = 'İmza';
-$lang['img_date'] = 'Tarix';
-$lang['img_fname'] = 'Faylın adı';
-$lang['img_fsize'] = 'Boy';
-$lang['img_artist'] = 'Şkilin müəllifi';
-$lang['img_copyr'] = 'Müəllif hüquqları';
-$lang['img_format'] = 'Format';
-$lang['img_camera'] = 'Model';
-$lang['img_keywords'] = 'Açar sözlər';
+$lang['btn_img_backto'] = 'Qayıd %s';
+$lang['img_title'] = 'Başlıq:';
+$lang['img_caption'] = 'İmza:';
+$lang['img_date'] = 'Tarix:';
+$lang['img_fname'] = 'Faylın adı:';
+$lang['img_fsize'] = 'Boy:';
+$lang['img_artist'] = 'Şkilin müəllifi:';
+$lang['img_copyr'] = 'Müəllif hüquqları:';
+$lang['img_format'] = 'Format:';
+$lang['img_camera'] = 'Model:';
+$lang['img_keywords'] = 'Açar sözlər:';
$lang['authtempfail'] = 'İstifadəçilərin autentifikasiyası müvəqqəti dayandırılıb. Əgər bu problem uzun müddət davam edir sə, administrator ilə əlaqə saxlayın.';
$lang['i_chooselang'] = 'Dili seçin/Language';
$lang['i_installer'] = 'DokuWiki quraşdırılır';
diff --git a/inc/lang/bg/denied.txt b/inc/lang/bg/denied.txt
index 45ce63769..bd695d46d 100644
--- a/inc/lang/bg/denied.txt
+++ b/inc/lang/bg/denied.txt
@@ -1,4 +1,4 @@
====== Отказан достъп ======
-Нямате достатъчно права, за да продължите. Може би сте забравили да се впишете?
+Нямате достатъчно права, за да продължите.
diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php
index bb74ff1ca..bfa8b2ad7 100644
--- a/inc/lang/bg/lang.php
+++ b/inc/lang/bg/lang.php
@@ -50,8 +50,8 @@ $lang['btn_revert'] = 'Възстановяване';
$lang['btn_register'] = 'Регистриране';
$lang['btn_apply'] = 'Прилагане';
$lang['btn_media'] = 'Диспечер на файлове';
-$lang['btn_deleteuser'] = 'Изтрий профила ми';
-$lang['loggedinas'] = 'Вписани сте като';
+$lang['btn_deleteuser'] = 'Изтриване на профила';
+$lang['loggedinas'] = 'Вписани сте като:';
$lang['user'] = 'Потребител';
$lang['pass'] = 'Парола';
$lang['newpass'] = 'Нова парола';
@@ -62,7 +62,7 @@ $lang['fullname'] = 'Истинско име';
$lang['email'] = 'Електронна поща';
$lang['profile'] = 'Потребителски профил';
$lang['badlogin'] = 'Грешно потребителско име или парола.';
-$lang['badpassconfirm'] = 'Съжаляваме, паролата е грешна';
+$lang['badpassconfirm'] = 'За съжаление паролата е грешна';
$lang['minoredit'] = 'Промените са незначителни';
$lang['draftdate'] = 'Черновата е автоматично записана на';
$lang['nosecedit'] = 'Страницата бе междувременно променена, презареждане на страницата поради неактуална информация.';
@@ -77,13 +77,13 @@ $lang['regpwmail'] = 'Паролата ви за DokuWiki';
$lang['reghere'] = 'Все още нямате профил? Направете си';
$lang['profna'] = 'Wiki-то не поддържа промяна на профила';
$lang['profnochange'] = 'Няма промени.';
-$lang['profnoempty'] = 'Въвеждането на име и ел. поща е задължително';
+$lang['profnoempty'] = 'Въвеждането на име и имейл е задължително';
$lang['profchanged'] = 'Потребителският профил е обновен успешно.';
-$lang['profnodelete'] = 'Не е възможно изтриване на потребители в това wiki ';
-$lang['profdeleteuser'] = 'Изтрий профила ми';
+$lang['profnodelete'] = 'Изтриването на потребители в това wiki не е възможно';
+$lang['profdeleteuser'] = 'Изтриване на профила';
$lang['profdeleted'] = 'Вашият профил е премахнат от това wiki ';
-$lang['profconfdelete'] = 'Искам да изтрия профила си от това wiki. <br/> Веднъж изтрит, профила не може да бъде възстановен!';
-$lang['profconfdeletemissing'] = 'Не и маркирана опцията за потвърждение';
+$lang['profconfdelete'] = 'Искам да изтрия профила си от това wiki. <br/> Веднъж изтрит, профилът не може да бъде възстановен!';
+$lang['profconfdeletemissing'] = 'Не сте поставили отметка в кутията потвърждение';
$lang['pwdforget'] = 'Забравили сте паролата си? Получете нова';
$lang['resendna'] = 'Wiki-то не поддържа повторно пращане на паролата.';
$lang['resendpwd'] = 'Задаване на нова парола за';
@@ -96,12 +96,12 @@ $lang['license'] = 'Ако не е посочено друго, с
$lang['licenseok'] = 'Бележка: Редактирайки страницата, Вие се съгласявате да лицензирате промените (които сте направили) под следния лиценз:';
$lang['searchmedia'] = 'Търсене на файл: ';
$lang['searchmedia_in'] = 'Търсене в %s';
-$lang['txt_upload'] = 'Изберете файл за качване';
-$lang['txt_filename'] = 'Качи като (незадължително)';
+$lang['txt_upload'] = 'Изберете файл за качване:';
+$lang['txt_filename'] = 'Качи като (незадължително):';
$lang['txt_overwrt'] = 'Презапиши съществуващите файлове';
$lang['maxuploadsize'] = 'Макс. размер за отделните файлове е %s.';
-$lang['lockedby'] = 'В момента е заключена от';
-$lang['lockexpire'] = 'Ще бъде отключена на';
+$lang['lockedby'] = 'В момента е заключена от:';
+$lang['lockexpire'] = 'Ще бъде отключена на:';
$lang['js']['willexpire'] = 'Страницата ще бъде отключена за редактиране след минута.\nЗа предотвратяване на конфликти, ползвайте бутона "Преглед", за рестартиране на брояча за заключване.';
$lang['js']['notsavedyet'] = 'Незаписаните промени ще бъдат загубени. Желаете ли да продължите?';
$lang['js']['searchmedia'] = 'Търсене на файлове';
@@ -140,7 +140,7 @@ $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_drop'] = 'Влачете и пуснете файлове тук, за да бъдат качени';
$lang['js']['media_cancel'] = 'премахване';
$lang['js']['media_overwrt'] = 'Презапиши съществуващите файлове';
$lang['rssfailed'] = 'Възникна грешка при получаването на емисията: ';
@@ -164,7 +164,7 @@ $lang['accessdenied'] = 'Нямате необходимите прав
$lang['mediausage'] = 'Ползвайте следния синтаксис, за да упоменете файла:';
$lang['mediaview'] = 'Преглед на оригиналния файл';
$lang['mediaroot'] = 'root';
-$lang['mediaupload'] = 'Качете файл в текущото именно пространство. За създаване на подимено пространство, добавете име преди това на файла като ги разделите с двоеточие в полето "Качи като"';
+$lang['mediaupload'] = 'Качете файл в текущото именно пространство. За създаване на подименно пространство, добавете име преди това на файла като ги разделите с двоеточие в полето "Качи като"';
$lang['mediaextchange'] = 'Разширението на файла е сменено от .%s на .%s!';
$lang['reference'] = 'Връзки за';
$lang['ref_inuse'] = 'Файлът не може да бъде изтрит, защото все още се ползва от следните страници:';
@@ -181,9 +181,9 @@ $lang['diff_type'] = 'Преглед на разликите:';
$lang['diff_inline'] = 'Вграден';
$lang['diff_side'] = 'Един до друг';
$lang['line'] = 'Ред';
-$lang['breadcrumb'] = 'Следа';
-$lang['youarehere'] = 'Намирате се в';
-$lang['lastmod'] = 'Последна промяна';
+$lang['breadcrumb'] = 'Следа:';
+$lang['youarehere'] = 'Намирате се в:';
+$lang['lastmod'] = 'Последна промяна:';
$lang['by'] = 'от';
$lang['deleted'] = 'изтрита';
$lang['created'] = 'създадена';
@@ -236,23 +236,23 @@ $lang['admin_register'] = 'Добавяне на нов потребит
$lang['metaedit'] = 'Редактиране на метаданни';
$lang['metasaveerr'] = 'Записването на метаданните се провали';
$lang['metasaveok'] = 'Метаданните са запазени успешно';
-$lang['img_backto'] = 'Назад към';
-$lang['img_title'] = 'Заглавие';
-$lang['img_caption'] = 'Надпис';
-$lang['img_date'] = 'Дата';
-$lang['img_fname'] = 'Име на файла';
-$lang['img_fsize'] = 'Размер';
-$lang['img_artist'] = 'Фотограф';
-$lang['img_copyr'] = 'Авторско право';
-$lang['img_format'] = 'Формат';
-$lang['img_camera'] = 'Фотоапарат';
-$lang['img_keywords'] = 'Ключови думи';
-$lang['img_width'] = 'Ширина';
-$lang['img_height'] = 'Височина';
-$lang['img_manager'] = 'Преглед в диспечера на файлове';
+$lang['btn_img_backto'] = 'Назад към %s';
+$lang['img_title'] = 'Заглавие:';
+$lang['img_caption'] = 'Надпис:';
+$lang['img_date'] = 'Дата:';
+$lang['img_fname'] = 'Име на файла:';
+$lang['img_fsize'] = 'Размер:';
+$lang['img_artist'] = 'Фотограф:';
+$lang['img_copyr'] = 'Авторско право:';
+$lang['img_format'] = 'Формат:';
+$lang['img_camera'] = 'Фотоапарат:';
+$lang['img_keywords'] = 'Ключови думи:';
+$lang['img_width'] = 'Ширина:';
+$lang['img_height'] = 'Височина:';
+$lang['btn_mediaManager'] = 'Преглед в диспечера на файлове';
$lang['subscr_subscribe_success'] = '%s е добавен към списъка с абониралите се за %s';
$lang['subscr_subscribe_error'] = 'Грешка при добавянето на %s към списъка с абониралите се за %s';
-$lang['subscr_subscribe_noaddress'] = 'Добавянето ви към списъка с абонати не е възможно поради липсата на свързан адрес (на ел. поща) с профила ви.';
+$lang['subscr_subscribe_noaddress'] = 'Добавянето ви към списъка с абонати не е възможно поради липсата на свързан адрес (имейл) с профила ви.';
$lang['subscr_unsubscribe_success'] = '%s е премахнат от списъка с абониралите се за %s';
$lang['subscr_unsubscribe_error'] = 'Грешка при премахването на %s от списъка с абониралите се за %s';
$lang['subscr_already_subscribed'] = '%s е вече абониран за %s';
@@ -263,12 +263,12 @@ $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'] = 'на ел. писмо с обобщение на промените във всяка страница (всеки %.2f дни)';
-$lang['subscr_style_list'] = 'на списък с променените страници от последното ел. писмо (всеки %.2f дни)';
+$lang['subscr_style_every'] = 'на имейл при всяка промяна';
+$lang['subscr_style_digest'] = 'на имейл с обобщение на промените във всяка страница (всеки %.2f дни)';
+$lang['subscr_style_list'] = 'на списък с променените страници от последния имейл (всеки %.2f дни)';
$lang['authtempfail'] = 'Удостоверяването на потребители не е възможно за момента. Ако продължи дълго, моля уведомете администратора на Wiki страницата.';
-$lang['authpwdexpire'] = 'Срока на паролата ви ще изтече след %d дни. Препорачително е да я смените по-скоро.';
-$lang['i_chooselang'] = 'Изберете вашия изик';
+$lang['authpwdexpire'] = 'Срока на паролата ви ще изтече след %d дни. Препоръчително е да я смените по-скоро.';
+$lang['i_chooselang'] = 'Изберете вашия език';
$lang['i_installer'] = 'Инсталатор на DokuWiki';
$lang['i_wikiname'] = 'Име на Wiki-то';
$lang['i_enableacl'] = 'Ползване на списък за достъп (ACL) [препоръчително]';
diff --git a/inc/lang/bg/register.txt b/inc/lang/bg/register.txt
index 51fbb83fe..333428005 100644
--- a/inc/lang/bg/register.txt
+++ b/inc/lang/bg/register.txt
@@ -1,4 +1,4 @@
====== Регистриране като нов потребител ======
-Моля, попълнете всичките полета отдолу, за да бъде създаден нов профил. Уверете се, че въведеният **адрес на ел. поща е правилен**. Ако няма поле за парола, ще ви бъде изпратена такава на въведения адрес. Потребителското име трябва да бъде валидно [[doku>pagename|име на страница]].
+Моля, попълнете всичките полета отдолу, за да бъде създаден нов профил. Уверете се, че въведеният **имейл адрес е правилен**. Ако няма поле за парола, ще ви бъде изпратена такава на въведения адрес. Потребителското име трябва да бъде валидно [[doku>pagename|име на страница]].
diff --git a/inc/lang/bg/resendpwd.txt b/inc/lang/bg/resendpwd.txt
index 38e2d1fe4..19dffc070 100644
--- a/inc/lang/bg/resendpwd.txt
+++ b/inc/lang/bg/resendpwd.txt
@@ -1,3 +1,3 @@
====== Пращане на нова парола ======
-Моля, въведете потребителското си име във формата по-долу, ако желаете да получите нова парола. По ел. поща ще получите линк, с който да потвърдите.
+Моля, въведете потребителското си име във формата по-долу, ако желаете да получите нова парола. Чрез имейл ще получите линк, с който да потвърдите.
diff --git a/inc/lang/bn/denied.txt b/inc/lang/bn/denied.txt
index 711275bad..5ba0fcf4f 100644
--- a/inc/lang/bn/denied.txt
+++ b/inc/lang/bn/denied.txt
@@ -1,3 +1,3 @@
====== অনুমতি অস্বীকার =====
-দুঃখিত, আপনি কি এগিয়ে যেতে যথেষ্ট অধিকার নেই. সম্ভবত আপনি লগইন ভুলে গেছেন? \ No newline at end of file
+দুঃখিত, আপনি কি এগিয়ে যেতে যথেষ্ট অধিকার নেই. \ No newline at end of file
diff --git a/inc/lang/bn/lang.php b/inc/lang/bn/lang.php
index 5d9ee59a0..2791bd50d 100644
--- a/inc/lang/bn/lang.php
+++ b/inc/lang/bn/lang.php
@@ -5,6 +5,7 @@
*
* @author Foysol <ragebot1125@gmail.com>
* @author ninetailz <ninetailz1125@gmail.com>
+ * @author Khan M. B. Asad <muhammad2017@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'itr';
@@ -49,7 +50,7 @@ $lang['btn_register'] = 'খাতা';
$lang['btn_apply'] = 'প্রয়োগ করা';
$lang['btn_media'] = 'মিডিয়া ম্যানেজার';
$lang['btn_deleteuser'] = 'আমার অ্যাকাউন্ট অপসারণ করুন';
-$lang['loggedinas'] = 'লগ ইন';
+$lang['loggedinas'] = 'লগ ইন:';
$lang['user'] = 'ইউজারনেম';
$lang['pass'] = 'পাসওয়ার্ড';
$lang['newpass'] = 'নতুন পাসওয়ার্ড';
@@ -95,12 +96,12 @@ $lang['license'] = 'অন্যথায় নোট যেখ
$lang['licenseok'] = 'দ্রষ্টব্য: আপনি নিম্নলিখিত লাইসেন্সের অধীনে আপনার বিষয়বস্তু লাইসেন্স সম্মত হন এই পৃষ্ঠার সম্পাদনার দ্বারা:';
$lang['searchmedia'] = 'অনুসন্ধান ফাইলের নাম:';
$lang['searchmedia_in'] = 'অনুসন্ধান %s -এ';
-$lang['txt_upload'] = 'আপলোড করার জন্য নির্বাচন করুন ফাইল';
-$lang['txt_filename'] = 'হিসাবে আপলোড করুন (ঐচ্ছিক)';
+$lang['txt_upload'] = 'আপলোড করার জন্য নির্বাচন করুন ফাইল:';
+$lang['txt_filename'] = 'হিসাবে আপলোড করুন (ঐচ্ছিক):';
$lang['txt_overwrt'] = 'বিদ্যমান ফাইল মুছে যাবে';
$lang['maxuploadsize'] = 'সর্বোচ্চ আপলোড করুন. %s-ফাইলের প্রতি.';
-$lang['lockedby'] = 'বর্তমানে দ্বারা লক';
-$lang['lockexpire'] = 'তালা এ মেয়াদ শেষ';
+$lang['lockedby'] = 'বর্তমানে দ্বারা লক:';
+$lang['lockexpire'] = 'তালা এ মেয়াদ শেষ:';
$lang['js']['willexpire'] = 'এই পৃষ্ঠার সম্পাদনার জন্য আপনার লক এক মিনিটের মধ্যে মেয়াদ শেষ সম্পর্কে. \ দ্বন্দ্ব লক টাইমার রিসেট প্রিভিউ বাটন ব্যবহার এড়াতে.';
$lang['js']['notsavedyet'] = 'অসংরক্ষিত পরিবর্তন হারিয়ে যাবে.';
$lang['js']['searchmedia'] = 'ফাইলের জন্য অনুসন্ধান';
@@ -117,3 +118,43 @@ $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'] = 'কোনো সারিবদ্ধ করা প্রয়োজন নেই';
+$lang['js']['nosmblinks'] = 'উইন্ডোস শেয়ার এর সাথে সংযোগ সাধন কেবল মাইক্রোসফ্ট ইন্টারনেট এক্সপ্লোরারেই সম্ভব।\nতবে আপনি লিংকটি কপি পেস্ট করতেই পারেন।';
+$lang['js']['linkwiz'] = 'লিংক উইজার্ড';
+$lang['js']['linkto'] = 'সংযোগের লক্ষ্য:';
+$lang['js']['del_confirm'] = 'নির্বাচিত আইটেম(গুলো) আসলেই মুছে ফেলতে চান?';
+$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'] = 'আপলোড সফল';
+$lang['uploadfail'] = 'আপলোড ব্যর্থ। অনুমতি জনিত ত্রুটি কী?';
+$lang['uploadwrong'] = 'আপলোড প্রত্যাখ্যাত। এই ফাইল এক্সটেনশন অননুমোদিত।';
+$lang['uploadexist'] = 'ফাইল ইতিমধ্যেই বিরাজমান। কিছু করা হয়নি।';
+$lang['uploadbadcontent'] = 'আপলোডকৃত সামগ্রী %s ফাইল এক্সটেনশন এর সাথে মিলেনি।';
+$lang['uploadspam'] = 'স্প্যাম ব্ল্যাকলিস্ট আপলোড আটকে দিয়েছে।';
+$lang['uploadxss'] = 'সামগ্রীটি ক্ষতিকর ভেবে আপলোড আটকে দেয়া হয়েছে।';
+$lang['uploadsize'] = 'আপলোডকৃত ফাইলটি বেশি বড়ো। (সর্বোচ্চ %s)';
+$lang['deletesucc'] = '"%s" ফাইলটি মুছে ফেলা হয়েছে।';
+$lang['deletefail'] = '"%s" ডিলিট করা যায়নি - অনুমতি আছে কি না দেখুন।';
+$lang['mediainuse'] = '"%s" ফাইলটি মোছা হয়নি - এটি এখনো ব্যবহৃত হচ্ছে।';
diff --git a/inc/lang/ca-valencia/denied.txt b/inc/lang/ca-valencia/denied.txt
index 39c45d946..6640e07f5 100644
--- a/inc/lang/ca-valencia/denied.txt
+++ b/inc/lang/ca-valencia/denied.txt
@@ -1,4 +1,4 @@
====== Permís denegat ======
-Disculpe, pero no té permís per a continuar. ¿Haurà oblidat iniciar sessió?
+Disculpe, pero no té permís per a continuar.
diff --git a/inc/lang/ca-valencia/lang.php b/inc/lang/ca-valencia/lang.php
index 9ab423783..98607d322 100644
--- a/inc/lang/ca-valencia/lang.php
+++ b/inc/lang/ca-valencia/lang.php
@@ -45,7 +45,7 @@ $lang['btn_recover'] = 'Recuperar borrador';
$lang['btn_draftdel'] = 'Borrar borrador';
$lang['btn_revert'] = 'Recuperar';
$lang['btn_register'] = 'Registrar-se';
-$lang['loggedinas'] = 'Sessió de';
+$lang['loggedinas'] = 'Sessió de:';
$lang['user'] = 'Nom d\'usuari';
$lang['pass'] = 'Contrasenya';
$lang['newpass'] = 'Contrasenya nova';
@@ -83,11 +83,11 @@ $lang['license'] = 'Excepte quan s\'indique una atra cosa, el cont
$lang['licenseok'] = 'Nota: a l\'editar esta pàgina accepta llicenciar el seu contingut baix la següent llicència:';
$lang['searchmedia'] = 'Buscar nom d\'archiu:';
$lang['searchmedia_in'] = 'Buscar en %s';
-$lang['txt_upload'] = 'Seleccione l\'archiu que vol pujar';
-$lang['txt_filename'] = 'Enviar com (opcional)';
+$lang['txt_upload'] = 'Seleccione l\'archiu que vol pujar:';
+$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['lockedby'] = 'Actualment bloquejat per:';
+$lang['lockexpire'] = 'El bloqueig venç a les:';
$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: ';
@@ -130,9 +130,9 @@ $lang['yours'] = 'La seua versió';
$lang['diff'] = 'Mostrar diferències en la versió actual';
$lang['diff2'] = 'Mostrar diferències entre versions';
$lang['line'] = 'Llínea';
-$lang['breadcrumb'] = 'Traça';
-$lang['youarehere'] = 'Vosté està ací';
-$lang['lastmod'] = 'Última modificació el';
+$lang['breadcrumb'] = 'Traça:';
+$lang['youarehere'] = 'Vosté està ací:';
+$lang['lastmod'] = 'Última modificació el:';
$lang['by'] = 'per';
$lang['deleted'] = 'borrat';
$lang['created'] = 'creat';
@@ -174,17 +174,17 @@ $lang['admin_register'] = 'Afegir nou usuari';
$lang['metaedit'] = 'Editar meta-senyes';
$lang['metasaveerr'] = 'Erro escrivint meta-senyes';
$lang['metasaveok'] = 'Meta-senyes guardades';
-$lang['img_backto'] = 'Tornar a';
-$lang['img_title'] = 'Títul';
-$lang['img_caption'] = 'Subtítul';
-$lang['img_date'] = 'Data';
-$lang['img_fname'] = 'Nom de l\'archiu';
-$lang['img_fsize'] = 'Tamany';
-$lang['img_artist'] = 'Fotógraf';
-$lang['img_copyr'] = 'Copyright';
-$lang['img_format'] = 'Format';
-$lang['img_camera'] = 'Càmara';
-$lang['img_keywords'] = 'Paraules clau';
+$lang['btn_img_backto'] = 'Tornar a %s';
+$lang['img_title'] = 'Títul:';
+$lang['img_caption'] = 'Subtítul:';
+$lang['img_date'] = 'Data:';
+$lang['img_fname'] = 'Nom de l\'archiu:';
+$lang['img_fsize'] = 'Tamany:';
+$lang['img_artist'] = 'Fotógraf:';
+$lang['img_copyr'] = 'Copyright:';
+$lang['img_format'] = 'Format:';
+$lang['img_camera'] = 'Càmara:';
+$lang['img_keywords'] = 'Paraules clau:';
$lang['authtempfail'] = 'L\'autenticació d\'usuaris està desactivada temporalment. Si la situació persistix, per favor, informe a l\'administrador del Wiki.';
$lang['i_chooselang'] = 'Trie l\'idioma';
$lang['i_installer'] = 'Instalador de DokuWiki';
diff --git a/inc/lang/ca/denied.txt b/inc/lang/ca/denied.txt
index e6125e83b..3f66d6bb6 100644
--- a/inc/lang/ca/denied.txt
+++ b/inc/lang/ca/denied.txt
@@ -1,4 +1,4 @@
====== Permís denegat ======
-No teniu prou drets per continuar. Potser us heu descuidat d'entrar?
+No teniu prou drets per continuar.
diff --git a/inc/lang/ca/lang.php b/inc/lang/ca/lang.php
index fd19c6834..00d28083c 100644
--- a/inc/lang/ca/lang.php
+++ b/inc/lang/ca/lang.php
@@ -48,7 +48,7 @@ $lang['btn_draftdel'] = 'Suprimeix esborrany';
$lang['btn_revert'] = 'Restaura';
$lang['btn_register'] = 'Registra\'m';
$lang['btn_apply'] = 'Aplica';
-$lang['loggedinas'] = 'Heu entrat com';
+$lang['loggedinas'] = 'Heu entrat com:';
$lang['user'] = 'Nom d\'usuari';
$lang['pass'] = 'Contrasenya';
$lang['newpass'] = 'Nova contrasenya';
@@ -87,8 +87,8 @@ $lang['license'] = 'Excepte on es digui una altra cosa, el conting
$lang['licenseok'] = 'Nota. En editar aquesta pàgina esteu acceptant que el vostre contingut estigui subjecte a la llicència següent:';
$lang['searchmedia'] = 'Cerca pel nom de fitxer';
$lang['searchmedia_in'] = 'Cerca en: %s';
-$lang['txt_upload'] = 'Trieu el fitxer que voleu penjar';
-$lang['txt_filename'] = 'Introduïu el nom wiki (opcional)';
+$lang['txt_upload'] = 'Trieu el fitxer que voleu penjar:';
+$lang['txt_filename'] = 'Introduïu el nom wiki (opcional):';
$lang['txt_overwrt'] = 'Sobreescriu el fitxer actual';
$lang['maxuploadsize'] = 'Puja com a màxim %s per arxiu.';
$lang['lockedby'] = 'Actualment blocat per:';
@@ -174,9 +174,9 @@ $lang['diff_type'] = 'Veieu les diferències:';
$lang['diff_inline'] = 'En línia';
$lang['diff_side'] = 'Un al costat de l\'altre';
$lang['line'] = 'Línia';
-$lang['breadcrumb'] = 'Camí';
-$lang['youarehere'] = 'Sou aquí';
-$lang['lastmod'] = 'Darrera modificació';
+$lang['breadcrumb'] = 'Camí:';
+$lang['youarehere'] = 'Sou aquí:';
+$lang['lastmod'] = 'Darrera modificació:';
$lang['by'] = 'per';
$lang['deleted'] = 'suprimit';
$lang['created'] = 'creat';
@@ -228,19 +228,19 @@ $lang['admin_register'] = 'Afegeix nou usuari';
$lang['metaedit'] = 'Edita metadades';
$lang['metasaveerr'] = 'No s\'han pogut escriure les metadades';
$lang['metasaveok'] = 'S\'han desat les metadades';
-$lang['img_backto'] = 'Torna a';
-$lang['img_title'] = 'Títol';
-$lang['img_caption'] = 'Peu d\'imatge';
-$lang['img_date'] = 'Data';
-$lang['img_fname'] = 'Nom de fitxer';
-$lang['img_fsize'] = 'Mida';
-$lang['img_artist'] = 'Fotògraf';
-$lang['img_copyr'] = 'Copyright';
-$lang['img_format'] = 'Format';
-$lang['img_camera'] = 'Càmera';
-$lang['img_keywords'] = 'Paraules clau';
-$lang['img_width'] = 'Ample';
-$lang['img_height'] = 'Alçada';
+$lang['btn_img_backto'] = 'Torna a %s';
+$lang['img_title'] = 'Títol:';
+$lang['img_caption'] = 'Peu d\'imatge:';
+$lang['img_date'] = 'Data:';
+$lang['img_fname'] = 'Nom de fitxer:';
+$lang['img_fsize'] = 'Mida:';
+$lang['img_artist'] = 'Fotògraf:';
+$lang['img_copyr'] = 'Copyright:';
+$lang['img_format'] = 'Format:';
+$lang['img_camera'] = 'Càmera:';
+$lang['img_keywords'] = 'Paraules clau:';
+$lang['img_width'] = 'Ample:';
+$lang['img_height'] = 'Alçada:';
$lang['subscr_subscribe_success'] = 'S\'ha afegit %s a la llista de subscripcions per %s';
$lang['subscr_subscribe_error'] = 'Hi ha hagut un error a l\'afegir %s a la llista per %s';
$lang['subscr_subscribe_noaddress'] = 'No hi ha cap adreça associada pel vostre nom d\'usuari, no podeu ser afegit a la llista de subscripcions';
diff --git a/inc/lang/cs/denied.txt b/inc/lang/cs/denied.txt
index 00a8811de..29524e5db 100644
--- a/inc/lang/cs/denied.txt
+++ b/inc/lang/cs/denied.txt
@@ -1,3 +1,3 @@
====== Nepovolená akce ======
-Promiňte, ale nemáte dostatečná oprávnění k této činnosti. Možná jste se zapomněli přihlásit?
+Promiňte, ale nemáte dostatečná oprávnění k této činnosti.
diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php
index a0f69b3dc..fa0a65044 100644
--- a/inc/lang/cs/lang.php
+++ b/inc/lang/cs/lang.php
@@ -15,8 +15,8 @@
* @author Jakub A. Těšínský (j@kub.cz)
* @author mkucera66@seznam.cz
* @author Zbyněk Křivka <krivka@fit.vutbr.cz>
- * @author Gerrit Uitslag <klapinklapin@gmail.com>
* @author Petr Klíma <qaxi@seznam.cz>
+ * @author Radovan Buroň <radovan@buron.cz>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -61,7 +61,9 @@ $lang['btn_register'] = 'Registrovat';
$lang['btn_apply'] = 'Použít';
$lang['btn_media'] = 'Správa médií';
$lang['btn_deleteuser'] = 'Odstranit můj účet';
-$lang['loggedinas'] = 'Přihlášen(a) jako';
+$lang['btn_img_backto'] = 'Zpět na %s';
+$lang['btn_mediaManager'] = 'Zobrazit ve správě médií';
+$lang['loggedinas'] = 'Přihlášen(a) jako:';
$lang['user'] = 'Uživatelské jméno';
$lang['pass'] = 'Heslo';
$lang['newpass'] = 'Nové heslo';
@@ -106,8 +108,8 @@ $lang['license'] = 'Kromě míst, kde je explicitně uvedeno jinak
$lang['licenseok'] = 'Poznámka: Tím, že editujete tuto stránku, souhlasíte, aby váš obsah byl licencován pod následující licencí:';
$lang['searchmedia'] = 'Hledat jméno souboru:';
$lang['searchmedia_in'] = 'Hledat v %s';
-$lang['txt_upload'] = 'Vyberte soubor jako přílohu';
-$lang['txt_filename'] = 'Wiki jméno (volitelné)';
+$lang['txt_upload'] = 'Vyberte soubor jako přílohu:';
+$lang['txt_filename'] = 'Wiki jméno (volitelné):';
$lang['txt_overwrt'] = 'Přepsat existující soubor';
$lang['maxuploadsize'] = 'Max. velikost souboru %s';
$lang['lockedby'] = 'Právě zamknuto:';
@@ -193,9 +195,9 @@ $lang['diff_type'] = 'Zobrazit rozdíly:';
$lang['diff_inline'] = 'Vložené';
$lang['diff_side'] = 'Přidané';
$lang['line'] = 'Řádek';
-$lang['breadcrumb'] = 'Historie';
-$lang['youarehere'] = 'Umístění';
-$lang['lastmod'] = 'Poslední úprava';
+$lang['breadcrumb'] = 'Historie:';
+$lang['youarehere'] = 'Umístění:';
+$lang['lastmod'] = 'Poslední úprava:';
$lang['by'] = 'autor:';
$lang['deleted'] = 'odstraněno';
$lang['created'] = 'vytvořeno';
@@ -248,20 +250,18 @@ $lang['admin_register'] = 'Přidat nového uživatele';
$lang['metaedit'] = 'Upravit Metadata';
$lang['metasaveerr'] = 'Chyba při zápisu metadat';
$lang['metasaveok'] = 'Metadata uložena';
-$lang['img_backto'] = 'Zpět na';
-$lang['img_title'] = 'Titulek';
-$lang['img_caption'] = 'Popis';
-$lang['img_date'] = 'Datum';
-$lang['img_fname'] = 'Jméno souboru';
-$lang['img_fsize'] = 'Velikost';
-$lang['img_artist'] = 'Autor fotografie';
-$lang['img_copyr'] = 'Copyright';
-$lang['img_format'] = 'Formát';
-$lang['img_camera'] = 'Typ fotoaparátu';
-$lang['img_keywords'] = 'Klíčová slova';
-$lang['img_width'] = 'Šířka';
-$lang['img_height'] = 'Výška';
-$lang['img_manager'] = 'Zobrazit ve správě médií';
+$lang['img_title'] = 'Titulek:';
+$lang['img_caption'] = 'Popis:';
+$lang['img_date'] = 'Datum:';
+$lang['img_fname'] = 'Jméno souboru:';
+$lang['img_fsize'] = 'Velikost:';
+$lang['img_artist'] = 'Autor fotografie:';
+$lang['img_copyr'] = 'Copyright:';
+$lang['img_format'] = 'Formát:';
+$lang['img_camera'] = 'Typ fotoaparátu:';
+$lang['img_keywords'] = 'Klíčová slova:';
+$lang['img_width'] = 'Šířka:';
+$lang['img_height'] = 'Výška:';
$lang['subscr_subscribe_success'] = '%s byl přihlášen do seznamu odběratelů %s';
$lang['subscr_subscribe_error'] = 'Došlo k chybě při přihlašování %s do seznamu odběratelů %s';
$lang['subscr_subscribe_noaddress'] = 'K Vašemu loginu neexistuje žádná adresa, nemohl jste být přihlášen do seznamu odběratelů.';
diff --git a/inc/lang/da/denied.txt b/inc/lang/da/denied.txt
index a4fa8b88f..7bf3b8b9b 100644
--- a/inc/lang/da/denied.txt
+++ b/inc/lang/da/denied.txt
@@ -1,3 +1,3 @@
====== Adgang nægtet! ======
-Du har ikke rettigheder til at fortsætte. Måske er du ikke logget ind.
+Du har ikke rettigheder til at fortsætte.
diff --git a/inc/lang/da/lang.php b/inc/lang/da/lang.php
index eb50bb240..3f06bf758 100644
--- a/inc/lang/da/lang.php
+++ b/inc/lang/da/lang.php
@@ -61,7 +61,7 @@ $lang['btn_register'] = 'Registrér';
$lang['btn_apply'] = 'Anvend';
$lang['btn_media'] = 'Media Manager';
$lang['btn_deleteuser'] = 'Fjern Min Konto';
-$lang['loggedinas'] = 'Logget ind som';
+$lang['loggedinas'] = 'Logget ind som:';
$lang['user'] = 'Brugernavn';
$lang['pass'] = 'Adgangskode';
$lang['newpass'] = 'Ny adgangskode';
@@ -105,12 +105,12 @@ $lang['license'] = 'Med mindre andet angivet, vil indhold på denn
$lang['licenseok'] = 'Note: ved at ændre denne side, acceptere du at dit indhold bliver frigivet under følgende licens:';
$lang['searchmedia'] = 'Søg filnavn';
$lang['searchmedia_in'] = 'Søg i %s';
-$lang['txt_upload'] = 'Vælg den fil der skal overføres';
-$lang['txt_filename'] = 'Indtast wikinavn (valgfrit)';
+$lang['txt_upload'] = 'Vælg den fil der skal overføres:';
+$lang['txt_filename'] = 'Indtast wikinavn (valgfrit):';
$lang['txt_overwrt'] = 'Overskriv eksisterende fil';
$lang['maxuploadsize'] = 'Upload max. %s pr. fil.';
-$lang['lockedby'] = 'Midlertidig låst af';
-$lang['lockexpire'] = 'Lås udløber kl.';
+$lang['lockedby'] = 'Midlertidig låst af:';
+$lang['lockexpire'] = 'Lås udløber kl:.';
$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?';
@@ -191,9 +191,9 @@ $lang['diff_type'] = 'Vis forskelle:';
$lang['diff_inline'] = 'Indeni';
$lang['diff_side'] = 'Side ved Side';
$lang['line'] = 'Linje';
-$lang['breadcrumb'] = 'Sti';
-$lang['youarehere'] = 'Du er her';
-$lang['lastmod'] = 'Sidst ændret';
+$lang['breadcrumb'] = 'Sti:';
+$lang['youarehere'] = 'Du er her:';
+$lang['lastmod'] = 'Sidst ændret:';
$lang['by'] = 'af';
$lang['deleted'] = 'slettet';
$lang['created'] = 'oprettet';
@@ -246,20 +246,20 @@ $lang['admin_register'] = 'Tilføj ny bruger';
$lang['metaedit'] = 'Rediger metadata';
$lang['metasaveerr'] = 'Skrivning af metadata fejlede';
$lang['metasaveok'] = 'Metadata gemt';
-$lang['img_backto'] = 'Tilbage til';
-$lang['img_title'] = 'Titel';
-$lang['img_caption'] = 'Billedtekst';
-$lang['img_date'] = 'Dato';
-$lang['img_fname'] = 'Filnavn';
-$lang['img_fsize'] = 'Størrelse';
-$lang['img_artist'] = 'Fotograf';
-$lang['img_copyr'] = 'Ophavsret';
-$lang['img_format'] = 'Format';
-$lang['img_camera'] = 'Kamera';
-$lang['img_keywords'] = 'Emneord';
-$lang['img_width'] = 'Bredde';
-$lang['img_height'] = 'Højde';
-$lang['img_manager'] = 'Vis i Media Manager';
+$lang['btn_img_backto'] = 'Tilbage til %s';
+$lang['img_title'] = 'Titel:';
+$lang['img_caption'] = 'Billedtekst:';
+$lang['img_date'] = 'Dato:';
+$lang['img_fname'] = 'Filnavn:';
+$lang['img_fsize'] = 'Størrelse:';
+$lang['img_artist'] = 'Fotograf:';
+$lang['img_copyr'] = 'Ophavsret:';
+$lang['img_format'] = 'Format:';
+$lang['img_camera'] = 'Kamera:';
+$lang['img_keywords'] = 'Emneord:';
+$lang['img_width'] = 'Bredde:';
+$lang['img_height'] = 'Højde:';
+$lang['btn_mediaManager'] = 'Vis i Media Manager';
$lang['subscr_subscribe_success'] = 'Tilføjede %s til abonnement listen for %s';
$lang['subscr_subscribe_error'] = 'Fejl ved tilføjelse af %s til abonnement listen for %s';
$lang['subscr_subscribe_noaddress'] = 'Der er ikke nogen addresse forbundet til din bruger, så du kan ikke blive tilføjet til abonnement listen';
diff --git a/inc/lang/de-informal/denied.txt b/inc/lang/de-informal/denied.txt
index 0bc0e59a8..99004f6e1 100644
--- a/inc/lang/de-informal/denied.txt
+++ b/inc/lang/de-informal/denied.txt
@@ -1,4 +1,4 @@
====== Zugang verweigert ======
-Du hast nicht die erforderliche Berechtigung, um diese Aktion durchzuführen. Eventuell bist du nicht am Wiki angemeldet?
+Du hast nicht die erforderliche Berechtigung, um diese Aktion durchzuführen.
diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php
index be3f14a18..c81109580 100644
--- a/inc/lang/de-informal/lang.php
+++ b/inc/lang/de-informal/lang.php
@@ -66,7 +66,7 @@ $lang['btn_register'] = 'Registrieren';
$lang['btn_apply'] = 'Übernehmen';
$lang['btn_media'] = 'Medien-Manager';
$lang['btn_deleteuser'] = 'Benutzerprofil löschen';
-$lang['loggedinas'] = 'Angemeldet als';
+$lang['loggedinas'] = 'Angemeldet als:';
$lang['user'] = 'Benutzername';
$lang['pass'] = 'Passwort';
$lang['newpass'] = 'Neues Passwort';
@@ -111,12 +111,12 @@ $lang['license'] = 'Falls nicht anders bezeichnet, ist der Inhalt
$lang['licenseok'] = 'Hinweis: Durch das Bearbeiten dieser Seite gibst du dein Einverständnis, dass dein Inhalt unter der folgenden Lizenz veröffentlicht wird:';
$lang['searchmedia'] = 'Suche nach Datei:';
$lang['searchmedia_in'] = 'Suche in %s';
-$lang['txt_upload'] = 'Datei zum Hochladen auswählen';
-$lang['txt_filename'] = 'Hochladen als (optional)';
+$lang['txt_upload'] = 'Datei zum Hochladen auswählen:';
+$lang['txt_filename'] = 'Hochladen als (optional):';
$lang['txt_overwrt'] = 'Bestehende Datei überschreiben';
$lang['maxuploadsize'] = 'Max. %s pro Datei-Upload.';
-$lang['lockedby'] = 'Momentan gesperrt von';
-$lang['lockexpire'] = 'Sperre läuft ab am';
+$lang['lockedby'] = 'Momentan gesperrt von:';
+$lang['lockexpire'] = 'Sperre läuft ab am:';
$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';
@@ -196,9 +196,9 @@ $lang['diff_type'] = 'Unterschiede anzeigen:';
$lang['diff_inline'] = 'Inline';
$lang['diff_side'] = 'Side by Side';
$lang['line'] = 'Zeile';
-$lang['breadcrumb'] = 'Zuletzt angesehen';
-$lang['youarehere'] = 'Du befindest dich hier';
-$lang['lastmod'] = 'Zuletzt geändert';
+$lang['breadcrumb'] = 'Zuletzt angesehen:';
+$lang['youarehere'] = 'Du befindest dich hier:';
+$lang['lastmod'] = 'Zuletzt geändert:';
$lang['by'] = 'von';
$lang['deleted'] = 'gelöscht';
$lang['created'] = 'angelegt';
@@ -251,20 +251,20 @@ $lang['admin_register'] = 'Neuen Benutzer anmelden';
$lang['metaedit'] = 'Metadaten bearbeiten';
$lang['metasaveerr'] = 'Die Metadaten konnten nicht gesichert werden';
$lang['metasaveok'] = 'Metadaten gesichert';
-$lang['img_backto'] = 'Zurück zu';
-$lang['img_title'] = 'Titel';
-$lang['img_caption'] = 'Bildunterschrift';
-$lang['img_date'] = 'Datum';
-$lang['img_fname'] = 'Dateiname';
-$lang['img_fsize'] = 'Größe';
-$lang['img_artist'] = 'Fotograf';
-$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['btn_img_backto'] = 'Zurück zu %s';
+$lang['img_title'] = 'Titel:';
+$lang['img_caption'] = 'Bildunterschrift:';
+$lang['img_date'] = 'Datum:';
+$lang['img_fname'] = 'Dateiname:';
+$lang['img_fsize'] = 'Größe:';
+$lang['img_artist'] = 'Fotograf:';
+$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['btn_mediaManager'] = 'Im Medien-Manager anzeigen';
$lang['subscr_subscribe_success'] = 'Die Seite %s wurde zur Abonnementliste von %s hinzugefügt';
$lang['subscr_subscribe_error'] = 'Fehler beim Hinzufügen von %s zur Abonnementliste von %s';
$lang['subscr_subscribe_noaddress'] = 'In deinem Account ist keine E-Mail-Adresse hinterlegt. Dadurch kann die Seite nicht abonniert werden';
diff --git a/inc/lang/de/denied.txt b/inc/lang/de/denied.txt
index 8efa81f1b..db3343876 100644
--- a/inc/lang/de/denied.txt
+++ b/inc/lang/de/denied.txt
@@ -1,4 +1,4 @@
====== Zugang verweigert ======
-Sie haben nicht die erforderliche Berechtigung, um diese Aktion durchzuführen. Eventuell sind Sie nicht am Wiki angemeldet?
+Sie haben nicht die erforderliche Berechtigung, um diese Aktion durchzuführen.
diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php
index 9df1035f7..12b7db396 100644
--- a/inc/lang/de/lang.php
+++ b/inc/lang/de/lang.php
@@ -23,6 +23,9 @@
* @author Pierre Corell <info@joomla-praxis.de>
* @author Mateng Schimmerlos <mateng@firemail.de>
* @author Benedikt Fey <spam@lifeisgoooood.de>
+ * @author Joerg <scooter22@gmx.de>
+ * @author Simon <st103267@stud.uni-stuttgart.de>
+ * @author Hoisl <hoisl@gmx.at>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -67,7 +70,9 @@ $lang['btn_register'] = 'Registrieren';
$lang['btn_apply'] = 'Übernehmen';
$lang['btn_media'] = 'Medien-Manager';
$lang['btn_deleteuser'] = 'Benutzerprofil löschen';
-$lang['loggedinas'] = 'Angemeldet als';
+$lang['btn_img_backto'] = 'Zurück zu %s';
+$lang['btn_mediaManager'] = 'Im Medien-Manager anzeigen';
+$lang['loggedinas'] = 'Angemeldet als:';
$lang['user'] = 'Benutzername';
$lang['pass'] = 'Passwort';
$lang['newpass'] = 'Neues Passwort';
@@ -112,12 +117,12 @@ $lang['license'] = 'Falls nicht anders bezeichnet, ist der Inhalt
$lang['licenseok'] = 'Hinweis: Durch das Bearbeiten dieser Seite geben Sie Ihr Einverständnis, dass Ihr Inhalt unter der folgenden Lizenz veröffentlicht wird:';
$lang['searchmedia'] = 'Suche Dateinamen:';
$lang['searchmedia_in'] = 'Suche in %s';
-$lang['txt_upload'] = 'Datei zum Hochladen auswählen';
-$lang['txt_filename'] = 'Hochladen als (optional)';
+$lang['txt_upload'] = 'Datei zum Hochladen auswählen:';
+$lang['txt_filename'] = 'Hochladen als (optional):';
$lang['txt_overwrt'] = 'Bestehende Datei überschreiben';
$lang['maxuploadsize'] = 'Max. %s pro Datei-Upload.';
-$lang['lockedby'] = 'Momentan gesperrt von';
-$lang['lockexpire'] = 'Sperre läuft ab am';
+$lang['lockedby'] = 'Momentan gesperrt von:';
+$lang['lockexpire'] = 'Sperre läuft ab am:';
$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';
@@ -196,10 +201,13 @@ $lang['difflink'] = 'Link zu dieser Vergleichsansicht';
$lang['diff_type'] = 'Unterschiede anzeigen:';
$lang['diff_inline'] = 'Inline';
$lang['diff_side'] = 'Side by Side';
+$lang['diffprevrev'] = 'Vorhergehende Überarbeitung';
+$lang['diffnextrev'] = 'Nächste Überarbeitung';
+$lang['difflastrev'] = 'Letzte Überarbeitung';
$lang['line'] = 'Zeile';
-$lang['breadcrumb'] = 'Zuletzt angesehen';
-$lang['youarehere'] = 'Sie befinden sich hier';
-$lang['lastmod'] = 'Zuletzt geändert';
+$lang['breadcrumb'] = 'Zuletzt angesehen:';
+$lang['youarehere'] = 'Sie befinden sich hier:';
+$lang['lastmod'] = 'Zuletzt geändert:';
$lang['by'] = 'von';
$lang['deleted'] = 'gelöscht';
$lang['created'] = 'angelegt';
@@ -252,20 +260,18 @@ $lang['admin_register'] = 'Neuen Benutzer anmelden';
$lang['metaedit'] = 'Metadaten bearbeiten';
$lang['metasaveerr'] = 'Die Metadaten konnten nicht gesichert werden';
$lang['metasaveok'] = 'Metadaten gesichert';
-$lang['img_backto'] = 'Zurück zu';
-$lang['img_title'] = 'Titel';
-$lang['img_caption'] = 'Bildunterschrift';
-$lang['img_date'] = 'Datum';
-$lang['img_fname'] = 'Dateiname';
-$lang['img_fsize'] = 'Größe';
-$lang['img_artist'] = 'FotografIn';
-$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['img_title'] = 'Titel:';
+$lang['img_caption'] = 'Bildunterschrift:';
+$lang['img_date'] = 'Datum:';
+$lang['img_fname'] = 'Dateiname:';
+$lang['img_fsize'] = 'Größe:';
+$lang['img_artist'] = 'FotografIn:';
+$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['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';
@@ -345,3 +351,4 @@ $lang['media_restore'] = 'Diese Version wiederherstellen';
$lang['currentns'] = 'Aktueller Namensraum';
$lang['searchresult'] = 'Suchergebnisse';
$lang['plainhtml'] = 'HTML Klartext';
+$lang['wikimarkup'] = 'Wiki Markup';
diff --git a/inc/lang/el/denied.txt b/inc/lang/el/denied.txt
index 36d7ae103..25fcbe8ca 100644
--- a/inc/lang/el/denied.txt
+++ b/inc/lang/el/denied.txt
@@ -2,4 +2,3 @@
Συγγνώμη, αλλά δεν έχετε επαρκή δικαιώματα για την συγκεκριμένη ενέργεια.
-Μήπως παραλείψατε να συνδεθείτε;
diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php
index 170e101a5..e5371c9f3 100644
--- a/inc/lang/el/lang.php
+++ b/inc/lang/el/lang.php
@@ -56,7 +56,7 @@ $lang['btn_register'] = 'Εγγραφή';
$lang['btn_apply'] = 'Εφαρμογή';
$lang['btn_media'] = 'Διαχειριστής πολυμέσων';
$lang['btn_deleteuser'] = 'Αφαίρεσε τον λογαριασμό μου';
-$lang['loggedinas'] = 'Συνδεδεμένος ως';
+$lang['loggedinas'] = 'Συνδεδεμένος ως:';
$lang['user'] = 'Όνομα χρήστη';
$lang['pass'] = 'Κωδικός';
$lang['newpass'] = 'Νέος κωδικός';
@@ -100,12 +100,12 @@ $lang['license'] = 'Εκτός εάν αναφέρεται δια
$lang['licenseok'] = 'Σημείωση: Τροποποιώντας αυτή την σελίδα αποδέχεστε την διάθεση του υλικού σας σύμφωνα με την ακόλουθη άδεια:';
$lang['searchmedia'] = 'Αναζήτηση αρχείου:';
$lang['searchmedia_in'] = 'Αναζήτηση σε %s';
-$lang['txt_upload'] = 'Επιλέξτε αρχείο για φόρτωση';
-$lang['txt_filename'] = 'Επιλέξτε νέο όνομα αρχείου (προαιρετικό)';
+$lang['txt_upload'] = 'Επιλέξτε αρχείο για φόρτωση:';
+$lang['txt_filename'] = 'Επιλέξτε νέο όνομα αρχείου (προαιρετικό):';
$lang['txt_overwrt'] = 'Αντικατάσταση υπάρχοντος αρχείου';
$lang['maxuploadsize'] = 'Μέγιστο μέγεθος αρχείου: %s.';
-$lang['lockedby'] = 'Προσωρινά κλειδωμένο από';
-$lang['lockexpire'] = 'Το κλείδωμα λήγει στις';
+$lang['lockedby'] = 'Προσωρινά κλειδωμένο από:';
+$lang['lockexpire'] = 'Το κλείδωμα λήγει στις:';
$lang['js']['willexpire'] = 'Το κλείδωμά σας για την επεξεργασία αυτής της σελίδας θα λήξει σε ένα λεπτό.\n Για να το ανανεώσετε χρησιμοποιήστε την Προεπισκόπηση.';
$lang['js']['notsavedyet'] = 'Οι μη αποθηκευμένες αλλαγές θα χαθούν.
Θέλετε να συνεχίσετε;';
@@ -186,9 +186,9 @@ $lang['diff_type'] = 'Προβολή διαφορών:';
$lang['diff_inline'] = 'Σε σειρά';
$lang['diff_side'] = 'Δίπλα-δίπλα';
$lang['line'] = 'Γραμμή';
-$lang['breadcrumb'] = 'Ιστορικό';
-$lang['youarehere'] = 'Είστε εδώ';
-$lang['lastmod'] = 'Τελευταία τροποποίηση';
+$lang['breadcrumb'] = 'Ιστορικό:';
+$lang['youarehere'] = 'Είστε εδώ:';
+$lang['lastmod'] = 'Τελευταία τροποποίηση:';
$lang['by'] = 'από';
$lang['deleted'] = 'διαγράφηκε';
$lang['created'] = 'δημιουργήθηκε';
@@ -241,20 +241,20 @@ $lang['admin_register'] = 'Προσθήκη νέου χρήστη';
$lang['metaedit'] = 'Τροποποίηση metadata';
$lang['metasaveerr'] = 'Η αποθήκευση των metadata απέτυχε';
$lang['metasaveok'] = 'Επιτυχής αποθήκευση metadata';
-$lang['img_backto'] = 'Επιστροφή σε';
-$lang['img_title'] = 'Τίτλος';
-$lang['img_caption'] = 'Λεζάντα';
-$lang['img_date'] = 'Ημερομηνία';
-$lang['img_fname'] = 'Όνομα αρχείου';
-$lang['img_fsize'] = 'Μέγεθος';
-$lang['img_artist'] = 'Καλλιτέχνης';
-$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['btn_img_backto'] = 'Επιστροφή σε %s';
+$lang['img_title'] = 'Τίτλος:';
+$lang['img_caption'] = 'Λεζάντα:';
+$lang['img_date'] = 'Ημερομηνία:';
+$lang['img_fname'] = 'Όνομα αρχείου:';
+$lang['img_fsize'] = 'Μέγεθος:';
+$lang['img_artist'] = 'Καλλιτέχνης:';
+$lang['img_copyr'] = 'Copyright:';
+$lang['img_format'] = 'Format:';
+$lang['img_camera'] = 'Camera:';
+$lang['img_keywords'] = 'Λέξεις-κλειδιά:';
+$lang['img_width'] = 'Πλάτος:';
+$lang['img_height'] = 'Ύψος:';
+$lang['btn_mediaManager'] = 'Εμφάνιση στον διαχειριστή πολυμέσων';
$lang['subscr_subscribe_success'] = 'Ο/η %s προστέθηκε στην λίστα ειδοποιήσεων για το %s';
$lang['subscr_subscribe_error'] = 'Σφάλμα κατά την προσθήκη του/της %s στην λίστα ειδοποιήσεων για το %s';
$lang['subscr_subscribe_noaddress'] = 'Δεν υπάρχει διεύθυνση ταχυδρομείου συσχετισμένη με το όνομα χρήστη σας. Κατά συνέπεια δεν μπορείτε να προστεθείτε στην λίστα ειδοποιήσεων';
diff --git a/inc/lang/en/denied.txt b/inc/lang/en/denied.txt
index 3ac72820c..34cb8456a 100644
--- a/inc/lang/en/denied.txt
+++ b/inc/lang/en/denied.txt
@@ -1,4 +1,4 @@
====== Permission Denied ======
-Sorry, you don't have enough rights to continue. Perhaps you forgot to login?
+Sorry, you don't have enough rights to continue.
diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php
index cbdef8661..9c1e5dacd 100644
--- a/inc/lang/en/lang.php
+++ b/inc/lang/en/lang.php
@@ -52,8 +52,10 @@ $lang['btn_register'] = 'Register';
$lang['btn_apply'] = 'Apply';
$lang['btn_media'] = 'Media Manager';
$lang['btn_deleteuser'] = 'Remove My Account';
+$lang['btn_img_backto'] = 'Back to %s';
+$lang['btn_mediaManager'] = 'View in media manager';
-$lang['loggedinas'] = 'Logged in as';
+$lang['loggedinas'] = 'Logged in as:';
$lang['user'] = 'Username';
$lang['pass'] = 'Password';
$lang['newpass'] = 'New password';
@@ -103,12 +105,12 @@ $lang['licenseok'] = 'Note: By editing this page you agree to licens
$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_upload'] = 'Select file to upload:';
+$lang['txt_filename'] = 'Upload as (optional):';
$lang['txt_overwrt'] = 'Overwrite existing file';
$lang['maxuploadsize'] = 'Upload max. %s per file.';
-$lang['lockedby'] = 'Currently locked by';
-$lang['lockexpire'] = 'Lock expires at';
+$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.';
@@ -191,10 +193,15 @@ $lang['difflink'] = 'Link to this comparison view';
$lang['diff_type'] = 'View differences:';
$lang['diff_inline'] = 'Inline';
$lang['diff_side'] = 'Side by Side';
+$lang['diffprevrev'] = 'Previous revision';
+$lang['diffnextrev'] = 'Next revision';
+$lang['difflastrev'] = 'Last revision';
+$lang['diffbothprevrev'] = 'Both sides previous revision';
+$lang['diffbothnextrev'] = 'Both sides next revision';
$lang['line'] = 'Line';
-$lang['breadcrumb'] = 'Trace';
-$lang['youarehere'] = 'You are here';
-$lang['lastmod'] = 'Last modified';
+$lang['breadcrumb'] = 'Trace:';
+$lang['youarehere'] = 'You are here:';
+$lang['lastmod'] = 'Last modified:';
$lang['by'] = 'by';
$lang['deleted'] = 'removed';
$lang['created'] = 'created';
@@ -253,20 +260,18 @@ $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['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['subscr_subscribe_success'] = 'Added %s to subscription list for %s';
$lang['subscr_subscribe_error'] = 'Error adding %s to subscription list for %s';
@@ -302,6 +307,7 @@ $lang['i_modified'] = 'For security reasons this script will only wor
<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_mbfuncoverload'] = 'mbstring.func_overload must be disabled in php.ini to run DokuWiki.';
$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.';
diff --git a/inc/lang/eo/admin.txt b/inc/lang/eo/admin.txt
index 4b0cf7909..4b3cf0c2a 100644
--- a/inc/lang/eo/admin.txt
+++ b/inc/lang/eo/admin.txt
@@ -1,3 +1,3 @@
====== Administrado ======
-Sube vi povas trovi liston de administraj taskoj disponeblaj en DokuWiki.
+Sube vi trovas liston de administraj taskoj haveblaj en DokuWiki.
diff --git a/inc/lang/eo/adminplugins.txt b/inc/lang/eo/adminplugins.txt
index 769a8c538..bb7e7829b 100644
--- a/inc/lang/eo/adminplugins.txt
+++ b/inc/lang/eo/adminplugins.txt
@@ -1 +1 @@
-===== Eksteraj kromaĵoj ===== \ No newline at end of file
+===== Aldonaj kromaĵoj ===== \ No newline at end of file
diff --git a/inc/lang/eo/denied.txt b/inc/lang/eo/denied.txt
index 3cd6c76bf..e0abba12c 100644
--- a/inc/lang/eo/denied.txt
+++ b/inc/lang/eo/denied.txt
@@ -1,4 +1,4 @@
====== Aliro malpermesita ======
-Vi ne havas sufiĉajn rajtojn rigardi ĉi tiujn paĝojn. Eble vi forgesis identiĝi.
+Vi ne havas sufiĉajn rajtojn daŭrigi.
diff --git a/inc/lang/eo/diff.txt b/inc/lang/eo/diff.txt
index 5829a7db1..3c9db61c8 100644
--- a/inc/lang/eo/diff.txt
+++ b/inc/lang/eo/diff.txt
@@ -1,4 +1,4 @@
====== Diferencoj ======
-Ĉi tie vi povas vidi diferencojn inter la aktuala versio kaj la elektita revizio de la paĝo.
+Tio montras diferencojn inter du versioj de la paĝo.
diff --git a/inc/lang/eo/draft.txt b/inc/lang/eo/draft.txt
index 32ddc83f6..57526f3b5 100644
--- a/inc/lang/eo/draft.txt
+++ b/inc/lang/eo/draft.txt
@@ -1,5 +1,5 @@
====== Skiza dosiero troviĝis ======
-Via lasta sekcio de redakto en tiu ĉi paĝo ne korekte kompletiĝis. DokuWiki aŭtomate konservis skizon dum vi laboris, kiun vi nun povas uzi por daŭrigi vian redaktadon. Sube vi povas vidi la datumaron, kiu konserviĝis el via lasta sekcio.
+Via lasta redaktosesio en tiu ĉi paĝo ne ĝuste kompletiĝis. DokuWiki aŭtomate konservis skizon dum vi laboris, kiun vi nun povas uzi por daŭrigi vian redaktadon. Sube vi povas vidi la datumaron, kiu konserviĝis el via lasta sesio.
Bonvolu decidi ĉu vi volas //restarigi// vian perditan redakton, //forigi// la aŭtomate konservitan skizon aŭ //rezigni// pri la redakta procezo.
diff --git a/inc/lang/eo/edit.txt b/inc/lang/eo/edit.txt
index 29b3382c5..ccc8a613d 100644
--- a/inc/lang/eo/edit.txt
+++ b/inc/lang/eo/edit.txt
@@ -1 +1 @@
-Redaktu paĝon kaj poste premu butonon titolitan '"Konservi'". Bonvolu tralegi la [[wiki:syntax|vikian sintakson]] por kompreni kiel vi povas krei paĝojn. Bonvolu redakti nur se vi planas **plibonigi** la enhavon de la paĝo. Se vi volas nur testi ion, bonvolu uzi specialan paĝon: [[wiki:playground|ludejo]].
+Redaktu paĝon kaj poste premu butonon titolitan '"Konservi'". Bonvolu tralegi la [[wiki:syntax|vikian sintakson]] pri la formatigo. Bonvolu redakti **nur**, se vi povas **plibonigi** la enhavon de la paĝo. Se vi volas nur testi ion, bonvolu uzi specialan paĝon: [[playground:playground|sablokesto]].
diff --git a/inc/lang/eo/editrev.txt b/inc/lang/eo/editrev.txt
index 1640baa91..2e1406b0f 100644
--- a/inc/lang/eo/editrev.txt
+++ b/inc/lang/eo/editrev.txt
@@ -1,2 +1,2 @@
-**Vi laboras kun malnova revizio de la dokumento!** Se vi konservos ĝin, kreiĝos nova kuranta versio kun la sama enhavo.
+**Vi laboras kun malnova revizio de la dokumento!** Se vi konservos ĝin, kreiĝos nova kuranta versio kun tiu enhavo.
----
diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php
index a543b2571..f81de7fa1 100644
--- a/inc/lang/eo/lang.php
+++ b/inc/lang/eo/lang.php
@@ -37,13 +37,13 @@ $lang['btn_secedit'] = 'Redakti';
$lang['btn_login'] = 'Ensaluti';
$lang['btn_logout'] = 'Elsaluti';
$lang['btn_admin'] = 'Administri';
-$lang['btn_update'] = 'Ĝisdatigi';
+$lang['btn_update'] = 'Aktualigi';
$lang['btn_delete'] = 'Forigi';
$lang['btn_back'] = 'Retroiri';
$lang['btn_backlink'] = 'Retroligoj';
$lang['btn_backtomedia'] = 'Retroiri al elekto de dosiero';
$lang['btn_subscribe'] = 'Aliĝi al paĝaj modifoj';
-$lang['btn_profile'] = 'Ĝisdatigi profilon';
+$lang['btn_profile'] = 'Aktualigi profilon';
$lang['btn_reset'] = 'Rekomenci';
$lang['btn_resendpwd'] = 'Sendi novan pasvorton';
$lang['btn_draft'] = 'Redakti skizon';
@@ -53,8 +53,10 @@ $lang['btn_revert'] = 'Restarigi';
$lang['btn_register'] = 'Registriĝi';
$lang['btn_apply'] = 'Apliki';
$lang['btn_media'] = 'Medio-administrilo';
-$lang['btn_deleteuser'] = 'Forigi mian aliĝon';
-$lang['loggedinas'] = 'Ensalutinta kiel';
+$lang['btn_deleteuser'] = 'Forigi mian konton';
+$lang['btn_img_backto'] = 'Iri reen al %s';
+$lang['btn_mediaManager'] = 'Rigardi en aŭdvidaĵ-administrilo';
+$lang['loggedinas'] = 'Ensalutinta kiel:';
$lang['user'] = 'Uzant-nomo';
$lang['pass'] = 'Pasvorto';
$lang['newpass'] = 'Nova pasvorto';
@@ -81,7 +83,7 @@ $lang['reghere'] = 'Se vi ne havas konton, vi povas akiri ĝin';
$lang['profna'] = 'Tiu ĉi vikio ne ebligas modifon en la profiloj.';
$lang['profnochange'] = 'Neniu ŝanĝo, nenio farinda.';
$lang['profnoempty'] = 'Malplena nomo aŭ retadreso ne estas permesata.';
-$lang['profchanged'] = 'La profilo de la uzanto sukcese ĝisdatiĝis.';
+$lang['profchanged'] = 'La profilo de la uzanto sukcese aktualiĝis.';
$lang['profnodelete'] = 'Tiu ĉi vikio ne subtenas forigo de uzantoj';
$lang['profdeleteuser'] = 'Forigi aliĝon';
$lang['profdeleted'] = 'Via uzant-aliĝo estis forigata de tiu ĉi vikio';
@@ -99,12 +101,12 @@ $lang['license'] = 'Krom kie rekte indikite, enhavo de tiu ĉi vik
$lang['licenseok'] = 'Rimarku: redaktante tiun ĉi paĝon vi konsentas publikigi vian enhavon laŭ la jena permesilo:';
$lang['searchmedia'] = 'Serĉi dosiernomon:';
$lang['searchmedia_in'] = 'Serĉi en %s';
-$lang['txt_upload'] = 'Elektu dosieron por alŝuti';
-$lang['txt_filename'] = 'Alŝuti kiel (laŭvole)';
+$lang['txt_upload'] = 'Elektu dosieron por alŝuti:';
+$lang['txt_filename'] = 'Alŝuti kiel (laŭvole):';
$lang['txt_overwrt'] = 'Anstataŭigi ekzistantan dosieron';
$lang['maxuploadsize'] = 'Alŝuto maks. %s po dosiero.';
-$lang['lockedby'] = 'Nune ŝlosita de';
-$lang['lockexpire'] = 'Ŝlosado ĉesos en';
+$lang['lockedby'] = 'Nune ŝlosita de:';
+$lang['lockexpire'] = 'Ŝlosado ĉesos je:';
$lang['js']['willexpire'] = 'Vi povos redakti ĉi tiun paĝon post unu minuto.\nSe vi volas nuligi tempokontrolon de la ŝlosado, premu la butonon "Antaŭrigardi".';
$lang['js']['notsavedyet'] = 'Ne konservitaj modifoj perdiĝos.
Ĉu vi certe volas daŭrigi la procezon?';
@@ -184,10 +186,15 @@ $lang['difflink'] = 'Ligilo al kompara rigardo';
$lang['diff_type'] = 'Rigardi malsamojn:';
$lang['diff_inline'] = 'Samlinie';
$lang['diff_side'] = 'Apude';
+$lang['diffprevrev'] = 'Antaŭa revizio';
+$lang['diffnextrev'] = 'Sekva revizio';
+$lang['difflastrev'] = 'Lasta revizio';
+$lang['diffbothprevrev'] = 'Sur ambaŭ flankoj antaŭa revizio';
+$lang['diffbothnextrev'] = 'Sur ambaŭ flankoj sekva revizio';
$lang['line'] = 'Linio';
-$lang['breadcrumb'] = 'Paŝoj';
-$lang['youarehere'] = 'Vi estas ĉi tie';
-$lang['lastmod'] = 'Lastaj ŝanĝoj';
+$lang['breadcrumb'] = 'Paŝoj:';
+$lang['youarehere'] = 'Vi estas ĉi tie:';
+$lang['lastmod'] = 'Lastaj ŝanĝoj:';
$lang['by'] = 'de';
$lang['deleted'] = 'forigita';
$lang['created'] = 'kreita';
@@ -240,20 +247,18 @@ $lang['admin_register'] = 'Aldoni novan uzanton';
$lang['metaedit'] = 'Redakti metadatumaron';
$lang['metasaveerr'] = 'La konservo de metadatumaro malsukcesis';
$lang['metasaveok'] = 'La metadatumaro konserviĝis';
-$lang['img_backto'] = 'Iri reen al';
-$lang['img_title'] = 'Titolo';
-$lang['img_caption'] = 'Priskribo';
-$lang['img_date'] = 'Dato';
-$lang['img_fname'] = 'Dosiernomo';
-$lang['img_fsize'] = 'Grandeco';
-$lang['img_artist'] = 'Fotisto';
-$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 aŭdvidaĵ-administrilo';
+$lang['img_title'] = 'Titolo:';
+$lang['img_caption'] = 'Priskribo:';
+$lang['img_date'] = 'Dato:';
+$lang['img_fname'] = 'Dosiernomo:';
+$lang['img_fsize'] = 'Grandeco:';
+$lang['img_artist'] = 'Fotisto:';
+$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['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';
@@ -293,6 +298,7 @@ $lang['i_policy'] = 'Komenca ACL-a agordo';
$lang['i_pol0'] = 'Malferma Vikio (legi, skribi, alŝuti povas ĉiuj)';
$lang['i_pol1'] = 'Publika Vikio (legi povas ĉiuj, skribi kaj alŝuti povas registritaj uzantoj)';
$lang['i_pol2'] = 'Ferma Vikio (legi, skribi, alŝuti nur povas registritaj uzantoj)';
+$lang['i_allowreg'] = 'Permesi al uzantoj registri sin mem';
$lang['i_retry'] = 'Reprovi';
$lang['i_license'] = 'Bonvolu elekti la permesilon, sub kiun vi volas meti vian enhavon:';
$lang['i_license_none'] = 'Ne montri licencinformojn';
diff --git a/inc/lang/es/denied.txt b/inc/lang/es/denied.txt
index d7b37404b..02a76a8cf 100644
--- a/inc/lang/es/denied.txt
+++ b/inc/lang/es/denied.txt
@@ -1,3 +1,4 @@
====== Permiso Denegado ======
-Lo siento, no tienes suficientes permisos para continuar. ¿Quizás has olvidado identificarte? \ No newline at end of file
+Lo siento, no tienes suficientes permisos para continuar.
+
diff --git a/inc/lang/es/edit.txt b/inc/lang/es/edit.txt
index 55c3c1dc5..4ed253bb3 100644
--- a/inc/lang/es/edit.txt
+++ b/inc/lang/es/edit.txt
@@ -1,2 +1,2 @@
-Edita la página y pulsa ''Guardar''. Mira [[wiki:syntax]] para sintaxis Wiki. Por favor edita la página solo si puedes **mejorarla**. Si quieres testear algunas cosas aprende a dar tus primeros pasos en el [[playground:playground]].
+Edita la página y pulsa ''Guardar''. Vaya a [[wiki:syntax]] para ver la sintaxis del Wiki. Por favor edite la página solo si puedes **mejorarla**. Si quieres probar algo relacionado a la sintaxis, aprende a dar tus primeros pasos en el [[playground:playground]].
diff --git a/inc/lang/es/jquery.ui.datepicker.js b/inc/lang/es/jquery.ui.datepicker.js
index ae32124e7..763d4cedd 100644
--- a/inc/lang/es/jquery.ui.datepicker.js
+++ b/inc/lang/es/jquery.ui.datepicker.js
@@ -9,9 +9,9 @@ jQuery(function($){
monthNames: ['enero','febrero','marzo','abril','mayo','junio',
'julio','agosto','septiembre','octubre','noviembre','diciembre'],
monthNamesShort: ['ene','feb','mar','abr','may','jun',
- 'jul','ago','sep','oct','nov','dic'],
+ 'jul','ogo','sep','oct','nov','dic'],
dayNames: ['domingo','lunes','martes','miércoles','jueves','viernes','sábado'],
- dayNamesShort: ['dom','lun','mar','mié','jue','vie','sáb'],
+ dayNamesShort: ['dom','lun','mar','mié','juv','vie','sáb'],
dayNamesMin: ['D','L','M','X','J','V','S'],
weekHeader: 'Sm',
dateFormat: 'dd/mm/yy',
diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php
index 216093f6c..03cbd51d2 100644
--- a/inc/lang/es/lang.php
+++ b/inc/lang/es/lang.php
@@ -31,6 +31,11 @@
* @author r0sk <r0sk10@gmail.com>
* @author monica <may.dorado@gmail.com>
* @author Antonio Bueno <atnbueno@gmail.com>
+ * @author Juan De La Cruz <juann.dlc@gmail.com>
+ * @author Fernando <fdiezala@gmail.com>
+ * @author Eloy <ej.perezgomez@gmail.com>
+ * @author Antonio Castilla <antoniocastilla@trazoide.com>
+ * @author Jonathan Hernández <me@jhalicea.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -40,13 +45,13 @@ $lang['singlequoteopening'] = '‘';
$lang['singlequoteclosing'] = '’';
$lang['apostrophe'] = '’';
$lang['btn_edit'] = 'Editar esta página';
-$lang['btn_source'] = 'Ver fuente';
+$lang['btn_source'] = 'Ver la fuente de esta página';
$lang['btn_show'] = 'Ver página';
$lang['btn_create'] = 'Crear esta página';
$lang['btn_search'] = 'Buscar';
$lang['btn_save'] = 'Guardar';
$lang['btn_preview'] = 'Previsualización';
-$lang['btn_top'] = 'Ir hasta arriba';
+$lang['btn_top'] = 'Volver arriba';
$lang['btn_newer'] = '<< más reciente';
$lang['btn_older'] = 'menos reciente >>';
$lang['btn_revs'] = 'Revisiones antiguas';
@@ -73,9 +78,11 @@ $lang['btn_draftdel'] = 'Eliminar borrador';
$lang['btn_revert'] = 'Restaurar';
$lang['btn_register'] = 'Registrarse';
$lang['btn_apply'] = 'Aplicar';
-$lang['btn_media'] = 'Gestor de ficheros';
+$lang['btn_media'] = 'Administrador de Ficheros';
$lang['btn_deleteuser'] = 'Elimina Mi Cuenta';
-$lang['loggedinas'] = 'Conectado como ';
+$lang['btn_img_backto'] = 'Volver a %s';
+$lang['btn_mediaManager'] = 'Ver en el administrador de ficheros';
+$lang['loggedinas'] = 'Conectado como:';
$lang['user'] = 'Usuario';
$lang['pass'] = 'Contraseña';
$lang['newpass'] = 'Nueva contraseña';
@@ -116,16 +123,16 @@ $lang['resendpwdnouser'] = 'Lo siento, no se encuentra este usuario en nue
$lang['resendpwdbadauth'] = 'Lo siento, este código de autenticación no es válido. Asegúrate de haber usado el enlace de confirmación entero.';
$lang['resendpwdconfirm'] = 'Un enlace para confirmación ha sido enviado por correo electrónico.';
$lang['resendpwdsuccess'] = 'Tu nueva contraseña ha sido enviada por correo electrónico.';
-$lang['license'] = 'Excepto donde se indique lo contrario, el contenido de esta wiki se autoriza bajo la siguiente licencia:';
+$lang['license'] = 'Excepto donde se indique lo contrario, el contenido de este wiki esta bajo la siguiente licencia:';
$lang['licenseok'] = 'Nota: Al editar esta página, estás de acuerdo en autorizar su contenido bajo la siguiente licencia:';
$lang['searchmedia'] = 'Buscar archivo:';
$lang['searchmedia_in'] = 'Buscar en %s';
-$lang['txt_upload'] = 'Selecciona el archivo a subir';
-$lang['txt_filename'] = 'Subir como (opcional)';
+$lang['txt_upload'] = 'Selecciona el archivo a subir:';
+$lang['txt_filename'] = 'Subir como (opcional):';
$lang['txt_overwrt'] = 'Sobreescribir archivo existente';
$lang['maxuploadsize'] = 'Peso máximo de %s por archivo';
-$lang['lockedby'] = 'Actualmente bloqueado por';
-$lang['lockexpire'] = 'El bloqueo expira en';
+$lang['lockedby'] = 'Actualmente bloqueado por:';
+$lang['lockexpire'] = 'El bloqueo expira en:';
$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?';
@@ -206,10 +213,15 @@ $lang['difflink'] = 'Enlace a la vista de comparación';
$lang['diff_type'] = 'Ver diferencias';
$lang['diff_inline'] = 'En línea';
$lang['diff_side'] = 'Lado a lado';
+$lang['diffprevrev'] = 'Revisión previa';
+$lang['diffnextrev'] = 'Próxima revisión';
+$lang['difflastrev'] = 'Última revisión';
+$lang['diffbothprevrev'] = 'Ambos lados, revisión anterior';
+$lang['diffbothnextrev'] = 'Ambos lados, revisión siguiente';
$lang['line'] = 'Línea';
-$lang['breadcrumb'] = 'Traza';
-$lang['youarehere'] = 'Estás aquí';
-$lang['lastmod'] = 'Última modificación';
+$lang['breadcrumb'] = 'Traza:';
+$lang['youarehere'] = 'Estás aquí:';
+$lang['lastmod'] = 'Última modificación:';
$lang['by'] = 'por';
$lang['deleted'] = 'borrado';
$lang['created'] = 'creado';
@@ -262,20 +274,18 @@ $lang['admin_register'] = 'Añadir nuevo usuario';
$lang['metaedit'] = 'Editar metadatos';
$lang['metasaveerr'] = 'La escritura de los metadatos ha fallado';
$lang['metasaveok'] = 'Los metadatos han sido guardados';
-$lang['img_backto'] = 'Volver a';
-$lang['img_title'] = 'Título';
-$lang['img_caption'] = 'Epígrafe';
-$lang['img_date'] = 'Fecha';
-$lang['img_fname'] = 'Nombre de fichero';
-$lang['img_fsize'] = 'Tamaño';
-$lang['img_artist'] = 'Fotógrafo';
-$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['img_title'] = 'Título:';
+$lang['img_caption'] = 'Información: ';
+$lang['img_date'] = 'Fecha:';
+$lang['img_fname'] = 'Nombre del archivo:';
+$lang['img_fsize'] = 'Tamaño:';
+$lang['img_artist'] = 'Fotógrafo:';
+$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['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';
@@ -303,6 +313,7 @@ $lang['i_problems'] = 'El instalador encontró algunos problemas, se
$lang['i_modified'] = 'Por razones de seguridad este script sólo funcionará con una instalación nueva y no modificada de Dokuwiki. Usted debe extraer nuevamente los ficheros del paquete bajado, o bien consultar las <a href="http://dokuwiki.org/install">instrucciones de instalación de Dokuwiki</a> completas.';
$lang['i_funcna'] = 'La función de PHP <code>%s</code> no está disponible. ¿Tal vez su proveedor de hosting la ha deshabilitado por alguna razón?';
$lang['i_phpver'] = 'Su versión de PHP <code>%s</code> es menor que la necesaria <code>%s</code>. Es necesario que actualice su instalación de PHP.';
+$lang['i_mbfuncoverload'] = 'mbstring.func_overload se debe deshabilitar en php.ini para que funcione DokuWiki.';
$lang['i_permfail'] = 'DokuWili no puede escribir <code>%s</code>. ¡Es necesario establecer correctamente los permisos de este directorio!';
$lang['i_confexists'] = '<code>%s</code> ya existe';
$lang['i_writeerr'] = 'Imposible crear <code>%s</code>. Se necesita que usted controle los permisos del fichero/directorio y que cree el fichero manualmente.';
@@ -321,13 +332,13 @@ $lang['i_license_none'] = 'No mostrar ninguna información sobre licencia
$lang['i_pop_field'] = 'Por favor, ayúdanos a mejorar la experiencia de DokuWiki:';
$lang['i_pop_label'] = 'Una vez al mes, enviar información anónima de uso de datos a los desarrolladores de DokuWiki';
$lang['recent_global'] = 'Actualmente estás viendo los cambios dentro del namespace <b>%s</b>. También puedes <a href="%s">ver los cambios recientes en el wiki completo</a>.';
-$lang['years'] = '%d años atrás';
-$lang['months'] = '%d meses atrás';
-$lang['weeks'] = '%d semanas atrás';
-$lang['days'] = '%d días atrás';
-$lang['hours'] = '%d horas atrás';
-$lang['minutes'] = '%d minutos atrás';
-$lang['seconds'] = '%d segundos atrás';
+$lang['years'] = 'hace %d años';
+$lang['months'] = 'hace %d meses';
+$lang['weeks'] = 'hace %d semanas';
+$lang['days'] = 'hace %d días';
+$lang['hours'] = 'hace %d horas';
+$lang['minutes'] = 'hace %d minutos';
+$lang['seconds'] = 'hace %d segundos';
$lang['wordblock'] = 'Sus cambios no se han guardado porque contienen textos bloqueados (spam).';
$lang['media_uploadtab'] = 'Cargar';
$lang['media_searchtab'] = 'Buscar';
diff --git a/inc/lang/es/uploadmail.txt b/inc/lang/es/uploadmail.txt
index 9d2f980d3..cf70d00d4 100644
--- a/inc/lang/es/uploadmail.txt
+++ b/inc/lang/es/uploadmail.txt
@@ -1,6 +1,7 @@
-Se ha subido un fichero a tu DokuWuki. Estos son los detalles:
+Se ha subido un fichero a tu DokuWiki. Estos son los detalles:
Archivo : @MEDIA@
+Ultima revisión: @OLD@
Fecha : @DATE@
Navegador : @BROWSER@
Dirección IP : @IPADDRESS@
diff --git a/inc/lang/et/adminplugins.txt b/inc/lang/et/adminplugins.txt
new file mode 100644
index 000000000..ee3ffb0a7
--- /dev/null
+++ b/inc/lang/et/adminplugins.txt
@@ -0,0 +1 @@
+===== Täiendavad laiendused ===== \ No newline at end of file
diff --git a/inc/lang/et/denied.txt b/inc/lang/et/denied.txt
index bb564ac57..093ccf4a8 100644
--- a/inc/lang/et/denied.txt
+++ b/inc/lang/et/denied.txt
@@ -1,3 +1,4 @@
====== Sul pole ligipääsuluba ======
-Kahju küll, aga sinu tublidusest ei piisa, et edasi liikuda, selleks on vastavaid õigusi vaja.
+Kahju küll, aga sinu tublidusest ei piisa, et edasi liikuda.
+
diff --git a/inc/lang/et/index.txt b/inc/lang/et/index.txt
index 8d2e25a68..fec211d9b 100644
--- a/inc/lang/et/index.txt
+++ b/inc/lang/et/index.txt
@@ -1,3 +1,3 @@
====== Sisukord ======
-See siin on nimekiri kõigist saadaval olevatest lehtedest järjestatud [[doku>namespaces|alajaotuste]] järgi.
+Alloleavs on loetletud kõik saada olevaist leheküljed, mis on järjestatud [[doku>namespaces|nimeruumi]]de alusel.
diff --git a/inc/lang/et/lang.php b/inc/lang/et/lang.php
index cc736db4d..9ae06d7d2 100644
--- a/inc/lang/et/lang.php
+++ b/inc/lang/et/lang.php
@@ -1,13 +1,15 @@
<?php
+
/**
- * Estonian language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Oliver S6ro <seem.iges@mail.ee>
* @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>
+ * @author Janar Leas <janarleas@gmail.com>
+ * @author Janar Leas <janar.leas@eesti.ee>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -43,12 +45,16 @@ $lang['btn_backtomedia'] = 'Tagasi faili valikusse';
$lang['btn_subscribe'] = 'Jälgi seda lehte (teated meilile)';
$lang['btn_profile'] = 'Minu info';
$lang['btn_reset'] = 'Taasta';
+$lang['btn_resendpwd'] = 'Sea uus salasõna';
$lang['btn_draft'] = 'Toimeta mustandit';
$lang['btn_recover'] = 'Taata mustand';
$lang['btn_draftdel'] = 'Kustuta mustand';
$lang['btn_revert'] = 'Taasta';
$lang['btn_register'] = 'Registreeri uus kasutaja';
-$lang['loggedinas'] = 'Logis sisse kui';
+$lang['btn_apply'] = 'Kinnita';
+$lang['btn_media'] = 'Meedia haldur';
+$lang['btn_deleteuser'] = 'Eemalda minu konto';
+$lang['loggedinas'] = 'Logis sisse kui:';
$lang['user'] = 'Kasutaja';
$lang['pass'] = 'Parool';
$lang['newpass'] = 'Uus parool';
@@ -59,8 +65,10 @@ $lang['fullname'] = 'Täielik nimi';
$lang['email'] = 'E-post';
$lang['profile'] = 'Kasutaja info';
$lang['badlogin'] = 'Oops, Sinu kasutajanimi või parool oli vale.';
+$lang['badpassconfirm'] = 'Väär salasõna';
$lang['minoredit'] = 'Ebaolulised muudatused';
$lang['draftdate'] = 'Mustand automaatselt salvestatud';
+$lang['nosecedit'] = 'Leht on vahepeal muutunud, jaotiste teave osutus aegunuks sestap laeti tervelehekülg.';
$lang['regmissing'] = 'Kõik väljad tuleb ära täita.';
$lang['reguexists'] = 'Tegelikult on sellise nimega kasutaja juba olemas.';
$lang['regsuccess'] = 'Kasutaja sai tehtud. Parool saadeti Sulle e-posti aadressil.';
@@ -76,21 +84,30 @@ $lang['profna'] = 'Viki ei toeta profiili muudatusi';
$lang['profnochange'] = 'Muutused puuduvad.';
$lang['profnoempty'] = 'Tühi nimi ega meiliaadress pole lubatud.';
$lang['profchanged'] = 'Kasutaja info edukalt muudetud';
+$lang['profnodelete'] = 'See wiki ei toeta kasutajate kustutamist';
+$lang['profdeleteuser'] = 'Kustuta konto';
+$lang['profdeleted'] = 'Sinu kasutajakonto on sellest wikist kustutatud';
+$lang['profconfdelete'] = 'Soovin sellest wikist oma konnto eemaldada. <br/> See tegevus on taastamatu.';
+$lang['profconfdeletemissing'] = 'Kinnituse valikkast märkimata.';
$lang['pwdforget'] = 'Unustasid parooli? Tee uus';
$lang['resendna'] = 'See wiki ei toeta parooli taassaatmist.';
+$lang['resendpwd'] = 'Sea uus salasõna';
$lang['resendpwdmissing'] = 'Khmm... Sa pead täitma kõik väljad.';
$lang['resendpwdnouser'] = 'Aga sellist kasutajat ei ole.';
$lang['resendpwdbadauth'] = 'See autentimiskood ei ole õige. Kontrolli, et kopeerisid terve lingi.';
$lang['resendpwdconfirm'] = 'Kinnituslink saadeti meilile.';
$lang['resendpwdsuccess'] = 'Uus parool saadeti Sinu meilile.';
+$lang['license'] = 'Kus pole öeldud teisiti, kehtib selle wiki sisule järgmine leping:';
+$lang['licenseok'] = 'Teadmiseks: Toimetades seda lehte, nõustud avaldama oma sisu järgmise lepingu alusel:';
$lang['searchmedia'] = 'Otsi failinime:';
$lang['searchmedia_in'] = 'Otsi %s';
-$lang['txt_upload'] = 'Vali fail, mida üles laadida';
-$lang['txt_filename'] = 'Siseta oma Wikinimi (soovituslik)';
+$lang['txt_upload'] = 'Vali fail, mida üles laadida:';
+$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['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['maxuploadsize'] = 'Üleslaadimiseks lubatu enim %s faili kohta.';
+$lang['lockedby'] = 'Praegu on selle lukustanud:';
+$lang['lockexpire'] = 'Lukustus aegub:';
+$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';
@@ -122,6 +139,17 @@ 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']['restore_confirm'] = 'Tõesti taastad selle järgu?';
+$lang['js']['media_diff'] = 'Vaatle erisusi:';
+$lang['js']['media_diff_both'] = 'Kõrvuti';
+$lang['js']['media_diff_opacity'] = 'Kuma läbi';
+$lang['js']['media_diff_portions'] = 'Puhasta';
+$lang['js']['media_select'] = 'Vali failid…';
+$lang['js']['media_upload_btn'] = 'Lae üles';
+$lang['js']['media_done_btn'] = 'Valmis';
+$lang['js']['media_drop'] = 'Üleslaadimiseks viska failid siia';
+$lang['js']['media_cancel'] = 'eemalda';
+$lang['js']['media_overwrt'] = 'Asenda olemasolevad failid';
$lang['rssfailed'] = 'Sinu soovitud info ammutamisel tekkis viga: ';
$lang['nothingfound'] = 'Oops, aga mitte muhvigi ei leitud.';
$lang['mediaselect'] = 'Hunnik faile';
@@ -131,6 +159,8 @@ $lang['uploadfail'] = 'Üleslaadimine läks nässu. Äkki pole Sa sel
$lang['uploadwrong'] = 'Ei saa Sa midagi üles laadida. Oops, aga seda tüüpi faili sul lihtsalt ei lubata üles laadida';
$lang['uploadexist'] = 'Fail on juba olemas. Midagi ei muudetud.';
$lang['uploadbadcontent'] = 'Üles laaditu ei sobinud %s faililaiendiga.';
+$lang['uploadspam'] = 'Üleslaadimine tõrjuti rämpssisu vältija poolt.';
+$lang['uploadxss'] = 'Üleslaadimine tõrjuti kahtlase sisu võimaluse tõttu';
$lang['uploadsize'] = 'Üles laaditud fail on liiga suur (maksimaalne suurus on %s).';
$lang['deletesucc'] = 'Fail nimega "%s" sai kustutatud.';
$lang['deletefail'] = 'Faili nimega "%s" ei kustutatud (kontrolli õigusi).';
@@ -141,7 +171,7 @@ $lang['accessdenied'] = 'Ligipääs keelatud.';
$lang['mediausage'] = 'Kasuta järgmist kirjapilti sellele failile viitamaks:';
$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['mediaupload'] = 'Lae fail sellesse nimeruumi (kataloogi). Loomaks täiendavaid alam-nimeruume, kasuta wiki-nime ja nimeruumide eraldamiseks koolonit.';
$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:';
@@ -155,20 +185,34 @@ $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_inline'] = 'Jooksvalt';
$lang['diff_side'] = 'Kõrvuti';
$lang['line'] = 'Rida';
-$lang['breadcrumb'] = 'Käidud rada';
-$lang['youarehere'] = 'Sa oled siin';
-$lang['lastmod'] = 'Viimati muutnud';
+$lang['breadcrumb'] = 'Käidud rada:';
+$lang['youarehere'] = 'Sa oled siin:';
+$lang['lastmod'] = 'Viimati muutnud:';
$lang['by'] = 'persoon';
$lang['deleted'] = 'eemaldatud';
$lang['created'] = 'tekitatud';
$lang['restored'] = 'vana versioon taastatud (%s)';
$lang['external_edit'] = 'väline muutmine';
$lang['summary'] = 'kokkuvõte muudatustest';
+$lang['noflash'] = 'Sele sisu vaatamisesks on vajalik <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Laiendus</a>.';
+$lang['tools'] = 'Tööriistad';
+$lang['user_tools'] = 'Kasutaja tarvikud';
+$lang['site_tools'] = 'Lehe tööriistad';
+$lang['page_tools'] = 'Lehekülje tarvikud';
+$lang['skip_to_content'] = 'mine sisule';
+$lang['sidebar'] = 'Külgriba';
$lang['mail_newpage'] = 'leht lisatud:';
$lang['mail_changed'] = 'leht muudetud';
+$lang['mail_subscribe_list'] = 'muutunud leheküljed nimeruumis:';
$lang['mail_new_user'] = 'Uus kasutaja:';
+$lang['mail_upload'] = 'üles laetud fail:';
+$lang['changes_type'] = 'Näita mmutuseid';
+$lang['pages_changes'] = 'Leheküljed';
+$lang['media_changes'] = 'Meedia failid';
+$lang['both_changes'] = 'Mõlemid, leheküljed ja meedia failid';
$lang['qb_bold'] = 'Rasvane kiri';
$lang['qb_italic'] = 'Kaldkiri';
$lang['qb_underl'] = 'Alajoonega kiri';
@@ -193,22 +237,42 @@ $lang['qb_media'] = 'Lisa pilte ja muid faile';
$lang['qb_sig'] = 'Lisa allkiri!';
$lang['qb_smileys'] = 'Emotikonid';
$lang['qb_chars'] = 'Erisümbolid';
+$lang['upperns'] = 'mine ülemisse nimeruumi';
$lang['admin_register'] = 'Lisa kasutaja';
$lang['metaedit'] = 'Muuda lisainfot';
$lang['metasaveerr'] = 'Lisainfo salvestamine läks untsu.';
$lang['metasaveok'] = 'Lisainfo salvestatud';
-$lang['img_backto'] = 'Tagasi';
-$lang['img_title'] = 'Tiitel';
-$lang['img_caption'] = 'Kirjeldus';
-$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';
+$lang['btn_img_backto'] = 'Tagasi %s';
+$lang['img_title'] = 'Tiitel:';
+$lang['img_caption'] = 'Kirjeldus:';
+$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:';
+$lang['img_width'] = 'Laius:';
+$lang['img_height'] = 'Kõrgus:';
+$lang['btn_mediaManager'] = 'Näita meediahalduris';
+$lang['subscr_subscribe_success'] = '%s lisati %s tellijaks';
+$lang['subscr_subscribe_error'] = 'Viga %s lisamisel %s tellijaks';
+$lang['subscr_subscribe_noaddress'] = 'Sinu kasutajaga pole seotud ühtegi aadressi, seega ei saa sind tellijaks lisada';
+$lang['subscr_unsubscribe_success'] = '%s eemaldati %s tellijatest';
+$lang['subscr_unsubscribe_error'] = 'Viga %s eemaldamisel %s tellijatest';
+$lang['subscr_already_subscribed'] = '%s on juba %s tellija';
+$lang['subscr_not_subscribed'] = '%s pole %s tellija';
+$lang['subscr_m_not_subscribed'] = 'Sina pole hetkel selle lehekülje ega nimeruumi tellija.';
+$lang['subscr_m_new_header'] = 'Lisa tellimus';
+$lang['subscr_m_current_header'] = 'Hetkel tellitud';
+$lang['subscr_m_unsubscribe'] = 'Eemalda tellimus';
+$lang['subscr_m_subscribe'] = 'Telli';
+$lang['subscr_style_every'] = 'igast toimetamisest teavitab ekiri';
+$lang['subscr_style_digest'] = 'kokkuvõte ekirjaga toimetamistest igal leheküljel (iga %.2f päeva järel)';
+$lang['subscr_style_list'] = 'Peale viimast ekirja (iga %.2f päeva järel) toimetaud lehekülgede loend.';
$lang['authtempfail'] = 'Kasutajate autentimine on ajutiselt rivist väljas. Kui see olukord mõne aja jooksul ei parane, siis teavita sellest serveri haldajat.';
+$lang['authpwdexpire'] = 'Sinu salasõna aegub %päeva pärast, võiksid seda peatselt muuta.';
$lang['i_chooselang'] = 'Vali keel';
$lang['i_installer'] = 'DokuWiki paigaldaja';
$lang['i_wikiname'] = 'Wiki nimi';
@@ -218,9 +282,11 @@ $lang['i_problems'] = 'Paigaldaja leidis mõned vead, mis on allpool
$lang['i_modified'] = 'Õnnetuste vältimiseks läheb see skript käima ainult värskelt paigaldatud ja muutmata Dokuwiki peal.
Sa peaksid ilmselt kogu koodi uuesti lahti pakkima. Vaata ka <a href="http://dokuwiki.org/install">Dokuwiki installeerimis juhendit</a>';
$lang['i_funcna'] = 'PHP funktsiooni <code>%s</code> ei ole olemas.võibolla sinu serveri hooldaja on selle mingil põhjusel keelanud?';
+$lang['i_phpver'] = 'Sinu PHP versioon <code>%s</code> on vanem nõutavast <code>%s</code>. Pead oma paigaldatud PHP-d uuendama.';
$lang['i_permfail'] = 'Dokuwiki ei saa kirjutada faili <code>%s</code>. Kontrolli serveris failide õigused üle.';
$lang['i_confexists'] = '<code>%s</code> on juba olemas';
$lang['i_writeerr'] = 'Faili <code>%s</code> ei lubata tekitada. Kontrolli kataloogi ja faili õigusi.';
+$lang['i_badhash'] = 'Tundmatu või muutunud dokuwiki.php (hash=<code>%s</code>)';
$lang['i_badval'] = '<code>%s</code> - lubamatu või tühi väärtus';
$lang['i_success'] = 'Seadistamine on õnnelikult lõpule viidud. Sa võid nüüd kustutada faili install.php. Alusta oma <a href="doku.php?id=wiki:welcome">uue DokuWiki</a> täitmist.';
$lang['i_failure'] = 'Konfiguratsiooni faili kirjutamisel esines vigu. Võimalik, et pead need käsitsi parandama enne <a href="doku.php?id=wiki:welcome">uue DokuWiki</a> täitma asumist.';
@@ -228,4 +294,45 @@ $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_allowreg'] = 'Luba kasutajail endid ise arvele võtta';
$lang['i_retry'] = 'Proovi uuesti';
+$lang['i_license'] = 'Vali leping, mille alusel wiki sisu avaldatakse:';
+$lang['i_license_none'] = 'Ära näita mingit lepingu teavet';
+$lang['i_pop_field'] = 'Aitake meil täiendada DokuWiki kasutuskogemsut:';
+$lang['i_pop_label'] = 'Kord kuus, saada DokuWiki arendajatele anonüümseid kasutus andmeid.';
+$lang['recent_global'] = 'Uurid hetkel nimeruumi <b>%s</b> muudatusi. Võid uurida ka <a href="%s">kogu selle wiki</a> muudatusi.';
+$lang['years'] = '%d aasta eest';
+$lang['months'] = '%d kuu eest';
+$lang['weeks'] = '%d nädala eest';
+$lang['days'] = '%d päeva eest';
+$lang['hours'] = '%d tunni eest';
+$lang['minutes'] = '%d minuti eest';
+$lang['seconds'] = '%d sekundi eest';
+$lang['wordblock'] = 'Sinu toimetus jäeti muutmata tõrjutud teksti tõttu (rämpspost?).';
+$lang['media_uploadtab'] = 'Lae-↑ ';
+$lang['media_searchtab'] = 'Otsi';
+$lang['media_file'] = 'Fail';
+$lang['media_viewtab'] = 'Vaata';
+$lang['media_edittab'] = 'Toimeta';
+$lang['media_historytab'] = 'Ajalugu';
+$lang['media_list_thumbs'] = 'Pisipildid';
+$lang['media_list_rows'] = 'Ridu';
+$lang['media_sort_name'] = 'Nimi';
+$lang['media_sort_date'] = 'Kuupäev';
+$lang['media_namespaces'] = 'Vali nimeruum';
+$lang['media_files'] = 'Failid %s-is';
+$lang['media_upload'] = 'Lae %s-ssi';
+$lang['media_search'] = 'Leia %s-st';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s asub %s-s';
+$lang['media_edit'] = 'Muuda %s-i';
+$lang['media_history'] = '%s ajalugu';
+$lang['media_meta_edited'] = 'toimetati päiseteavet';
+$lang['media_perm_read'] = 'Sul pole piisavaid õigusi failide vaatamiseks';
+$lang['media_perm_upload'] = 'Sul pole piisavaid õigusi failide üleslaadimiseks';
+$lang['media_update'] = 'Lea üles uus järk';
+$lang['media_restore'] = 'Ennista sellele järgule';
+$lang['currentns'] = 'Hetke nimeruum';
+$lang['searchresult'] = 'Otsingu tulemus';
+$lang['plainhtml'] = 'Liht-HTML';
+$lang['wikimarkup'] = 'Wiki märgistus';
diff --git a/inc/lang/et/resetpwd.txt b/inc/lang/et/resetpwd.txt
new file mode 100644
index 000000000..3a802986f
--- /dev/null
+++ b/inc/lang/et/resetpwd.txt
@@ -0,0 +1,3 @@
+====== Sea uus salasõna ======
+
+Sisesta oma selle wiki kasutajale uus salasõna \ No newline at end of file
diff --git a/inc/lang/et/subscr_digest.txt b/inc/lang/et/subscr_digest.txt
new file mode 100644
index 000000000..7446fd9f4
--- /dev/null
+++ b/inc/lang/et/subscr_digest.txt
@@ -0,0 +1,21 @@
+Tere!
+
+Wiki-s @TITLE@ toimetati lehekülge @PAGE@.
+
+Muudatustest lähemalt:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+
+Endine: @OLDPAGE@
+Uus: @NEWPAGE@
+
+Lehekülje teavituste katkestamiseks, sisene wiki-sse aadressil @DOKUWIKIURL@
+ja mine:
+@SUBSCRIBE@
+ning loobu lehekülje ja/või nimeruumi muudatuste teavitustest.
+
+--
+Selle e-kirja lõi DokuWiki aadressilt
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/et/subscr_form.txt b/inc/lang/et/subscr_form.txt
new file mode 100644
index 000000000..61a005b47
--- /dev/null
+++ b/inc/lang/et/subscr_form.txt
@@ -0,0 +1,3 @@
+====== Tellimuste haldus ======
+
+See lehekülg lubab sul hallata oma tellimusi antud leheküljele ja nimeruumile. \ No newline at end of file
diff --git a/inc/lang/et/subscr_list.txt b/inc/lang/et/subscr_list.txt
new file mode 100644
index 000000000..0629651b7
--- /dev/null
+++ b/inc/lang/et/subscr_list.txt
@@ -0,0 +1,19 @@
+Tere!
+
+Wiki-s @TITLE@ toimetati nimeruumi @PAGE@.
+Muudatustest lähemalt:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+Endine: @OLDPAGE@
+Uus: @NEWPAGE@
+
+Lehekülje teavituste katkestamiseks, sisene wiki-sse aadressil @DOKUWIKIURL@
+ja mine:
+@SUBSCRIBE@
+ning loobu lehekülje ja/või nimeruumi muudatuste teavitustest.
+
+--
+Selle e-kirja lõi DokuWiki aadressilt
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/et/subscr_single.txt b/inc/lang/et/subscr_single.txt
new file mode 100644
index 000000000..fff069f65
--- /dev/null
+++ b/inc/lang/et/subscr_single.txt
@@ -0,0 +1,23 @@
+Tere!
+
+Wiki-s @TITLE@ toimetati lehekülge @PAGE@.
+Muudatustest lähemalt:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+
+Kuupäev : @DATE@
+Kasutaja : @USER@
+Kokkuvõte: @SUMMARY@
+Endine: @OLDPAGE@
+Uus: @NEWPAGE@
+
+Lehekülje teavituste katkestamiseks, sisene wiki-sse aadressil @DOKUWIKIURL@
+ja mine:
+@SUBSCRIBE@
+ning loobu lehekülje ja/või nimeruumi muudatuste teavitustest.
+
+--
+Selle e-kirja lõi DokuWiki aadressilt
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/et/uploadmail.txt b/inc/lang/et/uploadmail.txt
new file mode 100644
index 000000000..2d3a6aa7e
--- /dev/null
+++ b/inc/lang/et/uploadmail.txt
@@ -0,0 +1,16 @@
+Sinu DokuWiki-sse lisati fail.
+Lähemalt:
+
+ Fail : @MEDIA@
+ Endine : @OLD@
+ Kuupäev : @DATE@
+ Veebilehitseja : @BROWSER@
+ IP-aadress : @IPADDRESS@
+ Hostinimi : @HOSTNAME@
+ Suurus : @SIZE@
+ MIME liik : @MIME@
+ Kasutaja : @ USER@
+
+--
+Selle e-kirja lõi DokuWiki aadressilt
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/eu/denied.txt b/inc/lang/eu/denied.txt
index 257076a3d..869c4c7d8 100644
--- a/inc/lang/eu/denied.txt
+++ b/inc/lang/eu/denied.txt
@@ -1,3 +1,4 @@
====== Ez duzu baimenik ======
-Barkatu, ez duzu baimenik orri hau ikusteko. Agian sesioa hastea ahaztu zaizu? \ No newline at end of file
+Barkatu, ez duzu baimenik orri hau ikusteko.
+
diff --git a/inc/lang/eu/lang.php b/inc/lang/eu/lang.php
index c7e7ead9a..0c996feaf 100644
--- a/inc/lang/eu/lang.php
+++ b/inc/lang/eu/lang.php
@@ -49,7 +49,7 @@ $lang['btn_revert'] = 'Berrezarri';
$lang['btn_register'] = 'Erregistratu';
$lang['btn_apply'] = 'Baieztatu';
$lang['btn_media'] = 'Media Kudeatzailea';
-$lang['loggedinas'] = 'Erabiltzailea';
+$lang['loggedinas'] = 'Erabiltzailea:';
$lang['user'] = 'Erabiltzailea';
$lang['pass'] = 'Pasahitza';
$lang['newpass'] = 'Pasahitz berria';
@@ -88,8 +88,8 @@ $lang['license'] = 'Besterik esan ezean, wiki hontako edukia ondor
$lang['licenseok'] = 'Oharra: Orri hau editatzean, zure edukia ondorengo lizentziapean argitaratzea onartzen duzu: ';
$lang['searchmedia'] = 'Bilatu fitxategi izena:';
$lang['searchmedia_in'] = 'Bilatu %s-n';
-$lang['txt_upload'] = 'Ireki nahi den fitxategia aukeratu';
-$lang['txt_filename'] = 'Idatzi wikiname-a (aukerazkoa)';
+$lang['txt_upload'] = 'Ireki nahi den fitxategia aukeratu:';
+$lang['txt_filename'] = 'Idatzi wikiname-a (aukerazkoa):';
$lang['txt_overwrt'] = 'Oraingo fitxategiaren gainean idatzi';
$lang['lockedby'] = 'Momentu honetan blokeatzen:';
$lang['lockexpire'] = 'Blokeaketa iraungitzen da:';
@@ -172,9 +172,9 @@ $lang['diff_type'] = 'Ikusi diferentziak:';
$lang['diff_inline'] = 'Lerro tartean';
$lang['diff_side'] = 'Ondoz ondo';
$lang['line'] = 'Marra';
-$lang['breadcrumb'] = 'Traza';
-$lang['youarehere'] = 'Hemen zaude';
-$lang['lastmod'] = 'Azken aldaketa';
+$lang['breadcrumb'] = 'Traza:';
+$lang['youarehere'] = 'Hemen zaude:';
+$lang['lastmod'] = 'Azken aldaketa:';
$lang['by'] = 'egilea:';
$lang['deleted'] = 'ezabatua';
$lang['created'] = 'sortua';
@@ -227,20 +227,20 @@ $lang['admin_register'] = 'Erabiltzaile berria gehitu';
$lang['metaedit'] = 'Metadatua Aldatu';
$lang['metasaveerr'] = 'Metadatuaren idazketak huts egin du';
$lang['metasaveok'] = 'Metadatua gordea';
-$lang['img_backto'] = 'Atzera hona';
-$lang['img_title'] = 'Izenburua';
-$lang['img_caption'] = 'Epigrafea';
-$lang['img_date'] = 'Data';
-$lang['img_fname'] = 'Fitxategi izena';
-$lang['img_fsize'] = 'Tamaina';
-$lang['img_artist'] = 'Artista';
-$lang['img_copyr'] = 'Copyright';
-$lang['img_format'] = 'Formatua';
-$lang['img_camera'] = 'Kamera';
-$lang['img_keywords'] = 'Hitz-gakoak';
-$lang['img_width'] = 'Zabalera';
-$lang['img_height'] = 'Altuera';
-$lang['img_manager'] = 'Media kudeatzailean ikusi';
+$lang['btn_img_backto'] = 'Atzera hona %s';
+$lang['img_title'] = 'Izenburua:';
+$lang['img_caption'] = 'Epigrafea:';
+$lang['img_date'] = 'Data:';
+$lang['img_fname'] = 'Fitxategi izena:';
+$lang['img_fsize'] = 'Tamaina:';
+$lang['img_artist'] = 'Artista:';
+$lang['img_copyr'] = 'Copyright:';
+$lang['img_format'] = 'Formatua:';
+$lang['img_camera'] = 'Kamera:';
+$lang['img_keywords'] = 'Hitz-gakoak:';
+$lang['img_width'] = 'Zabalera:';
+$lang['img_height'] = 'Altuera:';
+$lang['btn_mediaManager'] = 'Media kudeatzailean ikusi';
$lang['subscr_subscribe_success'] = '%s gehitua %s-ren harpidetza zerrendara';
$lang['subscr_subscribe_error'] = 'Errorea %s gehitzen %s-ren harpidetza zerrendara';
$lang['subscr_subscribe_noaddress'] = 'Ez dago helbiderik zure login-arekin lotuta, ezin zara harpidetza zerrendara gehitua izan.';
diff --git a/inc/lang/fa/denied.txt b/inc/lang/fa/denied.txt
index 827f73e2b..4bffa0f3c 100644
--- a/inc/lang/fa/denied.txt
+++ b/inc/lang/fa/denied.txt
@@ -1,3 +1,4 @@
====== دسترسی ممکن نیست ======
-شرمنده، شما اجازه‌ی دسترسی ب این صفحه را ندارید. ممکن است فراموش کرده باشید که وارد سایت شوید! \ No newline at end of file
+شرمنده، شما اجازه‌ی دسترسی ب این صفحه را ندارید.
+
diff --git a/inc/lang/fa/lang.php b/inc/lang/fa/lang.php
index dbad62890..d3016c0bd 100644
--- a/inc/lang/fa/lang.php
+++ b/inc/lang/fa/lang.php
@@ -98,12 +98,12 @@ $lang['license'] = 'به جز مواردی که ذکر می‌شو
$lang['licenseok'] = 'توجه: با ویرایش این صفحه، شما مجوز زیر را تایید می‌کنید:';
$lang['searchmedia'] = 'نام فایل برای جستجو:';
$lang['searchmedia_in'] = 'جستجو در %s';
-$lang['txt_upload'] = 'فایل را برای ارسال انتخاب کنید';
-$lang['txt_filename'] = 'ارسال به صورت (اختیاری)';
+$lang['txt_upload'] = 'فایل را برای ارسال انتخاب کنید:';
+$lang['txt_filename'] = 'ارسال به صورت (اختیاری):';
$lang['txt_overwrt'] = 'بر روی فایل موجود بنویس';
$lang['maxuploadsize'] = 'حداکثر %s برای هر فایل مجاز است.';
-$lang['lockedby'] = 'در حال حاضر قفل شده است';
-$lang['lockexpire'] = 'قفل منقضی شده است';
+$lang['lockedby'] = 'در حال حاضر قفل شده است:';
+$lang['lockexpire'] = 'قفل منقضی شده است:';
$lang['js']['willexpire'] = 'حالت قفل شما مدتی است منقضی شده است \n برای جلوگیری از تداخل دکمه‌ی پیش‌نمایش را برای صفر شدن ساعت قفل بزنید.';
$lang['js']['notsavedyet'] = 'تغییرات ذخیره شده از بین خواهد رفت.
می‌خواهید ادامه دهید؟';
@@ -185,9 +185,9 @@ $lang['diff_type'] = 'مشاهده تغییرات:';
$lang['diff_inline'] = 'خطی';
$lang['diff_side'] = 'کلی';
$lang['line'] = 'خط';
-$lang['breadcrumb'] = 'ردپا';
-$lang['youarehere'] = 'محل شما';
-$lang['lastmod'] = 'آخرین ویرایش';
+$lang['breadcrumb'] = 'ردپا:';
+$lang['youarehere'] = 'محل شما:';
+$lang['lastmod'] = 'آخرین ویرایش:';
$lang['by'] = 'توسط';
$lang['deleted'] = 'حذف شد';
$lang['created'] = 'ایجاد شد';
@@ -240,20 +240,20 @@ $lang['admin_register'] = 'یک حساب جدید بسازید';
$lang['metaedit'] = 'ویرایش داده‌های متا';
$lang['metasaveerr'] = 'نوشتن داده‌نما با مشکل مواجه شد';
$lang['metasaveok'] = 'داده‌نما ذخیره شد';
-$lang['img_backto'] = 'بازگشت به ';
-$lang['img_title'] = 'عنوان تصویر';
-$lang['img_caption'] = 'عنوان';
-$lang['img_date'] = 'تاریخ';
-$lang['img_fname'] = 'نام فایل';
-$lang['img_fsize'] = 'اندازه';
-$lang['img_artist'] = 'عکاس/هنرمند';
-$lang['img_copyr'] = 'دارنده‌ی حق تکثیر';
-$lang['img_format'] = 'فرمت';
-$lang['img_camera'] = 'دوربین';
-$lang['img_keywords'] = 'واژه‌های کلیدی';
-$lang['img_width'] = 'عرض';
-$lang['img_height'] = 'ارتفاع';
-$lang['img_manager'] = 'دیدن در مدیریت محتوای چند رسانه ای';
+$lang['btn_img_backto'] = 'بازگشت به %s';
+$lang['img_title'] = 'عنوان تصویر:';
+$lang['img_caption'] = 'عنوان:';
+$lang['img_date'] = 'تاریخ:';
+$lang['img_fname'] = 'نام فایل:';
+$lang['img_fsize'] = 'اندازه:';
+$lang['img_artist'] = 'عکاس/هنرمند:';
+$lang['img_copyr'] = 'دارنده‌ی حق تکثیر:';
+$lang['img_format'] = 'فرمت:';
+$lang['img_camera'] = 'دوربین:';
+$lang['img_keywords'] = 'واژه‌های کلیدی:';
+$lang['img_width'] = 'عرض:';
+$lang['img_height'] = 'ارتفاع:';
+$lang['btn_mediaManager'] = 'دیدن در مدیریت محتوای چند رسانه ای';
$lang['subscr_subscribe_success'] = '%s به لیست آبونه %s افزوده شد';
$lang['subscr_subscribe_error'] = 'اشکال در افزودن %s به لیست آبونه %s';
$lang['subscr_subscribe_noaddress'] = 'هیچ آدرسی برای این عضویت اضافه نشده است، شما نمی‌توانید به لیست آبونه اضافه شوید';
diff --git a/inc/lang/fi/denied.txt b/inc/lang/fi/denied.txt
index cd31da06b..89ebd4830 100644
--- a/inc/lang/fi/denied.txt
+++ b/inc/lang/fi/denied.txt
@@ -1,3 +1,4 @@
====== Lupa evätty ======
-Sinulla ei ole tarpeeksi valtuuksia jatkaa. Ehkä unohdit kirjautua sisään?
+Sinulla ei ole tarpeeksi valtuuksia jatkaa.
+
diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php
index feefc3da8..0f82c3b7a 100644
--- a/inc/lang/fi/lang.php
+++ b/inc/lang/fi/lang.php
@@ -53,7 +53,7 @@ $lang['btn_register'] = 'Rekisteröidy';
$lang['btn_apply'] = 'Toteuta';
$lang['btn_media'] = 'Media manager';
$lang['btn_deleteuser'] = 'Poista tilini';
-$lang['loggedinas'] = 'Kirjautunut nimellä';
+$lang['loggedinas'] = 'Kirjautunut nimellä:';
$lang['user'] = 'Käyttäjänimi';
$lang['pass'] = 'Salasana';
$lang['newpass'] = 'Uusi salasana';
@@ -98,12 +98,12 @@ $lang['license'] = 'Jollei muuta ole mainittu, niin sisältö täs
$lang['licenseok'] = 'Huom: Muokkaamalla tätä sivua suostut lisensoimaan sisällön seuraavan lisenssin mukaisesti:';
$lang['searchmedia'] = 'Etsi tiedostoa nimeltä:';
$lang['searchmedia_in'] = 'Etsi kohteesta %s';
-$lang['txt_upload'] = 'Valitse tiedosto lähetettäväksi';
-$lang['txt_filename'] = 'Lähetä nimellä (valinnainen)';
+$lang['txt_upload'] = 'Valitse tiedosto lähetettäväksi:';
+$lang['txt_filename'] = 'Lähetä nimellä (valinnainen):';
$lang['txt_overwrt'] = 'Ylikirjoita olemassa oleva';
$lang['maxuploadsize'] = 'Palvelimelle siirto max. %s / tiedosto.';
-$lang['lockedby'] = 'Tällä hetkellä tiedoston on lukinnut';
-$lang['lockexpire'] = 'Lukitus päättyy';
+$lang['lockedby'] = 'Tällä hetkellä tiedoston on lukinnut:';
+$lang['lockexpire'] = 'Lukitus päättyy:';
$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?';
@@ -185,9 +185,9 @@ $lang['diff_type'] = 'Näytä eroavaisuudet:';
$lang['diff_inline'] = 'Sisäkkäin';
$lang['diff_side'] = 'Vierekkäin';
$lang['line'] = 'Rivi';
-$lang['breadcrumb'] = 'Jäljet';
-$lang['youarehere'] = 'Olet täällä';
-$lang['lastmod'] = 'Viimeksi muutettu';
+$lang['breadcrumb'] = 'Jäljet:';
+$lang['youarehere'] = 'Olet täällä:';
+$lang['lastmod'] = 'Viimeksi muutettu:';
$lang['by'] = '/';
$lang['deleted'] = 'poistettu';
$lang['created'] = 'luotu';
@@ -240,20 +240,20 @@ $lang['admin_register'] = 'Lisää uusi käyttäjä';
$lang['metaedit'] = 'Muokkaa metadataa';
$lang['metasaveerr'] = 'Metadatan kirjoittaminen epäonnistui';
$lang['metasaveok'] = 'Metadata tallennettu';
-$lang['img_backto'] = 'Takaisin';
-$lang['img_title'] = 'Otsikko';
-$lang['img_caption'] = 'Kuvateksti';
-$lang['img_date'] = 'Päivämäärä';
-$lang['img_fname'] = 'Tiedoston nimi';
-$lang['img_fsize'] = 'Koko';
-$lang['img_artist'] = 'Kuvaaja';
-$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['btn_img_backto'] = 'Takaisin %s';
+$lang['img_title'] = 'Otsikko:';
+$lang['img_caption'] = 'Kuvateksti:';
+$lang['img_date'] = 'Päivämäärä:';
+$lang['img_fname'] = 'Tiedoston nimi:';
+$lang['img_fsize'] = 'Koko:';
+$lang['img_artist'] = 'Kuvaaja:';
+$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['btn_mediaManager'] = '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';
diff --git a/inc/lang/fo/denied.txt b/inc/lang/fo/denied.txt
index 505b249b4..ecebba88c 100644
--- a/inc/lang/fo/denied.txt
+++ b/inc/lang/fo/denied.txt
@@ -1,3 +1,4 @@
====== Atgongd nokta! ======
-Tú hevur ikki rættindi til at halda áfram. Møguliga hevur tú ikki rita inn.
+Tú hevur ikki rættindi til at halda áfram.
+
diff --git a/inc/lang/fo/lang.php b/inc/lang/fo/lang.php
index 161e7321a..b326d27ac 100644
--- a/inc/lang/fo/lang.php
+++ b/inc/lang/fo/lang.php
@@ -45,7 +45,7 @@ $lang['btn_recover'] = 'Endurbygg kladdu';
$lang['btn_draftdel'] = 'Sletta';
$lang['btn_revert'] = 'Endurbygg';
$lang['btn_register'] = 'Melda til';
-$lang['loggedinas'] = 'Ritavur inn sum';
+$lang['loggedinas'] = 'Ritavur inn sum:';
$lang['user'] = 'Brúkaranavn';
$lang['pass'] = 'Loyniorð';
$lang['newpass'] = 'Nýtt loyniorð';
@@ -83,11 +83,11 @@ $lang['license'] = 'Um ikki annað er tilskilað, so er tilfar á
$lang['licenseok'] = 'Legg til merkis: Við at dagføra hesa síðu samtykkir tú at loyva margfalding av tilfarinum undir fylgjandi treytum:';
$lang['searchmedia'] = 'Leita eftir fíl navn:';
$lang['searchmedia_in'] = 'Leita í %s';
-$lang['txt_upload'] = 'Vel tí fílu sum skal leggjast upp';
-$lang['txt_filename'] = 'Sláa inn wikinavn (valfrítt)';
+$lang['txt_upload'] = 'Vel tí fílu sum skal leggjast upp:';
+$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['lockedby'] = 'Fyribils læst av:';
+$lang['lockexpire'] = 'Lásið ferð úr gildi kl.:';
$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?';
@@ -124,9 +124,9 @@ $lang['current'] = 'núverandi';
$lang['yours'] = 'Tín útgáva';
$lang['diff'] = 'vís broytingar í mun til núverandi útgávu';
$lang['line'] = 'Linja';
-$lang['breadcrumb'] = 'Leið';
-$lang['youarehere'] = 'Tú ert her';
-$lang['lastmod'] = 'Seinast broytt';
+$lang['breadcrumb'] = 'Leið:';
+$lang['youarehere'] = 'Tú ert her:';
+$lang['lastmod'] = 'Seinast broytt:';
$lang['by'] = 'av';
$lang['deleted'] = 'strika';
$lang['created'] = 'stovna';
@@ -157,15 +157,15 @@ $lang['admin_register'] = 'Upprætta nýggjan brúkara';
$lang['metaedit'] = 'Rætta metadáta';
$lang['metasaveerr'] = 'Brek við skriving av metadáta';
$lang['metasaveok'] = 'Metadáta goymt';
-$lang['img_backto'] = 'Aftur til';
-$lang['img_title'] = 'Heitið';
-$lang['img_caption'] = 'Myndatekstur';
-$lang['img_date'] = 'Dato';
-$lang['img_fname'] = 'Fílunavn';
-$lang['img_fsize'] = 'Stødd';
-$lang['img_artist'] = 'Myndafólk';
-$lang['img_copyr'] = 'Upphavsrættur';
-$lang['img_format'] = 'Snið';
-$lang['img_camera'] = 'Fototól';
-$lang['img_keywords'] = 'Evnisorð';
+$lang['btn_img_backto'] = 'Aftur til %s';
+$lang['img_title'] = 'Heitið:';
+$lang['img_caption'] = 'Myndatekstur:';
+$lang['img_date'] = 'Dato:';
+$lang['img_fname'] = 'Fílunavn:';
+$lang['img_fsize'] = 'Stødd:';
+$lang['img_artist'] = 'Myndafólk:';
+$lang['img_copyr'] = 'Upphavsrættur:';
+$lang['img_format'] = 'Snið:';
+$lang['img_camera'] = 'Fototól:';
+$lang['img_keywords'] = 'Evnisorð:';
$lang['authtempfail'] = 'Validering av brúkara virkar fyribils ikki. Um hetta er varandi, fá so samband við umboðsstjóran á hesi wiki.';
diff --git a/inc/lang/fr/denied.txt b/inc/lang/fr/denied.txt
index 20d4d6755..da01a4086 100644
--- a/inc/lang/fr/denied.txt
+++ b/inc/lang/fr/denied.txt
@@ -1,3 +1,4 @@
====== Autorisation refusée ======
-Désolé, vous n'avez pas les droits pour continuer. Peut-être avez-vous oublié de vous identifier ?
+Désolé, vous n'avez pas suffisement d'autorisations pour poursuivre votre demande.
+
diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php
index 49f617323..c5edd4cf7 100644
--- a/inc/lang/fr/lang.php
+++ b/inc/lang/fr/lang.php
@@ -29,6 +29,12 @@
* @author Bruno Veilleux <bruno.vey@gmail.com>
* @author Emmanuel <seedfloyd@gmail.com>
* @author Jérôme Brandt <jeromebrandt@gmail.com>
+ * @author Wild <wild.dagger@free.fr>
+ * @author ggallon <gwenael.gallon@mac.com>
+ * @author David VANTYGHEM <david.vantyghem@free.fr>
+ * @author Caillot <remicaillot5@gmail.com>
+ * @author Schplurtz le Déboulonné <schplurtz@laposte.net>
+ * @author YoBoY <yoboy@ubuntu-fr.org>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -49,19 +55,19 @@ $lang['btn_newer'] = '<< Plus récent';
$lang['btn_older'] = 'Moins récent >>';
$lang['btn_revs'] = 'Anciennes révisions';
$lang['btn_recent'] = 'Derniers changements';
-$lang['btn_upload'] = 'Envoyer';
+$lang['btn_upload'] = 'Téléverser';
$lang['btn_cancel'] = 'Annuler';
-$lang['btn_index'] = 'Index';
+$lang['btn_index'] = 'Plan du site';
$lang['btn_secedit'] = 'Modifier';
-$lang['btn_login'] = 'Connexion';
-$lang['btn_logout'] = 'Déconnexion';
+$lang['btn_login'] = 'S\'identifier';
+$lang['btn_logout'] = 'Se déconnecter';
$lang['btn_admin'] = 'Administrer';
$lang['btn_update'] = 'Mettre à jour';
$lang['btn_delete'] = 'Effacer';
$lang['btn_back'] = 'Retour';
-$lang['btn_backlink'] = 'Liens vers cette page';
+$lang['btn_backlink'] = 'Liens de retour';
$lang['btn_backtomedia'] = 'Retour à la sélection du fichier média';
-$lang['btn_subscribe'] = 'S\'abonner à la page';
+$lang['btn_subscribe'] = 'Gérer souscriptions';
$lang['btn_profile'] = 'Mettre à jour le profil';
$lang['btn_reset'] = 'Réinitialiser';
$lang['btn_resendpwd'] = 'Définir un nouveau mot de passe';
@@ -69,11 +75,13 @@ $lang['btn_draft'] = 'Modifier le brouillon';
$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_register'] = 'Créer un compte';
$lang['btn_apply'] = 'Appliquer';
$lang['btn_media'] = 'Gestionnaire de médias';
$lang['btn_deleteuser'] = 'Supprimer mon compte';
-$lang['loggedinas'] = 'Connecté en tant que ';
+$lang['btn_img_backto'] = 'Retour vers %s';
+$lang['btn_mediaManager'] = 'Voir dans le gestionnaire de médias';
+$lang['loggedinas'] = 'Connecté en tant que :';
$lang['user'] = 'Utilisateur';
$lang['pass'] = 'Mot de passe';
$lang['newpass'] = 'Nouveau mot de passe';
@@ -83,20 +91,20 @@ $lang['remember'] = 'Mémoriser';
$lang['fullname'] = 'Nom';
$lang['email'] = 'Adresse de courriel';
$lang['profile'] = 'Profil utilisateur';
-$lang['badlogin'] = 'L\'utilisateur ou le mot de passe est incorrect.';
+$lang['badlogin'] = 'Le nom d\'utilisateur ou le mot de passe est incorrect.';
$lang['badpassconfirm'] = 'Désolé, le mot de passe est erroné';
$lang['minoredit'] = 'Modification mineure';
-$lang['draftdate'] = 'Brouillon enregistré de manière automatique le';
+$lang['draftdate'] = 'Brouillon enregistré automatiquement le';
$lang['nosecedit'] = 'La page a changé entre temps, les informations de la section sont obsolètes ; la page complète a été chargée à la place.';
$lang['regmissing'] = 'Désolé, vous devez remplir tous les champs.';
-$lang['reguexists'] = 'Désolé, ce nom d\'utilisateur est déjà utilisé.';
+$lang['reguexists'] = 'Désolé, ce nom d\'utilisateur est déjà pris.';
$lang['regsuccess'] = 'L\'utilisateur a été créé. Le mot de passe a été expédié par courriel.';
$lang['regsuccess2'] = 'L\'utilisateur a été créé.';
-$lang['regmailfail'] = 'Il semble y avoir un problème à l\'envoi du courriel. Contactez l\'administrateur.';
+$lang['regmailfail'] = 'On dirait qu\'il y a eu une erreur lors de l\'envoi du mot de passe de messagerie. Veuillez contacter l\'administrateur !';
$lang['regbadmail'] = 'L\'adresse de courriel semble incorrecte. Si vous pensez que c\'est une erreur, contactez l\'administrateur.';
$lang['regbadpass'] = 'Les deux mots de passe fournis sont différents, veuillez recommencez.';
$lang['regpwmail'] = 'Votre mot de passe DokuWiki';
-$lang['reghere'] = 'Vous n\'avez pas encore de compte ? Enregistrez-vous ici ';
+$lang['reghere'] = 'Vous n\'avez pas encore de compte ? Inscrivez-vous';
$lang['profna'] = 'Ce wiki ne permet pas de modifier les profils';
$lang['profnochange'] = 'Pas de modification, rien à faire.';
$lang['profnoempty'] = 'Un nom ou une adresse de courriel vide n\'est pas permis.';
@@ -118,12 +126,12 @@ $lang['license'] = 'Sauf mention contraire, le contenu de ce wiki
$lang['licenseok'] = 'Note : En modifiant cette page, vous acceptez que le contenu soit placé sous les termes de la licence suivante :';
$lang['searchmedia'] = 'Chercher le nom de fichier :';
$lang['searchmedia_in'] = 'Chercher dans %s';
-$lang['txt_upload'] = 'Sélectionnez un fichier à envoyer ';
-$lang['txt_filename'] = 'Envoyer en tant que (optionnel) ';
+$lang['txt_upload'] = 'Sélectionnez un fichier à envoyer:';
+$lang['txt_filename'] = 'Envoyer en tant que (optionnel):';
$lang['txt_overwrt'] = 'Écraser le fichier cible (s\'il existe)';
$lang['maxuploadsize'] = 'Taille d\'envoi maximale : %s par fichier';
-$lang['lockedby'] = 'Actuellement bloqué par';
-$lang['lockexpire'] = 'Le blocage expire à';
+$lang['lockedby'] = 'Actuellement bloqué par:';
+$lang['lockexpire'] = 'Le blocage expire à:';
$lang['js']['willexpire'] = 'Votre blocage 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';
@@ -202,10 +210,15 @@ $lang['difflink'] = 'Lien vers cette vue comparative';
$lang['diff_type'] = 'Voir les différences :';
$lang['diff_inline'] = 'Sur une seule ligne';
$lang['diff_side'] = 'Côte à côte';
+$lang['diffprevrev'] = 'Révision précédente';
+$lang['diffnextrev'] = 'Prochaine révision';
+$lang['difflastrev'] = 'Dernière révision';
+$lang['diffbothprevrev'] = 'Les deux révisions précédentes';
+$lang['diffbothnextrev'] = 'Les deux révisions suivantes';
$lang['line'] = 'Ligne';
-$lang['breadcrumb'] = 'Piste';
-$lang['youarehere'] = 'Vous êtes ici';
-$lang['lastmod'] = 'Dernière modification';
+$lang['breadcrumb'] = 'Piste:';
+$lang['youarehere'] = 'Vous êtes ici:';
+$lang['lastmod'] = 'Dernière modification:';
$lang['by'] = 'par';
$lang['deleted'] = 'supprimée';
$lang['created'] = 'créée';
@@ -258,20 +271,18 @@ $lang['admin_register'] = 'Ajouter un nouvel utilisateur';
$lang['metaedit'] = 'Modifier les métadonnées';
$lang['metasaveerr'] = 'Erreur lors de l\'enregistrement des métadonnées';
$lang['metasaveok'] = 'Métadonnées enregistrées';
-$lang['img_backto'] = 'Retour à';
-$lang['img_title'] = 'Titre';
-$lang['img_caption'] = 'Légende';
-$lang['img_date'] = 'Date';
-$lang['img_fname'] = 'Nom de fichier';
-$lang['img_fsize'] = 'Taille';
-$lang['img_artist'] = 'Photographe';
-$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['img_title'] = 'Titre:';
+$lang['img_caption'] = 'Légende:';
+$lang['img_date'] = 'Date:';
+$lang['img_fname'] = 'Nom de fichier:';
+$lang['img_fsize'] = 'Taille:';
+$lang['img_artist'] = 'Photographe:';
+$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['subscr_subscribe_success'] = '%s a été ajouté à la liste de souscription de %s';
$lang['subscr_subscribe_error'] = 'Erreur à l\'ajout de %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';
@@ -299,6 +310,7 @@ $lang['i_problems'] = 'L\'installateur a détecté les problèmes ind
$lang['i_modified'] = 'Pour des raisons de sécurité, ce script ne fonctionne qu\'avec une installation neuve et non modifiée de DokuWiki. Vous devriez ré-extraire les fichiers depuis le paquet téléchargé ou consulter les <a href="http://dokuwiki.org/install">instructions d\'installation de DokuWiki</a>';
$lang['i_funcna'] = 'La fonction PHP <code>%s</code> n\'est pas disponible. Peut-être que votre hébergeur web l\'a désactivée ?';
$lang['i_phpver'] = 'Votre version de PHP (%s) est antérieure à la version requise (%s). Vous devez mettre à jour votre installation de PHP.';
+$lang['i_mbfuncoverload'] = 'Il faut désactiver mbstring.func_overload dans php.ini pour DokuWiki';
$lang['i_permfail'] = '<code>%s</code> n\'est pas accessible en écriture pour DokuWiki. Vous devez corriger les autorisations de ce répertoire !';
$lang['i_confexists'] = '<code>%s</code> existe déjà';
$lang['i_writeerr'] = 'Impossible de créer <code>%s</code>. Vous devez vérifier les autorisations des répertoires/fichiers et créer le fichier manuellement.';
diff --git a/inc/lang/fr/subscr_form.txt b/inc/lang/fr/subscr_form.txt
index 49c0cf443..d68c05e6a 100644
--- a/inc/lang/fr/subscr_form.txt
+++ b/inc/lang/fr/subscr_form.txt
@@ -1,3 +1,3 @@
-====== Gestion de l'abonnement ======
+====== Gestion des souscriptions ======
-Cette page vous permet de gérer vos abonnements à la page et à la catégorie courantes \ No newline at end of file
+Cette page vous permet de gérer vos souscriptions pour suivre les modifications sur la page et sur la catégorie courante. \ No newline at end of file
diff --git a/inc/lang/gl/denied.txt b/inc/lang/gl/denied.txt
index 69408a4f3..ef37a06f0 100644
--- a/inc/lang/gl/denied.txt
+++ b/inc/lang/gl/denied.txt
@@ -1,4 +1,4 @@
====== Permiso Denegado ======
-Sentímolo, mais non tes permisos de abondo para continuares. Pode que esqueceses iniciar a sesión?
+Sentímolo, mais non tes permisos de abondo para continuares.
diff --git a/inc/lang/gl/lang.php b/inc/lang/gl/lang.php
index 65967a3b5..aed225359 100644
--- a/inc/lang/gl/lang.php
+++ b/inc/lang/gl/lang.php
@@ -49,7 +49,7 @@ $lang['btn_revert'] = 'Restaurar';
$lang['btn_register'] = 'Rexístrate';
$lang['btn_apply'] = 'Aplicar';
$lang['btn_media'] = 'Xestor de Arquivos-Media';
-$lang['loggedinas'] = 'Iniciaches sesión como';
+$lang['loggedinas'] = 'Iniciaches sesión como:';
$lang['user'] = 'Nome de Usuario';
$lang['pass'] = 'Contrasinal';
$lang['newpass'] = 'Novo Contrasinal';
@@ -88,12 +88,12 @@ $lang['license'] = 'O contido deste wiki, agás onde se indique o
$lang['licenseok'] = 'Nota: Ao editares esta páxina estás a aceptar o licenciamento do contido baixo da seguinte licenza:';
$lang['searchmedia'] = 'Procurar nome de arquivo:';
$lang['searchmedia_in'] = 'Procurar en %s';
-$lang['txt_upload'] = 'Escolle o arquivo para subir';
-$lang['txt_filename'] = 'Subir como (opcional)';
+$lang['txt_upload'] = 'Escolle o arquivo para subir:';
+$lang['txt_filename'] = 'Subir como (opcional):';
$lang['txt_overwrt'] = 'Sobrescribir arquivo existente';
$lang['maxuploadsize'] = 'Subida máxima %s por arquivo.';
-$lang['lockedby'] = 'Bloqueado actualmente por';
-$lang['lockexpire'] = 'O bloqueo remata o';
+$lang['lockedby'] = 'Bloqueado actualmente por:';
+$lang['lockexpire'] = 'O bloqueo remata o:';
$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.
Está certo de quereres continuar?';
@@ -175,9 +175,9 @@ $lang['diff_type'] = 'Ver diferenzas:';
$lang['diff_inline'] = 'Por liña';
$lang['diff_side'] = 'Cara a Cara';
$lang['line'] = 'Liña';
-$lang['breadcrumb'] = 'Trazado';
-$lang['youarehere'] = 'Estás aquí';
-$lang['lastmod'] = 'Última modificación';
+$lang['breadcrumb'] = 'Trazado:';
+$lang['youarehere'] = 'Estás aquí:';
+$lang['lastmod'] = 'Última modificación:';
$lang['by'] = 'por';
$lang['deleted'] = 'eliminado';
$lang['created'] = 'creado';
@@ -230,20 +230,20 @@ $lang['admin_register'] = 'Engadir novo usuario';
$lang['metaedit'] = 'Editar Metadatos';
$lang['metasaveerr'] = 'Non se puideron escribir os metadatos';
$lang['metasaveok'] = 'Metadatos gardados';
-$lang['img_backto'] = 'Volver a';
-$lang['img_title'] = 'Título';
-$lang['img_caption'] = 'Lenda';
-$lang['img_date'] = 'Data';
-$lang['img_fname'] = 'Nome de arquivo';
-$lang['img_fsize'] = 'Tamaño';
-$lang['img_artist'] = 'Fotógrafo';
-$lang['img_copyr'] = 'Copyright';
-$lang['img_format'] = 'Formato';
-$lang['img_camera'] = 'Cámara';
-$lang['img_keywords'] = 'Verbas chave';
-$lang['img_width'] = 'Ancho';
-$lang['img_height'] = 'Alto';
-$lang['img_manager'] = 'Ver no xestor de arquivos-media';
+$lang['btn_img_backto'] = 'Volver a %s';
+$lang['img_title'] = 'Título:';
+$lang['img_caption'] = 'Lenda:';
+$lang['img_date'] = 'Data:';
+$lang['img_fname'] = 'Nome de arquivo:';
+$lang['img_fsize'] = 'Tamaño:';
+$lang['img_artist'] = 'Fotógrafo:';
+$lang['img_copyr'] = 'Copyright:';
+$lang['img_format'] = 'Formato:';
+$lang['img_camera'] = 'Cámara:';
+$lang['img_keywords'] = 'Verbas chave:';
+$lang['img_width'] = 'Ancho:';
+$lang['img_height'] = 'Alto:';
+$lang['btn_mediaManager'] = 'Ver no xestor de arquivos-media';
$lang['subscr_subscribe_success'] = 'Engadido %s á lista de subscrición para %s';
$lang['subscr_subscribe_error'] = 'Erro ao tentar engadir %s á lista de subscrición para %s';
$lang['subscr_subscribe_noaddress'] = 'Non hai enderezos asociados co teu inicio de sesión, non é posíbel engadirte á lista de subscrición';
diff --git a/inc/lang/he/denied.txt b/inc/lang/he/denied.txt
index a366fc198..a2e19f3c5 100644
--- a/inc/lang/he/denied.txt
+++ b/inc/lang/he/denied.txt
@@ -1,3 +1,4 @@
====== הרשאה נדחתה ======
-אנו מצטערים אך אין לך הרשאות מתאימות כדי להמשיך. אולי שכחת להיכנס למערכת? \ No newline at end of file
+אנו מצטערים אך אין לך הרשאות מתאימות כדי להמשיך.
+
diff --git a/inc/lang/he/lang.php b/inc/lang/he/lang.php
index 8efe0da17..101102b48 100644
--- a/inc/lang/he/lang.php
+++ b/inc/lang/he/lang.php
@@ -57,7 +57,7 @@ $lang['btn_register'] = 'הרשמה';
$lang['btn_apply'] = 'ליישם';
$lang['btn_media'] = 'מנהל המדיה';
$lang['btn_deleteuser'] = 'להסיר את החשבון שלי';
-$lang['loggedinas'] = 'נכנסת בשם';
+$lang['loggedinas'] = 'נכנסת בשם:';
$lang['user'] = 'שם משתמש';
$lang['pass'] = 'ססמה';
$lang['newpass'] = 'ססמה חדשה';
@@ -102,12 +102,12 @@ $lang['license'] = 'למעט מקרים בהם צוין אחרת,
$lang['licenseok'] = 'נא לשים לב: עריכת דף זה מהווה הסכמה מצדך להצגת התוכן שהוספת בהתאם הרישיון הבא:';
$lang['searchmedia'] = 'חיפוש שם קובץ:';
$lang['searchmedia_in'] = 'חיפוש תחת %s';
-$lang['txt_upload'] = 'בחירת קובץ להעלות';
-$lang['txt_filename'] = 'העלאה בשם (נתון לבחירה)';
+$lang['txt_upload'] = 'בחירת קובץ להעלות:';
+$lang['txt_filename'] = 'העלאה בשם (נתון לבחירה):';
$lang['txt_overwrt'] = 'שכתוב על קובץ קיים';
$lang['maxuploadsize'] = 'העלה מקסימום. s% לכל קובץ.';
-$lang['lockedby'] = 'נעול על ידי';
-$lang['lockexpire'] = 'הנעילה פגה';
+$lang['lockedby'] = 'נעול על ידי:';
+$lang['lockexpire'] = 'הנעילה פגה:';
$lang['js']['willexpire'] = 'הנעילה תחלוף עוד זמן קצר. \nלמניעת התנגשויות יש להשתמש בכפתור הרענון מטה כדי לאפס את מד משך הנעילה.';
$lang['js']['notsavedyet'] = 'שינויים שלא נשמרו ילכו לאיבוד.';
$lang['js']['searchmedia'] = 'חיפוש אחר קבצים';
@@ -188,9 +188,9 @@ $lang['diff_type'] = 'הצגת הבדלים:';
$lang['diff_inline'] = 'באותה השורה';
$lang['diff_side'] = 'זה לצד זה';
$lang['line'] = 'שורה';
-$lang['breadcrumb'] = 'ביקורים אחרונים';
-$lang['youarehere'] = 'זהו מיקומך';
-$lang['lastmod'] = 'מועד השינוי האחרון';
+$lang['breadcrumb'] = 'ביקורים אחרונים:';
+$lang['youarehere'] = 'זהו מיקומך:';
+$lang['lastmod'] = 'מועד השינוי האחרון:';
$lang['by'] = 'על ידי';
$lang['deleted'] = 'נמחק';
$lang['created'] = 'נוצר';
@@ -243,20 +243,20 @@ $lang['admin_register'] = 'הוספת משתמש חדש';
$lang['metaedit'] = 'עריכת נתוני העל';
$lang['metasaveerr'] = 'אירע כשל בשמירת נתוני העל';
$lang['metasaveok'] = 'נתוני העל נשמרו';
-$lang['img_backto'] = 'חזרה אל';
-$lang['img_title'] = 'שם';
-$lang['img_caption'] = 'כותרת';
-$lang['img_date'] = 'תאריך';
-$lang['img_fname'] = 'שם הקובץ';
-$lang['img_fsize'] = 'גודל';
-$lang['img_artist'] = 'צלם';
-$lang['img_copyr'] = 'זכויות יוצרים';
-$lang['img_format'] = 'מבנה';
-$lang['img_camera'] = 'מצלמה';
-$lang['img_keywords'] = 'מילות מפתח';
-$lang['img_width'] = 'רוחב';
-$lang['img_height'] = 'גובה';
-$lang['img_manager'] = 'צפה במנהל מדיה';
+$lang['btn_img_backto'] = 'חזרה אל %s';
+$lang['img_title'] = 'שם:';
+$lang['img_caption'] = 'כותרת:';
+$lang['img_date'] = 'תאריך:';
+$lang['img_fname'] = 'שם הקובץ:';
+$lang['img_fsize'] = 'גודל:';
+$lang['img_artist'] = 'צלם:';
+$lang['img_copyr'] = 'זכויות יוצרים:';
+$lang['img_format'] = 'מבנה:';
+$lang['img_camera'] = 'מצלמה:';
+$lang['img_keywords'] = 'מילות מפתח:';
+$lang['img_width'] = 'רוחב:';
+$lang['img_height'] = 'גובה:';
+$lang['btn_mediaManager'] = 'צפה במנהל מדיה';
$lang['subscr_subscribe_success'] = '%s נוסף לרשימת המינויים לדף %s';
$lang['subscr_subscribe_error'] = 'אירעה שגיאה בהוספת %s לרשימת המינויים לדף %s';
$lang['subscr_subscribe_noaddress'] = 'אין כתובת המשויכת עם הכניסה שלך, נא ניתן להוסיף אותך לרשימת המינויים';
@@ -285,7 +285,7 @@ $lang['i_modified'] = 'משיקולי אבטחה סקריפט זה י
עליך לחלץ שנית את הקבצים מהחבילה שהורדה או להיעזר בדף
<a href="http://dokuwiki.org/install">Dokuwiki installation instructions</a>';
$lang['i_funcna'] = 'פונקציית ה-PHP&rlm; <code>%s</code> אינה זמינה. יתכן כי מארח האתר חסם אותה מסיבה כלשהי?';
-$lang['i_phpver'] = 'גרסת PHP שלך <code>%s</code> נמוכה מ <code>%s</ code> הצורך. אתה צריך לשדרג PHP שלך להתקין.';
+$lang['i_phpver'] = 'גרסת PHP שלך <code>%s</code> נמוכה מ <code>%s</code> הצורך. אתה צריך לשדרג PHP שלך להתקין.';
$lang['i_permfail'] = '<code>%s</code> אינה ניתנת לכתיבה על ידי DokuWiki. עליך לשנות הרשאות תיקייה זו!';
$lang['i_confexists'] = '<code>%s</code> כבר קיים';
$lang['i_writeerr'] = 'אין אפשרות ליצור את <code>%s</code>. נא לבדוק את הרשאות הקובץ/תיקייה וליצור את הקובץ ידנית.';
diff --git a/inc/lang/hi/lang.php b/inc/lang/hi/lang.php
index 184eeedbc..71795191c 100644
--- a/inc/lang/hi/lang.php
+++ b/inc/lang/hi/lang.php
@@ -63,11 +63,11 @@ $lang['profna'] = 'यह विकी प्रोफ़ाइ
$lang['profnochange'] = 'कोई परिवर्तन नहीं, कुछ नहीं करना |';
$lang['resendpwdmissing'] = 'छमा करें, आपको सारे रिक्त स्थान भरने पड़ेंगे |';
$lang['resendpwdsuccess'] = 'आपका नवगुप्तशब्द ईमेल द्वारा सम्प्रेषित कर दिया गया है |';
-$lang['txt_upload'] = 'अपलोड करने के लिए फ़ाइल चुनें';
-$lang['txt_filename'] = 'के रूप में अपलोड करें (वैकल्पिक)';
+$lang['txt_upload'] = 'अपलोड करने के लिए फ़ाइल चुनें:';
+$lang['txt_filename'] = 'के रूप में अपलोड करें (वैकल्पिक):';
$lang['txt_overwrt'] = 'अधिलेखित उपस्थित फ़ाइल';
-$lang['lockedby'] = 'इस समय तक बंद';
-$lang['lockexpire'] = 'बंद समाप्त होगा';
+$lang['lockedby'] = 'इस समय तक बंद:';
+$lang['lockexpire'] = 'बंद समाप्त होगा:';
$lang['js']['hidedetails'] = 'विवरण छिपाएँ';
$lang['nothingfound'] = 'कुच्छ नहीं मिला |';
$lang['uploadexist'] = 'फ़ाइल पहले से उपस्थित है. कुछ भी नहीं किया |';
@@ -81,8 +81,8 @@ $lang['yours'] = 'आपका संस्करणः';
$lang['diff'] = 'वर्तमान संशोधन में मतभेद दिखाइये |';
$lang['diff2'] = 'चयनित संशोधन के बीच में मतभेद दिखाइये |';
$lang['line'] = 'रेखा';
-$lang['youarehere'] = 'आप यहाँ हैं |';
-$lang['lastmod'] = 'अंतिम बार संशोधित';
+$lang['youarehere'] = 'आप यहाँ हैं |:';
+$lang['lastmod'] = 'अंतिम बार संशोधित:';
$lang['by'] = 'के द्वारा';
$lang['deleted'] = 'हटाया';
$lang['created'] = 'निर्मित';
@@ -103,14 +103,14 @@ $lang['qb_extlink'] = 'बाह्य कड़ी';
$lang['qb_hr'] = 'खड़ी रेखा';
$lang['qb_sig'] = 'हस्ताक्षर डालें';
$lang['admin_register'] = 'नया उपयोगकर्ता जोड़ें';
-$lang['img_backto'] = 'वापस जाना';
-$lang['img_title'] = 'शीर्षक';
-$lang['img_caption'] = 'सहशीर्षक';
-$lang['img_date'] = 'तिथि';
-$lang['img_fsize'] = 'आकार';
-$lang['img_artist'] = 'फोटोग्राफर';
-$lang['img_format'] = 'प्रारूप';
-$lang['img_camera'] = 'कैमरा';
+$lang['btn_img_backto'] = 'वापस जाना %s';
+$lang['img_title'] = 'शीर्षक:';
+$lang['img_caption'] = 'सहशीर्षक:';
+$lang['img_date'] = 'तिथि:';
+$lang['img_fsize'] = 'आकार:';
+$lang['img_artist'] = 'फोटोग्राफर:';
+$lang['img_format'] = 'प्रारूप:';
+$lang['img_camera'] = 'कैमरा:';
$lang['i_chooselang'] = 'अपनी भाषा चुनें';
$lang['i_installer'] = 'डोकुविकी इंस्टॉलर';
$lang['i_wikiname'] = 'विकी का नाम';
diff --git a/inc/lang/hr/adminplugins.txt b/inc/lang/hr/adminplugins.txt
new file mode 100644
index 000000000..556ffda0b
--- /dev/null
+++ b/inc/lang/hr/adminplugins.txt
@@ -0,0 +1 @@
+===== Dodatni Pluginovi ===== \ No newline at end of file
diff --git a/inc/lang/hr/denied.txt b/inc/lang/hr/denied.txt
index 216eea582..172b0fc92 100644
--- a/inc/lang/hr/denied.txt
+++ b/inc/lang/hr/denied.txt
@@ -2,4 +2,3 @@
Nemate autorizaciju.
-Niste li se možda zaboravili prijaviti u aplikaciju?
diff --git a/inc/lang/hr/draft.txt b/inc/lang/hr/draft.txt
new file mode 100644
index 000000000..2e6e08429
--- /dev/null
+++ b/inc/lang/hr/draft.txt
@@ -0,0 +1,4 @@
+====== Nađena neuspjelo uređivanje stranice ======
+
+Vaše zadnje uređivanje ove stranice nije završilo uredno. DokuWiki je automatski snimio kopiju tijekom rada koju sada možete iskoristiti da nastavite uređivanje. Niže možete vidjeti sadržaj koji je snimljen pri vašem zadnjem uređivanju.
+Molimo odlučite da li želite //vratiti// ili //obrisati// snimljeni sadržaj pri vašem zadnjem neuspjelom uređivanju, ili pak želite //odustati// od uređivanja.
diff --git a/inc/lang/hr/lang.php b/inc/lang/hr/lang.php
index f19610827..6a3fa20e2 100644
--- a/inc/lang/hr/lang.php
+++ b/inc/lang/hr/lang.php
@@ -1,12 +1,13 @@
<?php
+
/**
- * croatian language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @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
+ * @author Davor Turkalj <turki.bsc@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -42,12 +43,18 @@ $lang['btn_backtomedia'] = 'Povratak na Mediafile izbornik';
$lang['btn_subscribe'] = 'Pretplati se na promjene dokumenta';
$lang['btn_profile'] = 'Ažuriraj profil';
$lang['btn_reset'] = 'Poništi promjene';
+$lang['btn_resendpwd'] = 'Postavi 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['btn_apply'] = 'Primjeni';
+$lang['btn_media'] = 'Upravitelj datoteka';
+$lang['btn_deleteuser'] = 'Ukloni mojeg korisnika';
+$lang['btn_img_backto'] = 'Povratak na %s';
+$lang['btn_mediaManager'] = 'Pogledaj u upravitelju datoteka';
+$lang['loggedinas'] = 'Prijavljen kao:';
$lang['user'] = 'Korisničko ime';
$lang['pass'] = 'Lozinka';
$lang['newpass'] = 'Nova lozinka';
@@ -58,6 +65,7 @@ $lang['fullname'] = 'Ime i prezime';
$lang['email'] = 'Email';
$lang['profile'] = 'Korisnički profil';
$lang['badlogin'] = 'Ne ispravno korisničko ime ili lozinka.';
+$lang['badpassconfirm'] = 'Nažalost, lozinka nije ispravna';
$lang['minoredit'] = 'Manje izmjene';
$lang['draftdate'] = 'Nacrt dokumenta je automatski spremljen u ';
$lang['nosecedit'] = 'Stranica se u međuvremenu promijenila. Informacija o odjeljku je ostarila pa je učitana kompletna stranica.';
@@ -74,8 +82,14 @@ $lang['profna'] = 'Ovaj wiki ne dopušta izmjene korisničkog pro
$lang['profnochange'] = 'Nema izmjena.';
$lang['profnoempty'] = 'Prazno korisničko ime ili email nisu dopušteni.';
$lang['profchanged'] = 'Korisnički profil je uspješno izmijenjen.';
+$lang['profnodelete'] = 'Ovaj wiki ne podržava brisanje korisnika';
+$lang['profdeleteuser'] = 'Obriši korisnika';
+$lang['profdeleted'] = 'Vaš korisnik je obrisan s ovog wiki-a';
+$lang['profconfdelete'] = 'Želim ukloniti mojeg korisnika s ovog wiki-a. <br/> Ova akcija se ne može poništiti.';
+$lang['profconfdeletemissing'] = 'Kvačica za potvrdu nije označena';
$lang['pwdforget'] = 'Izgubili ste lozinku? Zatražite novu';
$lang['resendna'] = 'Ovaj wiki ne podržava ponovno slanje lozinke emailom.';
+$lang['resendpwd'] = 'Postavi novu lozinku za';
$lang['resendpwdmissing'] = 'Ispunite sva polja.';
$lang['resendpwdnouser'] = 'Nije moguće pronaći korisnika.';
$lang['resendpwdbadauth'] = 'Neispravan autorizacijski kod. Provjerite da li ste koristili potpun potvrdni link.';
@@ -85,12 +99,13 @@ $lang['license'] = 'Osim na mjestima gdje je naznačeno drugačije
$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_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['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['maxuploadsize'] = 'Moguće je učitati maks. %s po datoteci.';
+$lang['lockedby'] = 'Zaključao:';
+$lang['lockexpire'] = 'Zaključano do:';
+$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';
@@ -121,6 +136,17 @@ $lang['js']['nosmblinks'] = 'Linkovi na dijeljene Windows mape rade samo s
$lang['js']['linkwiz'] = 'Čarobnjak za poveznice';
$lang['js']['linkto'] = 'Poveznica na:';
$lang['js']['del_confirm'] = 'Zbilja želite obrisati odabrane stavke?';
+$lang['js']['restore_confirm'] = 'Zaista želite vratiti ovu verziju?';
+$lang['js']['media_diff'] = 'Pogledaj razlike:';
+$lang['js']['media_diff_both'] = 'Usporedni prikaz';
+$lang['js']['media_diff_opacity'] = 'Sjaj kroz';
+$lang['js']['media_diff_portions'] = 'Pomakni';
+$lang['js']['media_select'] = 'Odaberi datoteke ...';
+$lang['js']['media_upload_btn'] = 'Učitavanje';
+$lang['js']['media_done_btn'] = 'Gotovo';
+$lang['js']['media_drop'] = 'Ovdje spusti datoteke za učitavanje';
+$lang['js']['media_cancel'] = 'ukloni';
+$lang['js']['media_overwrt'] = 'Prepiši preko postojeće datoteke';
$lang['rssfailed'] = 'Došlo je do greške prilikom preuzimanja feed-a: ';
$lang['nothingfound'] = 'Traženi dokumetni nisu pronađeni.';
$lang['mediaselect'] = 'Mediafile datoteke';
@@ -158,10 +184,15 @@ $lang['difflink'] = 'Poveznica na ovaj prikaz usporedbe';
$lang['diff_type'] = 'Razlike u prikazu:';
$lang['diff_inline'] = 'U istoj razini';
$lang['diff_side'] = 'Usporedo';
+$lang['diffprevrev'] = 'Prošla verzija';
+$lang['diffnextrev'] = 'Novija verzija';
+$lang['difflastrev'] = 'Zadnja verzija';
+$lang['diffbothprevrev'] = 'Prošle verzije na obje strane';
+$lang['diffbothnextrev'] = 'Novije verzije na obje strane';
$lang['line'] = 'Redak';
-$lang['breadcrumb'] = 'Putanja';
-$lang['youarehere'] = 'Vi ste ovdje';
-$lang['lastmod'] = 'Zadnja izmjena';
+$lang['breadcrumb'] = 'Putanja:';
+$lang['youarehere'] = 'Vi ste ovdje:';
+$lang['lastmod'] = 'Zadnja izmjena:';
$lang['by'] = 'od';
$lang['deleted'] = 'obrisano';
$lang['created'] = 'stvoreno';
@@ -170,11 +201,21 @@ $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['tools'] = 'Alati';
+$lang['user_tools'] = 'Korisnički alati';
+$lang['site_tools'] = 'Site alati';
+$lang['page_tools'] = 'Stranični alati';
+$lang['skip_to_content'] = 'preskoči na sadržaj';
+$lang['sidebar'] = 'Bočna traka';
$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['changes_type'] = 'Vidi promjene od';
+$lang['pages_changes'] = 'Stranice';
+$lang['media_changes'] = 'Medijske datoteke';
+$lang['both_changes'] = 'Zajedno stranice i datoteke';
$lang['qb_bold'] = 'Podebljani tekst';
$lang['qb_italic'] = 'Ukošeni tekst';
$lang['qb_underl'] = 'Podcrtani tekst';
@@ -204,17 +245,18 @@ $lang['admin_register'] = 'Dodaj novog korisnika';
$lang['metaedit'] = 'Uredi metapodatake';
$lang['metasaveerr'] = 'Neuspješno zapisivanje metapodataka';
$lang['metasaveok'] = 'Spremljeni metapdaci';
-$lang['img_backto'] = 'Povratak na';
-$lang['img_title'] = 'Naziv';
-$lang['img_caption'] = 'Naslov';
-$lang['img_date'] = 'Datum';
-$lang['img_fname'] = 'Ime datoteke';
-$lang['img_fsize'] = 'Veličina';
-$lang['img_artist'] = 'Fotograf';
-$lang['img_copyr'] = 'Autorsko pravo';
-$lang['img_format'] = 'Format';
-$lang['img_camera'] = 'Kamera';
-$lang['img_keywords'] = 'Ključne riječi';
+$lang['img_title'] = 'Naziv:';
+$lang['img_caption'] = 'Naslov:';
+$lang['img_date'] = 'Datum:';
+$lang['img_fname'] = 'Ime datoteke:';
+$lang['img_fsize'] = 'Veličina:';
+$lang['img_artist'] = 'Fotograf:';
+$lang['img_copyr'] = 'Autorsko pravo:';
+$lang['img_format'] = 'Format:';
+$lang['img_camera'] = 'Kamera:';
+$lang['img_keywords'] = 'Ključne riječi:';
+$lang['img_width'] = 'Širina:';
+$lang['img_height'] = 'Visina:';
$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';
@@ -232,6 +274,7 @@ $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['authtempfail'] = 'Autentifikacija korisnika je privremeno nedostupna. Molimo Vas da kontaktirate administratora.';
+$lang['authpwdexpire'] = 'Vaša lozinka će isteći za %d dana, trebate ju promijeniti.';
$lang['i_chooselang'] = 'Izaberite vaš jezik';
$lang['i_installer'] = 'DokuWiki instalacija';
$lang['i_wikiname'] = 'Naziv Wikija';
@@ -241,6 +284,7 @@ $lang['i_problems'] = 'Instalacija je pronašla probleme koji su nazn
$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_mbfuncoverload'] = 'mbstring.func_overload mora biti onemogućena u php.ini da bi ste pokrenuli DokuWiki.';
$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.';
@@ -252,8 +296,12 @@ $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_allowreg'] = 'Dopusti da korisnici sami sebe registriraju';
$lang['i_retry'] = 'Pokušaj ponovo';
$lang['i_license'] = 'Molim odaberite licencu pod kojom želite postavljati vaš sadržaj:';
+$lang['i_license_none'] = 'Ne prikazuj nikakve licenčne informacije.';
+$lang['i_pop_field'] = 'Molimo, pomozite na da unaprijedimo DokuWiki:';
+$lang['i_pop_label'] = 'Jednom na mjesec, pošalji anonimne podatke o korištenju DokuWiki razvojnom timu';
$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';
@@ -263,3 +311,30 @@ $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).';
+$lang['media_uploadtab'] = 'Učitavanje';
+$lang['media_searchtab'] = 'Traženje';
+$lang['media_file'] = 'Datoteka';
+$lang['media_viewtab'] = 'Pogled';
+$lang['media_edittab'] = 'Uredi';
+$lang['media_historytab'] = 'Povijest';
+$lang['media_list_thumbs'] = 'Ikone';
+$lang['media_list_rows'] = 'Redovi';
+$lang['media_sort_name'] = 'Naziv';
+$lang['media_sort_date'] = 'Datum';
+$lang['media_namespaces'] = 'Odaberi namespace';
+$lang['media_files'] = 'Datoteka u %s';
+$lang['media_upload'] = 'Učitaj u %s';
+$lang['media_search'] = 'Potraži u %s';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s na %s';
+$lang['media_edit'] = 'Uredi %s';
+$lang['media_history'] = 'Povijest %s';
+$lang['media_meta_edited'] = 'meta podatci uređeni';
+$lang['media_perm_read'] = 'Nažalost, nemate prava za čitanje datoteka.';
+$lang['media_perm_upload'] = 'Nažalost, nemate prava za učitavanje datoteka.';
+$lang['media_update'] = 'Učitaj novu verziju';
+$lang['media_restore'] = 'Vrati ovu verziju';
+$lang['currentns'] = 'Tekući imenički prostor';
+$lang['searchresult'] = 'Rezultati pretraživanja';
+$lang['plainhtml'] = 'Čisti HTML';
+$lang['wikimarkup'] = 'Wiki kod';
diff --git a/inc/lang/hr/pwconfirm.txt b/inc/lang/hr/pwconfirm.txt
new file mode 100644
index 000000000..b2d9fa3ad
--- /dev/null
+++ b/inc/lang/hr/pwconfirm.txt
@@ -0,0 +1,13 @@
+Pozdrav @FULLNAME@!
+
+Netko je zatražio novu lozinku za vašu @TITLE@ prijavu na @DOKUWIKIURL@.
+
+Ako to niste bili Vi, molimo da samo ignorirate ovu poruku.
+
+Da bi ste potvrdili da ste to ipak bili Vi, molimo slijedite link u nastavku:
+
+@CONFIRM@
+
+--
+Ova poruka je generirana od strane DokuWiki dostupnog na
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/hr/registermail.txt b/inc/lang/hr/registermail.txt
new file mode 100644
index 000000000..ceaf3fb83
--- /dev/null
+++ b/inc/lang/hr/registermail.txt
@@ -0,0 +1,14 @@
+Novi korisnik je registriran. Ovdje su detalji:
+
+Korisničko ime : @NEWUSER@
+Puno ime : @NEWNAME@
+e-pošta : @NEWEMAIL@
+
+Datum : @DATE@
+Preglednik : @BROWSER@
+IP-Adresa : @IPADDRESS@
+Računalo : @HOSTNAME@
+
+--
+Ova poruka je generirana od strane DokuWiki dostupnog na
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/hr/resetpwd.txt b/inc/lang/hr/resetpwd.txt
new file mode 100644
index 000000000..8d92e51d2
--- /dev/null
+++ b/inc/lang/hr/resetpwd.txt
@@ -0,0 +1,3 @@
+====== Postavi novu lozinku ======
+
+Molimo unesite novu lozinku za Vašu korisničku prijavu na ovom wiki-u. \ No newline at end of file
diff --git a/inc/lang/hr/subscr_digest.txt b/inc/lang/hr/subscr_digest.txt
new file mode 100644
index 000000000..fad158d76
--- /dev/null
+++ b/inc/lang/hr/subscr_digest.txt
@@ -0,0 +1,19 @@
+Pozdrav !
+
+Stranica @PAGE@ u @TITLE@ wiki-u je promijenjena.
+Ovdje su promjene:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+
+Stara verzija: @OLDPAGE@
+Nova verzija: @NEWPAGE@
+
+Da poništite obavijesti o izmjenama prijavite se na wiki @DOKUWIKIURL@ i zatim posjetite
+@SUBSCRIBE@
+i odjavite se s promjena na stranici i/ili imeničkom prostoru.
+
+--
+Ova poruka je generirana od strane DokuWiki dostupnog na
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/hr/subscr_form.txt b/inc/lang/hr/subscr_form.txt
new file mode 100644
index 000000000..95b2cd03e
--- /dev/null
+++ b/inc/lang/hr/subscr_form.txt
@@ -0,0 +1,3 @@
+====== Uređivanje pretplata ======
+
+Ova stranica omogućuje Vam da uredite svoju pretplatu na promjene za tekuću stranicu ili imenički prostor. \ No newline at end of file
diff --git a/inc/lang/hr/subscr_list.txt b/inc/lang/hr/subscr_list.txt
new file mode 100644
index 000000000..611c76938
--- /dev/null
+++ b/inc/lang/hr/subscr_list.txt
@@ -0,0 +1,15 @@
+Pozdrav !
+
+Stranice u imeničkom prostoru @PAGE@ na @TITLE@ wiki-u su izmijenjene. Ovo su izmijenjene stranice:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+
+Da poništite obavijesti o izmjenama prijavite se na wiki @DOKUWIKIURL@ i zatim posjetite
+@SUBSCRIBE@
+i odjavite se s promjena na stranici i/ili imeničkom prostoru.
+
+--
+Ova poruka je generirana od strane DokuWiki dostupnog na
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/hr/subscr_single.txt b/inc/lang/hr/subscr_single.txt
new file mode 100644
index 000000000..18f66901c
--- /dev/null
+++ b/inc/lang/hr/subscr_single.txt
@@ -0,0 +1,22 @@
+Pozdrav !
+
+Stranica @PAGE@ na @TITLE@ wiki-u je izmijenjena.
+Ovo su promjene:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+
+Datum : @DATE@
+Korisnik: @USER@
+Sažetak izmjena: @SUMMARY@
+Stara verzija: @OLDPAGE@
+Nova verzija : @NEWPAGE@
+
+Da poništite obavijesti o izmjenama prijavite se na wiki @DOKUWIKIURL@ i zatim posjetite
+@SUBSCRIBE@
+i odjavite se s promjena na stranici i/ili imeničkom prostoru.
+
+--
+Ova poruka je generirana od strane DokuWiki dostupnog na
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/hr/uploadmail.txt b/inc/lang/hr/uploadmail.txt
new file mode 100644
index 000000000..5b18b2ba3
--- /dev/null
+++ b/inc/lang/hr/uploadmail.txt
@@ -0,0 +1,15 @@
+Datoteka je učitana na Vaš DokuWiki. Ovdje su detalji:
+
+Datoteka : @MEDIA@
+Stara verzija: @OLD@
+Datum : @DATE@
+Preglednik : @BROWSER@
+IP-Adresa : @IPADDRESS@
+Računalo : @HOSTNAME@
+Veličina : @SIZE@
+MIME Tip : @MIME@
+Korisnik : @USER@
+
+--
+Ova poruka je generirana od strane DokuWiki dostupnog na
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/hu-formal/admin.txt b/inc/lang/hu-formal/admin.txt
new file mode 100644
index 000000000..b661bfb17
--- /dev/null
+++ b/inc/lang/hu-formal/admin.txt
@@ -0,0 +1,3 @@
+===== Beállítások =====
+
+Alább találja a DokuWiki-ben elérhető beállítási lehetőségek listáját. \ No newline at end of file
diff --git a/inc/lang/hu-formal/adminplugins.txt b/inc/lang/hu-formal/adminplugins.txt
new file mode 100644
index 000000000..b077521fb
--- /dev/null
+++ b/inc/lang/hu-formal/adminplugins.txt
@@ -0,0 +1 @@
+===== További bővítmények ===== \ No newline at end of file
diff --git a/inc/lang/hu-formal/backlinks.txt b/inc/lang/hu-formal/backlinks.txt
new file mode 100644
index 000000000..437eb2e25
--- /dev/null
+++ b/inc/lang/hu-formal/backlinks.txt
@@ -0,0 +1,3 @@
+====== Hivatkozások ======
+
+Mindazon oldalak listája, amelyek az aktuális oldalra hivatkoznak. \ No newline at end of file
diff --git a/inc/lang/hu-formal/conflict.txt b/inc/lang/hu-formal/conflict.txt
new file mode 100644
index 000000000..6718d67e6
--- /dev/null
+++ b/inc/lang/hu-formal/conflict.txt
@@ -0,0 +1,5 @@
+====== Újabb változat érhető el ======
+
+Az Ön által szerkesztett oldalnak már egy újabb változata érhető el. Ez akkor fordulhat elő, ha egy másik felhasználó módosította a dokumtemot, mialatt Ön is szerkesztette azt.
+
+Vizsgálja meg az alább látható eltéréseket, majd döntse el, melyik változatot tartja meg. Ha a "Mentés" gombot választja, az Ön verziója mentődik el. Kattintson a "Mégsem" gombra a jelenlegi változat megtartásához. \ No newline at end of file
diff --git a/inc/lang/hu-formal/denied.txt b/inc/lang/hu-formal/denied.txt
new file mode 100644
index 000000000..d56a18117
--- /dev/null
+++ b/inc/lang/hu-formal/denied.txt
@@ -0,0 +1,4 @@
+====== Hozzáférés megtadadva ======
+
+Sajnáljuk, de nincs joga a folytatáshoz.
+
diff --git a/inc/lang/hu-formal/diff.txt b/inc/lang/hu-formal/diff.txt
new file mode 100644
index 000000000..f922a504a
--- /dev/null
+++ b/inc/lang/hu-formal/diff.txt
@@ -0,0 +1,3 @@
+====== Eltérések ======
+
+Az oldal két változata közötti különbségek az alábbiak. \ No newline at end of file
diff --git a/inc/lang/hu-formal/draft.txt b/inc/lang/hu-formal/draft.txt
new file mode 100644
index 000000000..9233eacad
--- /dev/null
+++ b/inc/lang/hu-formal/draft.txt
@@ -0,0 +1,5 @@
+===== Piszkozatot találtam =====
+
+Az Ön ezen az oldalon végzett utolsó szerkesztési művelete helytelenül fejeződött be. A DokuWiki automatikusan elmentett egy piszkozatot az Ön munkája során. Alább láthatók az utolsó munkafázis mentett adatai.
+
+Kérjük, döntse el, hogy //helyreállítja-e// a befejezetlen módosításokat, vagy //törli// az automatikusan mentett piszkozatot, vagy //megszakítja// a szerkesztési folyamatot. \ No newline at end of file
diff --git a/inc/lang/hu-formal/edit.txt b/inc/lang/hu-formal/edit.txt
new file mode 100644
index 000000000..08f648ba6
--- /dev/null
+++ b/inc/lang/hu-formal/edit.txt
@@ -0,0 +1 @@
+Módosítsa az oldalt, majd kattintson a "Mentés" gombra. A wiki-szintaxishoz nézze meg a [[wiki:syntax|szintaxis]] oldalt. Kérjük, csak akkor módosítsa az oldalt, ha **tökéletesíteni**, **javítani** tudja. Amennyiben szeretne kipróbálni ezt-azt, a [[playground:playground|játszótéren]] megtanulhatja az első lépéseket. \ No newline at end of file
diff --git a/inc/lang/hu-formal/editrev.txt b/inc/lang/hu-formal/editrev.txt
new file mode 100644
index 000000000..2eca33c7a
--- /dev/null
+++ b/inc/lang/hu-formal/editrev.txt
@@ -0,0 +1,2 @@
+**A dokumentum egy korábbi változatát töltötte be!** Ha az oldalt elmenti, akkor egy új változat jön létre belőle.
+---- \ No newline at end of file
diff --git a/inc/lang/hu-formal/index.txt b/inc/lang/hu-formal/index.txt
new file mode 100644
index 000000000..0f2b18fd2
--- /dev/null
+++ b/inc/lang/hu-formal/index.txt
@@ -0,0 +1,3 @@
+====== Oldaltérkép (tartalom) ======
+
+Az összes elérhető oldal [[doku>namespaces|névterek]] szerint rendezett oldaltérképe. \ No newline at end of file
diff --git a/inc/lang/hu-formal/lang.php b/inc/lang/hu-formal/lang.php
new file mode 100644
index 000000000..a98bdc0d3
--- /dev/null
+++ b/inc/lang/hu-formal/lang.php
@@ -0,0 +1,27 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Marina Vladi <deldadam@gmail.com>
+ */
+$lang['encoding'] = 'utf-8';
+$lang['direction'] = 'ltr';
+$lang['doublequoteopening'] = '„';
+$lang['doublequoteclosing'] = '”';
+$lang['singlequoteopening'] = '‚';
+$lang['singlequoteclosing'] = '’';
+$lang['apostrophe'] = '’';
+$lang['btn_edit'] = 'Oldal módosítása';
+$lang['btn_source'] = 'Forrás megtekintése';
+$lang['btn_show'] = 'Oldal megtekintése';
+$lang['btn_create'] = 'Oldal létrehozása';
+$lang['btn_search'] = 'Keresés';
+$lang['btn_save'] = 'Mentés';
+$lang['btn_preview'] = 'Előnézet';
+$lang['btn_top'] = 'Oldal tetejére';
+$lang['btn_newer'] = '<< újabb';
+$lang['btn_older'] = 'régebbi >>';
+$lang['btn_revs'] = 'Korábbi változatok';
+$lang['btn_recent'] = 'Legújabb változások';
+$lang['btn_upload'] = 'Feltöltés';
diff --git a/inc/lang/hu/denied.txt b/inc/lang/hu/denied.txt
index 0b06724df..922cbb895 100644
--- a/inc/lang/hu/denied.txt
+++ b/inc/lang/hu/denied.txt
@@ -1,4 +1,4 @@
====== Hozzáférés megtagadva ======
-Sajnáljuk, nincs jogod a folytatáshoz. Esetleg elfelejtettél bejelentkezni?
+Sajnáljuk, nincs jogod a folytatáshoz.
diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php
index 5113e1cc8..eb4b4601a 100644
--- a/inc/lang/hu/lang.php
+++ b/inc/lang/hu/lang.php
@@ -13,6 +13,7 @@
* @author Marton Sebok <sebokmarton@gmail.com>
* @author Serenity87HUN <anikototh87@gmail.com>
* @author Marina Vladi <deldadam@gmail.com>
+ * @author Mátyás Jani <jzombi@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -57,7 +58,9 @@ $lang['btn_register'] = 'Regisztráció';
$lang['btn_apply'] = 'Alkalmaz';
$lang['btn_media'] = 'Médiakezelő';
$lang['btn_deleteuser'] = 'Felhasználói fiókom eltávolítása';
-$lang['loggedinas'] = 'Belépett felhasználó: ';
+$lang['btn_img_backto'] = 'Vissza %s';
+$lang['btn_mediaManager'] = 'Megtekintés a médiakezelőben';
+$lang['loggedinas'] = 'Belépett felhasználó';
$lang['user'] = 'Azonosító';
$lang['pass'] = 'Jelszó';
$lang['newpass'] = 'Új jelszó';
@@ -102,8 +105,8 @@ $lang['license'] = 'Hacsak máshol nincs egyéb rendelkezés, ezen
$lang['licenseok'] = 'Megjegyzés: az oldal szerkesztésével elfogadja, hogy a tartalom a következő licenc alatt lesz elérhető:';
$lang['searchmedia'] = 'Keresett fájl neve:';
$lang['searchmedia_in'] = 'Keresés a következőben: %s';
-$lang['txt_upload'] = 'Válaszd ki a feltöltendő fájlt';
-$lang['txt_filename'] = 'Feltöltési név (elhagyható)';
+$lang['txt_upload'] = 'Válaszd ki a feltöltendő fájlt:';
+$lang['txt_filename'] = 'Feltöltési név (elhagyható):';
$lang['txt_overwrt'] = 'Létező fájl felülírása';
$lang['maxuploadsize'] = 'Maximum %s méretű fájlokat tölthetsz fel.';
$lang['lockedby'] = 'Jelenleg zárolta:';
@@ -187,10 +190,15 @@ $lang['difflink'] = 'Összehasonlító nézet linkje';
$lang['diff_type'] = 'Összehasonlítás módja:';
$lang['diff_inline'] = 'Sorok között';
$lang['diff_side'] = 'Egymás mellett';
+$lang['diffprevrev'] = 'Előző változat';
+$lang['diffnextrev'] = 'Következő változat';
+$lang['difflastrev'] = 'Utolsó változat';
+$lang['diffbothprevrev'] = 'Előző változat mindkét oldalon';
+$lang['diffbothnextrev'] = 'Következő változat mindkét oldalon';
$lang['line'] = 'Sor';
-$lang['breadcrumb'] = 'Nyomvonal';
-$lang['youarehere'] = 'Itt vagy';
-$lang['lastmod'] = 'Utolsó módosítás';
+$lang['breadcrumb'] = 'Nyomvonal:';
+$lang['youarehere'] = 'Itt vagy:';
+$lang['lastmod'] = 'Utolsó módosítás:';
$lang['by'] = 'szerkesztette:';
$lang['deleted'] = 'eltávolítva';
$lang['created'] = 'létrehozva';
@@ -243,20 +251,18 @@ $lang['admin_register'] = 'Új felhasználó';
$lang['metaedit'] = 'Metaadatok szerkesztése';
$lang['metasaveerr'] = 'A metaadatok írása nem sikerült';
$lang['metasaveok'] = 'Metaadatok elmentve';
-$lang['img_backto'] = 'Vissza';
-$lang['img_title'] = 'Cím';
-$lang['img_caption'] = 'Képaláírás';
-$lang['img_date'] = 'Dátum';
-$lang['img_fname'] = 'Fájlnév';
-$lang['img_fsize'] = 'Méret';
-$lang['img_artist'] = 'Készítette';
-$lang['img_copyr'] = 'Szerzői jogok';
-$lang['img_format'] = 'Formátum';
-$lang['img_camera'] = 'Fényképezőgép típusa';
-$lang['img_keywords'] = 'Kulcsszavak';
-$lang['img_width'] = 'Szélesség';
-$lang['img_height'] = 'Magasság';
-$lang['img_manager'] = 'Megtekintés a médiakezelőben';
+$lang['img_title'] = 'Cím:';
+$lang['img_caption'] = 'Képaláírás:';
+$lang['img_date'] = 'Dátum:';
+$lang['img_fname'] = 'Fájlnév:';
+$lang['img_fsize'] = 'Méret:';
+$lang['img_artist'] = 'Készítette:';
+$lang['img_copyr'] = 'Szerzői jogok:';
+$lang['img_format'] = 'Formátum:';
+$lang['img_camera'] = 'Fényképezőgép típusa:';
+$lang['img_keywords'] = 'Kulcsszavak:';
+$lang['img_width'] = 'Szélesség:';
+$lang['img_height'] = 'Magasság:';
$lang['subscr_subscribe_success'] = '%s hozzáadva az értesítési listához: %s';
$lang['subscr_subscribe_error'] = 'Hiba történt %s hozzáadásakor az értesítési listához: %s';
$lang['subscr_subscribe_noaddress'] = 'Nincs e-mail cím megadva az adataidnál, így a rendszer nem tudott hozzáadni az értesítési listához';
@@ -337,4 +343,4 @@ $lang['media_restore'] = 'Ezen verzió visszaállítása';
$lang['currentns'] = 'Aktuális névtér';
$lang['searchresult'] = 'Keresés eredménye';
$lang['plainhtml'] = 'Sima HTML';
-$lang['wikimarkup'] = 'Wiki-jelölő nyelv';
+$lang['wikimarkup'] = 'Wiki-jelölőnyelv';
diff --git a/inc/lang/ia/denied.txt b/inc/lang/ia/denied.txt
index 044e1532d..82f2fc668 100644
--- a/inc/lang/ia/denied.txt
+++ b/inc/lang/ia/denied.txt
@@ -1,3 +1,4 @@
====== Permission refusate ======
-Pardono, tu non ha le derectos requisite pro continuar. Pote esser que tu ha oblidate de aperir un session. \ No newline at end of file
+Pardono, tu non ha le derectos requisite pro continuar.
+
diff --git a/inc/lang/ia/lang.php b/inc/lang/ia/lang.php
index 144dfe33b..cabbbab93 100644
--- a/inc/lang/ia/lang.php
+++ b/inc/lang/ia/lang.php
@@ -50,7 +50,7 @@ $lang['btn_recover'] = 'Recuperar version provisori';
$lang['btn_draftdel'] = 'Deler version provisori';
$lang['btn_revert'] = 'Restaurar';
$lang['btn_register'] = 'Crear conto';
-$lang['loggedinas'] = 'Session aperite como';
+$lang['loggedinas'] = 'Session aperite como:';
$lang['user'] = 'Nomine de usator';
$lang['pass'] = 'Contrasigno';
$lang['newpass'] = 'Nove contrasigno';
@@ -88,11 +88,11 @@ $lang['license'] = 'Excepte ubi indicate alteremente, le contento
$lang['licenseok'] = 'Nota ben! Per modificar iste pagina tu accepta que tu contento essera publicate sub le conditiones del licentia sequente:';
$lang['searchmedia'] = 'Cercar file con nomine:';
$lang['searchmedia_in'] = 'Cercar in %s';
-$lang['txt_upload'] = 'Selige le file a incargar';
-$lang['txt_filename'] = 'Incargar como (optional)';
+$lang['txt_upload'] = 'Selige le file a incargar:';
+$lang['txt_filename'] = 'Incargar como (optional):';
$lang['txt_overwrt'] = 'Reimplaciar le file existente';
-$lang['lockedby'] = 'Actualmente serrate per';
-$lang['lockexpire'] = 'Serratura expira le';
+$lang['lockedby'] = 'Actualmente serrate per:';
+$lang['lockexpire'] = 'Serratura expira le:';
$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:';
@@ -157,9 +157,9 @@ $lang['yours'] = 'Tu version';
$lang['diff'] = 'Monstrar differentias con versiones actual';
$lang['diff2'] = 'Monstrar differentias inter le versiones seligite';
$lang['line'] = 'Linea';
-$lang['breadcrumb'] = 'Tracia';
-$lang['youarehere'] = 'Tu es hic';
-$lang['lastmod'] = 'Ultime modification';
+$lang['breadcrumb'] = 'Tracia:';
+$lang['youarehere'] = 'Tu es hic:';
+$lang['lastmod'] = 'Ultime modification:';
$lang['by'] = 'per';
$lang['deleted'] = 'removite';
$lang['created'] = 'create';
@@ -202,17 +202,17 @@ $lang['admin_register'] = 'Adder nove usator';
$lang['metaedit'] = 'Modificar metadatos';
$lang['metasaveerr'] = 'Scriptura de metadatos fallite';
$lang['metasaveok'] = 'Metadatos salveguardate';
-$lang['img_backto'] = 'Retornar a';
-$lang['img_title'] = 'Titulo';
-$lang['img_caption'] = 'Legenda';
-$lang['img_date'] = 'Data';
-$lang['img_fname'] = 'Nomine de file';
-$lang['img_fsize'] = 'Dimension';
-$lang['img_artist'] = 'Photographo';
-$lang['img_copyr'] = 'Copyright';
-$lang['img_format'] = 'Formato';
-$lang['img_camera'] = 'Camera';
-$lang['img_keywords'] = 'Parolas-clave';
+$lang['btn_img_backto'] = 'Retornar a %s';
+$lang['img_title'] = 'Titulo:';
+$lang['img_caption'] = 'Legenda:';
+$lang['img_date'] = 'Data:';
+$lang['img_fname'] = 'Nomine de file:';
+$lang['img_fsize'] = 'Dimension:';
+$lang['img_artist'] = 'Photographo:';
+$lang['img_copyr'] = 'Copyright:';
+$lang['img_format'] = 'Formato:';
+$lang['img_camera'] = 'Camera:';
+$lang['img_keywords'] = 'Parolas-clave:';
$lang['subscr_subscribe_success'] = '%s addite al lista de subscription de %s';
$lang['subscr_subscribe_error'] = 'Error durante le addition de %s al lista de subscription de %s';
$lang['subscr_subscribe_noaddress'] = 'Il non ha un adresse associate con tu conto. Tu non pote esser addite al lista de subscription.';
diff --git a/inc/lang/id-ni/lang.php b/inc/lang/id-ni/lang.php
index 7a1179326..1ff714f3e 100644
--- a/inc/lang/id-ni/lang.php
+++ b/inc/lang/id-ni/lang.php
@@ -41,7 +41,7 @@ $lang['btn_reset'] = 'Fawu\'a';
$lang['btn_draft'] = 'Fawu\'a wanura';
$lang['btn_draftdel'] = 'Heta zura';
$lang['btn_register'] = 'Fasura\'ö';
-$lang['loggedinas'] = 'Möi bakha zotöi';
+$lang['loggedinas'] = 'Möi bakha zotöi:';
$lang['user'] = 'Töi';
$lang['pass'] = 'Kode';
$lang['newpass'] = 'Kode sibohou';
@@ -72,6 +72,6 @@ $lang['resendpwdmissing'] = 'Bologö dödöu, si lö tola lö\'ö öfo\'ös
$lang['resendpwdnouser'] = 'Bologö dödöu, lö masöndra zangoguna da\'a ba database.';
$lang['resendpwdconfirm'] = 'No tefaohe\'ö link famaduhu\'ö ba imele.';
$lang['resendpwdsuccess'] = 'No tefa\'ohe\'ö kode sibohou ba imele.';
-$lang['txt_upload'] = 'Fili file ni fa\'ohe\'ö';
+$lang['txt_upload'] = 'Fili file ni fa\'ohe\'ö:';
$lang['js']['notsavedyet'] = 'Famawu\'a si lö mu\'irö\'ö taya. \nSinduhu ötohugö?';
$lang['mediaselect'] = 'Media file';
diff --git a/inc/lang/id/denied.txt b/inc/lang/id/denied.txt
index bad8f24a6..ff09c13c4 100644
--- a/inc/lang/id/denied.txt
+++ b/inc/lang/id/denied.txt
@@ -1,4 +1,4 @@
====== Akses Ditolak ======
-Maaf, Anda tidak mempunyai hak akses untuk melanjutkan. Apakah Anda belum login?
+Maaf, Anda tidak mempunyai hak akses untuk melanjutkan.
diff --git a/inc/lang/id/lang.php b/inc/lang/id/lang.php
index 5cb5cb6ea..ff77cf24d 100644
--- a/inc/lang/id/lang.php
+++ b/inc/lang/id/lang.php
@@ -8,6 +8,7 @@
* @author Yustinus Waruwu <juswaruwu@gmail.com>
* @author zamroni <therons@ymail.com>
* @author umriya afini <bigdream.power@gmail.com>
+ * @author Arif Budiman <me@kangarif.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -50,8 +51,11 @@ $lang['btn_draftdel'] = 'Hapus draft';
$lang['btn_revert'] = 'Kembalikan';
$lang['btn_register'] = 'Daftar';
$lang['btn_apply'] = 'Terapkan';
+$lang['btn_media'] = 'Pengelola Media';
$lang['btn_deleteuser'] = 'Hapus Akun Saya';
-$lang['loggedinas'] = 'Login sebagai ';
+$lang['btn_img_backto'] = 'Kembali ke %s';
+$lang['btn_mediaManager'] = 'Tampilkan di pengelola media';
+$lang['loggedinas'] = 'Login sebagai :';
$lang['user'] = 'Username';
$lang['pass'] = 'Password';
$lang['newpass'] = 'Password baru';
@@ -78,6 +82,7 @@ $lang['profna'] = 'Wiki ini tidak mengijinkan perubahan profil.';
$lang['profnochange'] = 'Tidak ada perubahan.';
$lang['profnoempty'] = 'Mohon mengisikan nama atau alamat email.';
$lang['profchanged'] = 'Profil User berhasil diubah.';
+$lang['profnodelete'] = 'Wiki ini tidak mendukung penghapusan pengguna';
$lang['profdeleteuser'] = 'Hapus Akun';
$lang['profdeleted'] = 'Akun anda telah dihapus dari wiki ini';
$lang['profconfdelete'] = 'Saya berharap menghapus akun saya dari wiki ini.
@@ -91,30 +96,57 @@ $lang['resendpwdnouser'] = 'Maaf, user ini tidak ditemukan.';
$lang['resendpwdbadauth'] = 'Maaf, kode autentikasi tidak valid. Pastikan Anda menggunakan keseluruhan link konfirmasi.';
$lang['resendpwdconfirm'] = 'Link konfirmasi telah dikirim melalui email.';
$lang['resendpwdsuccess'] = 'Password baru Anda telah dikirim melalui email.';
+$lang['license'] = 'Kecuali jika dinyatakan lain, konten pada wiki ini dilisensikan dibawah lisensi berikut:';
+$lang['licenseok'] = 'Catatan: Dengan menyunting halaman ini, Anda setuju untuk melisensikan konten Anda dibawah lisensi berikut:';
$lang['searchmedia'] = 'Cari nama file:';
-$lang['txt_upload'] = 'File yang akan diupload';
-$lang['txt_filename'] = 'Masukkan nama wiki (opsional)';
+$lang['searchmedia_in'] = 'Cari di %s';
+$lang['txt_upload'] = 'File yang akan diupload:';
+$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['maxuploadsize'] = 'Unggah maks. %s per berkas';
+$lang['lockedby'] = 'Sedang dikunci oleh:';
+$lang['lockexpire'] = 'Penguncian artikel sampai dengan:';
$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['js']['searchmedia'] = 'Cari file';
$lang['js']['keepopen'] = 'Biarkan window terbuka dalam pemilihan';
$lang['js']['hidedetails'] = 'Sembunyikan detil';
$lang['js']['mediatitle'] = 'Pengaturan Link';
+$lang['js']['mediadisplay'] = 'Jenis tautan';
+$lang['js']['mediaalign'] = 'Perataan';
$lang['js']['mediasize'] = 'Ukuran gambar';
+$lang['js']['mediatarget'] = 'Tautan tujuan';
$lang['js']['mediaclose'] = 'Tutup';
+$lang['js']['mediainsert'] = 'Sisip';
$lang['js']['mediadisplayimg'] = 'Lihat gambar';
$lang['js']['mediadisplaylnk'] = 'Lihat hanya link';
+$lang['js']['mediasmall'] = 'Versi kecil';
+$lang['js']['mediamedium'] = 'Versi sedang';
+$lang['js']['medialarge'] = 'Versi besar';
+$lang['js']['mediaoriginal'] = 'Versi asli';
+$lang['js']['medialnk'] = 'Tautan ke halaman rincian';
+$lang['js']['mediadirect'] = 'Tautan langsung ke aslinya';
+$lang['js']['medianolnk'] = 'Tanpa tautan';
+$lang['js']['medianolink'] = 'Jangan tautkan gambar';
+$lang['js']['medialeft'] = 'Rata gambar sebelah kiri';
+$lang['js']['mediaright'] = 'Rata gambar sebelah kanan';
+$lang['js']['mediacenter'] = 'Rata gambar di tengah';
+$lang['js']['medianoalign'] = 'Jangan gunakan perataan';
$lang['js']['nosmblinks'] = 'Link ke share Windows hanya bekerja di Microsoft Internet Explorer.
Anda masih dapat mengcopy and paste linknya.';
+$lang['js']['linkwiz'] = 'Wizard Tautan';
+$lang['js']['linkto'] = 'Tautkan ke:';
$lang['js']['del_confirm'] = 'Hapus tulisan ini?';
+$lang['js']['restore_confirm'] = 'Benar-benar ingin mengembalikan versi ini?';
+$lang['js']['media_diff'] = 'Lihat perbedaan:';
+$lang['js']['media_diff_both'] = 'Berdampingan';
+$lang['js']['media_diff_opacity'] = 'Mencolok';
$lang['js']['media_select'] = 'Pilih file...';
$lang['js']['media_upload_btn'] = 'Unggah';
$lang['js']['media_done_btn'] = 'Selesai';
$lang['js']['media_drop'] = 'Tarik file disini untuk mengunggah';
$lang['js']['media_cancel'] = 'Buang';
+$lang['js']['media_overwrt'] = 'Timpa berkas yang ada';
$lang['rssfailed'] = 'Error terjadi saat mengambil feed: ';
$lang['nothingfound'] = 'Tidak menemukan samasekali.';
$lang['mediaselect'] = 'Pilihan Mediafile';
@@ -148,21 +180,40 @@ $lang['current'] = 'sekarang';
$lang['yours'] = 'Versi Anda';
$lang['diff'] = 'Tampilkan perbedaan dengan versi sekarang';
$lang['diff2'] = 'Tampilkan perbedaan diantara revisi terpilih';
+$lang['difflink'] = 'Tautan ke tampilan pembanding ini';
+$lang['diff_type'] = 'Tampilkan perbedaan:';
+$lang['diff_inline'] = 'Sebaris';
+$lang['diff_side'] = 'Berdampingan';
+$lang['diffprevrev'] = 'Revisi sebelumnya';
+$lang['diffnextrev'] = 'Revisi selanjutnya';
+$lang['difflastrev'] = 'Revisi terakhir';
$lang['line'] = 'Baris';
-$lang['breadcrumb'] = 'Jejak';
-$lang['youarehere'] = 'Anda disini';
-$lang['lastmod'] = 'Terakhir diubah';
+$lang['breadcrumb'] = 'Jejak:';
+$lang['youarehere'] = 'Anda disini:';
+$lang['lastmod'] = 'Terakhir diubah:';
$lang['by'] = 'oleh';
$lang['deleted'] = 'terhapus';
$lang['created'] = 'dibuat';
$lang['restored'] = 'revisi lama ditampilkan kembali (%s)';
$lang['external_edit'] = 'Perubahan eksternal';
$lang['summary'] = 'Edit summary';
+$lang['noflash'] = '<a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> diperlukan untuk menampilkan konten ini.';
+$lang['download'] = 'Unduh Cuplikan';
+$lang['tools'] = 'Alat';
+$lang['user_tools'] = 'Alat Pengguna';
+$lang['site_tools'] = 'Alat Situs';
+$lang['page_tools'] = 'Alat Halaman';
+$lang['skip_to_content'] = 'lewati ke konten';
+$lang['sidebar'] = 'Bilah Sisi';
$lang['mail_newpage'] = 'Halaman ditambahkan:';
$lang['mail_changed'] = 'Halaman diubah:';
+$lang['mail_subscribe_list'] = 'halaman diubah dalam namespace:';
$lang['mail_new_user'] = 'User baru:';
$lang['mail_upload'] = 'Berkas di-upload:';
+$lang['changes_type'] = 'Tampilkan perubahan';
$lang['pages_changes'] = 'Halaman';
+$lang['media_changes'] = 'Berkas media';
+$lang['both_changes'] = 'Baik halaman dan berkas media';
$lang['qb_bold'] = 'Tebal';
$lang['qb_italic'] = 'Miring';
$lang['qb_underl'] = 'Garis Bawah';
@@ -173,6 +224,10 @@ $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_hs'] = 'Pilih Judul';
+$lang['qb_hplus'] = 'Judul Lebih Atas';
+$lang['qb_hminus'] = 'Judul Lebih Bawah';
+$lang['qb_hequal'] = 'Tingkat Judul yang Sama';
$lang['qb_link'] = 'Link Internal';
$lang['qb_extlink'] = 'Link External';
$lang['qb_hr'] = 'Garis Horisontal';
@@ -182,21 +237,37 @@ $lang['qb_media'] = 'Tambahkan gambar atau file lain';
$lang['qb_sig'] = 'Sisipkan tanda tangan';
$lang['qb_smileys'] = 'Smileys';
$lang['qb_chars'] = 'Karakter Khusus';
+$lang['upperns'] = 'lompat ke namespace induk';
$lang['admin_register'] = 'Tambah user baru';
$lang['metaedit'] = 'Edit Metadata';
$lang['metasaveerr'] = 'Gagal menulis metadata';
$lang['metasaveok'] = 'Metadata tersimpan';
-$lang['img_backto'] = 'Kembali ke';
-$lang['img_title'] = 'Judul';
-$lang['img_caption'] = 'Label';
-$lang['img_date'] = 'Tanggal';
-$lang['img_fname'] = 'Nama file';
-$lang['img_fsize'] = 'Ukuran';
-$lang['img_artist'] = 'Tukang foto';
-$lang['img_copyr'] = 'Hakcipta';
-$lang['img_format'] = 'Format';
-$lang['img_camera'] = 'Kamera';
-$lang['img_keywords'] = 'Katakunci';
+$lang['img_title'] = 'Judul:';
+$lang['img_caption'] = 'Label:';
+$lang['img_date'] = 'Tanggal:';
+$lang['img_fname'] = 'Nama file:';
+$lang['img_fsize'] = 'Ukuran:';
+$lang['img_artist'] = 'Tukang foto:';
+$lang['img_copyr'] = 'Hakcipta:';
+$lang['img_format'] = 'Format:';
+$lang['img_camera'] = 'Kamera:';
+$lang['img_keywords'] = 'Katakunci:';
+$lang['img_width'] = 'Lebar:';
+$lang['img_height'] = 'Tinggi:';
+$lang['subscr_subscribe_success'] = 'Menambah %s ke senarai langganan untuk %s';
+$lang['subscr_subscribe_error'] = 'Kesalahan menambahkan %s ke senarai langganan untuk %s';
+$lang['subscr_subscribe_noaddress'] = 'Tidak ada alamat yang terkait dengan login Anda, Anda tidak dapat ditambahkan ke senarai langganan';
+$lang['subscr_unsubscribe_success'] = 'Menghapus %s dari senarai langganan untuk %s';
+$lang['subscr_unsubscribe_error'] = 'Kesalahan menghapus %s dari senarai langganan untuk %s';
+$lang['subscr_already_subscribed'] = '%s sudah dilanggankan ke %s';
+$lang['subscr_not_subscribed'] = '%s tidak dilanggankan ke %s';
+$lang['subscr_m_not_subscribed'] = 'Saat ini Anda tidak berlangganan halaman dan namespace saat ini.';
+$lang['subscr_m_new_header'] = 'Tambahkan langganan';
+$lang['subscr_m_current_header'] = 'Langganan saat ini';
+$lang['subscr_m_unsubscribe'] = 'Berhenti berlangganan';
+$lang['subscr_m_subscribe'] = 'Berlangganan';
+$lang['subscr_m_receive'] = 'Menerima';
+$lang['subscr_style_every'] = 'email setiap diubah';
$lang['authtempfail'] = 'Autentikasi user saat ini sedang tidak dapat digunakan. Jika kejadian ini berlanjut, Harap informasikan admin Wiki Anda.';
$lang['i_chooselang'] = 'Pilih bahasa';
$lang['i_installer'] = 'Instalasi DokuWiki';
@@ -217,4 +288,41 @@ $lang['i_policy'] = 'Policy ACL awal';
$lang['i_pol0'] = 'Wiki Terbuka (baca, tulis, upload untuk semua orang)';
$lang['i_pol1'] = 'Wiki Publik (baca untuk semua orang, tulis dan upload untuk pengguna terdaftar)';
$lang['i_pol2'] = 'Wiki Privat (baca, tulis dan upload hanya untuk pengguna terdaftar)';
+$lang['i_allowreg'] = 'Ijinkan pengguna mendaftar sendiri';
$lang['i_retry'] = 'Coba Lagi';
+$lang['i_license'] = 'Silakan pilih lisensi untuk konten Anda:';
+$lang['i_license_none'] = 'Jangan tampilkan semua informasi lisensi';
+$lang['i_pop_field'] = 'Tolong, bantu kami meningkatkan pengalaman DokuWiki:';
+$lang['i_pop_label'] = 'Setiap bulan mengirimkan penggunaan data anonim ke pengembang DokuWiki';
+$lang['years'] = '%d tahun yang lalu';
+$lang['months'] = '%d bulan yang lalu';
+$lang['weeks'] = '%d minggu yang lalu';
+$lang['days'] = '%d hari yang lalu';
+$lang['hours'] = '%d jam yang lalu';
+$lang['minutes'] = '%d menit yang lalu';
+$lang['seconds'] = '%d detik yang lalu';
+$lang['wordblock'] = 'Pengubahan Anda tidak disimpan karena berisi teks yang diblokir (spam).';
+$lang['media_uploadtab'] = 'Unggah';
+$lang['media_searchtab'] = 'Cari';
+$lang['media_file'] = 'Berkas';
+$lang['media_viewtab'] = 'Lihat';
+$lang['media_edittab'] = 'Sunting';
+$lang['media_historytab'] = 'Riwayat';
+$lang['media_list_rows'] = 'Kolom';
+$lang['media_sort_name'] = 'Nama';
+$lang['media_sort_date'] = 'Tanggal';
+$lang['media_namespaces'] = 'Pilih namespace';
+$lang['media_upload'] = 'Unggah ke %s';
+$lang['media_search'] = 'Cari di %s';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s di %s';
+$lang['media_edit'] = 'Sunting %s';
+$lang['media_history'] = 'Riwayat %s';
+$lang['media_meta_edited'] = 'metadata disunting';
+$lang['media_perm_read'] = 'Maaf, Anda tidak memiliki izin untuk membaca berkas.';
+$lang['media_perm_upload'] = 'Maaf, Anda tidak memiliki izin untuk mengunggah berkas.';
+$lang['media_update'] = 'Unggah versi baru';
+$lang['media_restore'] = 'Kembalikan versi ini';
+$lang['currentns'] = 'Namespace saat ini';
+$lang['searchresult'] = 'Hasil Pencarian';
+$lang['wikimarkup'] = 'Markah Wiki';
diff --git a/inc/lang/id/resetpwd.txt b/inc/lang/id/resetpwd.txt
new file mode 100644
index 000000000..6ab26c866
--- /dev/null
+++ b/inc/lang/id/resetpwd.txt
@@ -0,0 +1,3 @@
+====== Atur sandi baru ======
+
+Silakan masukkan sandi baru untuk akun Anda di wiki ini. \ No newline at end of file
diff --git a/inc/lang/id/subscr_digest.txt b/inc/lang/id/subscr_digest.txt
new file mode 100644
index 000000000..5e1041c04
--- /dev/null
+++ b/inc/lang/id/subscr_digest.txt
@@ -0,0 +1,17 @@
+Hei!
+
+Halaman @PAGE@ di wiki @TITLE@ telah disunting.
+Berikut perubahannya:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+
+Revisi lama: @OLDPAGE@
+
+Revisi baru: @NEWPAGE@
+
+Untuk menonaktifkan pemberitahuan ini, masuk ke wiki di @DOKUWIKIURL@ kemudian kunjungi @SUBSCRIBE@ dan halaman batal berlangganan dan/atau namespace yang diubah.
+
+--
+Email ini dibuat oleh DokuWiki di @DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/is/lang.php b/inc/lang/is/lang.php
index fbc7e9049..de1a01ed5 100644
--- a/inc/lang/is/lang.php
+++ b/inc/lang/is/lang.php
@@ -51,7 +51,7 @@ $lang['btn_recover'] = 'Endurheimta uppkast';
$lang['btn_draftdel'] = 'Eyða uppkasti';
$lang['btn_revert'] = 'Endurheimta';
$lang['btn_register'] = 'Skráning';
-$lang['loggedinas'] = 'Innskráning sem';
+$lang['loggedinas'] = 'Innskráning sem:';
$lang['user'] = 'Notendanafn';
$lang['pass'] = 'Aðgangsorð';
$lang['newpass'] = 'Nýtt aðgangsorð';
@@ -89,11 +89,11 @@ $lang['license'] = 'Nema annað sé tekið fram, efni á þessari
$lang['licenseok'] = 'Athugið: Með því að breyta þessari síðu samþykkir þú að leyfisveitandi efni undir eftirfarandi leyfi:';
$lang['searchmedia'] = 'Leit skrárheiti:';
$lang['searchmedia_in'] = 'Leit í %s';
-$lang['txt_upload'] = 'Veldu skrá til innhleðslu';
-$lang['txt_filename'] = 'Innhlaða sem (valfrjálst)';
+$lang['txt_upload'] = 'Veldu skrá til innhleðslu:';
+$lang['txt_filename'] = 'Innhlaða sem (valfrjálst):';
$lang['txt_overwrt'] = 'Skrifa yfir skrá sem þegar er til';
-$lang['lockedby'] = 'Læstur af';
-$lang['lockexpire'] = 'Læsing rennur út eftir';
+$lang['lockedby'] = 'Læstur af:';
+$lang['lockexpire'] = 'Læsing rennur út eftir:';
$lang['nothingfound'] = 'Ekkert fannst';
$lang['mediaselect'] = 'Miðlaskrá';
$lang['fileupload'] = 'Hlaða inn miðlaskrá';
@@ -127,9 +127,9 @@ $lang['yours'] = 'Þín útgáfa';
$lang['diff'] = 'Sýna ágreiningur til núverandi endurskoðun';
$lang['diff2'] = 'Sýna ágreiningur meðal valið endurskoðun';
$lang['line'] = 'Lína';
-$lang['breadcrumb'] = 'Snefill';
-$lang['youarehere'] = 'Þú ert hér';
-$lang['lastmod'] = 'Síðast breytt';
+$lang['breadcrumb'] = 'Snefill:';
+$lang['youarehere'] = 'Þú ert hér:';
+$lang['lastmod'] = 'Síðast breytt:';
$lang['by'] = 'af';
$lang['deleted'] = 'eytt';
$lang['created'] = 'myndað';
@@ -170,15 +170,15 @@ $lang['admin_register'] = 'Setja nýjan notenda inn';
$lang['metaedit'] = 'Breyta lýsigögnum';
$lang['metasaveerr'] = 'Vistun lýsigagna mistókst';
$lang['metasaveok'] = 'Lýsigögn vistuð';
-$lang['img_backto'] = 'Aftur til';
-$lang['img_title'] = 'Heiti';
-$lang['img_caption'] = 'Skýringartexti';
-$lang['img_date'] = 'Dagsetning';
-$lang['img_fname'] = 'Skrárheiti';
-$lang['img_fsize'] = 'Stærð';
-$lang['img_artist'] = 'Myndsmiður';
-$lang['img_copyr'] = 'Útgáfuréttur';
-$lang['img_format'] = 'Forsnið';
-$lang['img_camera'] = 'Myndavél';
-$lang['img_keywords'] = 'Lykilorðir';
+$lang['btn_img_backto'] = 'Aftur til %s';
+$lang['img_title'] = 'Heiti:';
+$lang['img_caption'] = 'Skýringartexti:';
+$lang['img_date'] = 'Dagsetning:';
+$lang['img_fname'] = 'Skrárheiti:';
+$lang['img_fsize'] = 'Stærð:';
+$lang['img_artist'] = 'Myndsmiður:';
+$lang['img_copyr'] = 'Útgáfuréttur:';
+$lang['img_format'] = 'Forsnið:';
+$lang['img_camera'] = 'Myndavél:';
+$lang['img_keywords'] = 'Lykilorðir:';
$lang['i_retry'] = 'Reyna aftur';
diff --git a/inc/lang/it/denied.txt b/inc/lang/it/denied.txt
index d21956a5b..577d081ce 100644
--- a/inc/lang/it/denied.txt
+++ b/inc/lang/it/denied.txt
@@ -1,5 +1,4 @@
====== Accesso negato ======
-Non hai i diritti per continuare. Forse hai dimenticato di effettuare l'accesso?
-
+Non hai i diritti per continuare.
diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php
index a2bde3b60..a3017a92e 100644
--- a/inc/lang/it/lang.php
+++ b/inc/lang/it/lang.php
@@ -17,6 +17,8 @@
* @author snarchio@gmail.com
* @author Edmondo Di Tucci <snarchio@gmail.com>
* @author Claudio Lanconelli <lancos@libero.it>
+ * @author Mirko <malisan.mirko@gmail.com>
+ * @author Francesco <francesco.cavalli@hotmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -61,7 +63,9 @@ $lang['btn_register'] = 'Registrazione';
$lang['btn_apply'] = 'Applica';
$lang['btn_media'] = 'Gestore Media';
$lang['btn_deleteuser'] = 'Rimuovi il mio account';
-$lang['loggedinas'] = 'Collegato come';
+$lang['btn_img_backto'] = 'Torna a %s';
+$lang['btn_mediaManager'] = 'Guarda nel gestore media';
+$lang['loggedinas'] = 'Collegato come:';
$lang['user'] = 'Nome utente';
$lang['pass'] = 'Password';
$lang['newpass'] = 'Nuova password';
@@ -106,12 +110,12 @@ $lang['license'] = 'Ad eccezione da dove è diversamente indicato,
$lang['licenseok'] = 'Nota: modificando questa pagina accetti di rilasciare il contenuto sotto la seguente licenza:';
$lang['searchmedia'] = 'Cerca file di nome:';
$lang['searchmedia_in'] = 'Cerca in %s';
-$lang['txt_upload'] = 'Seleziona un file da caricare';
-$lang['txt_filename'] = 'Carica come (opzionale)';
+$lang['txt_upload'] = 'Seleziona un file da caricare:';
+$lang['txt_filename'] = 'Carica come (opzionale):';
$lang['txt_overwrt'] = 'Sovrascrivi file esistente';
$lang['maxuploadsize'] = 'Upload max. %s per ogni file.';
-$lang['lockedby'] = 'Attualmente bloccato da';
-$lang['lockexpire'] = 'Il blocco scade alle';
+$lang['lockedby'] = 'Attualmente bloccato da:';
+$lang['lockexpire'] = 'Il blocco scade alle:';
$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';
@@ -146,6 +150,7 @@ $lang['js']['del_confirm'] = 'Eliminare veramente questa voce?';
$lang['js']['restore_confirm'] = 'Vuoi davvero ripristinare questa versione?';
$lang['js']['media_diff'] = 'Guarda le differenze:';
$lang['js']['media_diff_both'] = 'Fianco a Fianco';
+$lang['js']['media_diff_portions'] = 'rubare';
$lang['js']['media_select'] = 'Seleziona files..';
$lang['js']['media_upload_btn'] = 'Upload';
$lang['js']['media_done_btn'] = 'Fatto';
@@ -189,10 +194,13 @@ $lang['difflink'] = 'Link a questa pagina di confronto';
$lang['diff_type'] = 'Guarda le differenze:';
$lang['diff_inline'] = 'In linea';
$lang['diff_side'] = 'Fianco a Fianco';
+$lang['diffprevrev'] = 'Revisione precedente';
+$lang['diffnextrev'] = 'Prossima revisione';
+$lang['difflastrev'] = 'Ultima revisione';
$lang['line'] = 'Linea';
-$lang['breadcrumb'] = 'Traccia';
-$lang['youarehere'] = 'Ti trovi qui';
-$lang['lastmod'] = 'Ultima modifica';
+$lang['breadcrumb'] = 'Traccia:';
+$lang['youarehere'] = 'Ti trovi qui:';
+$lang['lastmod'] = 'Ultima modifica:';
$lang['by'] = 'da';
$lang['deleted'] = 'eliminata';
$lang['created'] = 'creata';
@@ -245,20 +253,18 @@ $lang['admin_register'] = 'Aggiungi un nuovo utente';
$lang['metaedit'] = 'Modifica metadati';
$lang['metasaveerr'] = 'Scrittura metadati fallita';
$lang['metasaveok'] = 'Metadati salvati';
-$lang['img_backto'] = 'Torna a';
-$lang['img_title'] = 'Titolo';
-$lang['img_caption'] = 'Descrizione';
-$lang['img_date'] = 'Data';
-$lang['img_fname'] = 'Nome File';
-$lang['img_fsize'] = 'Dimensione';
-$lang['img_artist'] = 'Autore';
-$lang['img_copyr'] = 'Copyright';
-$lang['img_format'] = 'Formato';
-$lang['img_camera'] = 'Camera';
-$lang['img_keywords'] = 'Parole chiave';
-$lang['img_width'] = 'Larghezza';
-$lang['img_height'] = 'Altezza';
-$lang['img_manager'] = 'Guarda nel gestore media';
+$lang['img_title'] = 'Titolo:';
+$lang['img_caption'] = 'Descrizione:';
+$lang['img_date'] = 'Data:';
+$lang['img_fname'] = 'Nome File:';
+$lang['img_fsize'] = 'Dimensione:';
+$lang['img_artist'] = 'Autore:';
+$lang['img_copyr'] = 'Copyright:';
+$lang['img_format'] = 'Formato:';
+$lang['img_camera'] = 'Camera:';
+$lang['img_keywords'] = 'Parole chiave:';
+$lang['img_width'] = 'Larghezza:';
+$lang['img_height'] = 'Altezza:';
$lang['subscr_subscribe_success'] = 'Aggiunto %s alla lista di sottoscrizioni %s';
$lang['subscr_subscribe_error'] = 'Impossibile aggiungere %s alla lista di sottoscrizioni %s';
$lang['subscr_subscribe_noaddress'] = 'Non esiste alcun indirizzo associato al tuo account, non puoi essere aggiunto alla lista di sottoscrizioni';
@@ -337,4 +343,6 @@ $lang['media_perm_read'] = 'Spiacente, non hai abbastanza privilegi per le
$lang['media_perm_upload'] = 'Spiacente, non hai abbastanza privilegi per caricare files.';
$lang['media_update'] = 'Carica nuova versione';
$lang['media_restore'] = 'Ripristina questa versione';
+$lang['currentns'] = 'Namespace corrente';
$lang['searchresult'] = 'Risultati della ricerca';
+$lang['plainhtml'] = 'HTML';
diff --git a/inc/lang/ja/denied.txt b/inc/lang/ja/denied.txt
index d170aebe4..98ccb2f5a 100644
--- a/inc/lang/ja/denied.txt
+++ b/inc/lang/ja/denied.txt
@@ -1,4 +1,4 @@
====== アクセスが拒否されました ======
-実行する権限がありません。ログインされているか確認してください。
+実行する権限がありません。
diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php
index 1f53b0a90..381863eb3 100644
--- a/inc/lang/ja/lang.php
+++ b/inc/lang/ja/lang.php
@@ -11,6 +11,7 @@
* @author Satoshi Sahara <sahara.satoshi@gmail.com>
* @author Hideaki SAWADA <chuno@live.jp>
* @author Hideaki SAWADA <sawadakun@live.jp>
+ * @author PzF_X <jp_minecraft@yahoo.co.jp>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -55,7 +56,9 @@ $lang['btn_register'] = 'ユーザー登録';
$lang['btn_apply'] = '適用';
$lang['btn_media'] = 'メディアマネージャー';
$lang['btn_deleteuser'] = '自分のアカウントの抹消';
-$lang['loggedinas'] = 'ようこそ';
+$lang['btn_img_backto'] = '戻る %s';
+$lang['btn_mediaManager'] = 'メディアマネージャーで閲覧';
+$lang['loggedinas'] = 'ようこそ:';
$lang['user'] = 'ユーザー名';
$lang['pass'] = 'パスワード';
$lang['newpass'] = '新しいパスワード';
@@ -100,12 +103,12 @@ $lang['license'] = '特に明示されていない限り、本Wiki
$lang['licenseok'] = '注意: 本ページを編集することは、あなたの編集した内容が次のライセンスに従うことに同意したものとみなします:';
$lang['searchmedia'] = '検索ファイル名:';
$lang['searchmedia_in'] = '%s 内を検索';
-$lang['txt_upload'] = 'アップロードするファイルを選んでください。';
-$lang['txt_filename'] = '名前を変更してアップロード(オプション)';
+$lang['txt_upload'] = 'アップロードするファイルを選んでください。:';
+$lang['txt_filename'] = '名前を変更してアップロード(オプション):';
$lang['txt_overwrt'] = '既存のファイルを上書き';
$lang['maxuploadsize'] = 'アップロード上限サイズ %s /ファイル';
-$lang['lockedby'] = 'この文書は次のユーザーによってロックされています';
-$lang['lockexpire'] = 'ロック期限:';
+$lang['lockedby'] = 'この文書は次のユーザーによってロックされています:';
+$lang['lockexpire'] = 'ロック期限::';
$lang['js']['willexpire'] = '編集中の文書はロック期限を過ぎようとしています。このままロックする場合は、一度文書の確認を行って期限をリセットしてください。';
$lang['js']['notsavedyet'] = '変更は保存されません。このまま処理を続けてよろしいですか?';
$lang['js']['searchmedia'] = 'ファイル検索';
@@ -184,10 +187,15 @@ $lang['difflink'] = 'この比較画面にリンクする';
$lang['diff_type'] = '差分の表示方法:';
$lang['diff_inline'] = 'インライン';
$lang['diff_side'] = '横に並べる';
+$lang['diffprevrev'] = '前のリビジョン';
+$lang['diffnextrev'] = '次のリビジョン';
+$lang['difflastrev'] = '最新リビジョン';
+$lang['diffbothprevrev'] = '両方とも前のリビジョン';
+$lang['diffbothnextrev'] = '両方とも次のリビジョン';
$lang['line'] = 'ライン';
-$lang['breadcrumb'] = 'トレース';
-$lang['youarehere'] = '現在位置';
-$lang['lastmod'] = '最終更新';
+$lang['breadcrumb'] = 'トレース:';
+$lang['youarehere'] = '現在位置:';
+$lang['lastmod'] = '最終更新:';
$lang['by'] = 'by';
$lang['deleted'] = '削除';
$lang['created'] = '作成';
@@ -240,20 +248,18 @@ $lang['admin_register'] = '新規ユーザー作成';
$lang['metaedit'] = 'メタデータ編集';
$lang['metasaveerr'] = 'メタデータの書き込みに失敗しました';
$lang['metasaveok'] = 'メタデータは保存されました';
-$lang['img_backto'] = '戻る';
-$lang['img_title'] = 'タイトル';
-$lang['img_caption'] = '見出し';
-$lang['img_date'] = '日付';
-$lang['img_fname'] = 'ファイル名';
-$lang['img_fsize'] = 'サイズ';
-$lang['img_artist'] = '作成者';
-$lang['img_copyr'] = '著作権';
-$lang['img_format'] = 'フォーマット';
-$lang['img_camera'] = '使用カメラ';
-$lang['img_keywords'] = 'キーワード';
-$lang['img_width'] = '幅';
-$lang['img_height'] = '高さ';
-$lang['img_manager'] = 'メディアマネージャーで閲覧';
+$lang['img_title'] = 'タイトル:';
+$lang['img_caption'] = '見出し:';
+$lang['img_date'] = '日付:';
+$lang['img_fname'] = 'ファイル名:';
+$lang['img_fsize'] = 'サイズ:';
+$lang['img_artist'] = '作成者:';
+$lang['img_copyr'] = '著作権:';
+$lang['img_format'] = 'フォーマット:';
+$lang['img_camera'] = '使用カメラ:';
+$lang['img_keywords'] = 'キーワード:';
+$lang['img_width'] = '幅:';
+$lang['img_height'] = '高さ:';
$lang['subscr_subscribe_success'] = '%sが%sの購読リストに登録されました。';
$lang['subscr_subscribe_error'] = '%sを%sの購読リストへの追加に失敗しました。';
$lang['subscr_subscribe_noaddress'] = 'あなたのログインに対応するアドレスがないため、購読リストへ追加することができません。';
@@ -283,6 +289,7 @@ $lang['i_modified'] = 'セキュリティの理由から、新規も
<a href="http://dokuwiki.org/install">Dokuwiki インストールガイド</a>を参考にしてインストールしてください。';
$lang['i_funcna'] = 'PHPの関数 <code>%s</code> が使用できません。ホスティング会社が何らかの理由で無効にしている可能性があります。';
$lang['i_phpver'] = 'PHPのバージョン <code>%s</code> が必要なバージョン <code>%s</code> より以前のものです。PHPのアップグレードが必要です。';
+$lang['i_mbfuncoverload'] = 'DokuWiki を実行する php.ini ファイルの mbstring.func_overload は無効にして下さい。';
$lang['i_permfail'] = '<code>%s</code> に書き込みできません。このディレクトリの権限を確認して下さい。';
$lang['i_confexists'] = '<code>%s</code> は既に存在します';
$lang['i_writeerr'] = '<code>%s</code> を作成できません。ディレクトリとファイルの権限を確認し、それらを手動で作成する必要があります。';
diff --git a/inc/lang/ka/admin.txt b/inc/lang/ka/admin.txt
new file mode 100644
index 000000000..97072a449
--- /dev/null
+++ b/inc/lang/ka/admin.txt
@@ -0,0 +1,4 @@
+====== მართვა ======
+
+ქვემოთ თქვენ ხედავთ ადმინისტრაციული ოპერაციების სიას «დოკუვიკიში».
+
diff --git a/inc/lang/ka/adminplugins.txt b/inc/lang/ka/adminplugins.txt
new file mode 100644
index 000000000..011bfeb62
--- /dev/null
+++ b/inc/lang/ka/adminplugins.txt
@@ -0,0 +1 @@
+===== დამატებითი პლაგინები ===== \ No newline at end of file
diff --git a/inc/lang/ka/backlinks.txt b/inc/lang/ka/backlinks.txt
new file mode 100644
index 000000000..7b54797c7
--- /dev/null
+++ b/inc/lang/ka/backlinks.txt
@@ -0,0 +1,4 @@
+====== გადმომისამართება ======
+
+გვერდები რომლებიც ანიშნებენ ამ გვერდზე.
+
diff --git a/inc/lang/ka/conflict.txt b/inc/lang/ka/conflict.txt
new file mode 100644
index 000000000..1b1eb0482
--- /dev/null
+++ b/inc/lang/ka/conflict.txt
@@ -0,0 +1,5 @@
+====== გამოვიდა უფრო ახალი ვერსია ======
+
+არსებობს დოკუმენტის უფრო ახალი ვერსია, რომელიც თქვენ დაარედაქტირეთ. ეს ხდება მაშინ, როდესაც სხვა მომხმარებელი არედაქტირებს დოკუმენტს, სანამ თქვენ აკეთებდით იგივეს.
+
+ყურადღებით დააკვირდით ქვემოთ მოყვანილ განსხვავებებს, და გადაწყვიტეთ რომელი ვერსია სჯობს. თუ შენახვას დააჭერთ, თქვენი ვერსია შეინახება. \ No newline at end of file
diff --git a/inc/lang/ka/denied.txt b/inc/lang/ka/denied.txt
new file mode 100644
index 000000000..bb8910472
--- /dev/null
+++ b/inc/lang/ka/denied.txt
@@ -0,0 +1,3 @@
+====== მიუწვდომელია ======
+
+თქვენ არ გაქვთ საკმარისი უფლებები. იქნებ ავტორიზაცია დაგავიწყდათ?
diff --git a/inc/lang/ka/diff.txt b/inc/lang/ka/diff.txt
new file mode 100644
index 000000000..c635e45f4
--- /dev/null
+++ b/inc/lang/ka/diff.txt
@@ -0,0 +1,3 @@
+====== განსხვავებები ======
+ქვემოთ მოყვანილაი განსხვავებები მსგავს გვერდებს შორის.
+
diff --git a/inc/lang/ka/draft.txt b/inc/lang/ka/draft.txt
new file mode 100644
index 000000000..f3356ddb5
--- /dev/null
+++ b/inc/lang/ka/draft.txt
@@ -0,0 +1,3 @@
+====== ნაპოვნია ჩანაწერი ======
+
+გვერდის რედაქტირება არ იყო დამთავრებული. \ No newline at end of file
diff --git a/inc/lang/ka/edit.txt b/inc/lang/ka/edit.txt
new file mode 100644
index 000000000..3fffceb0c
--- /dev/null
+++ b/inc/lang/ka/edit.txt
@@ -0,0 +1,2 @@
+დაარედაქტირეთ გვერდი და დააჭირეთ «შენახვას». წაიკითხეთ [[wiki:syntax|FAQ]] ვიკის სინტაქსისთან გასაცნობად. დაარედაქტირეთ გვერდი მხოლოდ იმ შემთხვევაში თუ აპირებთ გვერდის გაუმჯობესებას. თუ თქვენ რამის დატესტვა გინდათ, გამოიყენეთ სპეციალური გვერდი.
+
diff --git a/inc/lang/ka/editrev.txt b/inc/lang/ka/editrev.txt
new file mode 100644
index 000000000..17ccff57f
--- /dev/null
+++ b/inc/lang/ka/editrev.txt
@@ -0,0 +1,2 @@
+**თქვენ ატვირთეთ დოკუმენტის ძველი ვერსია** მისი შენახვით თქვენ შექმნით ახალ ვერსიას იგივე შიგთავსით.
+----
diff --git a/inc/lang/ka/index.txt b/inc/lang/ka/index.txt
new file mode 100644
index 000000000..7daef7fb6
--- /dev/null
+++ b/inc/lang/ka/index.txt
@@ -0,0 +1 @@
+====== სტატიები ====== აქ ნაჩვენებია ყველა სტატია \ No newline at end of file
diff --git a/inc/lang/ka/lang.php b/inc/lang/ka/lang.php
new file mode 100644
index 000000000..28ca11e45
--- /dev/null
+++ b/inc/lang/ka/lang.php
@@ -0,0 +1,326 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Luka Lejava <luka.lejava@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'] = 'Manage Subscriptions';
+$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['btn_apply'] = 'ცადე';
+$lang['btn_media'] = 'მედია ფაილების მართვა';
+$lang['btn_deleteuser'] = 'ჩემი ექაუნთის წაშლა';
+$lang['btn_img_backto'] = 'უკან %';
+$lang['btn_mediaManager'] = 'მედია ფაილების მმართველში გახსნა';
+$lang['loggedinas'] = 'შესული ხართ როგორც:';
+$lang['user'] = 'ლოგინი';
+$lang['pass'] = 'პაროლი';
+$lang['newpass'] = 'ახალი პაროლი';
+$lang['oldpass'] = 'დაადასტურეთ პაროლი';
+$lang['passchk'] = 'კიდევ ერთხელ';
+$lang['remember'] = 'დამიმახსოვრე';
+$lang['fullname'] = 'ნამდვილი სახელი';
+$lang['email'] = 'ფოსტა';
+$lang['profile'] = 'მომხმარებლის პროფილი';
+$lang['badlogin'] = 'ლოგინი ან პაროლი არასწორია';
+$lang['badpassconfirm'] = 'პაროლი არასწორია';
+$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'] = 'არ შეგიძლიათ პროფილის რედაქტირება';
+$lang['profnochange'] = 'ცვლილებები არ არის';
+$lang['profnoempty'] = 'ცარიელი სახელი ან ფოსტა დაუშვებელია';
+$lang['profchanged'] = 'პროფილი განახლდა';
+$lang['profnodelete'] = 'მომხმარებლის წაშლა შეუძლებელია';
+$lang['profdeleteuser'] = 'პროფილის წაშლა';
+$lang['profdeleted'] = 'პროფილი წაიშალა';
+$lang['profconfdelete'] = 'მე მსურს პროფილის წაშლა. <br/> თქვენ აღარ გექნებათ საშუალება აღადგინოთ პროფილი.';
+$lang['profconfdeletemissing'] = 'დადასტურების ველი ცარიელია';
+$lang['pwdforget'] = 'დაგავიწყდა პაროლი? აღადგინე';
+$lang['resendna'] = 'პაროლის აღდგენა შეუძლებელია';
+$lang['resendpwd'] = 'ახალი პაროლი';
+$lang['resendpwdmissing'] = 'უნდა შეავსოთ ყველა ველი';
+$lang['resendpwdnouser'] = 'მსგავსი ლოგინი დარეგისტრირებული არ არის';
+$lang['resendpwdbadauth'] = 'კოდი არასწორია';
+$lang['resendpwdconfirm'] = 'აღსადგენი ბმული გამოგზავნილია';
+$lang['resendpwdsuccess'] = 'ახალი პაროლი გამოგზავნილია';
+$lang['license'] = 'ვიკი ლიცენზირებულია: ';
+$lang['licenseok'] = 'ამ გვერდის რედაქტირებით თვენ ეთანხმებით ლიცენზიას:';
+$lang['searchmedia'] = 'საძებო სახელი:';
+$lang['searchmedia_in'] = 'ძებნა %-ში';
+$lang['txt_upload'] = 'აირჩიეთ ასატვირთი ფაილი:';
+$lang['txt_filename'] = 'ატვირთვა როგორც (არჩევითი):';
+$lang['txt_overwrt'] = 'გადაწერა ზემოდან';
+$lang['maxuploadsize'] = 'მაქსიმალური ზომა %';
+$lang['lockedby'] = 'დაბლოკილია:';
+$lang['lockexpire'] = 'განიბლოკება:';
+$lang['js']['willexpire'] = 'გვერდი განიბლოკება 1 წუთში';
+$lang['js']['notsavedyet'] = 'შეუნახავი მონაცემები წაიშლება';
+$lang['js']['searchmedia'] = 'ძებნა';
+$lang['js']['keepopen'] = 'დატოვეთ ღია';
+$lang['js']['hidedetails'] = 'დეტალების დამალვა';
+$lang['js']['mediatitle'] = 'ინსტრუმენტები';
+$lang['js']['mediadisplay'] = 'ბმულის ტიპი';
+$lang['js']['mediaalign'] = 'Alignment';
+$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'] = 'Use no align.';
+$lang['js']['nosmblinks'] = 'ეს ფუქნცია მუშაობს მხოლოდ Internet Explorer-ზე';
+$lang['js']['linkwiz'] = 'ბმული';
+$lang['js']['linkto'] = 'ბმული';
+$lang['js']['del_confirm'] = 'დარწმუნებული ხართ რომ წაშლა გინდათ?';
+$lang['js']['restore_confirm'] = 'დარწმუნებული ხართ რომ აღდგენა გინდათ?';
+$lang['js']['media_diff'] = 'განსხვავებების ჩვენება';
+$lang['js']['media_diff_both'] = 'გვერდიგვერდ';
+$lang['js']['media_diff_opacity'] = 'Shine-through';
+$lang['js']['media_diff_portions'] = 'Swipe
+';
+$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'] = 'ატვირთვა დასრულებულია';
+$lang['uploadfail'] = 'შეფერხება ატვირთვისას';
+$lang['uploadwrong'] = 'ატვირთვა შეუძლებელია';
+$lang['uploadexist'] = 'ფაილი უკვე არსებობს';
+$lang['uploadbadcontent'] = 'ატვირთული ფაილები არ ემთხვევა ';
+$lang['uploadspam'] = 'ატვირთვა დაბლოკილია სპამბლოკერის მიერ';
+$lang['uploadxss'] = 'ატვირთვა დაბლოკილია';
+$lang['uploadsize'] = 'ასატვირთი ფაილი ზედმეტად დიდია';
+$lang['deletesucc'] = '% ფაილები წაიშალა';
+$lang['deletefail'] = '% ვერ მოიძებნა';
+$lang['mediainuse'] = 'ფაილის % ვერ წაიშალა, რადგან გამოყენებაშია';
+$lang['namespaces'] = 'Namespaces';
+$lang['mediafiles'] = 'არსებული ფაილები';
+$lang['accessdenied'] = 'თქვენ არ შეგიძლიათ გვერდის ნახვა';
+$lang['mediausage'] = 'Use the following syntax to reference this file:';
+$lang['mediaview'] = 'ორიგინალი ფაილის ჩვენება';
+$lang['mediaroot'] = 'root';
+$lang['mediaupload'] = 'Upload a file to the current namespace here. To create subnamespaces, prepend them to your filename separated by colons after you selected the files. Files can also be selected by drag and drop.';
+$lang['mediaextchange'] = 'Filextension changed from .%s to .%s!';
+$lang['reference'] = 'References for';
+$lang['ref_inuse'] = 'ფაილი წაშლა შეუძლებელია, გამოიყენება აქ:';
+$lang['ref_hidden'] = 'ზოგიერთი ბლოკის წაკითხვის უფლება არ გაქვთ';
+$lang['hits'] = 'Hits';
+$lang['quickhits'] = 'მსგავსი სახელები';
+$lang['toc'] = 'Table of Contents';
+$lang['current'] = 'ახლანდელი';
+$lang['yours'] = 'თვენი ვერსია';
+$lang['diff'] = 'ვერსიების განსხვავება';
+$lang['diff2'] = 'განსხვავებები';
+$lang['difflink'] = 'Link to this comparison view';
+$lang['diff_type'] = 'განსხვავებების ჩვენება';
+$lang['diff_inline'] = 'Inline';
+$lang['diff_side'] = 'გვერდიგვერდ';
+$lang['diffprevrev'] = 'წინა ვერსია';
+$lang['diffnextrev'] = 'შემდეგი ვერსია';
+$lang['difflastrev'] = 'ბოლო ვერსია';
+$lang['diffbothprevrev'] = 'Both sides previous revision';
+$lang['diffbothnextrev'] = 'Both sides next revision';
+$lang['line'] = 'ზოლი';
+$lang['breadcrumb'] = 'Trace:';
+$lang['youarehere'] = 'თვენ ხართ აქ:';
+$lang['lastmod'] = 'ბოლოს მოდიფიცირებული:';
+$lang['deleted'] = 'წაშლილია';
+$lang['created'] = 'შექმნილია';
+$lang['restored'] = 'ძველი ვერსია აღდგენილია %';
+$lang['external_edit'] = 'რედაქტირება';
+$lang['summary'] = 'Edit summary';
+$lang['noflash'] = '<a href="http://www.adobe.com/products/flashplayer/">საჭიროა Adobe Flash Plugin</a>';
+$lang['download'] = 'Snippet-ის გადმოწერა';
+$lang['tools'] = 'ინსტრუმენტები';
+$lang['user_tools'] = 'მომხმარებლის ინსტრუმენტები';
+$lang['site_tools'] = 'საიტის ინსტრუმენტები';
+$lang['page_tools'] = 'გვერდის ინსტრუმენტები';
+$lang['skip_to_content'] = 'მასალა';
+$lang['sidebar'] = 'გვერდითი პანელი';
+$lang['mail_newpage'] = 'გვერდი დამატებულია:';
+$lang['mail_changed'] = 'გვერდი შეცვლილია:';
+$lang['mail_subscribe_list'] = 'გვერდში შეცვლილია namespace-ები:';
+$lang['mail_new_user'] = 'ახალი მომხმარებელი';
+$lang['mail_upload'] = 'ფაილი ატვირთულია';
+$lang['changes_type'] = 'ცვლილებები';
+$lang['pages_changes'] = 'გვერდები';
+$lang['media_changes'] = 'მედია ფაილები';
+$lang['both_changes'] = 'გვერდები და მედია ფაილები';
+$lang['qb_bold'] = 'Bold Text';
+$lang['qb_italic'] = 'Italic Text';
+$lang['qb_underl'] = 'Underlined Text';
+$lang['qb_code'] = 'Monospaced Text';
+$lang['qb_strike'] = 'Strike-through Text';
+$lang['qb_h1'] = 'Level 1 სათაური';
+$lang['qb_h2'] = 'Level 2 სათაური';
+$lang['qb_h3'] = 'Level 3 სათაური';
+$lang['qb_h4'] = 'Level 4 სათაური';
+$lang['qb_h5'] = 'Level 5 სათაური';
+$lang['qb_h'] = 'სათაური';
+$lang['qb_hs'] = 'სათაურის არჩევა';
+$lang['qb_hplus'] = 'Higher სათაური';
+$lang['qb_hminus'] = 'Lower სათაური';
+$lang['qb_hequal'] = 'Same Level სათაური';
+$lang['qb_link'] = 'Internal Link';
+$lang['qb_extlink'] = 'External Link';
+$lang['qb_hr'] = 'Horizontal Rule';
+$lang['qb_ol'] = 'შეკვეთილი ბოლო მასალა';
+$lang['qb_ul'] = 'Unordered List Item';
+$lang['qb_media'] = 'ნახატების და სხვა ფაიელბის დამატება';
+$lang['qb_sig'] = 'ხელმოწერა';
+$lang['qb_smileys'] = 'სმაილები';
+$lang['qb_chars'] = 'Special Chars';
+$lang['upperns'] = 'jump to parent namespace';
+$lang['admin_register'] = 'ახალი მომხმარებლის დამატება';
+$lang['metaedit'] = 'Edit Metadata';
+$lang['metasaveerr'] = 'Writing metadata failed';
+$lang['metasaveok'] = 'Metadata saved';
+$lang['img_title'] = 'სათაური:';
+$lang['img_caption'] = 'Caption:';
+$lang['img_date'] = 'თარიღი:';
+$lang['img_fname'] = 'ფაილის სახელი:';
+$lang['img_fsize'] = 'ზომა:';
+$lang['img_artist'] = 'ფოტოგრაფი:';
+$lang['img_copyr'] = 'Copyright:';
+$lang['img_format'] = 'ფორმატი:';
+$lang['img_camera'] = 'კამერა:';
+$lang['img_keywords'] = 'Keywords:';
+$lang['img_width'] = 'სიგანე:';
+$lang['img_height'] = 'სიმაღლე:';
+$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['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'] = 'მიღება';
+$lang['subscr_style_every'] = 'ფოსტა ყოველ ცვლილებაზე';
+$lang['subscr_style_digest'] = 'ფოსტა ყოველი გვერდის შეცვლაზე ';
+$lang['subscr_style_list'] = 'ფოსტა ყოველი გვერდის შეცვლაზე ';
+$lang['authtempfail'] = 'User authentication is temporarily unavailable. If this situation persists, please inform your Wiki Admin.';
+$lang['authpwdexpire'] = 'თქვენს პაროლს ვადა გაუვა %d დღეში, მალე შეცვლა მოგიწევთ.';
+$lang['i_chooselang'] = 'ენსი არჩევა';
+$lang['i_installer'] = 'DokuWiki დამყენებელი';
+$lang['i_wikiname'] = 'Wiki სახელი';
+$lang['i_enableacl'] = 'Enable ACL (recommended)';
+$lang['i_superuser'] = 'ადმინი';
+$lang['i_problems'] = 'შეასწორეთ შეცდომები';
+$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_failure'] = 'Some errors occurred while writing the configuration files. You may need to fix them manually before you can use <a href="doku.php?id=wiki:welcome">your new DokuWiki</a>.';
+$lang['i_policy'] = 'Initial ACL policy';
+$lang['i_pol0'] = 'ღია ვიკი (წაკითხვა, დაწერა და ატვირთვა შეუძლია ნებისმიერს)';
+$lang['i_pol1'] = 'თავისუფალი ვიკი (წაკითხვა შეუძლია ყველას, დაწერა და ატვირთვა - რეგისტრირებულს)';
+$lang['i_pol2'] = 'დახურული ვიკი (წაკითხვა, დაწერა და ატვირთვა შეუძლიათ მხოლოდ რეგისტრირებულებს)';
+$lang['i_allowreg'] = 'რეგისტრაციის გახსნა';
+$lang['i_retry'] = 'თავიდან ცდა';
+$lang['i_license'] = 'აირჩიეთ ლიცენზია';
+$lang['i_license_none'] = 'არ აჩვენოთ ლიცენზიის ინფორმაცია';
+$lang['i_pop_field'] = 'დაგვეხმარეთ DokuWiki-ს აგუმჯობესებაში';
+$lang['i_pop_label'] = 'თვეში ერთელ ინფორმაციის DokuWiki-ის ადმინისტრაციისთვის გაგზავნა';
+$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 წლის უკან';
+$lang['months'] = '%d თვის უკან';
+$lang['weeks'] = '%d კვირის უკან';
+$lang['days'] = '%d დღის წინ';
+$lang['hours'] = '%d საათის წინ';
+$lang['minutes'] = '%d წუთის წინ';
+$lang['seconds'] = '%d წამის წინ';
+$lang['wordblock'] = 'თქვენი ცვლილებები არ შეინახა, რადგან შეიცავს სპამს';
+$lang['media_uploadtab'] = 'ატვირთვა';
+$lang['media_searchtab'] = 'ძებნა';
+$lang['media_file'] = 'ფაილი';
+$lang['media_viewtab'] = 'ჩვენება';
+$lang['media_edittab'] = 'რედაქტირება';
+$lang['media_historytab'] = 'ისტორია';
+$lang['media_list_thumbs'] = 'Thumbnails';
+$lang['media_list_rows'] = 'Rows';
+$lang['media_sort_name'] = 'სახელი';
+$lang['media_sort_date'] = 'თარიღი';
+$lang['media_namespaces'] = 'Choose namespace';
+$lang['media_files'] = 'ფაილები %s';
+$lang['media_upload'] = 'ატვირთვა %s';
+$lang['media_search'] = 'ძებნა %s';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s at %s';
+$lang['media_edit'] = 'რედაქტირება %s';
+$lang['media_history'] = 'ისტორია %s';
+$lang['media_meta_edited'] = 'metadata edited';
+$lang['media_perm_read'] = 'თვენ არ გაქვთ უფლება წაიკითხოთ ეს მასალა';
diff --git a/inc/lang/kk/lang.php b/inc/lang/kk/lang.php
index 37b0f462b..74afa24e5 100644
--- a/inc/lang/kk/lang.php
+++ b/inc/lang/kk/lang.php
@@ -45,7 +45,7 @@ $lang['btn_draftdel'] = 'Шимайды өшіру';
$lang['btn_revert'] = 'Қалпына келтіру';
$lang['btn_register'] = 'Тіркеу';
$lang['btn_apply'] = 'Қолдану/Енгізу';
-$lang['loggedinas'] = 'түпнұсқамен кірген';
+$lang['loggedinas'] = 'түпнұсқамен кірген:';
$lang['user'] = 'Түпнұсқа';
$lang['pass'] = 'Құпиясөз';
$lang['newpass'] = 'Жаңа құпиясөз';
@@ -83,11 +83,11 @@ $lang['license'] = 'Басқаша көрсетілген болм
$lang['licenseok'] = 'Ескерту: бұл бетті өңдеуіңізбен мазмұныңыз келесі лицензия бойынша беруге келесесіз:';
$lang['searchmedia'] = 'Іздеу файлдың атауы:';
$lang['searchmedia_in'] = '%s-мен іздеу:';
-$lang['txt_upload'] = 'Еңгізетін файлды таңдау';
-$lang['txt_filename'] = 'Келесідей еңгізу (қалауынша)';
+$lang['txt_upload'] = 'Еңгізетін файлды таңдау:';
+$lang['txt_filename'] = 'Келесідей еңгізу (қалауынша):';
$lang['txt_overwrt'] = 'Бар файлды қайта жазу';
-$lang['lockedby'] = 'Осы уақытта тойтарылған';
-$lang['lockexpire'] = 'Тойтару келесі уақытта бітеді';
+$lang['lockedby'] = 'Осы уақытта тойтарылған:';
+$lang['lockexpire'] = 'Тойтару келесі уақытта бітеді:';
$lang['js']['willexpire'] = 'Бұл бетті түзеу тойтаруыңыз бір минутта бітеді. Қақтығыс болмау және тойтару таймерді түсіру үшін қарап шығу пернені басыңыз.';
$lang['js']['notsavedyet'] = 'Сақталмаған өзгерістер жоғалатын болады.';
$lang['js']['searchmedia'] = 'Файлдарды іздеу';
@@ -123,8 +123,8 @@ $lang['yours'] = 'Сендердің болжамыңыз';
$lang['created'] = 'ЖасалFан';
$lang['mail_new_user'] = 'Жаңа пайдаланушы';
$lang['qb_chars'] = 'Арнайы белгiлер';
-$lang['img_backto'] = 'Қайта оралу';
-$lang['img_format'] = 'Формат';
-$lang['img_camera'] = 'Камера';
+$lang['btn_img_backto'] = 'Қайта оралу %s';
+$lang['img_format'] = 'Формат:';
+$lang['img_camera'] = 'Камера:';
$lang['i_chooselang'] = 'Тіл таңдау';
$lang['i_retry'] = 'Қайталау';
diff --git a/inc/lang/km/denied.txt b/inc/lang/km/denied.txt
index 58b10ee86..be0371498 100644
--- a/inc/lang/km/denied.txt
+++ b/inc/lang/km/denied.txt
@@ -1,3 +1,4 @@
====== បដិសេធអនុញ្ញាត ======
+
សូមទុស អ្នកគ្មានអនុញ្ញាតទៅបណ្តទេ។
diff --git a/inc/lang/km/lang.php b/inc/lang/km/lang.php
index 4800b6c23..749fa419c 100644
--- a/inc/lang/km/lang.php
+++ b/inc/lang/km/lang.php
@@ -43,7 +43,7 @@ $lang['btn_recover'] = 'ស្រោះគំរោងឡើង';
$lang['btn_draftdel'] = 'លុបគំរោង';
$lang['btn_register'] = 'ចុះឈ្មោះ';//'Register';
-$lang['loggedinas'] = 'អ្នកប្រើ';
+$lang['loggedinas'] = 'អ្នកប្រើ:';
$lang['user'] = 'នាមបម្រើ';
$lang['pass'] = 'ពាក្សសម្ងត់';
$lang['newpass'] = 'ពាក្សសម្ងាត់ថ្មី';
@@ -80,11 +80,11 @@ $lang['resendpwdbadauth'] = 'សុំអាទោស​ រហស្សលេ
$lang['resendpwdconfirm'] ='ខ្សែបន្ត';
$lang['resendpwdsuccess'] = 'ពាក្សសម្ងាតអ្នកបានផ្ញើហើយ។';
-$lang['txt_upload'] = 'ជ្រើសឯកសារដែលរុញ​ឡើង';
-$lang['txt_filename'] = 'រុញឡើងជា (ស្រេច​ចិត្ត)';
+$lang['txt_upload'] = 'ជ្រើសឯកសារដែលរុញ​ឡើង:';
+$lang['txt_filename'] = 'រុញឡើងជា (ស្រេច​ចិត្ត):';
$lang['txt_overwrt'] = 'កត់ពីលើ';//'Overwrite existing file';
-$lang['lockedby'] = 'ឥឡូវនេះចកជាប់​';
-$lang['lockexpire'] = 'សោជាប់ផុត​កំណត់ម៉ោង';
+$lang['lockedby'] = 'ឥឡូវនេះចកជាប់​:';
+$lang['lockexpire'] = 'សោជាប់ផុត​កំណត់ម៉ោង:';
$lang['js']['willexpire'] = 'សោអ្នកចំពោះកែតម្រូវទំព័រនេះ ហួសពែលក្នុងមួយនាទី។\nកុំឲ្យមានជម្លោះ ប្រើ «បង្ហាញ»​ ទៅកំណត់​ឡើង​វិញ។';
$lang['js']['notsavedyet'] = 'កម្រែមិនទានរុក្សាទកត្រូវបោះបង់។\nបន្តទៅទាឬទេ?';
@@ -125,9 +125,9 @@ $lang['current'] = 'ឥឡៅវ';
$lang['yours'] = 'តំណែអ្នាក';
$lang['diff'] = 'បង្ហាងអសទិសភាពជាមួយតំណែឥឡូវ ';
$lang['line'] = 'ខ្សែ';
-$lang['breadcrumb'] = 'ដាន';
-$lang['youarehere'] = 'ដាន';
-$lang['lastmod'] = 'ពេលកែចុងក្រោយ';
+$lang['breadcrumb'] = 'ដាន:';
+$lang['youarehere'] = 'ដាន:';
+$lang['lastmod'] = 'ពេលកែចុងក្រោយ:';
$lang['by'] = 'និពន្ឋដោយ';
$lang['deleted'] = 'យកចេញ';
$lang['created'] = 'បង្កើត';
@@ -165,17 +165,17 @@ $lang['admin_register']= 'តែមអ្នកប្រើ';//'Add new user';
$lang['metaedit'] = 'កែទិន្នន័យអរូប';//'Edit Metadata';
$lang['metasaveerr'] = 'ពំអាចកត់រទិន្នន័យអរូប';//'Writing metadata failed';
$lang['metasaveok'] = 'ទិន្នន័យអរូប';
-$lang['img_backto'] = 'ថយក្រោយ';
-$lang['img_title'] = 'អភិធេយ្យ';
-$lang['img_caption'] = 'ចំណងជើង';
-$lang['img_date'] = 'ថ្ងៃខែ';//'Date';
-$lang['img_fname'] = 'ឈ្មោះឯកសារ';
-$lang['img_fsize'] = 'ទំហំ';//'Size';
-$lang['img_artist'] = 'អ្នកថតរូប';
-$lang['img_copyr'] = 'រក្សា​សិទ្ធិ';
-$lang['img_format'] = 'ធុនប្រភេទ';
-$lang['img_camera'] = 'គ្រឿងថត';
-$lang['img_keywords']= 'មេពាក្ស';//'Keywords';
+$lang['btn_img_backto'] = 'ថយក្រោយ%s';
+$lang['img_title'] = 'អភិធេយ្យ:';
+$lang['img_caption'] = 'ចំណងជើង:';
+$lang['img_date'] = 'ថ្ងៃខែ:';//'Date';
+$lang['img_fname'] = 'ឈ្មោះឯកសារ:';
+$lang['img_fsize'] = 'ទំហំ:';//'Size';
+$lang['img_artist'] = 'អ្នកថតរូប:';
+$lang['img_copyr'] = 'រក្សា​សិទ្ធិ:';
+$lang['img_format'] = 'ធុនប្រភេទ:';
+$lang['img_camera'] = 'គ្រឿងថត:';
+$lang['img_keywords']= 'មេពាក្ស:';//'Keywords';
/* auth.class language support */
$lang['authtempfail'] = 'ការផ្ទៀងផ្ទាត់​ភាព​​ត្រឹមត្រូវឥតដំនេ។ ប្រើ ....';
diff --git a/inc/lang/ko/denied.txt b/inc/lang/ko/denied.txt
index cf0b294a4..a4b94be65 100644
--- a/inc/lang/ko/denied.txt
+++ b/inc/lang/ko/denied.txt
@@ -1,3 +1,4 @@
====== 권한 거절 ======
-죄송하지만 계속할 수 있는 권한이 없습니다. 로그인을 잊으셨나요? \ No newline at end of file
+죄송하지만 계속할 수 있는 권한이 없습니다.
+
diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php
index 266ff01e5..ff5e66d9b 100644
--- a/inc/lang/ko/lang.php
+++ b/inc/lang/ko/lang.php
@@ -12,6 +12,7 @@
* @author Myeongjin <aranet100@gmail.com>
* @author Gerrit Uitslag <klapinklapin@gmail.com>
* @author Garam <rowain8@gmail.com>
+ * @author Young gon Cha <garmede@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -45,7 +46,7 @@ $lang['btn_back'] = '뒤로';
$lang['btn_backlink'] = '백링크';
$lang['btn_backtomedia'] = '미디어 파일 선택으로 돌아가기';
$lang['btn_subscribe'] = '구독 관리';
-$lang['btn_profile'] = '개인 정보 바꾸기';
+$lang['btn_profile'] = '프로필 바꾸기';
$lang['btn_reset'] = '재설정';
$lang['btn_resendpwd'] = '새 비밀번호 설정';
$lang['btn_draft'] = '초안 편집';
@@ -54,18 +55,20 @@ $lang['btn_draftdel'] = '초안 삭제';
$lang['btn_revert'] = '되돌리기';
$lang['btn_register'] = '등록';
$lang['btn_apply'] = '적용';
-$lang['btn_media'] = '미디어 관리';
+$lang['btn_media'] = '미디어 관리자';
$lang['btn_deleteuser'] = '내 계정 제거';
-$lang['loggedinas'] = '로그인한 사용자';
+$lang['btn_img_backto'] = '%s(으)로 돌아가기';
+$lang['btn_mediaManager'] = '미디어 관리자에서 보기';
+$lang['loggedinas'] = '로그인한 사용자:';
$lang['user'] = '사용자 이름';
$lang['pass'] = '비밀번호';
$lang['newpass'] = '새 비밀번호';
$lang['oldpass'] = '현재 비밀번호 확인';
-$lang['passchk'] = '비밀번호 다시 확인';
+$lang['passchk'] = '다시 확인';
$lang['remember'] = '기억하기';
$lang['fullname'] = '실명';
$lang['email'] = '이메일';
-$lang['profile'] = '개인 정보';
+$lang['profile'] = '사용자 프로필';
$lang['badlogin'] = '죄송하지만 사용자 이름이나 비밀번호가 잘못되었습니다.';
$lang['badpassconfirm'] = '죄송하지만 비밀번호가 잘못되었습니다';
$lang['minoredit'] = '사소한 바뀜';
@@ -75,21 +78,21 @@ $lang['regmissing'] = '죄송하지만 모든 필드를 채워야 합
$lang['reguexists'] = '죄송하지만 같은 이름을 사용하는 사용자가 있습니다.';
$lang['regsuccess'] = '사용자를 만들었으며 비밀번호는 이메일로 보냈습니다.';
$lang['regsuccess2'] = '사용자를 만들었습니다.';
-$lang['regmailfail'] = '비밀번호를 이메일로 보내는 동안 오류가 발생했습니다. 관리자에게 문의하세요!';
-$lang['regbadmail'] = '주어진 이메일 주소가 잘못되었습니다 - 오류라고 생각하면 관리자에게 문의하세요';
-$lang['regbadpass'] = '새 비밀번호가 같지 않습니다. 다시 입력하세요.';
+$lang['regmailfail'] = '비밀번호를 이메일로 보내는 동안 오류가 발생했습니다. 관리자에게 문의해주세요!';
+$lang['regbadmail'] = '주어진 이메일 주소가 잘못되었습니다 - 오류라고 생각하면 관리자에게 문의해주세요';
+$lang['regbadpass'] = '두 주어진 비밀번호가 같지 않습니다. 다시 입력하세요.';
$lang['regpwmail'] = '도쿠위키 비밀번호';
-$lang['reghere'] = '계정이 없나요? 계정을 등록할 수 있습니다';
-$lang['profna'] = '이 위키는 개인 정보 수정을 할 수 없습니다';
+$lang['reghere'] = '계정이 없나요? 계정을 등록하세요';
+$lang['profna'] = '이 위키는 프로필 수정을 할 수 없습니다';
$lang['profnochange'] = '바뀐 내용이 없습니다.';
-$lang['profnoempty'] = '이름이나 이메일 주소가 비었습니다.';
-$lang['profchanged'] = '개인 정보가 성공적으로 바뀌었습니다.';
+$lang['profnoempty'] = '빈 이름이나 이메일 주소는 허용하지 않습니다.';
+$lang['profchanged'] = '프로필이 성공적으로 바뀌었습니다.';
$lang['profnodelete'] = '이 위키는 사용자 삭제를 지원하지 않습니다';
$lang['profdeleteuser'] = '계정 삭제';
$lang['profdeleted'] = '당신의 사용자 계정이 이 위키에서 삭제되었습니다';
$lang['profconfdelete'] = '이 위키에서 내 계정을 제거하고 싶습니다. <br/> 이 행동은 되돌릴 수 없습니다.';
$lang['profconfdeletemissing'] = '선택하지 않은 확인 상자를 확인';
-$lang['pwdforget'] = '비밀번호를 잊으셨나요? 비밀번호를 재설정할 수 있습니다';
+$lang['pwdforget'] = '비밀번호를 잊으셨나요? 비밀번호를 재설정하세요';
$lang['resendna'] = '이 위키는 비밀번호 재설정을 지원하지 않습니다.';
$lang['resendpwd'] = '다음으로 새 비밀번호 보내기';
$lang['resendpwdmissing'] = '죄송하지만 모든 필드를 채워야 합니다.';
@@ -101,19 +104,19 @@ $lang['license'] = '별도로 명시하지 않을 경우, 이 위
$lang['licenseok'] = '참고: 이 문서를 편집하면 내용은 다음 라이선스에 따라 배포하는 데 동의합니다:';
$lang['searchmedia'] = '파일 이름 검색:';
$lang['searchmedia_in'] = '%s에서 검색';
-$lang['txt_upload'] = '올릴 파일 선택';
-$lang['txt_filename'] = '올릴 파일 이름 (선택 사항)';
+$lang['txt_upload'] = '올릴 파일 선택:';
+$lang['txt_filename'] = '올릴 파일 이름 (선택 사항):';
$lang['txt_overwrt'] = '기존 파일에 덮어쓰기';
$lang['maxuploadsize'] = '최대 올리기 용량. 파일당 %s입니다.';
-$lang['lockedby'] = '현재 잠겨진 사용자';
-$lang['lockexpire'] = '잠금 해제 시간';
+$lang['lockedby'] = '현재 잠겨진 사용자:';
+$lang['lockexpire'] = '잠금 해제 시간:';
$lang['js']['willexpire'] = '잠시 후 편집 잠금이 해제됩니다.\n편집 충돌을 피하려면 미리 보기를 눌러 잠금 시간을 다시 설정하세요.';
$lang['js']['notsavedyet'] = '저장하지 않은 바뀜이 사라집니다.';
$lang['js']['searchmedia'] = '파일 검색';
-$lang['js']['keepopen'] = '선택할 때 창을 열어 놓기';
+$lang['js']['keepopen'] = '선택할 때 열어 놓은 창을 유지하기';
$lang['js']['hidedetails'] = '자세한 정보 숨기기';
$lang['js']['mediatitle'] = '링크 설정';
-$lang['js']['mediadisplay'] = '링크 형태';
+$lang['js']['mediadisplay'] = '링크 유형';
$lang['js']['mediaalign'] = '배치';
$lang['js']['mediasize'] = '그림 크기';
$lang['js']['mediatarget'] = '링크 목표';
@@ -171,7 +174,7 @@ $lang['mediaview'] = '원본 파일 보기';
$lang['mediaroot'] = '루트';
$lang['mediaupload'] = '파일을 현재 이름공간으로 올립니다. 하위 이름공간으로 만들려면 선택한 파일 이름 앞에 쌍점(:)으로 구분되는 이름을 붙이면 됩니다. 파일을 드래그 앤 드롭해 선택할 수 있습니다.';
$lang['mediaextchange'] = '파일 확장자가 .%s에서 .%s(으)로 바뀌었습니다!';
-$lang['reference'] = '참고';
+$lang['reference'] = '다음을 참조';
$lang['ref_inuse'] = '다음 문서에서 아직 사용 중이므로 파일을 삭제할 수 없습니다:';
$lang['ref_hidden'] = '문서의 일부 참고는 읽을 수 있는 권한이 없습니다';
$lang['hits'] = '조회 수';
@@ -185,13 +188,18 @@ $lang['difflink'] = '차이 보기로 링크';
$lang['diff_type'] = '차이 보기:';
$lang['diff_inline'] = '직렬 방식';
$lang['diff_side'] = '다중 창 방식';
+$lang['diffprevrev'] = '이전 판';
+$lang['diffnextrev'] = '다음 판';
+$lang['difflastrev'] = '마지막 판';
+$lang['diffbothprevrev'] = '양쪽 이전 판';
+$lang['diffbothnextrev'] = '양쪽 다음 판';
$lang['line'] = '줄';
-$lang['breadcrumb'] = '추적';
-$lang['youarehere'] = '현재 위치';
-$lang['lastmod'] = '마지막으로 수정됨';
+$lang['breadcrumb'] = '추적:';
+$lang['youarehere'] = '현재 위치:';
+$lang['lastmod'] = '마지막으로 수정됨:';
$lang['by'] = '저자';
$lang['deleted'] = '제거됨';
-$lang['created'] = '새로 만듦';
+$lang['created'] = '만듦';
$lang['restored'] = '이전 판으로 되돌림 (%s)';
$lang['external_edit'] = '바깥 편집';
$lang['summary'] = '편집 요약';
@@ -232,7 +240,7 @@ $lang['qb_extlink'] = '바깥 링크';
$lang['qb_hr'] = '가로줄';
$lang['qb_ol'] = '순서 있는 목록';
$lang['qb_ul'] = '순서 없는 목록';
-$lang['qb_media'] = '그림과 기타 파일 추가 (새 창에서 열림)';
+$lang['qb_media'] = '그림과 다른 파일 추가 (새 창에서 열림)';
$lang['qb_sig'] = '서명 넣기';
$lang['qb_smileys'] = '이모티콘';
$lang['qb_chars'] = '특수 문자';
@@ -241,20 +249,18 @@ $lang['admin_register'] = '새 사용자 추가';
$lang['metaedit'] = '메타데이터 편집';
$lang['metasaveerr'] = '메타데이터 쓰기 실패';
$lang['metasaveok'] = '메타데이터 저장됨';
-$lang['img_backto'] = '뒤로';
-$lang['img_title'] = '제목';
-$lang['img_caption'] = '설명';
-$lang['img_date'] = '날짜';
-$lang['img_fname'] = '파일 이름';
-$lang['img_fsize'] = '크기';
-$lang['img_artist'] = '촬영자';
-$lang['img_copyr'] = '저작권';
-$lang['img_format'] = '포맷';
-$lang['img_camera'] = '카메라';
-$lang['img_keywords'] = '키워드';
-$lang['img_width'] = '너비';
-$lang['img_height'] = '높이';
-$lang['img_manager'] = '미디어 관리자에서 보기';
+$lang['img_title'] = '제목:';
+$lang['img_caption'] = '설명:';
+$lang['img_date'] = '날짜:';
+$lang['img_fname'] = '파일 이름:';
+$lang['img_fsize'] = '크기:';
+$lang['img_artist'] = '촬영자:';
+$lang['img_copyr'] = '저작권:';
+$lang['img_format'] = '포맷:';
+$lang['img_camera'] = '카메라:';
+$lang['img_keywords'] = '키워드:';
+$lang['img_width'] = '너비:';
+$lang['img_height'] = '높이:';
$lang['subscr_subscribe_success'] = '%s 사용자가 %s 구독 목록에 추가했습니다';
$lang['subscr_subscribe_error'] = '%s 사용자가 %s 구독 목록에 추가하는데 실패했습니다';
$lang['subscr_subscribe_noaddress'] = '로그인으로 연결된 주소가 없기 때문에 구독 목록에 추가할 수 없습니다';
@@ -283,6 +289,7 @@ $lang['i_modified'] = '보안 상의 이유로 이 스크립트는
다운로드한 압축 패키지를 다시 설치하거나 <a href="http://dokuwiki.org/ko:install">도쿠위키 설치 과정</a>을 참고해서 설치하세요.';
$lang['i_funcna'] = '<code>%s</code> PHP 함수를 사용할 수 없습니다. 호스트 제공자가 어떤 이유에서인지 막아 놓았을지 모릅니다.';
$lang['i_phpver'] = 'PHP <code>%s</code> 버전은 필요한 <code>%s</code> 버전보다 오래되었습니다. PHP를 업그레이드할 필요가 있습니다.';
+$lang['i_mbfuncoverload'] = '도쿠위키를 실행하려면 mbstring.func_overload를 php.ini에서 비활성화해야 합니다.';
$lang['i_permfail'] = '<code>%s</code>는 도쿠위키가 쓰기 가능 권한이 없습니다. 먼저 이 디렉터리에 쓰기 권한이 설정되어야 합니다!';
$lang['i_confexists'] = '<code>%s</code>(은)는 이미 존재합니다';
$lang['i_writeerr'] = '<code>%s</code>(을)를 만들 수 없습니다. 먼저 디렉터리/파일 권한을 확인하고 파일을 수동으로 만드세요.';
@@ -302,7 +309,7 @@ $lang['i_pop_field'] = '도쿠위키 경험을 개선하는 데 도움
$lang['i_pop_label'] = '한 달에 한 번씩, 도쿠위키 개발자에게 익명의 사용 데이터를 보냅니다';
$lang['recent_global'] = '현재 <b>%s</b> 이름공간을 구독 중입니다. <a href="%s">전체 위키의 최근 바뀜도 볼 수</a> 있습니다.';
$lang['years'] = '%d년 전';
-$lang['months'] = '%d달 전';
+$lang['months'] = '%d개월 전';
$lang['weeks'] = '%d주 전';
$lang['days'] = '%d일 전';
$lang['hours'] = '%d시간 전';
diff --git a/inc/lang/ko/searchpage.txt b/inc/lang/ko/searchpage.txt
index 2313f0bb0..53faa04c6 100644
--- a/inc/lang/ko/searchpage.txt
+++ b/inc/lang/ko/searchpage.txt
@@ -1,5 +1,5 @@
====== 검색 ======
-아래에서 검색 결과를 찾을 수 있습니다. 만약 원하는 문서를 찾지 못했다면, "문서 만들기"나 "문서 편집"을 사용해 검색어와 같은 이름의 문서를 만들거나 편집할 수 있습니다.
+아래에서 검색 결과를 찾을 수 있습니다. 만약 원하는 문서를 찾지 못했다면, ''문서 만들기''나 ''문서 편집''을 사용해 검색어와 같은 이름의 문서를 만들거나 편집할 수 있습니다.
===== 결과 ===== \ No newline at end of file
diff --git a/inc/lang/ko/subscr_digest.txt b/inc/lang/ko/subscr_digest.txt
index 0f03e51a3..d1f2d4b99 100644
--- a/inc/lang/ko/subscr_digest.txt
+++ b/inc/lang/ko/subscr_digest.txt
@@ -11,7 +11,7 @@
새 판: @NEWPAGE@
-문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤
+문서 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤
@SUBSCRIBE@ 문서를 방문해 문서나 이름공간의 구독을 취소하세요.
--
diff --git a/inc/lang/ko/updateprofile.txt b/inc/lang/ko/updateprofile.txt
index 80545e9bf..055272e9d 100644
--- a/inc/lang/ko/updateprofile.txt
+++ b/inc/lang/ko/updateprofile.txt
@@ -1,3 +1,3 @@
-====== 개인 정보 바꾸기 ======
+====== 계정 프로필 바꾸기 ======
바꾸고 싶은 항목을 입력하세요. 사용자 이름은 바꿀 수 없습니다. \ No newline at end of file
diff --git a/inc/lang/ku/denied.txt b/inc/lang/ku/denied.txt
index 3ac72820c..34cb8456a 100644
--- a/inc/lang/ku/denied.txt
+++ b/inc/lang/ku/denied.txt
@@ -1,4 +1,4 @@
====== Permission Denied ======
-Sorry, you don't have enough rights to continue. Perhaps you forgot to login?
+Sorry, you don't have enough rights to continue.
diff --git a/inc/lang/ku/lang.php b/inc/lang/ku/lang.php
index b6287806d..b1b733ec9 100644
--- a/inc/lang/ku/lang.php
+++ b/inc/lang/ku/lang.php
@@ -35,7 +35,7 @@ $lang['btn_backtomedia'] = 'Back to Mediafile Selection';
$lang['btn_subscribe'] = 'Subscribe Changes';
$lang['btn_register'] = 'Register';
-$lang['loggedinas'] = 'Logged in as';
+$lang['loggedinas'] = 'Logged in as:';
$lang['user'] = 'Username';
$lang['pass'] = 'Password';
$lang['passchk'] = 'once again';
@@ -89,8 +89,8 @@ $lang['current'] = 'current';
$lang['yours'] = 'Your Version';
$lang['diff'] = 'show differences to current version';
$lang['line'] = 'Rêz';
-$lang['breadcrumb'] = 'Şop';
-$lang['lastmod'] = 'Guherandina dawî';
+$lang['breadcrumb'] = 'Şop:';
+$lang['lastmod'] = 'Guherandina dawî:';
$lang['by'] = 'by';
$lang['deleted'] = 'hat jê birin';
$lang['created'] = 'hat afirandin';
@@ -127,16 +127,16 @@ $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['btn_img_backto'] = 'Back to %s';
+$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:';
//Setup VIM: ex: et ts=2 :
diff --git a/inc/lang/la/denied.txt b/inc/lang/la/denied.txt
index fdb62f53e..1cdaf05c9 100644
--- a/inc/lang/la/denied.txt
+++ b/inc/lang/la/denied.txt
@@ -1,3 +1,4 @@
====== Ad hanc paginam accedere non potes ======
-Ad hanc paginam accedere non potes: antea in conuentum ineas, deinde rursum temptas \ No newline at end of file
+Ad hanc paginam accedere non potes: antea in conuentum ineas.
+
diff --git a/inc/lang/la/lang.php b/inc/lang/la/lang.php
index c71a71bdd..66cd13967 100644
--- a/inc/lang/la/lang.php
+++ b/inc/lang/la/lang.php
@@ -90,8 +90,8 @@ $lang['searchmedia_in'] = 'Quaere "%s":';
$lang['txt_upload'] = 'Eligere documenta oneranda:';
$lang['txt_filename'] = 'Onerare (optio):';
$lang['txt_overwrt'] = 'Documento ueteri imponere:';
-$lang['lockedby'] = 'Nunc hoc intercludit';
-$lang['lockexpire'] = 'Hoc apertum';
+$lang['lockedby'] = 'Nunc hoc intercludit:';
+$lang['lockexpire'] = 'Hoc apertum:';
$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';
@@ -202,17 +202,17 @@ $lang['admin_register'] = 'Nouom Sodalem creare';
$lang['metaedit'] = 'Res codicis mutare';
$lang['metasaveerr'] = 'Res codicis non scribitur.';
$lang['metasaveok'] = 'Res codicis seruatae.';
-$lang['img_backto'] = 'Redere ad';
-$lang['img_title'] = 'Titulus';
-$lang['img_caption'] = 'Descriptio';
-$lang['img_date'] = 'Dies';
-$lang['img_fname'] = 'Titulus documenti';
-$lang['img_fsize'] = 'Pondus';
-$lang['img_artist'] = 'Imaginum exprimitor\trix';
-$lang['img_copyr'] = 'Iura exemplarium';
-$lang['img_format'] = 'Forma';
-$lang['img_camera'] = 'Cella';
-$lang['img_keywords'] = 'Verba claues';
+$lang['btn_img_backto'] = 'Redere ad %s';
+$lang['img_title'] = 'Titulus:';
+$lang['img_caption'] = 'Descriptio:';
+$lang['img_date'] = 'Dies:';
+$lang['img_fname'] = 'Titulus documenti:';
+$lang['img_fsize'] = 'Pondus:';
+$lang['img_artist'] = 'Imaginum exprimitor\trix:';
+$lang['img_copyr'] = 'Iura exemplarium:';
+$lang['img_format'] = 'Forma:';
+$lang['img_camera'] = 'Cella:';
+$lang['img_keywords'] = 'Verba claues:';
$lang['subscr_subscribe_success'] = '%s additur indici subscriptionis quod %s';
$lang['subscr_subscribe_error'] = '%s non additur indici subscriptionis quod %s';
$lang['subscr_subscribe_noaddress'] = 'Cursus interretialis tuus deest, sic in indice subscriptionis non scribi potes';
diff --git a/inc/lang/lb/denied.txt b/inc/lang/lb/denied.txt
index 487bf2198..1a7fd8f52 100644
--- a/inc/lang/lb/denied.txt
+++ b/inc/lang/lb/denied.txt
@@ -1,3 +1,4 @@
======Erlaabnis verweigert======
-Et deet mer leed, du hues net genuch Rechter fir weiderzefueren. Hues de vläicht vergiess dech anzeloggen?
+Et deet mer leed, du hues net genuch Rechter fir weiderzefueren.
+
diff --git a/inc/lang/lb/lang.php b/inc/lang/lb/lang.php
index 55113745a..a1b6ccf84 100644
--- a/inc/lang/lb/lang.php
+++ b/inc/lang/lb/lang.php
@@ -41,7 +41,7 @@ $lang['btn_draft'] = 'Entworf änneren';
$lang['btn_recover'] = 'Entworf zeréckhuelen';
$lang['btn_draftdel'] = 'Entworf läschen';
$lang['btn_register'] = 'Registréieren';
-$lang['loggedinas'] = 'Ageloggt als';
+$lang['loggedinas'] = 'Ageloggt als:';
$lang['user'] = 'Benotzernumm';
$lang['pass'] = 'Passwuert';
$lang['newpass'] = 'Nei Passwuert';
@@ -77,11 +77,11 @@ $lang['resendpwdconfirm'] = 'De Konfirmatiounslink gouf iwwer Email gesché
$lang['resendpwdsuccess'] = 'Däi nei Passwuert gouf iwwer Email geschéckt.';
$lang['license'] = 'Wann näischt anescht do steet, ass den Inhalt vun dësem Wiki ënner folgender Lizenz:';
$lang['licenseok'] = 'Pass op: Wanns de dës Säit änners, bass de dermat averstan dass den Inhalt ënner folgender Lizenz lizenzéiert gëtt:';
-$lang['txt_upload'] = 'Wiel eng Datei fir eropzelueden';
-$lang['txt_filename'] = 'Eroplueden als (optional)';
+$lang['txt_upload'] = 'Wiel eng Datei fir eropzelueden:';
+$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['lockedby'] = 'Am Moment gespaart vun:';
+$lang['lockexpire'] = 'D\'Spär leeft of ëm:';
$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: ';
@@ -118,9 +118,9 @@ $lang['yours'] = 'Deng Versioun';
$lang['diff'] = 'Weis d\'Ënnerscheeder zuer aktueller Versioun';
$lang['diff2'] = 'Weis d\'Ënnerscheeder zwescht den ausgewielte Versiounen';
$lang['line'] = 'Linn';
-$lang['breadcrumb'] = 'Spuer';
-$lang['youarehere'] = 'Du bass hei';
-$lang['lastmod'] = 'Fir d\'lescht g\'ännert';
+$lang['breadcrumb'] = 'Spuer:';
+$lang['youarehere'] = 'Du bass hei:';
+$lang['lastmod'] = 'Fir d\'lescht g\'ännert:';
$lang['by'] = 'vun';
$lang['deleted'] = 'geläscht';
$lang['created'] = 'erstallt';
@@ -162,17 +162,17 @@ $lang['admin_register'] = 'Neie Benotzer bäisetzen';
$lang['metaedit'] = 'Metadaten änneren';
$lang['metasaveerr'] = 'Feeler beim Schreiwe vun de Metadaten';
$lang['metasaveok'] = 'Metadate gespäichert';
-$lang['img_backto'] = 'Zeréck op';
-$lang['img_title'] = 'Titel';
-$lang['img_caption'] = 'Beschreiwung';
-$lang['img_date'] = 'Datum';
-$lang['img_fname'] = 'Dateinumm';
-$lang['img_fsize'] = 'Gréisst';
-$lang['img_artist'] = 'Fotograf';
-$lang['img_copyr'] = 'Copyright';
-$lang['img_format'] = 'Format';
-$lang['img_camera'] = 'Kamera';
-$lang['img_keywords'] = 'Schlësselwieder';
+$lang['btn_img_backto'] = 'Zeréck op %s';
+$lang['img_title'] = 'Titel:';
+$lang['img_caption'] = 'Beschreiwung:';
+$lang['img_date'] = 'Datum:';
+$lang['img_fname'] = 'Dateinumm:';
+$lang['img_fsize'] = 'Gréisst:';
+$lang['img_artist'] = 'Fotograf:';
+$lang['img_copyr'] = 'Copyright:';
+$lang['img_format'] = 'Format:';
+$lang['img_camera'] = 'Kamera:';
+$lang['img_keywords'] = 'Schlësselwieder:';
$lang['authtempfail'] = 'D\'Benotzerautentifikatioun ass de Moment net verfügbar. Wann dës Situatioun unhält, dann informéier w.e.g. de Wiki Admin.';
$lang['i_chooselang'] = 'Wiel deng Sprooch';
$lang['i_installer'] = 'DokuWiki Installer';
diff --git a/inc/lang/lt/denied.txt b/inc/lang/lt/denied.txt
index c25fb5f0c..9a8544694 100644
--- a/inc/lang/lt/denied.txt
+++ b/inc/lang/lt/denied.txt
@@ -1,4 +1,4 @@
====== Priėjimas uždraustas ======
-Jūs neturite reikiamų teisių, kad galėtumėte tęsti. Turbūt pamiršote prisijungti :-).
+Jūs neturite reikiamų teisių, kad galėtumėte tęsti.
diff --git a/inc/lang/lt/lang.php b/inc/lang/lt/lang.php
index c38ea8838..d6552d68c 100644
--- a/inc/lang/lt/lang.php
+++ b/inc/lang/lt/lang.php
@@ -46,7 +46,7 @@ $lang['btn_draft'] = 'Redaguoti juodraštį';
$lang['btn_recover'] = 'Atkurti juodraštį';
$lang['btn_draftdel'] = 'Šalinti juodraštį';
$lang['btn_register'] = 'Registruotis';
-$lang['loggedinas'] = 'Prisijungęs kaip';
+$lang['loggedinas'] = 'Prisijungęs kaip:';
$lang['user'] = 'Vartotojo vardas';
$lang['pass'] = 'Slaptažodis';
$lang['newpass'] = 'Naujas slaptažodis';
@@ -82,11 +82,11 @@ $lang['resendpwdconfirm'] = 'Patvirtinimo nuoroda išsiųsta el. paštu.';
$lang['resendpwdsuccess'] = 'Jūsų naujas slaptažodis buvo išsiųstas el. paštu.';
$lang['license'] = 'Jei nenurodyta kitaip, šio wiki turinys ginamas tokia licencija:';
$lang['licenseok'] = 'Pastaba: Redaguodami šį puslapį jūs sutinkate jog jūsų turinys atitinka licencijavima pagal šią licenciją';
-$lang['txt_upload'] = 'Išsirinkite atsiunčiamą bylą';
-$lang['txt_filename'] = 'Įveskite wikivardą (nebūtina)';
+$lang['txt_upload'] = 'Išsirinkite atsiunčiamą bylą:';
+$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['lockedby'] = 'Užrakintas vartotojo:';
+$lang['lockexpire'] = 'Užraktas bus nuimtas:';
$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: ';
@@ -125,9 +125,9 @@ $lang['yours'] = 'Jūsų versija';
$lang['diff'] = 'rodyti skirtumus tarp šios ir esamos versijos';
$lang['diff2'] = 'Parodyti skirtumus tarp pasirinktų versijų';
$lang['line'] = 'Linija';
-$lang['breadcrumb'] = 'Kelias';
-$lang['youarehere'] = 'Jūs esate čia';
-$lang['lastmod'] = 'Keista';
+$lang['breadcrumb'] = 'Kelias:';
+$lang['youarehere'] = 'Jūs esate čia:';
+$lang['lastmod'] = 'Keista:';
$lang['by'] = 'vartotojo';
$lang['deleted'] = 'ištrintas';
$lang['created'] = 'sukurtas';
@@ -163,17 +163,17 @@ $lang['admin_register'] = 'Sukurti naują vartotoją';
$lang['metaedit'] = 'Redaguoti metaduomenis';
$lang['metasaveerr'] = 'Nepavyko išsaugoti metaduomenų';
$lang['metasaveok'] = 'Metaduomenys išsaugoti';
-$lang['img_backto'] = 'Atgal į';
-$lang['img_title'] = 'Pavadinimas';
-$lang['img_caption'] = 'Antraštė';
-$lang['img_date'] = 'Data';
-$lang['img_fname'] = 'Bylos pavadinimas';
-$lang['img_fsize'] = 'Dydis';
-$lang['img_artist'] = 'Fotografas';
-$lang['img_copyr'] = 'Autorinės teisės';
-$lang['img_format'] = 'Formatas';
-$lang['img_camera'] = 'Kamera';
-$lang['img_keywords'] = 'Raktiniai žodžiai';
+$lang['btn_img_backto'] = 'Atgal į %s';
+$lang['img_title'] = 'Pavadinimas:';
+$lang['img_caption'] = 'Antraštė:';
+$lang['img_date'] = 'Data:';
+$lang['img_fname'] = 'Bylos pavadinimas:';
+$lang['img_fsize'] = 'Dydis:';
+$lang['img_artist'] = 'Fotografas:';
+$lang['img_copyr'] = 'Autorinės teisės:';
+$lang['img_format'] = 'Formatas:';
+$lang['img_camera'] = 'Kamera:';
+$lang['img_keywords'] = 'Raktiniai žodžiai:';
$lang['authtempfail'] = 'Vartotojo tapatumo nustatymas laikinai nepasiekiamas. Jei ši situacija kartojasi, tai praneškite savo administratoriui.';
$lang['i_chooselang'] = 'Pasirinkite kalbą';
$lang['i_installer'] = 'DokuWiki Instaliatorius';
diff --git a/inc/lang/lv/denied.txt b/inc/lang/lv/denied.txt
index c7df462c8..6733fb2e9 100644
--- a/inc/lang/lv/denied.txt
+++ b/inc/lang/lv/denied.txt
@@ -1,6 +1,4 @@
====== Piekļuve aizliegta ======
-Atvaino, tev nav tiesību turpināt. Varbūt aizmirsi ielogoties?
-
-
+Atvaino, tev nav tiesību turpināt.
diff --git a/inc/lang/lv/lang.php b/inc/lang/lv/lang.php
index 898125d60..15994afe6 100644
--- a/inc/lang/lv/lang.php
+++ b/inc/lang/lv/lang.php
@@ -1,8 +1,8 @@
<?php
+
/**
- * latvian language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Aivars Miška <allefm@gmail.com>
*/
$lang['encoding'] = 'utf-8';
@@ -47,7 +47,10 @@ $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['btn_deleteuser'] = 'Dzēst manu kontu';
+$lang['btn_img_backto'] = 'Atpakaļ uz %s';
+$lang['btn_mediaManager'] = 'Skatīt mēdiju pārvaldniekā';
+$lang['loggedinas'] = 'Pieteicies kā:';
$lang['user'] = 'Lietotājvārds';
$lang['pass'] = 'Parole';
$lang['newpass'] = 'Jaunā parole';
@@ -58,6 +61,7 @@ $lang['fullname'] = 'Pilns vārds';
$lang['email'] = 'E-pasts';
$lang['profile'] = 'Lietotāja vārds';
$lang['badlogin'] = 'Atvaino, lietotājvārds vai parole aplama.';
+$lang['badpassconfirm'] = 'Atvaino, aplama parole';
$lang['minoredit'] = 'Sīki labojumi';
$lang['draftdate'] = 'Melnraksts automātiski saglabāts';
$lang['nosecedit'] = 'Lapa pa šo laiku ir mainījusies, sekcijas informācija novecojusi. Ielādēta lapas pilnās versija.';
@@ -74,6 +78,11 @@ $lang['profna'] = 'Labot profilu nav iespējams';
$lang['profnochange'] = 'Izmaiņu nav. Nav, ko darīt.';
$lang['profnoempty'] = 'Bez vārda vai e-pasta adreses nevar.';
$lang['profchanged'] = 'Profils veiksmīgi izlabots.';
+$lang['profnodelete'] = 'Šajā viki lietotājus izdzēst nevar';
+$lang['profdeleteuser'] = 'Dzēst kontu';
+$lang['profdeleted'] = 'Jūsu lietotāja konts ir izdzēsts';
+$lang['profconfdelete'] = 'Es vēlos dzēst savu kontu no viki. <br/> Šo darbību vairs nevarēs atsaukt.';
+$lang['profconfdeletemissing'] = 'Nav atzīmēta apstiprinājuma rūtiņa.';
$lang['pwdforget'] = 'Aizmirsi paroli? Saņem jaunu';
$lang['resendna'] = 'Paroļu izsūtīšanu nepiedāvāju.';
$lang['resendpwd'] = 'Uzstādīt jaunu paroli lietotājam';
@@ -86,12 +95,12 @@ $lang['license'] = 'Ja nav norādīts citādi, viki saturs pieejam
$lang['licenseok'] = 'Ievēro: Labojot lapu, tu piekrīti šādiem licenzes noteikumiem.';
$lang['searchmedia'] = 'Meklētais faila vārds: ';
$lang['searchmedia_in'] = 'Meklēt iekš %s';
-$lang['txt_upload'] = 'Norādi augšupielādējamo failu';
-$lang['txt_filename'] = 'Ievadi vikivārdu (nav obligāts)';
+$lang['txt_upload'] = 'Norādi augšupielādējamo failu:';
+$lang['txt_filename'] = 'Ievadi vikivārdu (nav obligāts):';
$lang['txt_overwrt'] = 'Aizstāt esošo failu';
$lang['maxuploadsize'] = 'Augšuplādējamā faila ierobežojums: %s.';
-$lang['lockedby'] = 'Patlaban bloķējis ';
-$lang['lockexpire'] = 'Bloķējums beigsies ';
+$lang['lockedby'] = 'Patlaban bloķējis :';
+$lang['lockexpire'] = 'Bloķējums beigsies :';
$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?';
@@ -172,10 +181,15 @@ $lang['difflink'] = 'Saite uz salīdzināšanas skatu.';
$lang['diff_type'] = 'Skatīt atšķirības:';
$lang['diff_inline'] = 'Iekļauti';
$lang['diff_side'] = 'Blakus';
+$lang['diffprevrev'] = 'Iepriekšējā versija';
+$lang['diffnextrev'] = 'Nākamā versija';
+$lang['difflastrev'] = 'Jaunākā versija';
+$lang['diffbothprevrev'] = 'Abās pusēs iepriekšējo versiju';
+$lang['diffbothnextrev'] = 'Abās pusēs nākamo versiju';
$lang['line'] = 'Rinda';
-$lang['breadcrumb'] = 'Apmeklēts';
-$lang['youarehere'] = 'Tu atrodies šeit';
-$lang['lastmod'] = 'Labota';
+$lang['breadcrumb'] = 'Apmeklēts:';
+$lang['youarehere'] = 'Tu atrodies šeit:';
+$lang['lastmod'] = 'Labota:';
$lang['by'] = ', labojis';
$lang['deleted'] = 'dzēsts';
$lang['created'] = 'izveidots';
@@ -228,20 +242,18 @@ $lang['admin_register'] = 'Pievienot jaunu lietotāju';
$lang['metaedit'] = 'Labot metadatus';
$lang['metasaveerr'] = 'Metadati nav saglabāti';
$lang['metasaveok'] = 'Metadati saglabāti';
-$lang['img_backto'] = 'Atpakaļ uz';
-$lang['img_title'] = 'Virsraksts';
-$lang['img_caption'] = 'Apraksts';
-$lang['img_date'] = 'Datums';
-$lang['img_fname'] = 'Faila vārds';
-$lang['img_fsize'] = 'Izmērs';
-$lang['img_artist'] = 'Fotogrāfs';
-$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['img_title'] = 'Virsraksts:';
+$lang['img_caption'] = 'Apraksts:';
+$lang['img_date'] = 'Datums:';
+$lang['img_fname'] = 'Faila vārds:';
+$lang['img_fsize'] = 'Izmērs:';
+$lang['img_artist'] = 'Fotogrāfs:';
+$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['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.';
@@ -270,6 +282,7 @@ $lang['i_modified'] = 'Drošības nolūkos šis skripts darbosies tik
Vai nu no jauna jāatarhivē faili no lejupielādētās pakas vai jāraugās pēc padoma pilnā Dokuwiki instalācijas instrukcijā <a href="http://dokuwiki.org/install"></a>';
$lang['i_funcna'] = 'PHP funkcija <code>%s</code> nav pieejama. Varbūt jūsu servera īpašnieks to kāda iemesla dēļ atslēdzis?';
$lang['i_phpver'] = 'Jūsu PHP versija <code>%s</code> ir par vecu. Vajag versiju <code>%s</code>. Atjaunojiet savu PHP instalāciju.';
+$lang['i_mbfuncoverload'] = 'Lai darbinātu DokuWiki, php.ini failā ir jāatspējo mbstring.func_overload.';
$lang['i_permfail'] = 'Dokuwiki nevar ierakstīt <code>%s</code>. Jālabo direktorijas tiesības!';
$lang['i_confexists'] = '<code>%s</code> jau ir';
$lang['i_writeerr'] = 'Nevar izveidot <code>%s</code>. Jāpārbauda direktorijas/faila tiesības un fails jāizveido pašam.';
@@ -281,6 +294,7 @@ $lang['i_policy'] = 'Sākotnējā ACL politika';
$lang['i_pol0'] = 'Atvērts Wiki (raksta, lasa un augšupielādē ikviens)';
$lang['i_pol1'] = 'Publisks Wiki (lasa ikviens, raksta un augšupielādē reģistrēti lietotāji)';
$lang['i_pol2'] = 'Slēgts Wiki (raksta, lasa un augšupielādē tikai reģistrēti lietotāji)';
+$lang['i_allowreg'] = 'Atļaut lietotājiem reģistrēties.';
$lang['i_retry'] = 'Atkārtot';
$lang['i_license'] = 'Ar kādu licenci saturs tiks publicēts:';
$lang['i_license_none'] = 'Nerādīt nekādu licences informāciju';
@@ -318,3 +332,7 @@ $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['currentns'] = 'Pašreizējā sadaļa';
+$lang['searchresult'] = 'Meklēšanas rezultāti';
+$lang['plainhtml'] = 'Tīrs HTML';
+$lang['wikimarkup'] = 'Viki iezīmēšana valoda';
diff --git a/inc/lang/mg/denied.txt b/inc/lang/mg/denied.txt
index edf20f1a1..d6d2b814e 100644
--- a/inc/lang/mg/denied.txt
+++ b/inc/lang/mg/denied.txt
@@ -1,4 +1,4 @@
====== Tsy tafiditra ======
-Miala tsiny fa tsy manana alalana hanohizana mankany ianao. Angamba hadinonao ny niditra.
+Miala tsiny fa tsy manana alalana hanohizana mankany ianao.
diff --git a/inc/lang/mg/lang.php b/inc/lang/mg/lang.php
index c5ed669a9..6239c01fe 100644
--- a/inc/lang/mg/lang.php
+++ b/inc/lang/mg/lang.php
@@ -49,11 +49,11 @@ $lang['regbadpass'] = 'Tsy mitovy ny alahidy roa nomenao, avereno indray.';
$lang['regpwmail'] = 'Ny alahidy Wiki-nao';
$lang['reghere'] = 'Mbola tsy manana kaonty ianao? Manaova vaovao';
-$lang['txt_upload'] = 'Misafidiana rakitra halefa';
-$lang['txt_filename'] = 'Ampidiro ny anaran\'ny wiki (tsy voatery)';
+$lang['txt_upload'] = 'Misafidiana rakitra halefa:';
+$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['lockedby'] = 'Mbola voahidin\'i:';
+$lang['lockexpire'] = 'Afaka ny hidy amin\'ny:';
$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?';
@@ -83,7 +83,7 @@ $lang['current'] = 'current';
$lang['yours'] = 'Kinova-nao';
$lang['diff'] = 'Asehoy ny tsy fitoviana amin\'ny kinova amin\'izao';
$lang['line'] = 'Andalana';
-$lang['breadcrumb'] = 'Taiza ianao';
+$lang['breadcrumb'] = 'Taiza ianao:';
$lang['lastmod'] = 'Novaina farany:';
$lang['by'] = '/';
$lang['deleted'] = 'voafafa';
diff --git a/inc/lang/mk/lang.php b/inc/lang/mk/lang.php
index 2b2c9fb7f..ddfae15c4 100644
--- a/inc/lang/mk/lang.php
+++ b/inc/lang/mk/lang.php
@@ -47,7 +47,7 @@ $lang['btn_recover'] = 'Поврати скица';
$lang['btn_draftdel'] = 'Избриши скица';
$lang['btn_revert'] = 'Обнови';
$lang['btn_register'] = 'Регистрирај се';
-$lang['loggedinas'] = 'Најавен/а како';
+$lang['loggedinas'] = 'Најавен/а како:';
$lang['user'] = 'Корисничко име';
$lang['pass'] = 'Лозинка';
$lang['newpass'] = 'Нова лозинка';
@@ -85,11 +85,11 @@ $lang['license'] = 'Освен каде што е наведено
$lang['licenseok'] = 'Забелешка: со уредување на оваа страница се согласувате да ја лиценцирате вашата содржина под следнава лиценца:';
$lang['searchmedia'] = 'Барај име на датотека:';
$lang['searchmedia_in'] = 'Барај во %s';
-$lang['txt_upload'] = 'Избери датотека за качување';
-$lang['txt_filename'] = 'Качи како (неморално)';
+$lang['txt_upload'] = 'Избери датотека за качување:';
+$lang['txt_filename'] = 'Качи како (неморално):';
$lang['txt_overwrt'] = 'Пребриши ја веќе постоечката датотека';
-$lang['lockedby'] = 'Моментално заклучена од';
-$lang['lockexpire'] = 'Клучот истекува на';
+$lang['lockedby'] = 'Моментално заклучена од:';
+$lang['lockexpire'] = 'Клучот истекува на:';
$lang['js']['willexpire'] = 'Вашиот клуч за уредување на оваа страница ќе истече за една минута.\nЗа да избегнете конфликти и да го ресетирате бројачот за време, искористете го копчето за преглед.';
$lang['js']['notsavedyet'] = 'Незачуваните промени ќе бидат изгубени.\nСакате да продолжите?';
$lang['rssfailed'] = 'Се појави грешка при повлекувањето на овој канал:';
@@ -130,9 +130,9 @@ $lang['yours'] = 'Вашата верзија';
$lang['diff'] = 'Прикажи разлики со сегашната верзија';
$lang['diff2'] = 'Прикажи разлики помеѓу избраните ревизии';
$lang['line'] = 'Линија';
-$lang['breadcrumb'] = 'Следи';
-$lang['youarehere'] = 'Вие сте тука';
-$lang['lastmod'] = 'Последно изменета';
+$lang['breadcrumb'] = 'Следи:';
+$lang['youarehere'] = 'Вие сте тука:';
+$lang['lastmod'] = 'Последно изменета:';
$lang['by'] = 'од';
$lang['deleted'] = 'отстранета';
$lang['created'] = 'креирана';
@@ -171,17 +171,17 @@ $lang['admin_register'] = 'Додај нов корисник';
$lang['metaedit'] = 'Уреди мета-податоци';
$lang['metasaveerr'] = 'Запишување на мета-податоците не успеа';
$lang['metasaveok'] = 'Мета-податоците се зачувани';
-$lang['img_backto'] = 'Назад до';
-$lang['img_title'] = 'Насловна линија';
-$lang['img_caption'] = 'Наслов';
-$lang['img_date'] = 'Датум';
-$lang['img_fname'] = 'Име на датотека';
-$lang['img_fsize'] = 'Големина';
-$lang['img_artist'] = 'Фотограф';
-$lang['img_copyr'] = 'Авторско право';
-$lang['img_format'] = 'Формат';
-$lang['img_camera'] = 'Камера';
-$lang['img_keywords'] = 'Клучни зборови';
+$lang['btn_img_backto'] = 'Назад до %s';
+$lang['img_title'] = 'Насловна линија:';
+$lang['img_caption'] = 'Наслов:';
+$lang['img_date'] = 'Датум:';
+$lang['img_fname'] = 'Име на датотека:';
+$lang['img_fsize'] = 'Големина:';
+$lang['img_artist'] = 'Фотограф:';
+$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['subscr_subscribe_noaddress'] = 'Нема адреса за е-пошта поврзана со Вашата најава, не може да бидете додадени на претплатничката листа';
diff --git a/inc/lang/mr/denied.txt b/inc/lang/mr/denied.txt
index 1b499f51d..5415fde04 100644
--- a/inc/lang/mr/denied.txt
+++ b/inc/lang/mr/denied.txt
@@ -1,3 +1,4 @@
====== परवानगी नाकारली ======
-क्षमा करा, पण तुम्हाला यापुढे जाण्याचे हक्क नाहीत. कदाचित तुम्ही लॉगिन करायला विसरला आहात ? \ No newline at end of file
+क्षमा करा, पण तुम्हाला यापुढे जाण्याचे हक्क नाहीत.
+
diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php
index 54b69974d..72779dd10 100644
--- a/inc/lang/mr/lang.php
+++ b/inc/lang/mr/lang.php
@@ -54,7 +54,7 @@ $lang['btn_revert'] = 'पुनर्स्थापन';
$lang['btn_register'] = 'नोंदणी';
$lang['btn_apply'] = 'लागू';
$lang['btn_media'] = 'मिडिया व्यवस्थापक';
-$lang['loggedinas'] = 'लॉगिन नाव';
+$lang['loggedinas'] = 'लॉगिन नाव:';
$lang['user'] = 'वापरकर्ता';
$lang['pass'] = 'परवलीचा शब्द';
$lang['newpass'] = 'नवीन परवलीचा शब्द';
@@ -93,8 +93,8 @@ $lang['license'] = 'विशिष्ठ नोंद केल
$lang['licenseok'] = 'नोंद : हे पृष्ठ संपादित केल्यास तुम्ही तुमचे योगदान खालील लायसन्स अंतर्गत येइल : ';
$lang['searchmedia'] = 'फाईल शोधा:';
$lang['searchmedia_in'] = '%s मधे शोधा';
-$lang['txt_upload'] = 'अपलोड करण्याची फाइल निवडा';
-$lang['txt_filename'] = 'अपलोड उर्फ़ ( वैकल्पिक )';
+$lang['txt_upload'] = 'अपलोड करण्याची फाइल निवडा:';
+$lang['txt_filename'] = 'अपलोड उर्फ़ ( वैकल्पिक ):';
$lang['txt_overwrt'] = 'अस्तित्वात असलेल्या फाइलवरच सुरक्षित करा.';
$lang['lockedby'] = 'सध्या लॉक करणारा :';
$lang['lockexpire'] = 'सध्या लॉक करणारा :';
@@ -174,9 +174,9 @@ $lang['diff_type'] = 'फरक बघू:';
$lang['diff_inline'] = 'एका ओळीत';
$lang['diff_side'] = 'बाजूबाजूला';
$lang['line'] = 'ओळ';
-$lang['breadcrumb'] = 'मागमूस';
-$lang['youarehere'] = 'तुम्ही इथे आहात';
-$lang['lastmod'] = 'सर्वात शेवटचा बदल';
+$lang['breadcrumb'] = 'मागमूस:';
+$lang['youarehere'] = 'तुम्ही इथे आहात:';
+$lang['lastmod'] = 'सर्वात शेवटचा बदल:';
$lang['by'] = 'द्वारा';
$lang['deleted'] = 'काढून टाकले';
$lang['created'] = 'निर्माण केले';
@@ -227,20 +227,20 @@ $lang['admin_register'] = 'नवीन सदस्य';
$lang['metaedit'] = 'मेटाडेटा बदला';
$lang['metasaveerr'] = 'मेटाडेटा सुरक्षित झाला नाही';
$lang['metasaveok'] = 'मेटाडेटा सुरक्षित झाला';
-$lang['img_backto'] = 'परत जा';
-$lang['img_title'] = 'नाव';
-$lang['img_caption'] = 'टीप';
-$lang['img_date'] = 'तारीख';
-$lang['img_fname'] = 'फाइल नाव';
-$lang['img_fsize'] = 'साइझ';
-$lang['img_artist'] = 'फोटोग्राफर';
-$lang['img_copyr'] = 'कॉपीराइट';
-$lang['img_format'] = 'प्रकार';
-$lang['img_camera'] = 'कॅमेरा';
-$lang['img_keywords'] = 'मुख्य शब्द';
-$lang['img_width'] = 'रुंदी';
-$lang['img_height'] = 'उंची';
-$lang['img_manager'] = 'मिडिया व्यवस्थापकात बघू';
+$lang['btn_img_backto'] = 'परत जा %s';
+$lang['img_title'] = 'नाव:';
+$lang['img_caption'] = 'टीप:';
+$lang['img_date'] = 'तारीख:';
+$lang['img_fname'] = 'फाइल नाव:';
+$lang['img_fsize'] = 'साइझ:';
+$lang['img_artist'] = 'फोटोग्राफर:';
+$lang['img_copyr'] = 'कॉपीराइट:';
+$lang['img_format'] = 'प्रकार:';
+$lang['img_camera'] = 'कॅमेरा:';
+$lang['img_keywords'] = 'मुख्य शब्द:';
+$lang['img_width'] = 'रुंदी:';
+$lang['img_height'] = 'उंची:';
+$lang['btn_mediaManager'] = 'मिडिया व्यवस्थापकात बघू';
$lang['authtempfail'] = 'सदस्य अधिकृत करण्याची सुविधा सध्या चालू नाही. सतत हा मजकूर दिसल्यास कृपया तुमच्या विकीच्या व्यवस्थापकाशी सम्पर्क साधा.';
$lang['i_chooselang'] = 'तुमची भाषा निवडा';
$lang['i_installer'] = 'डॉक्युविकि इनस्टॉलर';
diff --git a/inc/lang/ms/lang.php b/inc/lang/ms/lang.php
index 02c0e2c91..303116429 100644
--- a/inc/lang/ms/lang.php
+++ b/inc/lang/ms/lang.php
@@ -47,7 +47,7 @@ $lang['btn_revert'] = 'Pulihkan';
$lang['btn_register'] = 'Daftaran';
$lang['btn_apply'] = 'Simpan';
$lang['btn_media'] = 'Manager media';
-$lang['loggedinas'] = 'Log masuk sebagai';
+$lang['loggedinas'] = 'Log masuk sebagai:';
$lang['user'] = 'Nama pengguna';
$lang['pass'] = 'Kata laluan';
$lang['newpass'] = 'Kata laluan baru';
@@ -83,10 +83,10 @@ $lang['license'] = 'Selain daripada yang dinyata, isi wiki ini dis
$lang['licenseok'] = 'Perhatian: Dengan menyunting halaman ini, anda setuju untuk isi-isi anda dilesen menggunakan lesen berikut:';
$lang['searchmedia'] = 'Cari nama fail:';
$lang['searchmedia_in'] = 'Cari di %s';
-$lang['txt_upload'] = 'Pilih fail untuk diunggah';
-$lang['txt_filename'] = 'Unggah fail dengan nama (tidak wajib)';
+$lang['txt_upload'] = 'Pilih fail untuk diunggah:';
+$lang['txt_filename'] = 'Unggah fail dengan nama (tidak wajib):';
$lang['txt_overwrt'] = 'Timpa fail sekarang';
-$lang['lockedby'] = 'Halaman ini telah di';
+$lang['lockedby'] = 'Halaman ini telah di:';
$lang['fileupload'] = 'Muat naik fail';
$lang['uploadsucc'] = 'Pemuatan naik berjaya';
$lang['uploadfail'] = 'Ralat muat naik';
diff --git a/inc/lang/ne/denied.txt b/inc/lang/ne/denied.txt
index ab4bcf290..5c58cde28 100644
--- a/inc/lang/ne/denied.txt
+++ b/inc/lang/ne/denied.txt
@@ -1,3 +1,4 @@
====== अनुमति अमान्य ======
-माफ गर्नुहोला तपाईलाई अगाडि बढ्न अनुमति छैन। सम्भवत: तपाईले प्रवेश गर्न भुल्नु भयो। \ No newline at end of file
+माफ गर्नुहोला तपाईलाई अगाडि बढ्न अनुमति छैन।
+
diff --git a/inc/lang/ne/lang.php b/inc/lang/ne/lang.php
index 7fd14d2c5..ddf031242 100644
--- a/inc/lang/ne/lang.php
+++ b/inc/lang/ne/lang.php
@@ -44,7 +44,7 @@ $lang['btn_draft'] = ' ड्राफ्ट सम्पादन
$lang['btn_recover'] = 'पहिलेको ड्राफ्ट हासिल गर्नुहोस ';
$lang['btn_draftdel'] = ' ड्राफ्ट मेटाउनुहोस् ';
$lang['btn_register'] = 'दर्ता गर्नुहोस्';
-$lang['loggedinas'] = 'प्रवेश गर्नुहोस् ';
+$lang['loggedinas'] = 'प्रवेश गर्नुहोस् :';
$lang['user'] = 'प्रयोगकर्ता ';
$lang['pass'] = 'प्रवेशशव्द';
$lang['newpass'] = 'नयाँ प्रवेशशव्द';
@@ -80,10 +80,10 @@ $lang['resendpwdconfirm'] = 'तपाईको इमेलमा कन
$lang['resendpwdsuccess'] = 'तपाईको प्रवेशशव्द इमेलबाट पठाइएको छ। ';
$lang['license'] = 'खुलाइएको बाहेक, यस विकिका विषयवस्तुहरु निम्त प्रमाण द्वारा प्रमाणिक गरिएको छ।';
$lang['licenseok'] = 'नोट: यस पृष्ठ सम्पादन गरी तपाईले आफ्नो विषयवस्तु तलको प्रमाण पत्र अन्तर्गत प्रमाणिक गर्न राजी हुनु हुनेछ ।';
-$lang['txt_upload'] = 'अपलोड गर्नलाई फाइल छा्न्नुहो्स्';
-$lang['txt_filename'] = 'अर्को रुपमा अपलोड गर्नुहोस् (ऐच्छिक)';
+$lang['txt_upload'] = 'अपलोड गर्नलाई फाइल छा्न्नुहो्स्:';
+$lang['txt_filename'] = 'अर्को रुपमा अपलोड गर्नुहोस् (ऐच्छिक):';
$lang['txt_overwrt'] = 'रहेको उहि नामको फाइललाई मेटाउने';
-$lang['lockedby'] = 'अहिले ताल्चा लगाइएको';
+$lang['lockedby'] = 'अहिले ताल्चा लगाइएको:';
$lang['lockexpire'] = 'ताल्चा अवधि सकिने :';
$lang['js']['willexpire'] = 'तपाईलले यो पृष्ठ सम्पादन गर्न लगाउनु भएको ताल्चाको अवधि एक मिनेट भित्र सकिदै छ। \n द्वन्द हुन नदिन पूर्वरुप वा ताल्चा समय परिवर्तन गर्नुहोस् ।';
$lang['js']['notsavedyet'] = 'तपाईले वचन गर्नु नभएको परिवर्रन हराउने छ। \n साच्चै जारी गर्नुहुन्छ ।';
@@ -123,9 +123,9 @@ $lang['yours'] = 'तपाईको संस्करण';
$lang['diff'] = 'हालको संस्करण सँगको भिन्नता';
$lang['diff2'] = 'रोजिएका संस्करण वीचका भिन्नताहरु ';
$lang['line'] = 'हरफ';
-$lang['breadcrumb'] = 'छुट्ट्याउनुहोस् ';
-$lang['youarehere'] = 'तपाई यहा हुनुहुन्छ';
-$lang['lastmod'] = 'अन्तिम पटक सच्याइएको';
+$lang['breadcrumb'] = 'छुट्ट्याउनुहोस् :';
+$lang['youarehere'] = 'तपाई यहा हुनुहुन्छ:';
+$lang['lastmod'] = 'अन्तिम पटक सच्याइएको:';
$lang['by'] = 'द्वारा ';
$lang['deleted'] = 'हटाइएको';
$lang['created'] = 'निर्माण गरिएको';
@@ -158,17 +158,17 @@ $lang['admin_register'] = 'नयाँ प्रयोगकर्ता
$lang['metaedit'] = 'मेटाडेटा सम्पादन गर्नुहोस्';
$lang['metasaveerr'] = 'मेटाडाटा लेखन असफल';
$lang['metasaveok'] = 'मेटाडाटा वचत भयो ';
-$lang['img_backto'] = 'फिर्ता';
-$lang['img_title'] = 'शिर्षक';
-$lang['img_caption'] = 'निम्न लेख';
-$lang['img_date'] = 'मिति';
-$lang['img_fname'] = 'फाइलनाम';
-$lang['img_fsize'] = 'आकार';
-$lang['img_artist'] = 'चित्रकार';
-$lang['img_copyr'] = 'सर्वाधिकार';
-$lang['img_format'] = 'ढाचा';
-$lang['img_camera'] = 'क्यामेरा';
-$lang['img_keywords'] = 'खोज शब्द';
+$lang['btn_img_backto'] = 'फिर्ता%s';
+$lang['img_title'] = 'शिर्षक:';
+$lang['img_caption'] = 'निम्न लेख:';
+$lang['img_date'] = 'मिति:';
+$lang['img_fname'] = 'फाइलनाम:';
+$lang['img_fsize'] = 'आकार:';
+$lang['img_artist'] = 'चित्रकार:';
+$lang['img_copyr'] = 'सर्वाधिकार:';
+$lang['img_format'] = 'ढाचा:';
+$lang['img_camera'] = 'क्यामेरा:';
+$lang['img_keywords'] = 'खोज शब्द:';
$lang['authtempfail'] = 'प्रयोगकर्ता प्रामाणिकरण अस्थाइरुपमा अनुपलब्ध छ। यदि यो समस्या रहि रहेमा तपाईको विकि एड्मिनलाई खवर गर्नुहोला ।';
$lang['i_chooselang'] = 'भाषा छान्नुहोस् ';
$lang['i_installer'] = 'DokuWiki स्थापक';
diff --git a/inc/lang/nl/denied.txt b/inc/lang/nl/denied.txt
index 6a8bf773f..a172ddab6 100644
--- a/inc/lang/nl/denied.txt
+++ b/inc/lang/nl/denied.txt
@@ -1,3 +1,4 @@
====== Toegang geweigerd ======
-Sorry: je hebt niet voldoende rechten om verder te gaan. Misschien ben je vergeten in te loggen?
+Sorry: je hebt niet voldoende rechten om verder te gaan.
+
diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php
index e5e3e3c76..a9058720c 100644
--- a/inc/lang/nl/lang.php
+++ b/inc/lang/nl/lang.php
@@ -22,14 +22,16 @@
* @author Klap-in <klapinklapin@gmail.com>
* @author Remon <no@email.local>
* @author gicalle <gicalle@hotmail.com>
+ * @author Rene <wllywlnt@yahoo.com>
+ * @author Johan Vervloet <johan.vervloet@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
-$lang['doublequoteopening'] = '„';
+$lang['doublequoteopening'] = '“';
$lang['doublequoteclosing'] = '”';
-$lang['singlequoteopening'] = '‚';
+$lang['singlequoteopening'] = '‘';
$lang['singlequoteclosing'] = '’';
-$lang['apostrophe'] = '\'';
+$lang['apostrophe'] = '’';
$lang['btn_edit'] = 'Pagina aanpassen';
$lang['btn_source'] = 'Toon broncode';
$lang['btn_show'] = 'Toon pagina';
@@ -66,7 +68,9 @@ $lang['btn_register'] = 'Registreren';
$lang['btn_apply'] = 'Toepassen';
$lang['btn_media'] = 'Mediabeheerder';
$lang['btn_deleteuser'] = 'Verwijder mijn account';
-$lang['loggedinas'] = 'Ingelogd als';
+$lang['btn_img_backto'] = 'Terug naar %s';
+$lang['btn_mediaManager'] = 'In mediabeheerder bekijken';
+$lang['loggedinas'] = 'Ingelogd als:';
$lang['user'] = 'Gebruikersnaam';
$lang['pass'] = 'Wachtwoord';
$lang['newpass'] = 'Nieuw wachtwoord';
@@ -111,12 +115,12 @@ $lang['license'] = 'Tenzij anders vermeld valt de inhoud van deze
$lang['licenseok'] = 'Let op: Door deze pagina aan te passen geef je de inhoud vrij onder de volgende licentie:';
$lang['searchmedia'] = 'Bestandsnaam zoeken:';
$lang['searchmedia_in'] = 'Zoek in %s';
-$lang['txt_upload'] = 'Selecteer een bestand om te uploaden';
-$lang['txt_filename'] = 'Vul nieuwe naam in (optioneel)';
+$lang['txt_upload'] = 'Selecteer een bestand om te uploaden:';
+$lang['txt_filename'] = 'Vul nieuwe naam in (optioneel):';
$lang['txt_overwrt'] = 'Overschrijf bestaand bestand';
$lang['maxuploadsize'] = 'Max %s per bestand';
-$lang['lockedby'] = 'Momenteel in gebruik door';
-$lang['lockexpire'] = 'Exclusief gebruiksrecht vervalt op';
+$lang['lockedby'] = 'Momenteel in gebruik door:';
+$lang['lockexpire'] = 'Exclusief gebruiksrecht vervalt op:';
$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?';
@@ -197,10 +201,15 @@ $lang['difflink'] = 'Link naar deze vergelijking';
$lang['diff_type'] = 'Bekijk verschillen:';
$lang['diff_inline'] = 'Inline';
$lang['diff_side'] = 'Zij aan zij';
+$lang['diffprevrev'] = 'Vorige revisie';
+$lang['diffnextrev'] = 'Volgende revisie';
+$lang['difflastrev'] = 'Laatste revisie';
+$lang['diffbothprevrev'] = 'Beide kanten vorige revisie';
+$lang['diffbothnextrev'] = 'Beide kanten volgende revisie';
$lang['line'] = 'Regel';
-$lang['breadcrumb'] = 'Spoor';
-$lang['youarehere'] = 'Je bent hier';
-$lang['lastmod'] = 'Laatst gewijzigd';
+$lang['breadcrumb'] = 'Spoor:';
+$lang['youarehere'] = 'Je bent hier:';
+$lang['lastmod'] = 'Laatst gewijzigd:';
$lang['by'] = 'door';
$lang['deleted'] = 'verwijderd';
$lang['created'] = 'aangemaakt';
@@ -253,20 +262,18 @@ $lang['admin_register'] = 'Nieuwe gebruiker toevoegen';
$lang['metaedit'] = 'Metadata wijzigen';
$lang['metasaveerr'] = 'Schrijven van metadata mislukt';
$lang['metasaveok'] = 'Metadata bewaard';
-$lang['img_backto'] = 'Terug naar';
-$lang['img_title'] = 'Titel';
-$lang['img_caption'] = 'Bijschrift';
-$lang['img_date'] = 'Datum';
-$lang['img_fname'] = 'Bestandsnaam';
-$lang['img_fsize'] = 'Grootte';
-$lang['img_artist'] = 'Fotograaf';
-$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 mediabeheerder bekijken';
+$lang['img_title'] = 'Titel:';
+$lang['img_caption'] = 'Bijschrift:';
+$lang['img_date'] = 'Datum:';
+$lang['img_fname'] = 'Bestandsnaam:';
+$lang['img_fsize'] = 'Grootte:';
+$lang['img_artist'] = 'Fotograaf:';
+$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['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 e-mailadres gekoppeld aan uw account, u kunt daardoor niet worden ingeschreven.';
diff --git a/inc/lang/no/denied.txt b/inc/lang/no/denied.txt
index 6e7f1f28b..f60f48f6b 100644
--- a/inc/lang/no/denied.txt
+++ b/inc/lang/no/denied.txt
@@ -1,3 +1,4 @@
====== Adgang forbudt ======
-Beklager, men du har ikke rettigheter til dette. Kanskje du har glemt å logge inn?
+Beklager, men du har ikke rettigheter til dette.
+
diff --git a/inc/lang/no/lang.php b/inc/lang/no/lang.php
index 3f31f6c73..6156fa34c 100644
--- a/inc/lang/no/lang.php
+++ b/inc/lang/no/lang.php
@@ -20,6 +20,7 @@
* @author Egil Hansen <egil@rosetta.no>
* @author Thomas Juberg <Thomas.Juberg@Gmail.com>
* @author Boris <boris@newton-media.no>
+ * @author Christopher Schive <chschive@frisurf.no>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -64,7 +65,9 @@ $lang['btn_register'] = 'Registrer deg';
$lang['btn_apply'] = 'Bruk';
$lang['btn_media'] = 'Mediefiler';
$lang['btn_deleteuser'] = 'Fjern min konto';
-$lang['loggedinas'] = 'Innlogget som';
+$lang['btn_img_backto'] = 'Tilbake til %s';
+$lang['btn_mediaManager'] = 'Vis i mediefilbehandler';
+$lang['loggedinas'] = 'Innlogget som:';
$lang['user'] = 'Brukernavn';
$lang['pass'] = 'Passord';
$lang['newpass'] = 'Nytt passord';
@@ -109,12 +112,12 @@ $lang['license'] = 'Der annet ikke er angitt, er innholdet på den
$lang['licenseok'] = 'Merk: Ved å endre på denne siden godtar du at ditt innhold utgis under følgende lisens:';
$lang['searchmedia'] = 'Søk filnavn';
$lang['searchmedia_in'] = 'Søk i %s';
-$lang['txt_upload'] = 'Velg fil som skal lastes opp';
-$lang['txt_filename'] = 'Skriv inn wikinavn (alternativt)';
+$lang['txt_upload'] = 'Velg fil som skal lastes opp:';
+$lang['txt_filename'] = 'Skriv inn wikinavn (alternativt):';
$lang['txt_overwrt'] = 'Overskriv eksisterende fil';
$lang['maxuploadsize'] = 'Opplast maks % per fil.';
-$lang['lockedby'] = 'Låst av';
-$lang['lockexpire'] = 'Låsingen utløper';
+$lang['lockedby'] = 'Låst av:';
+$lang['lockexpire'] = 'Låsingen utløper:';
$lang['js']['willexpire'] = 'Din redigeringslås for dette dokumentet kommer snart til å utløpe.\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?';
@@ -195,10 +198,15 @@ $lang['difflink'] = 'Lenk til denne sammenligningen';
$lang['diff_type'] = 'Vis forskjeller:';
$lang['diff_inline'] = 'I teksten';
$lang['diff_side'] = 'Side ved side';
+$lang['diffprevrev'] = 'Forrige revisjon';
+$lang['diffnextrev'] = 'Neste revisjon';
+$lang['difflastrev'] = 'Siste revisjon';
+$lang['diffbothprevrev'] = 'Begge sider forrige revisjon';
+$lang['diffbothnextrev'] = 'Begge sider neste revisjon';
$lang['line'] = 'Linje';
-$lang['breadcrumb'] = 'Spor';
-$lang['youarehere'] = 'Du er her';
-$lang['lastmod'] = 'Sist endret';
+$lang['breadcrumb'] = 'Spor:';
+$lang['youarehere'] = 'Du er her:';
+$lang['lastmod'] = 'Sist endret:';
$lang['by'] = 'av';
$lang['deleted'] = 'fjernet';
$lang['created'] = 'opprettet';
@@ -251,20 +259,18 @@ $lang['admin_register'] = 'Legg til ny bruker';
$lang['metaedit'] = 'Rediger metadata';
$lang['metasaveerr'] = 'Skriving av metadata feilet';
$lang['metasaveok'] = 'Metadata lagret';
-$lang['img_backto'] = 'Tilbake til';
-$lang['img_title'] = 'Tittel';
-$lang['img_caption'] = 'Bildetekst';
-$lang['img_date'] = 'Dato';
-$lang['img_fname'] = 'Filnavn';
-$lang['img_fsize'] = 'Størrelse';
-$lang['img_artist'] = 'Fotograf';
-$lang['img_copyr'] = 'Opphavsrett';
-$lang['img_format'] = 'Format';
-$lang['img_camera'] = 'Kamera';
-$lang['img_keywords'] = 'Nøkkelord';
-$lang['img_width'] = 'Bredde';
-$lang['img_height'] = 'Høyde';
-$lang['img_manager'] = 'Vis i mediefilbehandler';
+$lang['img_title'] = 'Tittel:';
+$lang['img_caption'] = 'Bildetekst:';
+$lang['img_date'] = 'Dato:';
+$lang['img_fname'] = 'Filnavn:';
+$lang['img_fsize'] = 'Størrelse:';
+$lang['img_artist'] = 'Fotograf:';
+$lang['img_copyr'] = 'Opphavsrett:';
+$lang['img_format'] = 'Format:';
+$lang['img_camera'] = 'Kamera:';
+$lang['img_keywords'] = 'Nøkkelord:';
+$lang['img_width'] = 'Bredde:';
+$lang['img_height'] = 'Høyde:';
$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.';
@@ -348,3 +354,4 @@ $lang['media_restore'] = 'Gjenopprett denne versjonen';
$lang['currentns'] = 'gjeldende navnemellomrom';
$lang['searchresult'] = 'Søk i resultat';
$lang['plainhtml'] = 'Enkel HTML';
+$lang['wikimarkup'] = 'wiki-format';
diff --git a/inc/lang/no/resetpwd.txt b/inc/lang/no/resetpwd.txt
new file mode 100644
index 000000000..2da717021
--- /dev/null
+++ b/inc/lang/no/resetpwd.txt
@@ -0,0 +1,3 @@
+====== Sett nytt passord ======
+
+Vennligst skriv inn et nytt passord for din konto i denne wikien. \ No newline at end of file
diff --git a/inc/lang/pl/denied.txt b/inc/lang/pl/denied.txt
index d402463ef..2b268b921 100644
--- a/inc/lang/pl/denied.txt
+++ b/inc/lang/pl/denied.txt
@@ -1,4 +1,4 @@
====== Brak dostępu ======
-Nie masz wystarczających uprawnień. Zaloguj się!
+Nie masz wystarczających uprawnień.
diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php
index e5f2d8d40..c6ff4983e 100644
--- a/inc/lang/pl/lang.php
+++ b/inc/lang/pl/lang.php
@@ -16,6 +16,7 @@
* @author Aoi Karasu <aoikarasu@gmail.com>
* @author Tomasz Bosak <bosak.tomasz@gmail.com>
* @author Paweł Jan Czochański <czochanski@gmail.com>
+ * @author Mati <mackosa@wp.pl>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -60,7 +61,9 @@ $lang['btn_register'] = 'Zarejestruj się!';
$lang['btn_apply'] = 'Zastosuj';
$lang['btn_media'] = 'Menadżer multimediów';
$lang['btn_deleteuser'] = 'Usuń moje konto';
-$lang['loggedinas'] = 'Zalogowany jako';
+$lang['btn_img_backto'] = 'Wróć do %s';
+$lang['btn_mediaManager'] = 'Zobacz w menadżerze multimediów';
+$lang['loggedinas'] = 'Zalogowany jako:';
$lang['user'] = 'Użytkownik';
$lang['pass'] = 'Hasło';
$lang['newpass'] = 'Nowe hasło';
@@ -105,12 +108,12 @@ $lang['license'] = 'Wszystkie treści w tym wiki, którym nie przy
$lang['licenseok'] = 'Uwaga: edytując tę stronę zgadzasz się na publikowanie jej treści pod licencją:';
$lang['searchmedia'] = 'Szukaj pliku o nazwie:';
$lang['searchmedia_in'] = 'Szukaj w %s';
-$lang['txt_upload'] = 'Wybierz plik do wysłania';
-$lang['txt_filename'] = 'Nazwa pliku (opcjonalnie)';
+$lang['txt_upload'] = 'Wybierz plik do wysłania:';
+$lang['txt_filename'] = 'Nazwa pliku (opcjonalnie):';
$lang['txt_overwrt'] = 'Nadpisać istniejący plik?';
$lang['maxuploadsize'] = 'Maksymalny rozmiar wysyłanych danych wynosi %s dla jednego pliku.';
-$lang['lockedby'] = 'Aktualnie zablokowane przez';
-$lang['lockexpire'] = 'Blokada wygasa';
+$lang['lockedby'] = 'Aktualnie zablokowane przez:';
+$lang['lockexpire'] = 'Blokada wygasa:';
$lang['js']['willexpire'] = 'Twoja blokada edycji tej strony wygaśnie w ciągu minuty. \nW celu uniknięcia konfliktów użyj przycisku podglądu aby odnowić blokadę.';
$lang['js']['notsavedyet'] = 'Nie zapisane zmiany zostaną utracone.
Czy na pewno kontynuować?';
@@ -191,10 +194,13 @@ $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['diffprevrev'] = 'Poprzednia wersja';
+$lang['diffnextrev'] = 'Nowa wersja';
+$lang['difflastrev'] = 'Ostatnia wersja';
$lang['line'] = 'Linia';
-$lang['breadcrumb'] = 'Ślad';
-$lang['youarehere'] = 'Jesteś tutaj';
-$lang['lastmod'] = 'ostatnio zmienione';
+$lang['breadcrumb'] = 'Ślad:';
+$lang['youarehere'] = 'Jesteś tutaj:';
+$lang['lastmod'] = 'ostatnio zmienione:';
$lang['by'] = 'przez';
$lang['deleted'] = 'usunięto';
$lang['created'] = 'utworzono';
@@ -247,20 +253,18 @@ $lang['admin_register'] = 'Dodawanie użytkownika';
$lang['metaedit'] = 'Edytuj metadane';
$lang['metasaveerr'] = 'Zapis metadanych nie powiódł się';
$lang['metasaveok'] = 'Metadane zapisano';
-$lang['img_backto'] = 'Wróć do';
-$lang['img_title'] = 'Tytuł';
-$lang['img_caption'] = 'Nagłówek';
-$lang['img_date'] = 'Data';
-$lang['img_fname'] = 'Nazwa pliku';
-$lang['img_fsize'] = 'Rozmiar';
-$lang['img_artist'] = 'Fotograf';
-$lang['img_copyr'] = 'Prawa autorskie';
-$lang['img_format'] = 'Format';
-$lang['img_camera'] = 'Aparat';
-$lang['img_keywords'] = 'Słowa kluczowe';
-$lang['img_width'] = 'Szerokość';
-$lang['img_height'] = 'Wysokość';
-$lang['img_manager'] = 'Zobacz w menadżerze multimediów';
+$lang['img_title'] = 'Tytuł:';
+$lang['img_caption'] = 'Nagłówek:';
+$lang['img_date'] = 'Data:';
+$lang['img_fname'] = 'Nazwa pliku:';
+$lang['img_fsize'] = 'Rozmiar:';
+$lang['img_artist'] = 'Fotograf:';
+$lang['img_copyr'] = 'Prawa autorskie:';
+$lang['img_format'] = 'Format:';
+$lang['img_camera'] = 'Aparat:';
+$lang['img_keywords'] = 'Słowa kluczowe:';
+$lang['img_width'] = 'Szerokość:';
+$lang['img_height'] = 'Wysokość:';
$lang['subscr_subscribe_success'] = 'Dodano %s do listy subskrypcji %s';
$lang['subscr_subscribe_error'] = 'Błąd podczas dodawania %s do listy subskrypcji %s';
$lang['subscr_subscribe_noaddress'] = 'Brak adresu skojarzonego z twoim loginem, nie możesz zostać dodany(a) do listy subskrypcji';
diff --git a/inc/lang/pt-br/denied.txt b/inc/lang/pt-br/denied.txt
index d7e423f42..9a71df619 100644
--- a/inc/lang/pt-br/denied.txt
+++ b/inc/lang/pt-br/denied.txt
@@ -1,3 +1,4 @@
====== Permissão Negada ======
-Desculpe, você não tem permissões suficientes para continuar. Por acaso esqueceu de autenticar-se?
+Desculpe, você não tem permissões suficientes para continuar.
+
diff --git a/inc/lang/pt-br/lang.php b/inc/lang/pt-br/lang.php
index 6845e792d..4f1baf22c 100644
--- a/inc/lang/pt-br/lang.php
+++ b/inc/lang/pt-br/lang.php
@@ -23,6 +23,7 @@
* @author Leone Lisboa Magevski <leone1983@gmail.com>
* @author Dário Estevão <darioems@gmail.com>
* @author Juliano Marconi Lanigra <juliano.marconi@gmail.com>
+ * @author Ednei <leuloch@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -67,7 +68,9 @@ $lang['btn_register'] = 'Cadastre-se';
$lang['btn_apply'] = 'Aplicar';
$lang['btn_media'] = 'Gerenciador de mídias';
$lang['btn_deleteuser'] = 'Remover minha conta';
-$lang['loggedinas'] = 'Identificado(a) como';
+$lang['btn_img_backto'] = 'Voltar para %s';
+$lang['btn_mediaManager'] = 'Ver no gerenciador de mídias';
+$lang['loggedinas'] = 'Identificado(a) como:';
$lang['user'] = 'Nome de usuário';
$lang['pass'] = 'Senha';
$lang['newpass'] = 'Nova senha';
@@ -112,12 +115,12 @@ $lang['license'] = 'Exceto onde for informado ao contrário, o con
$lang['licenseok'] = 'Observe: editando esta página você aceita disponibilizar o seu conteúdo sob a seguinte licença:';
$lang['searchmedia'] = 'Buscar arquivo:';
$lang['searchmedia_in'] = 'Buscar em %s';
-$lang['txt_upload'] = 'Selecione o arquivo a ser enviado';
-$lang['txt_filename'] = 'Enviar como (opcional)';
+$lang['txt_upload'] = 'Selecione o arquivo a ser enviado:';
+$lang['txt_filename'] = 'Enviar como (opcional):';
$lang['txt_overwrt'] = 'Substituir o arquivo existente';
$lang['maxuploadsize'] = 'Tamanho máximo de %s por arquivo.';
-$lang['lockedby'] = 'Atualmente bloqueada por';
-$lang['lockexpire'] = 'O bloqueio expira em';
+$lang['lockedby'] = 'Atualmente bloqueada por:';
+$lang['lockexpire'] = 'O bloqueio expira em:';
$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?';
@@ -198,10 +201,13 @@ $lang['difflink'] = 'Link para esta página de comparações';
$lang['diff_type'] = 'Ver as diferenças:';
$lang['diff_inline'] = 'Mescladas';
$lang['diff_side'] = 'Lado a lado';
+$lang['diffprevrev'] = 'Revisão anterior';
+$lang['diffnextrev'] = 'Próxima revisão';
+$lang['difflastrev'] = 'Última revisão';
$lang['line'] = 'Linha';
-$lang['breadcrumb'] = 'Visitou';
-$lang['youarehere'] = 'Você está aqui';
-$lang['lastmod'] = 'Última modificação';
+$lang['breadcrumb'] = 'Visitou:';
+$lang['youarehere'] = 'Você está aqui:';
+$lang['lastmod'] = 'Última modificação:';
$lang['by'] = 'por';
$lang['deleted'] = 'removida';
$lang['created'] = 'criada';
@@ -254,20 +260,18 @@ $lang['admin_register'] = 'Adicionar novo usuário';
$lang['metaedit'] = 'Editar metadados';
$lang['metasaveerr'] = 'Não foi possível escrever os metadados';
$lang['metasaveok'] = 'Os metadados foram salvos';
-$lang['img_backto'] = 'Voltar para';
-$lang['img_title'] = 'Título';
-$lang['img_caption'] = 'Descrição';
-$lang['img_date'] = 'Data';
-$lang['img_fname'] = 'Nome do arquivo';
-$lang['img_fsize'] = 'Tamanho';
-$lang['img_artist'] = 'Fotógrafo';
-$lang['img_copyr'] = 'Direitos autorais';
-$lang['img_format'] = 'Formato';
-$lang['img_camera'] = 'Câmera';
-$lang['img_keywords'] = 'Palavras-chave';
-$lang['img_width'] = 'Largura';
-$lang['img_height'] = 'Altura';
-$lang['img_manager'] = 'Ver no gerenciador de mídias';
+$lang['img_title'] = 'Título:';
+$lang['img_caption'] = 'Descrição:';
+$lang['img_date'] = 'Data:';
+$lang['img_fname'] = 'Nome do arquivo:';
+$lang['img_fsize'] = 'Tamanho:';
+$lang['img_artist'] = 'Fotógrafo:';
+$lang['img_copyr'] = 'Direitos autorais:';
+$lang['img_format'] = 'Formato:';
+$lang['img_camera'] = 'Câmera:';
+$lang['img_keywords'] = 'Palavras-chave:';
+$lang['img_width'] = 'Largura:';
+$lang['img_height'] = 'Altura:';
$lang['subscr_subscribe_success'] = 'Adicionado %s à lista de monitoramentos de %s';
$lang['subscr_subscribe_error'] = 'Ocorreu um erro na adição de %s à lista de monitoramentos de %s';
$lang['subscr_subscribe_noaddress'] = 'Como não há nenhum endereço associado ao seu usuário, você não pode ser adicionado à lista de monitoramento';
@@ -296,6 +300,7 @@ $lang['i_modified'] = 'Por questões de segurança, esse script funci
Você pode extrair novamente os arquivos do pacote original ou consultar as <a href="http://dokuwiki.org/install">instruções de instalação do DokuWiki</a>.';
$lang['i_funcna'] = 'A função PHP <code>%s</code> não está disponível. O seu host a mantém desabilitada por algum motivo?';
$lang['i_phpver'] = 'A sua versão do PHP (<code>%s</code>) é inferior à necessária (<code>%s</code>). Você precisa atualizar a sua instalação do PHP.';
+$lang['i_mbfuncoverload'] = 'mbstring.func_overload precisa ser desabilitado no php.ini para executar o DokuWiki';
$lang['i_permfail'] = 'O DokuWiki não tem permissão de escrita em <code>%s</code>. Você precisa corrigir as configurações de permissão nesse diretório!';
$lang['i_confexists'] = '<code>%s</code> já existe';
$lang['i_writeerr'] = 'Não foi possível criar <code>%s</code>. É necessário checar as permissões de arquivos/diretórios e criar o arquivo manualmente.';
diff --git a/inc/lang/pt/denied.txt b/inc/lang/pt/denied.txt
index eb2614387..3af816666 100644
--- a/inc/lang/pt/denied.txt
+++ b/inc/lang/pt/denied.txt
@@ -1,3 +1,4 @@
====== Permissão Negada ======
-Não possui direitos e permissões suficientes para continuar. Talvez se tenha esquecido de iniciar sessão? \ No newline at end of file
+Não possui direitos e permissões suficientes para continuar.
+
diff --git a/inc/lang/pt/lang.php b/inc/lang/pt/lang.php
index 46405c444..ddc9b33ab 100644
--- a/inc/lang/pt/lang.php
+++ b/inc/lang/pt/lang.php
@@ -2,13 +2,15 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
+ *
* @author José Carlos Monteiro <jose.c.monteiro@netcabo.pt>
* @author José Monteiro <Jose.Monteiro@DoWeDo-IT.com>
* @author Enrico Nicoletto <liverig@gmail.com>
* @author Fil <fil@meteopt.com>
* @author André Neves <drakferion@gmail.com>
* @author José Campos zecarlosdecampos@gmail.com
+ * @author Murilo <muriloricci@hotmail.com>
+ * @author Paulo Silva <paulotsilva@yahoo.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -44,6 +46,7 @@ $lang['btn_backtomedia'] = 'Voltar à Selecção de Media';
$lang['btn_subscribe'] = 'Subscrever Alterações';
$lang['btn_profile'] = 'Actualizar Perfil';
$lang['btn_reset'] = 'Limpar';
+$lang['btn_resendpwd'] = 'Definir nova senha';
$lang['btn_draft'] = 'Editar rascunho';
$lang['btn_recover'] = 'Recuperar rascunho';
$lang['btn_draftdel'] = 'Apagar rascunho';
@@ -52,7 +55,9 @@ $lang['btn_register'] = 'Registar';
$lang['btn_apply'] = 'Aplicar';
$lang['btn_media'] = 'Gestor de Media';
$lang['btn_deleteuser'] = 'Remover a Minha Conta';
-$lang['loggedinas'] = 'Está em sessão como';
+$lang['btn_img_backto'] = 'De volta a %s';
+$lang['btn_mediaManager'] = 'Ver em gestor de media';
+$lang['loggedinas'] = 'Está em sessão como:';
$lang['user'] = 'Utilizador';
$lang['pass'] = 'Senha';
$lang['newpass'] = 'Nova senha';
@@ -63,6 +68,7 @@ $lang['fullname'] = 'Nome completo';
$lang['email'] = 'Email';
$lang['profile'] = 'Perfil do Utilizador';
$lang['badlogin'] = 'O utilizador inválido ou senha inválida.';
+$lang['badpassconfirm'] = 'Infelizmente a palavra-passe não é a correcta';
$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.';
@@ -82,8 +88,11 @@ $lang['profchanged'] = 'Perfil do utilizador actualizado com sucesso.'
$lang['profnodelete'] = 'Esta wiki não suporta remoção de utilizadores';
$lang['profdeleteuser'] = 'Apagar Conta';
$lang['profdeleted'] = 'A sua conta de utilizador foi removida desta wiki';
+$lang['profconfdelete'] = 'Quero remover a minha conta desta wiki. <br/> Esta acção não pode ser anulada.';
+$lang['profconfdeletemissing'] = 'A caixa de confirmação não foi marcada';
$lang['pwdforget'] = 'Esqueceu a sua senha? Pedir nova senha';
$lang['resendna'] = 'Este wiki não suporta reenvio de senhas.';
+$lang['resendpwd'] = 'Definir nova senha para';
$lang['resendpwdmissing'] = 'É preciso preencher todos os campos.';
$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.';
@@ -93,11 +102,11 @@ $lang['license'] = 'Excepto menção em contrário, o conteúdo ne
$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';
-$lang['txt_filename'] = 'Carregar como (opcional)';
+$lang['txt_upload'] = 'Escolha ficheiro para carregar:';
+$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['lockedby'] = 'Bloqueado por:';
+$lang['lockexpire'] = 'Expira em:';
$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';
@@ -177,10 +186,13 @@ $lang['difflink'] = 'Ligação para esta vista de comparação';
$lang['diff_type'] = 'Ver diferenças';
$lang['diff_inline'] = 'Embutido';
$lang['diff_side'] = 'Lado a lado';
+$lang['diffprevrev'] = 'Revisão anterior';
+$lang['diffnextrev'] = 'Próxima revisão';
+$lang['difflastrev'] = 'Última revisão';
$lang['line'] = 'Linha';
-$lang['breadcrumb'] = 'Está em';
-$lang['youarehere'] = 'Está aqui';
-$lang['lastmod'] = 'Esta página foi modificada pela última vez em';
+$lang['breadcrumb'] = 'Está em:';
+$lang['youarehere'] = 'Está aqui:';
+$lang['lastmod'] = 'Esta página foi modificada pela última vez em:';
$lang['by'] = 'por';
$lang['deleted'] = 'Documento automaticamente removido.';
$lang['created'] = 'Criação deste novo documento.';
@@ -233,20 +245,18 @@ $lang['admin_register'] = 'Registar Novo Utilizador';
$lang['metaedit'] = 'Editar Metadata';
$lang['metasaveerr'] = 'Falhou a escrita de Metadata';
$lang['metasaveok'] = 'Metadata gravada';
-$lang['img_backto'] = 'De volta a';
-$lang['img_title'] = 'Título';
-$lang['img_caption'] = 'Legenda';
-$lang['img_date'] = 'Data';
-$lang['img_fname'] = 'Ficheiro';
-$lang['img_fsize'] = 'Tamanho';
-$lang['img_artist'] = 'Fotógrafo';
-$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['img_title'] = 'Título:';
+$lang['img_caption'] = 'Legenda:';
+$lang['img_date'] = 'Data:';
+$lang['img_fname'] = 'Ficheiro:';
+$lang['img_fsize'] = 'Tamanho:';
+$lang['img_artist'] = 'Fotógrafo:';
+$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['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,6 +295,7 @@ $lang['i_policy'] = 'Politica ACL inicial';
$lang['i_pol0'] = 'Wiki Aberto (ler, escrever e carregar para todos)';
$lang['i_pol1'] = 'Wiki Público (ler para todos, escrever e carregar para utilizadores inscritos)';
$lang['i_pol2'] = 'Wiki Fechado (ler, escrever e carregar somente para utilizadores inscritos)';
+$lang['i_allowreg'] = 'Permitir aos utilizadores registarem-se por si próprios';
$lang['i_retry'] = 'Repetir';
$lang['i_license'] = 'Por favor escolha a licença sob a qual quer colocar o seu conteúdo:';
$lang['i_license_none'] = 'Não mostrar nenhuma informação de licença';
@@ -305,9 +316,11 @@ $lang['media_file'] = 'Ficheiro';
$lang['media_viewtab'] = 'Ver';
$lang['media_edittab'] = 'Editar';
$lang['media_historytab'] = 'Histórico';
+$lang['media_list_thumbs'] = 'Miniaturas';
$lang['media_list_rows'] = 'Linhas';
$lang['media_sort_name'] = 'Ordenar por nome';
$lang['media_sort_date'] = 'Ordenar por data';
+$lang['media_namespaces'] = 'Escolha o namespace';
$lang['media_files'] = 'Ficheiros em %s';
$lang['media_upload'] = 'Enviar para o grupo <strong>%s</strong>.';
$lang['media_search'] = 'Procurar no grupo <strong>%s</strong>.';
@@ -319,3 +332,7 @@ $lang['media_perm_read'] = 'Perdão, não tem permissão para ler ficheiro
$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['currentns'] = 'Namespace actual';
+$lang['searchresult'] = 'Resultado da pesquisa';
+$lang['plainhtml'] = 'HTML simples';
+$lang['wikimarkup'] = 'Markup de Wiki';
diff --git a/inc/lang/ro/denied.txt b/inc/lang/ro/denied.txt
index 8e8126a17..490233acf 100644
--- a/inc/lang/ro/denied.txt
+++ b/inc/lang/ro/denied.txt
@@ -1,4 +1,4 @@
====== Acces nepermis ======
-Din păcate nu ai destule drepturi pentru a continua. Poate ai uitat să te
-autentifici?
+Din păcate nu ai destule drepturi pentru a continua.
+
diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php
index 491ab58e7..cd7d4fcc3 100644
--- a/inc/lang/ro/lang.php
+++ b/inc/lang/ro/lang.php
@@ -53,7 +53,7 @@ $lang['btn_revert'] = 'Revenire';
$lang['btn_register'] = 'Înregistrează';
$lang['btn_apply'] = 'Aplică';
$lang['btn_media'] = 'Administrare media';
-$lang['loggedinas'] = 'Autentificat ca';
+$lang['loggedinas'] = 'Autentificat ca:';
$lang['user'] = 'Utilizator';
$lang['pass'] = 'Parola';
$lang['newpass'] = 'Parola nouă';
@@ -92,11 +92,11 @@ $lang['license'] = 'Exceptând locurile unde este altfel specifica
$lang['licenseok'] = 'Notă: Prin editarea acestei pagini ești de acord să publici conțintul sub următoarea licență:';
$lang['searchmedia'] = 'Caută numele fișierului:';
$lang['searchmedia_in'] = 'Caută în %s';
-$lang['txt_upload'] = 'Selectează fișierul de încărcat';
-$lang['txt_filename'] = 'Încarcă fișierul ca (opțional)';
+$lang['txt_upload'] = 'Selectează fișierul de încărcat:';
+$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['lockedby'] = 'Momentan blocat de:';
+$lang['lockexpire'] = 'Blocarea expiră la:';
$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?';
@@ -178,9 +178,9 @@ $lang['diff_type'] = 'Vezi diferențe:';
$lang['diff_inline'] = 'Succesiv';
$lang['diff_side'] = 'Alăturate';
$lang['line'] = 'Linia';
-$lang['breadcrumb'] = 'Traseu';
-$lang['youarehere'] = 'Ești aici';
-$lang['lastmod'] = 'Ultima modificare';
+$lang['breadcrumb'] = 'Traseu:';
+$lang['youarehere'] = 'Ești aici:';
+$lang['lastmod'] = 'Ultima modificare:';
$lang['by'] = 'de către';
$lang['deleted'] = 'șters';
$lang['created'] = 'creat';
@@ -232,20 +232,20 @@ $lang['admin_register'] = 'Adaugă utilizator nou';
$lang['metaedit'] = 'Editează metadata';
$lang['metasaveerr'] = 'Scrierea metadatelor a eșuat';
$lang['metasaveok'] = 'Metadatele au fost salvate';
-$lang['img_backto'] = 'Înapoi la';
-$lang['img_title'] = 'Titlu';
-$lang['img_caption'] = 'Legendă';
-$lang['img_date'] = 'Dată';
-$lang['img_fname'] = 'Nume fișier';
-$lang['img_fsize'] = 'Dimensiune';
-$lang['img_artist'] = 'Fotograf';
-$lang['img_copyr'] = 'Drept de autor';
-$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['btn_img_backto'] = 'Înapoi la %s';
+$lang['img_title'] = 'Titlu:';
+$lang['img_caption'] = 'Legendă:';
+$lang['img_date'] = 'Dată:';
+$lang['img_fname'] = 'Nume fișier:';
+$lang['img_fsize'] = 'Dimensiune:';
+$lang['img_artist'] = 'Fotograf:';
+$lang['img_copyr'] = 'Drept de autor:';
+$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['btn_mediaManager'] = '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ă adresă de e-mail asociată autentificării curente, nu poți fi adăugat la lista de abonare';
diff --git a/inc/lang/ru/admin.txt b/inc/lang/ru/admin.txt
index e00daa447..cd609a347 100644
--- a/inc/lang/ru/admin.txt
+++ b/inc/lang/ru/admin.txt
@@ -1,4 +1,4 @@
====== Управление ======
-Ниже вы сможете найти список административных операций, доступных в «ДокуВики».
+Ниже вы сможете найти список административных операций, доступных в «Докувики».
diff --git a/inc/lang/ru/denied.txt b/inc/lang/ru/denied.txt
index f7f53ce88..6b7c82511 100644
--- a/inc/lang/ru/denied.txt
+++ b/inc/lang/ru/denied.txt
@@ -1,3 +1,4 @@
====== Доступ запрещён ======
-Извините, у вас не хватает прав для этого действия. Может быть вы забыли войти в вики под своим логином?
+Извините, у вас не хватает прав для этого действия.
+
diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php
index 208d647a8..c36c611c0 100644
--- a/inc/lang/ru/lang.php
+++ b/inc/lang/ru/lang.php
@@ -24,6 +24,8 @@
* @author Pavel <ivanovtsk@mail.ru>
* @author Artur <ncuxxx@gmail.com>
* @author Erli Moen <evseev.jr@gmail.com>
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
+ * @author Владимир <id37736@yandex.ru>
*/
$lang['encoding'] = ' utf-8';
$lang['direction'] = 'ltr';
@@ -68,7 +70,9 @@ $lang['btn_register'] = 'Зарегистрироваться';
$lang['btn_apply'] = 'Применить';
$lang['btn_media'] = 'Управление медиафайлами';
$lang['btn_deleteuser'] = 'Удалить мой аккаунт';
-$lang['loggedinas'] = 'Зашли как';
+$lang['btn_img_backto'] = 'Вернуться к %s';
+$lang['btn_mediaManager'] = 'Просмотр в «управлении медиафайлами»';
+$lang['loggedinas'] = 'Зашли как:';
$lang['user'] = 'Логин';
$lang['pass'] = 'Пароль';
$lang['newpass'] = 'Новый пароль';
@@ -90,7 +94,7 @@ $lang['regsuccess2'] = 'Пользователь создан.';
$lang['regmailfail'] = 'Похоже есть проблема с отправкой пароля по почте. Пожалуйста, сообщите об этом администратору.';
$lang['regbadmail'] = 'Данный вами адрес электронной почты выглядит неправильным. Если вы считаете это ошибкой, сообщите администратору.';
$lang['regbadpass'] = 'Два введённых пароля не идентичны. Пожалуйста, попробуйте ещё раз.';
-$lang['regpwmail'] = 'Ваш пароль для системы «ДокуВики»';
+$lang['regpwmail'] = 'Ваш пароль для системы «Докувики»';
$lang['reghere'] = 'У вас ещё нет аккаунта? Зарегистрируйтесь';
$lang['profna'] = 'Данная вики не поддерживает изменение профиля';
$lang['profnochange'] = 'Изменений не было внесено, профиль не обновлён.';
@@ -113,12 +117,12 @@ $lang['license'] = 'За исключением случаев, к
$lang['licenseok'] = 'Примечание: редактируя эту страницу, вы соглашаетесь на использование своего вклада на условиях следующей лицензии:';
$lang['searchmedia'] = 'Поиск по имени файла:';
$lang['searchmedia_in'] = 'Поиск в %s';
-$lang['txt_upload'] = 'Выберите файл для загрузки';
-$lang['txt_filename'] = 'Введите имя файла в вики (необязательно)';
+$lang['txt_upload'] = 'Выберите файл для загрузки:';
+$lang['txt_filename'] = 'Введите имя файла в вики (необязательно):';
$lang['txt_overwrt'] = 'Перезаписать существующий файл';
$lang['maxuploadsize'] = 'Максимальный размер загружаемого файла %s';
-$lang['lockedby'] = 'В данный момент заблокирован';
-$lang['lockexpire'] = 'Блокировка истекает в';
+$lang['lockedby'] = 'В данный момент заблокирован:';
+$lang['lockexpire'] = 'Блокировка истекает в:';
$lang['js']['willexpire'] = 'Ваша блокировка этой страницы на редактирование истекает в течение минуты.\nЧтобы предотвратить конфликты используйте кнопку «Просмотр» для сброса таймера блокировки.';
$lang['js']['notsavedyet'] = 'Несохранённые изменения будут потеряны. Вы действительно хотите продолжить?';
$lang['js']['searchmedia'] = 'Поиск файлов';
@@ -145,7 +149,7 @@ $lang['js']['medialeft'] = 'Выровнять изображение по
$lang['js']['mediaright'] = 'Выровнять изображение по правому краю.';
$lang['js']['mediacenter'] = 'Выровнять изображение по центру.';
$lang['js']['medianoalign'] = 'Не выравнивать.';
-$lang['js']['nosmblinks'] = 'Ссылка на сетевые каталоги Windows работает только из Интернет Эксплорера. Но вы можете скопировать ссылку.';
+$lang['js']['nosmblinks'] = 'Ссылка на сетевые каталоги Windows работает только из MS Internet Explorer, но вы можете скопировать ссылку.';
$lang['js']['linkwiz'] = 'Мастер ссылок';
$lang['js']['linkto'] = 'Ссылка на:';
$lang['js']['del_confirm'] = 'Вы на самом деле желаете удалить выбранное?';
@@ -197,10 +201,13 @@ $lang['difflink'] = 'Ссылка на это сравнение';
$lang['diff_type'] = 'Посмотреть отличия';
$lang['diff_inline'] = 'встроенный';
$lang['diff_side'] = 'бок о бок';
+$lang['diffprevrev'] = 'Предыдущая версия';
+$lang['diffnextrev'] = 'Следущая версия';
+$lang['difflastrev'] = 'Последняя версия';
$lang['line'] = 'Строка';
-$lang['breadcrumb'] = 'Вы посетили';
-$lang['youarehere'] = 'Вы находитесь здесь';
-$lang['lastmod'] = 'Последние изменения';
+$lang['breadcrumb'] = 'Вы посетили:';
+$lang['youarehere'] = 'Вы находитесь здесь:';
+$lang['lastmod'] = 'Последние изменения:';
$lang['by'] = ' —';
$lang['deleted'] = 'удалено';
$lang['created'] = 'создано';
@@ -253,20 +260,18 @@ $lang['admin_register'] = 'Добавить пользователя';
$lang['metaedit'] = 'Править метаданные';
$lang['metasaveerr'] = 'Ошибка записи метаданных';
$lang['metasaveok'] = 'Метаданные сохранены';
-$lang['img_backto'] = 'Вернуться к';
-$lang['img_title'] = 'Название';
-$lang['img_caption'] = 'Подпись';
-$lang['img_date'] = 'Дата';
-$lang['img_fname'] = 'Имя файла';
-$lang['img_fsize'] = 'Размер';
-$lang['img_artist'] = 'Фотограф';
-$lang['img_copyr'] = 'Авторские права';
-$lang['img_format'] = 'Формат';
-$lang['img_camera'] = 'Модель';
-$lang['img_keywords'] = 'Ключевые слова';
-$lang['img_width'] = 'Ширина';
-$lang['img_height'] = 'Высота';
-$lang['img_manager'] = 'Просмотр в «управлении медиафайлами»';
+$lang['img_title'] = 'Название:';
+$lang['img_caption'] = 'Подпись:';
+$lang['img_date'] = 'Дата:';
+$lang['img_fname'] = 'Имя файла:';
+$lang['img_fsize'] = 'Размер:';
+$lang['img_artist'] = 'Фотограф:';
+$lang['img_copyr'] = 'Авторские права:';
+$lang['img_format'] = 'Формат:';
+$lang['img_camera'] = 'Модель:';
+$lang['img_keywords'] = 'Ключевые слова:';
+$lang['img_width'] = 'Ширина:';
+$lang['img_height'] = 'Высота:';
$lang['subscr_subscribe_success'] = 'Добавлен %s в подписку на %s';
$lang['subscr_subscribe_error'] = 'Невозможно добавить %s в подписку на %s';
$lang['subscr_subscribe_noaddress'] = 'Нет адреса электронной почты, сопоставленного с вашей учётной записью. Вы не можете подписаться на рассылку';
@@ -286,34 +291,34 @@ $lang['subscr_style_list'] = 'список изменённых страни
$lang['authtempfail'] = 'Аутентификация пользователей временно недоступна. Если проблема продолжается какое-то время, пожалуйста, сообщите об этом своему администратору вики.';
$lang['authpwdexpire'] = 'Действие вашего пароля истекает через %d дней. Вы должны изменить его как можно скорее';
$lang['i_chooselang'] = 'Выберите свой язык/Choose your language';
-$lang['i_installer'] = 'Установка «ДокуВики»';
+$lang['i_installer'] = 'Установка «Докувики»';
$lang['i_wikiname'] = 'Название вики';
$lang['i_enableacl'] = 'Разрешить ограничение прав доступа (рекомендуется)';
$lang['i_superuser'] = 'Суперпользователь';
$lang['i_problems'] = 'Программа установки столкнулась с проблемами, перечисленными ниже. Чтобы продолжить, вам необходимо их устранить. ';
-$lang['i_modified'] = 'Из соображений безопасности эта программа запускается только на новой, неизменённой установке «ДокуВики».
+$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> недоступна для записи «ДокуВики». Вам необходимо исправить системные права доступа для этой директории!';
+$lang['i_permfail'] = '<code>%s</code> недоступна для записи «Докувики». Вам необходимо исправить системные права доступа для этой директории!';
$lang['i_confexists'] = '<code>%s</code> уже существует';
-$lang['i_writeerr'] = 'Не удалось создать <code>%s</code>. Вам необходимо проверить системные права доступа к файлу/директориям и создать файл вручную. ';
+$lang['i_writeerr'] = 'Не удалось создать <code>%s</code>. Вам необходимо проверить системные права доступа к файлу и директориям, и создать файл вручную. ';
$lang['i_badhash'] = 'dokuwiki.php не распознан или изменён (хэш=<code>%s</code>)';
$lang['i_badval'] = '<code>%s</code> — недопустимое или пустое значение';
$lang['i_success'] = 'Конфигурация прошла успешно. Теперь вы можете удалить файл install.php. Переходите к
- <a href="doku.php?id=wiki:welcome">своей новой «ДокуВики»</a>.';
-$lang['i_failure'] = 'При записи в файлы конфигурации были обнаружены ошибки. Возможно, вам придётся исправить их вручную, прежде чем вы сможете использовать <a href="doku.php?id=wiki:welcome">свою новую «ДокуВики»</a>.';
+ <a href="doku.php?id=wiki:welcome">своей новой «Докувики»</a>.';
+$lang['i_failure'] = 'При записи в файлы конфигурации были обнаружены ошибки. Возможно, вам придётся исправить их вручную, прежде чем вы сможете использовать <a href="doku.php?id=wiki:welcome">свою новую «Докувики»</a>.';
$lang['i_policy'] = 'Исходная политика прав доступа';
$lang['i_pol0'] = 'Открытая вики (чтение, запись, закачка файлов для всех)';
$lang['i_pol1'] = 'Общедоступная вики (чтение для всех, запись и загрузка файлов для зарегистрированных пользователей)';
$lang['i_pol2'] = 'Закрытая вики (чтение, запись и загрузка файлов только для зарегистрированных пользователей)';
-$lang['i_allowreg'] = 'Позволить пользователям самостоятельно регестрироваться';
+$lang['i_allowreg'] = 'Разрешить пользователям самостоятельно регистрироваться';
$lang['i_retry'] = 'Повторить попытку';
-$lang['i_license'] = 'Пожалуйста, выберите тип лицензии для своей вики:';
-$lang['i_license_none'] = 'Не отображать информацию о лицензионных операциях';
-$lang['i_pop_field'] = 'Пожалуйста, помогите нам улучшить «ДокуВики»:';
-$lang['i_pop_label'] = 'Отправлять раз в месяц анонимную пользовательскую информацию разработчикам «ДокуВики»';
+$lang['i_license'] = 'Пожалуйста, выберите тип лицензии для своей вики';
+$lang['i_license_none'] = 'Не отображать информацию о лицензии';
+$lang['i_pop_field'] = 'Пожалуйста, помогите нам улучшить «Докувики»:';
+$lang['i_pop_label'] = 'Отправлять раз в месяц анонимную пользовательскую информацию разработчикам «Докувики»';
$lang['recent_global'] = 'Вы просматриваете изменения в пространстве имён <b>%s</b>. Вы можете также <a href="%s">просмотреть недавние изменения во всей вики</a>.';
$lang['years'] = '%d лет назад';
$lang['months'] = '%d месяц(ев) назад';
@@ -347,6 +352,7 @@ $lang['media_perm_read'] = 'Извините, у вас недостато
$lang['media_perm_upload'] = 'Извините, у вас недостаточно прав для загрузки файлов.';
$lang['media_update'] = 'Загрузить новую версию';
$lang['media_restore'] = 'Восстановить эту версию';
-$lang['currentns'] = 'Текущее пространство имен';
+$lang['currentns'] = 'Текущее пространство имён';
$lang['searchresult'] = 'Результаты поиска';
-$lang['plainhtml'] = 'Чистый HTML';
+$lang['plainhtml'] = 'Простой HTML';
+$lang['wikimarkup'] = 'вики-разметка';
diff --git a/inc/lang/ru/mailtext.txt b/inc/lang/ru/mailtext.txt
index 2b3f76bbd..953daddf2 100644
--- a/inc/lang/ru/mailtext.txt
+++ b/inc/lang/ru/mailtext.txt
@@ -13,5 +13,5 @@ IP-адрес: @IPADDRESS@
--
-Это письмо было сгенерировано «ДокуВики» по адресу
+Это письмо было сгенерировано «Докувики» по адресу
@DOKUWIKIURL@
diff --git a/inc/lang/ru/norev.txt b/inc/lang/ru/norev.txt
index 388d6149d..c088d0d5a 100644
--- a/inc/lang/ru/norev.txt
+++ b/inc/lang/ru/norev.txt
@@ -1,4 +1,3 @@
====== Такой версии не существует ======
Указанная версия страницы не существует. Нажмите на кнопку «История страницы», чтобы получить список доступных предыдущих версий этого документа.
-
diff --git a/inc/lang/ru/password.txt b/inc/lang/ru/password.txt
index eb100f334..fabdf2b68 100644
--- a/inc/lang/ru/password.txt
+++ b/inc/lang/ru/password.txt
@@ -6,5 +6,5 @@
Пароль: @PASSWORD@
--
-Это письмо было сгенерировано «ДокуВики» по адресу
+Это письмо было сгенерировано «Докувики» по адресу
@DOKUWIKIURL@
diff --git a/inc/lang/ru/pwconfirm.txt b/inc/lang/ru/pwconfirm.txt
index 9c27af752..954c75dfe 100644
--- a/inc/lang/ru/pwconfirm.txt
+++ b/inc/lang/ru/pwconfirm.txt
@@ -9,5 +9,5 @@
@CONFIRM@
--
-Это сообщение было сгенерировано «ДокуВики» по адресу
+Это сообщение было сгенерировано «Докувики» по адресу
@DOKUWIKIURL@
diff --git a/inc/lang/ru/registermail.txt b/inc/lang/ru/registermail.txt
index fc862b034..86ef11e8c 100644
--- a/inc/lang/ru/registermail.txt
+++ b/inc/lang/ru/registermail.txt
@@ -10,5 +10,5 @@
Хост: @HOSTNAME@
--
-Это сообщение было сгенерировано «ДокуВики» по адресу
+Это сообщение было сгенерировано «Докувики» по адресу
@DOKUWIKIURL@
diff --git a/inc/lang/ru/subscr_digest.txt b/inc/lang/ru/subscr_digest.txt
index 41774a4e9..ac0fc0528 100644
--- a/inc/lang/ru/subscr_digest.txt
+++ b/inc/lang/ru/subscr_digest.txt
@@ -15,6 +15,6 @@
@SUBSCRIBE@
и отмените подписку на страницу и/или пространство имен.
---
-Это письмо создано «ДокуВики» с сайта
+--
+Это письмо создано «Докувики» с сайта
@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/ru/subscr_list.txt b/inc/lang/ru/subscr_list.txt
index 41e1323bc..984a25eb0 100644
--- a/inc/lang/ru/subscr_list.txt
+++ b/inc/lang/ru/subscr_list.txt
@@ -12,6 +12,6 @@
@SUBSCRIBE@
и отмените подписку на страницу и/или пространство имён.
---
-Это письмо создано «ДокуВики» с сайта
+--
+Это письмо создано «Докувики» с сайта
@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/ru/subscr_single.txt b/inc/lang/ru/subscr_single.txt
index 911a48e96..679ca6fff 100644
--- a/inc/lang/ru/subscr_single.txt
+++ b/inc/lang/ru/subscr_single.txt
@@ -19,6 +19,6 @@
@SUBSCRIBE@
и отмените подписку на страницу и/или пространство имён.
---
-Это письмо создано «ДокуВики» с сайта
+--
+Это письмо создано «Докувики» с сайта
@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/ru/uploadmail.txt b/inc/lang/ru/uploadmail.txt
index f696f2c44..84103b45a 100644
--- a/inc/lang/ru/uploadmail.txt
+++ b/inc/lang/ru/uploadmail.txt
@@ -11,5 +11,5 @@
Пользователь: @USER@
--
-Это письмо было сгенерировано «ДокуВики» по адресу
+Это письмо было сгенерировано «Докувики» по адресу
@DOKUWIKIURL@
diff --git a/inc/lang/sk/denied.txt b/inc/lang/sk/denied.txt
index 6e9c98496..aa6f7b8fb 100644
--- a/inc/lang/sk/denied.txt
+++ b/inc/lang/sk/denied.txt
@@ -1,3 +1,4 @@
====== Nepovolená akcia ======
-Prepáčte, ale nemáte dostatočné oprávnenie k tejto činnosti. Možno ste sa zabudli prihlásiť?
+Prepáčte, ale nemáte dostatočné oprávnenie k tejto činnosti.
+
diff --git a/inc/lang/sk/lang.php b/inc/lang/sk/lang.php
index aa823b074..e501cb7fc 100644
--- a/inc/lang/sk/lang.php
+++ b/inc/lang/sk/lang.php
@@ -51,7 +51,7 @@ $lang['btn_register'] = 'Registrovať';
$lang['btn_apply'] = 'Použiť';
$lang['btn_media'] = 'Správa médií';
$lang['btn_deleteuser'] = 'Zrušiť môj účet';
-$lang['loggedinas'] = 'Prihlásený(á) ako';
+$lang['loggedinas'] = 'Prihlásený(á) ako:';
$lang['user'] = 'Užívateľské meno';
$lang['pass'] = 'Heslo';
$lang['newpass'] = 'Nové heslo';
@@ -96,8 +96,8 @@ $lang['license'] = 'Ak nie je uvedené inak, obsah tejto wiki je u
$lang['licenseok'] = 'Poznámka: Zmenou tejto stránky súhlasíte s uverejnením obsahu pod nasledujúcou licenciou:';
$lang['searchmedia'] = 'Hľadať meno súboru:';
$lang['searchmedia_in'] = 'Hľadať v %s';
-$lang['txt_upload'] = 'Vyberte súbor ako prílohu';
-$lang['txt_filename'] = 'Uložiť ako (voliteľné)';
+$lang['txt_upload'] = 'Vyberte súbor ako prílohu:';
+$lang['txt_filename'] = 'Uložiť ako (voliteľné):';
$lang['txt_overwrt'] = 'Prepísať existujúci súbor';
$lang['maxuploadsize'] = 'Obmedzenie max. %s na súbor.';
$lang['lockedby'] = 'Práve zamknuté:';
@@ -183,9 +183,9 @@ $lang['diff_type'] = 'Prehľad zmien:';
$lang['diff_inline'] = 'Vnorený';
$lang['diff_side'] = 'Vedľa seba';
$lang['line'] = 'Riadok';
-$lang['breadcrumb'] = 'História';
-$lang['youarehere'] = 'Nachádzate sa';
-$lang['lastmod'] = 'Posledná úprava';
+$lang['breadcrumb'] = 'História:';
+$lang['youarehere'] = 'Nachádzate sa:';
+$lang['lastmod'] = 'Posledná úprava:';
$lang['by'] = 'od';
$lang['deleted'] = 'odstránené';
$lang['created'] = 'vytvorené';
@@ -238,20 +238,20 @@ $lang['admin_register'] = 'Pridaj nového užívateľa';
$lang['metaedit'] = 'Upraviť metainformácie';
$lang['metasaveerr'] = 'Zápis metainformácií zlyhal';
$lang['metasaveok'] = 'Metainformácie uložené';
-$lang['img_backto'] = 'Späť na';
-$lang['img_title'] = 'Titul';
-$lang['img_caption'] = 'Popis';
-$lang['img_date'] = 'Dátum';
-$lang['img_fname'] = 'Názov súboru';
-$lang['img_fsize'] = 'Veľkosť';
-$lang['img_artist'] = 'Fotograf';
-$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['btn_img_backto'] = 'Späť na %s';
+$lang['img_title'] = 'Titul:';
+$lang['img_caption'] = 'Popis:';
+$lang['img_date'] = 'Dátum:';
+$lang['img_fname'] = 'Názov súboru:';
+$lang['img_fsize'] = 'Veľkosť:';
+$lang['img_artist'] = 'Fotograf:';
+$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['btn_mediaManager'] = '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';
diff --git a/inc/lang/sl/denied.txt b/inc/lang/sl/denied.txt
index 5b5fd4d3a..206e167bb 100644
--- a/inc/lang/sl/denied.txt
+++ b/inc/lang/sl/denied.txt
@@ -1,3 +1,4 @@
====== Ni ustreznih dovoljenj ======
-Za nadaljevanje opravila je treba imeti ustrezna dovoljenja. Ali ste se morda pozabili prijaviti?
+Za nadaljevanje opravila je treba imeti ustrezna dovoljenja.
+
diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php
index c9a47927d..f76dbb7d1 100644
--- a/inc/lang/sl/lang.php
+++ b/inc/lang/sl/lang.php
@@ -10,6 +10,7 @@
* @author Matej Urbančič (mateju@svn.gnome.org)
* @author Matej Urbančič <mateju@svn.gnome.org>
* @author matej <mateju@svn.gnome.org>
+ * @author Jernej Vidmar <jernej.vidmar@vidmarboehm.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -54,7 +55,9 @@ $lang['btn_register'] = 'Prijava';
$lang['btn_apply'] = 'Uveljavi';
$lang['btn_media'] = 'Urejevalnik predstavnih vsebin';
$lang['btn_deleteuser'] = 'Odstrani račun';
-$lang['loggedinas'] = 'Prijava kot';
+$lang['btn_img_backto'] = 'Nazaj na %s';
+$lang['btn_mediaManager'] = 'Poglej v urejevalniku predstavnih vsebin';
+$lang['loggedinas'] = 'Prijava kot:';
$lang['user'] = 'Uporabniško ime';
$lang['pass'] = 'Geslo';
$lang['newpass'] = 'Novo geslo';
@@ -85,6 +88,7 @@ $lang['profchanged'] = 'Uporabniški profil je uspešno posodobljen.';
$lang['profnodelete'] = 'Ni omogočena podpora za brisanje uporabnikov.';
$lang['profdeleteuser'] = 'Izbriši račun';
$lang['profdeleted'] = 'Uporabniški račun je izbrisan.';
+$lang['profconfdeletemissing'] = 'Potrditveno okno ni označeno';
$lang['pwdforget'] = 'Ali ste pozabili geslo? Pridobite si novo geslo.';
$lang['resendna'] = 'DokuWiki ne podpira možnosti ponovnega pošiljanja gesel.';
$lang['resendpwd'] = 'Nastavi novo geslo za';
@@ -97,11 +101,11 @@ $lang['license'] = 'V kolikor ni posebej določeno, je vsebina Wik
$lang['licenseok'] = 'Opomba: z urejanjem vsebine strani, se strinjate z objavo pod pogoji dovoljenja:';
$lang['searchmedia'] = 'Poišči ime datoteke:';
$lang['searchmedia_in'] = 'Poišči v %s';
-$lang['txt_upload'] = 'Izberite datoteko za pošiljanje';
-$lang['txt_filename'] = 'Pošlji z imenom (izborno)';
+$lang['txt_upload'] = 'Izberite datoteko za pošiljanje:';
+$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['lockedby'] = 'Trenutno je zaklenjeno s strani:';
+$lang['lockexpire'] = 'Zaklep preteče ob:';
$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';
@@ -179,10 +183,13 @@ $lang['difflink'] = 'Poveži s tem pogledom primerjave.';
$lang['diff_type'] = 'Razlike:';
$lang['diff_inline'] = 'V besedilu';
$lang['diff_side'] = 'Eno ob drugem';
+$lang['diffprevrev'] = 'Prejšnja revizija';
+$lang['diffnextrev'] = 'Naslednja revizija';
+$lang['difflastrev'] = 'Zadnja revizija';
$lang['line'] = 'Vrstica';
-$lang['breadcrumb'] = 'Sled';
-$lang['youarehere'] = 'Trenutno dejavna stran';
-$lang['lastmod'] = 'Zadnja sprememba';
+$lang['breadcrumb'] = 'Sled:';
+$lang['youarehere'] = 'Trenutno dejavna stran:';
+$lang['lastmod'] = 'Zadnja sprememba:';
$lang['by'] = 'uporabnika';
$lang['deleted'] = 'odstranjena';
$lang['created'] = 'ustvarjena';
@@ -235,20 +242,18 @@ $lang['admin_register'] = 'Dodaj novega uporabnika';
$lang['metaedit'] = 'Uredi metapodatke';
$lang['metasaveerr'] = 'Zapisovanje metapodatkov je spodletelo';
$lang['metasaveok'] = 'Metapodatki so shranjeni';
-$lang['img_backto'] = 'Nazaj na';
-$lang['img_title'] = 'Naslov';
-$lang['img_caption'] = 'Opis';
-$lang['img_date'] = 'Datum';
-$lang['img_fname'] = 'Ime datoteke';
-$lang['img_fsize'] = 'Velikost';
-$lang['img_artist'] = 'Fotograf';
-$lang['img_copyr'] = 'Avtorska pravica';
-$lang['img_format'] = 'Zapis';
-$lang['img_camera'] = 'Fotoaparat';
-$lang['img_keywords'] = 'Ključne besede';
-$lang['img_width'] = 'Širina';
-$lang['img_height'] = 'Višina';
-$lang['img_manager'] = 'Poglej v urejevalniku predstavnih vsebin';
+$lang['img_title'] = 'Naslov:';
+$lang['img_caption'] = 'Opis:';
+$lang['img_date'] = 'Datum:';
+$lang['img_fname'] = 'Ime datoteke:';
+$lang['img_fsize'] = 'Velikost:';
+$lang['img_artist'] = 'Fotograf:';
+$lang['img_copyr'] = 'Avtorska pravica:';
+$lang['img_format'] = 'Zapis:';
+$lang['img_camera'] = 'Fotoaparat:';
+$lang['img_keywords'] = 'Ključne besede:';
+$lang['img_width'] = 'Širina:';
+$lang['img_height'] = 'Višina:';
$lang['subscr_subscribe_success'] = 'Uporabniški račun %s je dodan na seznam naročnin na %s';
$lang['subscr_subscribe_error'] = 'Napaka med dodajanjem %s na seznam naročnin na %s';
$lang['subscr_subscribe_noaddress'] = 'S trenutnimi prijavnimi podatki ni povezanega elektronskega naslova, zato uporabniškega računa ni mogoče dodati na seznam naročnikov.';
@@ -291,6 +296,8 @@ $lang['i_allowreg'] = 'Dovoli uporabnikom vpis';
$lang['i_retry'] = 'Ponovni poskus';
$lang['i_license'] = 'Izbor dovoljenja objave vsebine:';
$lang['i_license_none'] = 'Ne pokaži podrobnosti dovoljenja.';
+$lang['i_pop_field'] = 'Prosimo pomagajte nam izboljšati DokuWiki izkušnjo:';
+$lang['i_pop_label'] = 'Enkrat na mesec pošlji anonimne uporabniške podatke DokuWiki razvijalcem';
$lang['recent_global'] = 'Trenutno so prikazane spremembe znotraj imenskega prostora <b>%s</b>. Mogoče si je ogledati tudi spremembe <a href="%s">celotnega sistema Wiki</a>.';
$lang['years'] = '%d let nazaj';
$lang['months'] = '%d mesecev nazaj';
diff --git a/inc/lang/sq/denied.txt b/inc/lang/sq/denied.txt
index 03e10527f..60aa05e55 100644
--- a/inc/lang/sq/denied.txt
+++ b/inc/lang/sq/denied.txt
@@ -1,3 +1,4 @@
====== Leja Refuzohet ======
-Na vjen keq, ju nuk keni të drejta të mjaftueshme për të vazhduar. Mbase harruat të hyni? \ No newline at end of file
+Na vjen keq, ju nuk keni të drejta të mjaftueshme për të vazhduar.
+
diff --git a/inc/lang/sq/lang.php b/inc/lang/sq/lang.php
index 2ed62ed4e..49984097c 100644
--- a/inc/lang/sq/lang.php
+++ b/inc/lang/sq/lang.php
@@ -49,7 +49,7 @@ $lang['btn_recover'] = 'Rekupero skicën';
$lang['btn_draftdel'] = 'Fshi skicën';
$lang['btn_revert'] = 'Kthe si më parë';
$lang['btn_register'] = 'Regjsitrohuni';
-$lang['loggedinas'] = 'Regjistruar si ';
+$lang['loggedinas'] = 'Regjistruar si :';
$lang['user'] = 'Nofka e përdoruesit:';
$lang['pass'] = 'Fjalëkalimi';
$lang['newpass'] = 'Fjalëkalim i ri';
@@ -87,11 +87,11 @@ $lang['license'] = 'Përveç rasteve të përcaktuara, përmbajtja
$lang['licenseok'] = 'Shënim: Duke redaktuar këtë faqe ju bini dakort të liçensoni përmbajtjen tuaj nën liçensën e mëposhtme:';
$lang['searchmedia'] = 'Kërko emrin e skedarit:';
$lang['searchmedia_in'] = 'Kërko në %s';
-$lang['txt_upload'] = 'Zgjidh skedarin për ngarkim';
-$lang['txt_filename'] = 'Ngarko si (alternative)';
+$lang['txt_upload'] = 'Zgjidh skedarin për ngarkim:';
+$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['lockedby'] = 'Kyçur momentalisht nga:';
+$lang['lockexpire'] = 'Kyçi skadon në:';
$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:';
@@ -134,9 +134,9 @@ $lang['yours'] = 'Versioni Juaj';
$lang['diff'] = 'Trego ndryshimet nga rishikimet aktuale';
$lang['diff2'] = 'Trego ndryshimet mes rishikimeve të përzgjedhura';
$lang['line'] = 'Vijë';
-$lang['breadcrumb'] = 'Gjurmë';
-$lang['youarehere'] = 'Ju jeni këtu';
-$lang['lastmod'] = 'Redaktuar për herë të fundit';
+$lang['breadcrumb'] = 'Gjurmë:';
+$lang['youarehere'] = 'Ju jeni këtu:';
+$lang['lastmod'] = 'Redaktuar për herë të fundit:';
$lang['by'] = 'nga';
$lang['deleted'] = 'u fshi';
$lang['created'] = 'u krijua';
@@ -179,17 +179,17 @@ $lang['admin_register'] = 'Shto Përdorues të Ri';
$lang['metaedit'] = 'Redakto Metadata';
$lang['metasaveerr'] = 'Shkrimi i metadata-ve dështoi';
$lang['metasaveok'] = 'Metadata u ruajt';
-$lang['img_backto'] = 'Mbrapa te';
-$lang['img_title'] = 'Titulli ';
-$lang['img_caption'] = 'Titra';
-$lang['img_date'] = 'Data';
-$lang['img_fname'] = 'Emri Skedarit';
-$lang['img_fsize'] = 'Madhësia';
-$lang['img_artist'] = 'Autor';
-$lang['img_copyr'] = 'Mbajtësi i të drejtave të autorit';
-$lang['img_format'] = 'Formati';
-$lang['img_camera'] = 'Kamera';
-$lang['img_keywords'] = 'Fjalë Kyçe';
+$lang['btn_img_backto'] = 'Mbrapa te %s';
+$lang['img_title'] = 'Titulli :';
+$lang['img_caption'] = 'Titra:';
+$lang['img_date'] = 'Data:';
+$lang['img_fname'] = 'Emri Skedarit:';
+$lang['img_fsize'] = 'Madhësia:';
+$lang['img_artist'] = 'Autor:';
+$lang['img_copyr'] = 'Mbajtësi i të drejtave të autorit:';
+$lang['img_format'] = 'Formati:';
+$lang['img_camera'] = 'Kamera:';
+$lang['img_keywords'] = 'Fjalë Kyçe:';
$lang['subscr_subscribe_success'] = 'Iu shtua %s listës së abonimeve për %s';
$lang['subscr_subscribe_error'] = 'Gabim gjatë shtimit të %s listës së abonimeve për %s';
$lang['subscr_subscribe_noaddress'] = 'Nuk ekziston asnjë adresë e lidhur me regjistrimin tuaj, ju nuk mund t\'i shtoheni listës së abonimeve.';
diff --git a/inc/lang/sr/denied.txt b/inc/lang/sr/denied.txt
index b74f2b1f8..521c28453 100644
--- a/inc/lang/sr/denied.txt
+++ b/inc/lang/sr/denied.txt
@@ -1,4 +1,4 @@
====== Забрањен приступ ======
-Извините, али немате довољно права да наставите. Можда сте заборавили да се пријавите?
+Извините, али немате довољно права да наставите.
diff --git a/inc/lang/sr/lang.php b/inc/lang/sr/lang.php
index 7c434cbc9..22a500e76 100644
--- a/inc/lang/sr/lang.php
+++ b/inc/lang/sr/lang.php
@@ -46,7 +46,7 @@ $lang['btn_recover'] = 'Опорави нацрт';
$lang['btn_draftdel'] = 'Обриши нацрт';
$lang['btn_revert'] = 'Врати на пређашњу верзију';
$lang['btn_register'] = 'Региструј се';
-$lang['loggedinas'] = 'Пријављен као';
+$lang['loggedinas'] = 'Пријављен као:';
$lang['user'] = 'Корисничко име';
$lang['pass'] = 'Лозинка';
$lang['newpass'] = 'Нова лозинка';
@@ -84,11 +84,11 @@ $lang['license'] = 'Осим где је другачије наз
$lang['licenseok'] = 'Напомена: Изменом ове стране слажете се да ће ваше измене бити под следећом лиценцом:';
$lang['searchmedia'] = 'Претражи по имену фајла';
$lang['searchmedia_in'] = 'Претражи у %s';
-$lang['txt_upload'] = 'Изаберите датотеку за слање';
-$lang['txt_filename'] = 'Унесите вики-име (опционо)';
+$lang['txt_upload'] = 'Изаберите датотеку за слање:';
+$lang['txt_filename'] = 'Унесите вики-име (опционо):';
$lang['txt_overwrt'] = 'Препишите тренутни фајл';
-$lang['lockedby'] = 'Тренутно закључано од стране';
-$lang['lockexpire'] = 'Закључавање истиче';
+$lang['lockedby'] = 'Тренутно закључано од стране:';
+$lang['lockexpire'] = 'Закључавање истиче:';
$lang['js']['willexpire'] = 'Ваше закључавање за измену ове странице ће да истекне за један минут.\nДа би сте избегли конфликте, искористите дугме за преглед како би сте ресетовали тајмер закључавања.';
$lang['js']['notsavedyet'] = 'Несачуване измене ће бити изгубљене.
Да ли стварно желите да наставите?';
@@ -156,9 +156,9 @@ $lang['diff'] = 'прикажи разлике до трену
$lang['diff2'] = 'Прикажи разлике између одабраних ревизија';
$lang['difflink'] = 'Постави везу ка овом компаративном приказу';
$lang['line'] = 'Линија';
-$lang['breadcrumb'] = 'Траг';
-$lang['youarehere'] = 'Сада сте овде';
-$lang['lastmod'] = 'Последњи пут мењано';
+$lang['breadcrumb'] = 'Траг:';
+$lang['youarehere'] = 'Сада сте овде:';
+$lang['lastmod'] = 'Последњи пут мењано:';
$lang['by'] = 'од';
$lang['deleted'] = 'избрисано';
$lang['created'] = 'направљено';
@@ -201,17 +201,17 @@ $lang['admin_register'] = 'Додај новог корисника';
$lang['metaedit'] = 'Измени мета-податке';
$lang['metasaveerr'] = 'Записивање мета-података није било успешно';
$lang['metasaveok'] = 'Мета-подаци су сачувани';
-$lang['img_backto'] = 'Натраг на';
-$lang['img_title'] = 'Наслов';
-$lang['img_caption'] = 'Назив';
-$lang['img_date'] = 'Датум';
-$lang['img_fname'] = 'Име фајла';
-$lang['img_fsize'] = 'Величина';
-$lang['img_artist'] = 'Фотограф';
-$lang['img_copyr'] = 'Права копирања';
-$lang['img_format'] = 'Формат';
-$lang['img_camera'] = 'Камера';
-$lang['img_keywords'] = 'Кључне речи';
+$lang['btn_img_backto'] = 'Натраг на %s';
+$lang['img_title'] = 'Наслов:';
+$lang['img_caption'] = 'Назив:';
+$lang['img_date'] = 'Датум:';
+$lang['img_fname'] = 'Име фајла:';
+$lang['img_fsize'] = 'Величина:';
+$lang['img_artist'] = 'Фотограф:';
+$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['subscr_subscribe_noaddress'] = 'Не постоји адреса повезана са вашим подацима, стога вас не можемо додати на списак претплатника.';
diff --git a/inc/lang/sv/denied.txt b/inc/lang/sv/denied.txt
index 64d129227..7ae09b85b 100644
--- a/inc/lang/sv/denied.txt
+++ b/inc/lang/sv/denied.txt
@@ -1,4 +1,4 @@
====== Åtkomst nekad ======
-Tyvärr, du har inte behörighet att fortsätta. Kanske har du glömt att logga in?
+Tyvärr, du har inte behörighet att fortsätta.
diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php
index 8c8858f61..1f129c621 100644
--- a/inc/lang/sv/lang.php
+++ b/inc/lang/sv/lang.php
@@ -20,6 +20,7 @@
* @author Henrik <henrik@idealis.se>
* @author Tor Härnqvist <tor.harnqvist@gmail.com>
* @author Hans Iwan Bratt <hibratt@gmail.com>
+ * @author Mikael Bergström <krank23@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -62,9 +63,11 @@ $lang['btn_draftdel'] = 'Radera utkast';
$lang['btn_revert'] = 'Återställ';
$lang['btn_register'] = 'Registrera';
$lang['btn_apply'] = 'Verkställ';
-$lang['btn_media'] = 'Media Hanteraren';
+$lang['btn_media'] = 'Mediahanteraren';
$lang['btn_deleteuser'] = 'Ta bort Mitt Konto';
-$lang['loggedinas'] = 'Inloggad som';
+$lang['btn_img_backto'] = 'Tillbaka till %s';
+$lang['btn_mediaManager'] = 'Se mediahanteraren';
+$lang['loggedinas'] = 'Inloggad som:';
$lang['user'] = 'Användarnamn';
$lang['pass'] = 'Lösenord';
$lang['newpass'] = 'Nytt lösenord';
@@ -109,12 +112,12 @@ $lang['license'] = 'Om inte annat angivet, innehållet i denna wik
$lang['licenseok'] = 'Notera: Genom att ändra i denna sidan så accepterar du att licensiera ditt bidrag under följande licenser:';
$lang['searchmedia'] = 'Sök efter filnamn:';
$lang['searchmedia_in'] = 'Sök i %s';
-$lang['txt_upload'] = 'Välj fil att ladda upp';
-$lang['txt_filename'] = 'Ladda upp som (ej obligatoriskt)';
+$lang['txt_upload'] = 'Välj fil att ladda upp:';
+$lang['txt_filename'] = 'Ladda upp som (ej obligatoriskt):';
$lang['txt_overwrt'] = 'Skriv över befintlig fil';
$lang['maxuploadsize'] = 'Max %s per uppladdad fil.';
-$lang['lockedby'] = 'Låst av';
-$lang['lockexpire'] = 'Lås upphör att gälla';
+$lang['lockedby'] = 'Låst av:';
+$lang['lockexpire'] = 'Lås upphör att gälla:';
$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?';
@@ -194,9 +197,9 @@ $lang['difflink'] = 'Länk till den här jämförelsesidan';
$lang['diff_type'] = 'Visa skillnader:';
$lang['diff_side'] = 'Sida vid sida';
$lang['line'] = 'Rad';
-$lang['breadcrumb'] = 'Spår';
-$lang['youarehere'] = 'Här är du';
-$lang['lastmod'] = 'Senast uppdaterad';
+$lang['breadcrumb'] = 'Spår:';
+$lang['youarehere'] = 'Här är du:';
+$lang['lastmod'] = 'Senast uppdaterad:';
$lang['by'] = 'av';
$lang['deleted'] = 'raderad';
$lang['created'] = 'skapad';
@@ -249,20 +252,18 @@ $lang['admin_register'] = 'Lägg till ny användare';
$lang['metaedit'] = 'Redigera metadata';
$lang['metasaveerr'] = 'Skrivning av metadata misslyckades';
$lang['metasaveok'] = 'Metadata sparad';
-$lang['img_backto'] = 'Tillbaka till';
-$lang['img_title'] = 'Rubrik';
-$lang['img_caption'] = 'Bildtext';
-$lang['img_date'] = 'Datum';
-$lang['img_fname'] = 'Filnamn';
-$lang['img_fsize'] = 'Storlek';
-$lang['img_artist'] = 'Fotograf';
-$lang['img_copyr'] = 'Copyright';
-$lang['img_format'] = 'Format';
-$lang['img_camera'] = 'Kamera';
-$lang['img_keywords'] = 'Nyckelord';
-$lang['img_width'] = 'Bredd';
-$lang['img_height'] = 'Höjd';
-$lang['img_manager'] = 'Se mediahanteraren';
+$lang['img_title'] = 'Rubrik:';
+$lang['img_caption'] = 'Bildtext:';
+$lang['img_date'] = 'Datum:';
+$lang['img_fname'] = 'Filnamn:';
+$lang['img_fsize'] = 'Storlek:';
+$lang['img_artist'] = 'Fotograf:';
+$lang['img_copyr'] = 'Copyright:';
+$lang['img_format'] = 'Format:';
+$lang['img_camera'] = 'Kamera:';
+$lang['img_keywords'] = 'Nyckelord:';
+$lang['img_width'] = 'Bredd:';
+$lang['img_height'] = 'Höjd:';
$lang['subscr_subscribe_success'] = 'La till %s till prenumerationslista %s';
$lang['subscr_subscribe_noaddress'] = 'Det finns ingen adress associerad med din inloggning, du kan inte bli tillagd i prenumerationslistan';
$lang['subscr_unsubscribe_success'] = '%s borttagen från prenumerationslistan för %s';
diff --git a/inc/lang/ta/denied.txt b/inc/lang/ta/denied.txt
new file mode 100644
index 000000000..9dcf1c9ed
--- /dev/null
+++ b/inc/lang/ta/denied.txt
@@ -0,0 +1 @@
+மன்னிக்கவும் ! உங்களுக்கு தொடர அனுமதி இல்லை \ No newline at end of file
diff --git a/inc/lang/th/denied.txt b/inc/lang/th/denied.txt
index 88b012a67..4cc29d626 100644
--- a/inc/lang/th/denied.txt
+++ b/inc/lang/th/denied.txt
@@ -1,3 +1,4 @@
====== ปฏิเสธสิทธิ์ ======
-ขออภัย คุณไม่มีสิทธิ์เพียงพอที่จะดำเนินการต่อ บางทีคุณอาจจะลืมล็อกอิน? \ No newline at end of file
+ขออภัย คุณไม่มีสิทธิ์เพียงพอที่จะดำเนินการต่อ
+
diff --git a/inc/lang/th/lang.php b/inc/lang/th/lang.php
index 5d364166b..0e9f1d3bb 100644
--- a/inc/lang/th/lang.php
+++ b/inc/lang/th/lang.php
@@ -1,17 +1,13 @@
<?php
+
/**
- * th language file
- *
- * This file was initially built by fetching translations from other
- * Wiki projects. See the @url lines below. Additional translations
- * and fixes where done for DokuWiki by the people mentioned in the
- * lines starting with @author
- *
- * @url http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/messages/MessagesTh.php?view=co
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Komgrit Niyomrath <n.komgrit@gmail.com>
* @author Arthit Suriyawongkul <arthit@gmail.com>
* @author Kittithat Arnontavilas <mrtomyum@gmail.com>
* @author Thanasak Sompaisansin <jombthep@gmail.com>
+ * @author Yuthana Tantirungrotechai <yt203y@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -47,12 +43,17 @@ $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['btn_media'] = 'ส่วนจัดการสื่อและไฟล์';
+$lang['btn_deleteuser'] = 'ลบบัญชีผู้ใช้งานของฉัน';
+$lang['btn_img_backto'] = 'กลับไปยัง %s';
+$lang['btn_mediaManager'] = 'ดูในส่วนจัดการสื่อและไฟล์';
+$lang['loggedinas'] = 'ลงชื่อเข้าใช้เป็น:';
$lang['user'] = 'ชื่อผู้ใช้:';
$lang['pass'] = 'รหัสผ่าน';
$lang['newpass'] = 'รหัสผ่านใหม่';
@@ -63,6 +64,7 @@ $lang['fullname'] = 'ชื่อจริง:';
$lang['email'] = 'อีเมล:';
$lang['profile'] = 'ข้อมูลส่วนตัวผู้ใช้';
$lang['badlogin'] = 'ขัดข้อง:';
+$lang['badpassconfirm'] = 'พาสเวิร์ดไม่ถูกต้อง';
$lang['minoredit'] = 'เป็นการแก้ไขเล็กน้อย';
$lang['draftdate'] = 'บันทึกฉบับร่างเมื่อ';
$lang['nosecedit'] = 'ในช่วงเวลาที่ผ่านมานี้เพจถูกแก้ไขไปแล้ว, เนื้อหาในเซคชั่นนี้ไม่ทันสมัย กรุณาโหลดเพจใหม่ทั้งหน้าแทน';
@@ -79,6 +81,10 @@ $lang['profna'] = 'วิกินี้ไม่รองรั
$lang['profnochange'] = 'ไม่มีการเปลี่ยนแปลงข้อมูลส่วนตัว';
$lang['profnoempty'] = 'ไม่อนุญาติให้เว้นว่างชื่อ หรืออีเมล';
$lang['profchanged'] = 'ปรับปรุงข้อมูลส่วนตัวผู้ใช้สำเร็จ';
+$lang['profnodelete'] = 'วิกินี้ไม่รองรับการลบบัญชีผู้ใช้งาน';
+$lang['profdeleteuser'] = 'ลบบัญชีผู้ใช้งาน';
+$lang['profdeleted'] = 'บัญชีผู้ใช้งานของคุณได้ถูกลบออกจากวิกิแล้ว';
+$lang['profconfdelete'] = 'ฉันอยากลบบัญชีผู้ใช้งานของฉันจากวิกินี้ <br/> การดำเนินการนี้ไม่สามารถแก้ไขคืนได้ ';
$lang['pwdforget'] = 'ลืมรหัสผ่านหรือ? เอาอันใหม่สิ';
$lang['resendna'] = 'วิกินี้ไม่รองรับการส่งรหัสผ่านซ้ำ';
$lang['resendpwdmissing'] = 'ขออภัย, คุณต้องกรอกทุกช่อง';
@@ -90,13 +96,20 @@ $lang['license'] = 'เว้นแต่จะได้แจ้
$lang['licenseok'] = 'โปรดทราบ: เมื่อเริ่มแก้ไขหน้านี้ ถือว่าคุณตกลงให้สิทธิ์กับเนื้อหาของคุณอยู่ภายใต้สัญญาอนุญาตินี้';
$lang['searchmedia'] = 'สืบค้นไฟล์ชื่อ:';
$lang['searchmedia_in'] = 'สืบค้นใน %s';
-$lang['txt_upload'] = 'เลือกไฟล์ที่จะอัพโหลด';
-$lang['txt_filename'] = 'อัพโหลดเป็น(ตัวเลือก)';
+$lang['txt_upload'] = 'เลือกไฟล์ที่จะอัพโหลด:';
+$lang['txt_filename'] = 'อัพโหลดเป็น(ตัวเลือก):';
$lang['txt_overwrt'] = 'เขียนทับไฟล์ที่มีอยู่แล้ว';
-$lang['lockedby'] = 'ตอนนี้ถูกล๊อคโดย';
-$lang['lockexpire'] = 'การล๊อคจะหมดอายุเมื่อ';
-$lang['js']['willexpire'] = 'การล๊อคเพื่อแก้ไขหน้านี้กำลังจะหมดเวลาในอีก \n นาที เพื่อที่จะหลีกเลี่ยงข้อขัดแย้งให้ใช้ปุ่ม "Preview" เพื่อรีเซ็ทเวลาใหม่';
+$lang['lockedby'] = 'ตอนนี้ถูกล๊อคโดย:';
+$lang['lockexpire'] = 'การล๊อคจะหมดอายุเมื่อ:';
+$lang['js']['willexpire'] = 'การล๊อคเพื่อแก้ไขหน้านี้กำลังจะหมดเวลาในอีก \n นาที เพื่อที่จะหลีกเลี่ยงข้อขัดแย้งให้ใช้ปุ่ม "Preview" เพื่อรีเซ็ทเวลาใหม่';
$lang['js']['notsavedyet'] = 'การแก้ไขที่ไม่ได้บันทึกจะสูญหาย \n ต้องการทำต่อจริงๆหรือ?';
+$lang['js']['searchmedia'] = 'ค้นหาไฟล์';
+$lang['js']['keepopen'] = 'เปิดหน้าต่างไว้ระหว่างที่เลือก';
+$lang['js']['hidedetails'] = 'ซ่อนรายละเอียด';
+$lang['js']['nosmblinks'] = 'เชื่อมไปยังหน้าต่างแบ่งปัน ทำงานได้กับเฉพาะไมโครซอฟท์อินเตอร์เน็ตเอ็กซโปรเรอร์(IE) คุณยังคงสามารถคัดลอกและแปะลิ้งค์ได้';
+$lang['js']['linkwiz'] = 'ลิงค์วิเศษ';
+$lang['js']['linkto'] = 'ลิงค์ไป:';
+$lang['js']['del_confirm'] = 'ต้องการลบรายการที่เลือกจริงๆหรือ?';
$lang['rssfailed'] = 'มีข้อผิดพลาดขณะดูดฟีดนี้';
$lang['nothingfound'] = 'ไม่พบสิ่งใด';
$lang['mediaselect'] = 'ไฟล์สื่อ';
@@ -114,13 +127,6 @@ $lang['deletefail'] = '"%s" ไม่สามารถลบได
$lang['mediainuse'] = 'ไฟล์ "%s" ไม่ได้ถูกลบ - มันถูกใช้อยู่';
$lang['namespaces'] = 'เนมสเปซ';
$lang['mediafiles'] = 'มีไฟล์พร้อมใช้อยู่ใน';
-$lang['js']['searchmedia'] = 'ค้นหาไฟล์';
-$lang['js']['keepopen'] = 'เปิดหน้าต่างไว้ระหว่างที่เลือก';
-$lang['js']['hidedetails'] = 'ซ่อนรายละเอียด';
-$lang['js']['nosmblinks'] = 'เชื่อมไปยังหน้าต่างแบ่งปัน ทำงานได้กับเฉพาะไมโครซอฟท์อินเตอร์เน็ตเอ็กซโปรเรอร์(IE) คุณยังคงสามารถคัดลอกและแปะลิ้งค์ได้';
-$lang['js']['linkwiz'] = 'ลิงค์วิเศษ';
-$lang['js']['linkto'] = 'ลิงค์ไป:';
-$lang['js']['del_confirm'] = 'ต้องการลบรายการที่เลือกจริงๆหรือ?';
$lang['mediausage'] = 'ให้ใช้ไวยกรณ์ต่อไปนี้เพื่ออ้างอิงไฟล์นี้';
$lang['mediaview'] = 'ดูไฟล์ต้นฉบับ';
$lang['mediaroot'] = 'ราก(รูท)';
@@ -137,9 +143,9 @@ $lang['yours'] = 'ฉบับของคุณ';
$lang['diff'] = 'แสดงจุดแตกต่างกับฉบับปัจจุบัน';
$lang['diff2'] = 'แสดงจุดแตกต่างระหว่างฉบับที่เลือกไว้';
$lang['line'] = 'บรรทัด';
-$lang['breadcrumb'] = 'ตามรอย';
-$lang['youarehere'] = 'คุณอยู่ที่นี่';
-$lang['lastmod'] = 'แก้ไขครั้งล่าสุด';
+$lang['breadcrumb'] = 'ตามรอย:';
+$lang['youarehere'] = 'คุณอยู่ที่นี่:';
+$lang['lastmod'] = 'แก้ไขครั้งล่าสุด:';
$lang['by'] = 'โดย';
$lang['deleted'] = 'ถูกถอดออก';
$lang['created'] = 'ถูกสร้าง';
@@ -181,17 +187,16 @@ $lang['admin_register'] = 'สร้างบัญชีผู้ใช
$lang['metaedit'] = 'แก้ไขข้อมูลเมต้า';
$lang['metasaveerr'] = 'มีข้อผิดพลาดในการเขียนข้อมูลเมต้า';
$lang['metasaveok'] = 'บันทึกเมต้าดาต้าแล้ว';
-$lang['img_backto'] = 'กลับไปยัง';
-$lang['img_title'] = 'ชื่อภาพ';
-$lang['img_caption'] = 'คำบรรยายภาพ';
-$lang['img_date'] = 'วันที่';
-$lang['img_fname'] = 'ชื่อไฟล์';
-$lang['img_fsize'] = 'ขนาดภาพ';
-$lang['img_artist'] = 'ผู้สร้างสรรค์';
-$lang['img_copyr'] = 'ผู้ถือลิขสิทธิ์';
-$lang['img_format'] = 'รูปแบบ';
-$lang['img_camera'] = 'กล้อง';
-$lang['img_keywords'] = 'คำหลัก';
+$lang['img_title'] = 'ชื่อภาพ:';
+$lang['img_caption'] = 'คำบรรยายภาพ:';
+$lang['img_date'] = 'วันที่:';
+$lang['img_fname'] = 'ชื่อไฟล์:';
+$lang['img_fsize'] = 'ขนาดภาพ:';
+$lang['img_artist'] = 'ผู้สร้างสรรค์:';
+$lang['img_copyr'] = 'ผู้ถือลิขสิทธิ์:';
+$lang['img_format'] = 'รูปแบบ:';
+$lang['img_camera'] = 'กล้อง:';
+$lang['img_keywords'] = 'คำหลัก:';
$lang['authtempfail'] = 'ระบบตรวจสอบสิทธิ์ผู้ใช้ไม่พร้อมใช้งานชั่วคราว หากสถานการณ์ยังไม่เปลี่ยนแปลง กรุณาแจ้งผู้ดูแลระบวิกิของคุณ';
$lang['i_chooselang'] = 'เลือกภาษาของคุณ';
$lang['i_installer'] = 'ตัวติดตั้งโดกุวิกิ';
diff --git a/inc/lang/tr/denied.txt b/inc/lang/tr/denied.txt
index 04e9b8bfb..2acfd7a8f 100644
--- a/inc/lang/tr/denied.txt
+++ b/inc/lang/tr/denied.txt
@@ -1,4 +1,4 @@
====== Yetki Reddedildi ======
-Üzgünüz, devam etmek için yetkiniz yok. Giriş yapmayı unutmuş olabilir misiniz?
+Üzgünüz, devam etmek için yetkiniz yok.
diff --git a/inc/lang/tr/lang.php b/inc/lang/tr/lang.php
index 210a82530..90a7ea7ba 100644
--- a/inc/lang/tr/lang.php
+++ b/inc/lang/tr/lang.php
@@ -11,6 +11,8 @@
* @author farukerdemoncel@gmail.com
* @author Mustafa Aslan <maslan@hotmail.com>
* @author huseyin can <huseyincan73@gmail.com>
+ * @author ilker rifat kapaç <irifat@gmail.com>
+ * @author İlker R. Kapaç <irifat@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -55,7 +57,9 @@ $lang['btn_register'] = 'Kayıt ol';
$lang['btn_apply'] = 'Uygula';
$lang['btn_media'] = 'Çokluortam Yöneticisi';
$lang['btn_deleteuser'] = 'Hesabımı Sil';
-$lang['loggedinas'] = 'Giriş ismi';
+$lang['btn_img_backto'] = 'Şuna dön: %s';
+$lang['btn_mediaManager'] = 'Ortam oynatıcısında göster';
+$lang['loggedinas'] = 'Giriş ismi:';
$lang['user'] = 'Kullanıcı ismi';
$lang['pass'] = 'Parola';
$lang['newpass'] = 'Yeni Parola';
@@ -100,8 +104,8 @@ $lang['license'] = 'Aksi belirtilmediği halde, bu wikinin içeri
$lang['licenseok'] = 'Not: Bu sayfayı değiştirerek yazınızın şu lisans ile yayınlanmasını kabul etmiş olacaksınız:';
$lang['searchmedia'] = 'Dosya Adı Ara:';
$lang['searchmedia_in'] = '%s içinde ara';
-$lang['txt_upload'] = 'Yüklenecek dosyayı seç';
-$lang['txt_filename'] = 'Dosya adı (zorunlu değil)';
+$lang['txt_upload'] = 'Yüklenecek dosyayı seç:';
+$lang['txt_filename'] = 'Dosya adı (zorunlu değil):';
$lang['txt_overwrt'] = 'Mevcut dosyanın üstüne yaz';
$lang['maxuploadsize'] = 'Yükleme dosya başına en fazla %s';
$lang['lockedby'] = 'Şu an şunun tarafından kilitli:';
@@ -181,10 +185,16 @@ $lang['diff'] = 'Kullanılan sürüm ile farkları göster';
$lang['diff2'] = 'Seçili sürümler arasındaki farkı göster';
$lang['difflink'] = 'Karşılaştırma görünümüne bağlantı';
$lang['diff_type'] = 'farklı görünüş';
+$lang['diff_side'] = 'Yan yana';
+$lang['diffprevrev'] = 'Önceki sürüm';
+$lang['diffnextrev'] = 'Sonraki sürüm';
+$lang['difflastrev'] = 'Son sürüm';
+$lang['diffbothprevrev'] = 'İki taraf da önceki sürüm';
+$lang['diffbothnextrev'] = 'İki taraf da sonraki sürüm';
$lang['line'] = 'Satır';
-$lang['breadcrumb'] = 'İz';
-$lang['youarehere'] = 'Buradasınız';
-$lang['lastmod'] = 'Son değiştirilme';
+$lang['breadcrumb'] = 'İz:';
+$lang['youarehere'] = 'Buradasınız:';
+$lang['lastmod'] = 'Son değiştirilme:';
$lang['by'] = 'Değiştiren:';
$lang['deleted'] = 'silindi';
$lang['created'] = 'oluşturuldu';
@@ -201,6 +211,7 @@ $lang['skip_to_content'] = 'Bağlanmak için kaydır';
$lang['sidebar'] = 'kaydırma çubuğu';
$lang['mail_newpage'] = 'sayfa eklenme:';
$lang['mail_changed'] = 'sayfa değiştirilme:';
+$lang['mail_subscribe_list'] = 'isimalanındaki değişmiş sayfalar: ';
$lang['mail_new_user'] = 'yeni kullanıcı';
$lang['mail_upload'] = 'dosya yüklendi:';
$lang['changes_type'] = 'görünüşü değiştir';
@@ -220,6 +231,8 @@ $lang['qb_h5'] = '5. Seviye Başlık';
$lang['qb_h'] = 'Başlık';
$lang['qb_hs'] = 'Başlığı seç';
$lang['qb_hplus'] = 'Daha yüksek başlık';
+$lang['qb_hminus'] = 'Daha Düşük Başlık';
+$lang['qb_hequal'] = 'Aynı Seviye Başlık';
$lang['qb_link'] = 'İç Bağlantı';
$lang['qb_extlink'] = 'Dış Bağlantı';
$lang['qb_hr'] = 'Yatay Çizgi';
@@ -229,29 +242,29 @@ $lang['qb_media'] = 'Resim ve başka dosyalar ekle';
$lang['qb_sig'] = 'İmza Ekle';
$lang['qb_smileys'] = 'Gülen Yüzler';
$lang['qb_chars'] = 'Özel Karakterler';
+$lang['upperns'] = 'ebeveyn isimalanına atla';
$lang['admin_register'] = 'Yeni kullanıcı ekle...';
$lang['metaedit'] = 'Metaverileri Değiştir';
$lang['metasaveerr'] = 'Metaveri yazma başarısız ';
$lang['metasaveok'] = 'Metaveri kaydedildi';
-$lang['img_backto'] = 'Şuna dön:';
-$lang['img_title'] = 'Başlık';
-$lang['img_caption'] = 'Serlevha';
-$lang['img_date'] = 'Tarih';
-$lang['img_fname'] = 'Dosya Adı';
-$lang['img_fsize'] = 'Boyut';
-$lang['img_artist'] = 'Fotoğrafçı';
-$lang['img_copyr'] = 'Telif Hakkı';
-$lang['img_format'] = 'Biçim';
-$lang['img_camera'] = 'Fotoğraf Makinası';
-$lang['img_keywords'] = 'Anahtar Sözcükler';
-$lang['img_width'] = 'Genişlik';
-$lang['img_height'] = 'Yükseklik';
-$lang['img_manager'] = 'Ortam oynatıcısında göster';
+$lang['img_title'] = 'Başlık:';
+$lang['img_caption'] = 'Serlevha:';
+$lang['img_date'] = 'Tarih:';
+$lang['img_fname'] = 'Dosya Adı:';
+$lang['img_fsize'] = 'Boyut:';
+$lang['img_artist'] = 'Fotoğrafçı:';
+$lang['img_copyr'] = 'Telif Hakkı:';
+$lang['img_format'] = 'Biçim:';
+$lang['img_camera'] = 'Fotoğraf Makinası:';
+$lang['img_keywords'] = 'Anahtar Sözcükler:';
+$lang['img_width'] = 'Genişlik:';
+$lang['img_height'] = 'Yükseklik:';
$lang['subscr_m_new_header'] = 'Üyelik ekle';
$lang['subscr_m_current_header'] = 'Üyeliğini onayla';
$lang['subscr_m_unsubscribe'] = 'Üyelik iptali';
$lang['subscr_m_subscribe'] = 'Kayıt ol';
$lang['subscr_m_receive'] = 'Al';
+$lang['subscr_style_every'] = 'her değişiklikte e-posta gönder';
$lang['authtempfail'] = 'Kullanıcı doğrulama geçici olarak yapılamıyor. Eğer bu durum devam ederse lütfen Wiki yöneticine haber veriniz.';
$lang['authpwdexpire'] = 'Şifreniz %d gün sonra geçersiz hale gelecek, yakın bir zamanda değiştirmelisiniz.';
$lang['i_chooselang'] = 'Dili seçiniz';
@@ -274,8 +287,12 @@ $lang['i_policy'] = 'İlk ACL ayarı';
$lang['i_pol0'] = 'Tamamen Açık Wiki (herkes okuyabilir, yazabilir ve dosya yükleyebilir)';
$lang['i_pol1'] = 'Açık Wiki (herkes okuyabilir, ancak sadece üye olanlar yazabilir ve dosya yükleyebilir)';
$lang['i_pol2'] = 'Kapalı Wiki (sadece üye olanlar okuyabilir, yazabilir ve dosya yükleyebilir)';
+$lang['i_allowreg'] = 'Kullanıcıların kendi kendilerine üye olmalarına için ver';
$lang['i_retry'] = 'Tekrar Dene';
$lang['i_license'] = 'Lütfen içeriği hangi lisans altında yayınlamak istediğniizi belirtin:';
+$lang['i_license_none'] = 'Hiç bir lisans bilgisi gösterme';
+$lang['i_pop_field'] = 'Lütfen DokuWiki deneyimini geliştirmemizde, bize yardım edin:';
+$lang['i_pop_label'] = 'DokuWiki geliştiricilerine ayda bir, anonim kullanım bilgisini gönder';
$lang['recent_global'] = '<b>%s</b> namespace\'i içerisinde yapılan değişiklikleri görüntülemektesiniz. Wiki\'deki tüm değişiklikleri de <a href="%s">bu adresten</a> görebilirsiniz. ';
$lang['years'] = '%d yıl önce';
$lang['months'] = '%d ay önce';
@@ -295,12 +312,19 @@ $lang['media_list_thumbs'] = 'Küçük resimler';
$lang['media_list_rows'] = 'Satırlar';
$lang['media_sort_name'] = 'İsim';
$lang['media_sort_date'] = 'Tarih';
+$lang['media_namespaces'] = 'İsimalanı seçin';
$lang['media_files'] = '%s deki dosyalar';
$lang['media_upload'] = '%s dizinine yükle';
$lang['media_search'] = '%s dizininde ara';
$lang['media_view'] = '%s';
$lang['media_edit'] = 'Düzenle %s';
$lang['media_history'] = 'Geçmiş %s';
+$lang['media_meta_edited'] = 'üstveri düzenlendi';
+$lang['media_perm_read'] = 'Özür dileriz, dosyaları okumak için yeterli haklara sahip değilsiniz.';
$lang['media_perm_upload'] = 'Üzgünüm, karşıya dosya yükleme yetkiniz yok.';
$lang['media_update'] = 'Yeni versiyonu yükleyin';
$lang['media_restore'] = 'Bu sürümü eski haline getir';
+$lang['currentns'] = 'Geçerli isimalanı';
+$lang['searchresult'] = 'Arama Sonucu';
+$lang['plainhtml'] = 'Yalın HTML';
+$lang['wikimarkup'] = 'Wiki Biçimlendirmesi';
diff --git a/inc/lang/tr/subscr_form.txt b/inc/lang/tr/subscr_form.txt
new file mode 100644
index 000000000..21a8fbaeb
--- /dev/null
+++ b/inc/lang/tr/subscr_form.txt
@@ -0,0 +1,3 @@
+====== Abonelik Yönetimi ======
+
+Bu sayfa, geçerli isimalanı ve sayfa için aboneliklerinizi düzenlemenize olanak sağlar. \ No newline at end of file
diff --git a/inc/lang/uk/denied.txt b/inc/lang/uk/denied.txt
index 5db12e1bc..635d31c38 100644
--- a/inc/lang/uk/denied.txt
+++ b/inc/lang/uk/denied.txt
@@ -1,4 +1,4 @@
====== Доступ заборонено ======
-Вибачте, але у вас не вистачає прав для продовження. Можливо ви забули увійти в систему?
+Вибачте, але у вас не вистачає прав для продовження.
diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php
index 4e91e82a2..56f064c9f 100644
--- a/inc/lang/uk/lang.php
+++ b/inc/lang/uk/lang.php
@@ -53,7 +53,7 @@ $lang['btn_revert'] = 'Відновити';
$lang['btn_register'] = 'Реєстрація';
$lang['btn_apply'] = 'Застосувати';
$lang['btn_deleteuser'] = 'Видалити мій аккаунт';
-$lang['loggedinas'] = 'Ви';
+$lang['loggedinas'] = 'Ви:';
$lang['user'] = 'Користувач';
$lang['pass'] = 'Пароль';
$lang['newpass'] = 'Новий пароль';
@@ -94,11 +94,11 @@ $lang['license'] = 'Якщо не вказано інше, вмі
$lang['licenseok'] = 'Примітка. Редагуючи ці сторінку, ви погоджуєтесь на розповсюдження інформації за такою ліцензією:';
$lang['searchmedia'] = 'Пошук файлу:';
$lang['searchmedia_in'] = 'Шукати у %s';
-$lang['txt_upload'] = 'Виберіть файл для завантаження';
-$lang['txt_filename'] = 'Завантажити як (не обов\'язкове)';
+$lang['txt_upload'] = 'Виберіть файл для завантаження:';
+$lang['txt_filename'] = 'Завантажити як (не обов\'язкове):';
$lang['txt_overwrt'] = 'Перезаписати існуючий файл';
-$lang['lockedby'] = 'Заблоковано';
-$lang['lockexpire'] = 'Блокування завершується в';
+$lang['lockedby'] = 'Заблоковано:';
+$lang['lockexpire'] = 'Блокування завершується в:';
$lang['js']['willexpire'] = 'Блокування редагування цієї сторінки закінчується через хвилину.\n Щоб уникнути конфліктів використовуйте кнопку перегляду для продовження блокування.';
$lang['js']['notsavedyet'] = 'Незбережені зміни будуть втрачені.
Дійсно продовжити?';
@@ -172,9 +172,9 @@ $lang['diff_type'] = 'Переглянути відмінності:
$lang['diff_inline'] = 'Вбудувати';
$lang['diff_side'] = 'Поряд';
$lang['line'] = 'Рядок';
-$lang['breadcrumb'] = 'Відвідано';
-$lang['youarehere'] = 'Ви тут';
-$lang['lastmod'] = 'В останнє змінено';
+$lang['breadcrumb'] = 'Відвідано:';
+$lang['youarehere'] = 'Ви тут:';
+$lang['lastmod'] = 'В останнє змінено:';
$lang['by'] = ' ';
$lang['deleted'] = 'знищено';
$lang['created'] = 'створено';
@@ -223,17 +223,17 @@ $lang['admin_register'] = 'Додати нового користувач
$lang['metaedit'] = 'Редагувати метадані';
$lang['metasaveerr'] = 'Помилка запису метаданих';
$lang['metasaveok'] = 'Метадані збережено';
-$lang['img_backto'] = 'Повернутися до';
-$lang['img_title'] = 'Назва';
-$lang['img_caption'] = 'Підпис';
-$lang['img_date'] = 'Дата';
-$lang['img_fname'] = 'Ім’я файлу';
-$lang['img_fsize'] = 'Розмір';
-$lang['img_artist'] = 'Фотограф';
-$lang['img_copyr'] = 'Авторські права';
-$lang['img_format'] = 'Формат';
-$lang['img_camera'] = 'Камера';
-$lang['img_keywords'] = 'Ключові слова';
+$lang['btn_img_backto'] = 'Повернутися до %s';
+$lang['img_title'] = 'Назва:';
+$lang['img_caption'] = 'Підпис:';
+$lang['img_date'] = 'Дата:';
+$lang['img_fname'] = 'Ім’я файлу:';
+$lang['img_fsize'] = 'Розмір:';
+$lang['img_artist'] = 'Фотограф:';
+$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['subscr_subscribe_noaddress'] = 'Немає адреси, асоційованої з Вашим логіном, тому Ви не можете бути додані до списку підписки.';
diff --git a/inc/lang/vi/denied.txt b/inc/lang/vi/denied.txt
index 35acaeb62..fe6e759fc 100644
--- a/inc/lang/vi/denied.txt
+++ b/inc/lang/vi/denied.txt
@@ -1,3 +1,4 @@
====== Không được phép vào ======
-Rất tiếc là bạn không được phép để tiếp tục. Bạn quên đăng nhập hay sao?
+Rất tiếc là bạn không được phép để tiếp tục.
+
diff --git a/inc/lang/vi/lang.php b/inc/lang/vi/lang.php
index d8e40f875..b2349d0b0 100644
--- a/inc/lang/vi/lang.php
+++ b/inc/lang/vi/lang.php
@@ -45,7 +45,7 @@ $lang['btn_revert'] = 'Phục hồi';
$lang['btn_register'] = 'Đăng ký';
$lang['btn_apply'] = 'Chấp nhận';
$lang['btn_media'] = 'Quản lý tệp tin';
-$lang['loggedinas'] = 'Username đang dùng';
+$lang['loggedinas'] = 'Username đang dùng:';
$lang['user'] = 'Username';
$lang['pass'] = 'Mật khẩu';
$lang['newpass'] = 'Mật khẩu mới';
@@ -84,11 +84,11 @@ $lang['license'] = 'Trừ khi có ghi chú khác, nội dung trên
$lang['licenseok'] = 'Lưu ý: Bằng cách chỉnh sửa trang này, bạn đồng ý cấp giấy phép nội dung của bạn theo giấy phép sau:';
$lang['searchmedia'] = 'Tìm tên file:';
$lang['searchmedia_in'] = 'Tìm ở %s';
-$lang['txt_upload'] = 'Chọn tệp để tải lên';
-$lang['txt_filename'] = 'Điền wikiname (tuỳ ý)';
+$lang['txt_upload'] = 'Chọn tệp để tải lên:';
+$lang['txt_filename'] = 'Điền wikiname (tuỳ ý):';
$lang['txt_overwrt'] = 'Ghi đè file trùng';
-$lang['lockedby'] = 'Đang khoá bởi';
-$lang['lockexpire'] = 'Sẽ được mở khóa vào lúc';
+$lang['lockedby'] = 'Đang khoá bởi:';
+$lang['lockexpire'] = 'Sẽ được mở khóa vào lúc:';
$lang['js']['willexpire'] = 'Trong một phút nữa bài viết sẽ được mở khóa để cho phép người khác chỉnh sửa.\nĐể tránh xung đột, bạn nên bấm nút Duyệt trước để lập lại thời gian khoá bài';
$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['js']['searchmedia'] = 'Tìm kiếm tập tin';
@@ -156,9 +156,9 @@ $lang['diff_type'] = 'Xem sự khác biệt:';
$lang['diff_inline'] = 'Nội tuyến';
$lang['diff_side'] = 'Xếp cạnh nhau';
$lang['line'] = 'Dòng';
-$lang['breadcrumb'] = 'Trang đã xem';
-$lang['youarehere'] = 'Bạn đang ở đây';
-$lang['lastmod'] = 'Thời điểm thay đổi';
+$lang['breadcrumb'] = 'Trang đã xem:';
+$lang['youarehere'] = 'Bạn đang ở đây:';
+$lang['lastmod'] = 'Thời điểm thay đổi:';
$lang['by'] = 'do';
$lang['deleted'] = 'bị xoá';
$lang['created'] = 'được tạo ra';
@@ -192,20 +192,20 @@ $lang['qb_sig'] = 'Đặt chữ ký';
$lang['metaedit'] = 'Sửa Metadata';
$lang['metasaveerr'] = 'Thất bại khi viết metadata';
$lang['metasaveok'] = 'Metadata đã được lưu';
-$lang['img_backto'] = 'Quay lại';
-$lang['img_title'] = 'Tiêu đề';
-$lang['img_caption'] = 'Ghi chú';
-$lang['img_date'] = 'Ngày';
-$lang['img_fname'] = 'Tên file';
-$lang['img_fsize'] = 'Kích cỡ';
-$lang['img_artist'] = 'Người chụp';
-$lang['img_copyr'] = 'Bản quyền';
-$lang['img_format'] = 'Định dạng';
-$lang['img_camera'] = 'Camera';
-$lang['img_keywords'] = 'Từ khóa';
-$lang['img_width'] = 'Rộng';
-$lang['img_height'] = 'Cao';
-$lang['img_manager'] = 'Xem trong trình quản lý tệp media';
+$lang['btn_img_backto'] = 'Quay lại %s';
+$lang['img_title'] = 'Tiêu đề:';
+$lang['img_caption'] = 'Ghi chú:';
+$lang['img_date'] = 'Ngày:';
+$lang['img_fname'] = 'Tên file:';
+$lang['img_fsize'] = 'Kích cỡ:';
+$lang['img_artist'] = 'Người chụp:';
+$lang['img_copyr'] = 'Bản quyền:';
+$lang['img_format'] = 'Định dạng:';
+$lang['img_camera'] = 'Camera:';
+$lang['img_keywords'] = 'Từ khóa:';
+$lang['img_width'] = 'Rộng:';
+$lang['img_height'] = 'Cao:';
+$lang['btn_mediaManager'] = 'Xem trong trình quản lý tệp media';
$lang['i_chooselang'] = 'Chọn ngôn ngữ';
$lang['i_retry'] = 'Thử lại';
$lang['years'] = 'cách đây %d năm';
diff --git a/inc/lang/zh-tw/denied.txt b/inc/lang/zh-tw/denied.txt
index 5a4d483a5..23f306d07 100644
--- a/inc/lang/zh-tw/denied.txt
+++ b/inc/lang/zh-tw/denied.txt
@@ -1,4 +1,4 @@
====== 權限拒絕 ======
-抱歉,您沒有足夠權限繼續執行。或許您忘了登入?
+抱歉,您沒有足夠權限繼續執行。
diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php
index 456377810..03d5d54a1 100644
--- a/inc/lang/zh-tw/lang.php
+++ b/inc/lang/zh-tw/lang.php
@@ -57,7 +57,7 @@ $lang['btn_register'] = '註冊';
$lang['btn_apply'] = '套用';
$lang['btn_media'] = '多媒體管理器';
$lang['btn_deleteuser'] = '移除我的帳號';
-$lang['loggedinas'] = '登入成';
+$lang['loggedinas'] = '登入成:';
$lang['user'] = '帳號';
$lang['pass'] = '密碼';
$lang['newpass'] = '新密碼';
@@ -102,12 +102,12 @@ $lang['license'] = '若無特別註明,本 wiki 上的內容都
$lang['licenseok'] = '注意:編輯此頁面表示您同意用以下授權方式發布您撰寫的內容:';
$lang['searchmedia'] = '搜尋檔名:';
$lang['searchmedia_in'] = '在 %s 裏搜尋';
-$lang['txt_upload'] = '請選擇要上傳的檔案';
-$lang['txt_filename'] = '請輸入要上傳至本 wiki 的檔案名稱 (非必要)';
+$lang['txt_upload'] = '請選擇要上傳的檔案:';
+$lang['txt_filename'] = '請輸入要上傳至本 wiki 的檔案名稱 (非必要):';
$lang['txt_overwrt'] = '是否要覆蓋原有檔案';
$lang['maxuploadsize'] = '每個上傳檔案不可大於 %s 。';
-$lang['lockedby'] = '目前已被下列人員鎖定';
-$lang['lockexpire'] = '預計解除鎖定於';
+$lang['lockedby'] = '目前已被下列人員鎖定:';
+$lang['lockexpire'] = '預計解除鎖定於:';
$lang['js']['willexpire'] = '本頁的編輯鎖定將在一分鐘內到期。要避免發生衝突,請按「預覽」鍵重設鎖定計時。';
$lang['js']['notsavedyet'] = '未儲存的變更將會遺失,繼續嗎?';
$lang['js']['searchmedia'] = '搜尋檔案';
@@ -188,9 +188,9 @@ $lang['diff_type'] = '檢視差異:';
$lang['diff_inline'] = '行內';
$lang['diff_side'] = '並排';
$lang['line'] = '行';
-$lang['breadcrumb'] = '足跡';
-$lang['youarehere'] = '您在這裏';
-$lang['lastmod'] = '上一次變更';
+$lang['breadcrumb'] = '足跡:';
+$lang['youarehere'] = '您在這裏:';
+$lang['lastmod'] = '上一次變更:';
$lang['by'] = '由';
$lang['deleted'] = '移除';
$lang['created'] = '建立';
@@ -243,20 +243,20 @@ $lang['admin_register'] = '新增使用者';
$lang['metaedit'] = '編輯後設資料';
$lang['metasaveerr'] = '後設資料無法寫入';
$lang['metasaveok'] = '後設資料已儲存';
-$lang['img_backto'] = '回上一頁';
-$lang['img_title'] = '標題';
-$lang['img_caption'] = '照片說明';
-$lang['img_date'] = '日期';
-$lang['img_fname'] = '檔名';
-$lang['img_fsize'] = '大小';
-$lang['img_artist'] = '攝影者';
-$lang['img_copyr'] = '版權';
-$lang['img_format'] = '格式';
-$lang['img_camera'] = '相機';
-$lang['img_keywords'] = '關鍵字';
-$lang['img_width'] = '寬度';
-$lang['img_height'] = '高度';
-$lang['img_manager'] = '在多媒體管理器中檢視';
+$lang['btn_img_backto'] = '回上一頁 %s';
+$lang['img_title'] = '標題:';
+$lang['img_caption'] = '照片說明:';
+$lang['img_date'] = '日期:';
+$lang['img_fname'] = '檔名:';
+$lang['img_fsize'] = '大小:';
+$lang['img_artist'] = '攝影者:';
+$lang['img_copyr'] = '版權:';
+$lang['img_format'] = '格式:';
+$lang['img_camera'] = '相機:';
+$lang['img_keywords'] = '關鍵字:';
+$lang['img_width'] = '寬度:';
+$lang['img_height'] = '高度:';
+$lang['btn_mediaManager'] = '在多媒體管理器中檢視';
$lang['subscr_subscribe_success'] = '已將 %s 加入至 %s 的訂閱列表';
$lang['subscr_subscribe_error'] = '將 %s 加入至 %s 的訂閱列表時發生錯誤';
$lang['subscr_subscribe_noaddress'] = '沒有與您登入相關的地址,無法將您加入訂閱列表';
diff --git a/inc/lang/zh/denied.txt b/inc/lang/zh/denied.txt
index 276741c40..94721e48a 100644
--- a/inc/lang/zh/denied.txt
+++ b/inc/lang/zh/denied.txt
@@ -1,3 +1,4 @@
====== 拒绝授权 ======
-对不起,您没有足够权限,无法继续。也许您忘了登录? \ No newline at end of file
+对不起,您没有足够权限,无法继续。
+
diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php
index 004997d6e..c8a76b66b 100644
--- a/inc/lang/zh/lang.php
+++ b/inc/lang/zh/lang.php
@@ -20,6 +20,9 @@
* @author Yangyu Huang <yangyu.huang@gmail.com>
* @author anjianshi <anjianshi@gmail.com>
* @author oott123 <ip.192.168.1.1@qq.com>
+ * @author Cupen <Cupenoruler@foxmail.com>
+ * @author xiqingongzi <Xiqingongzi@Gmail.com>
+ * @author qinghao <qingxianhao@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -64,7 +67,9 @@ $lang['btn_register'] = '注册';
$lang['btn_apply'] = '应用';
$lang['btn_media'] = '媒体管理器';
$lang['btn_deleteuser'] = '移除我的账户';
-$lang['loggedinas'] = '登录为';
+$lang['btn_img_backto'] = '返回到 %s';
+$lang['btn_mediaManager'] = '在媒体管理器中查看';
+$lang['loggedinas'] = '登录为:';
$lang['user'] = '用户名';
$lang['pass'] = '密码';
$lang['newpass'] = '请输入新密码';
@@ -109,12 +114,12 @@ $lang['license'] = '除额外注明的地方外,本维基上的
$lang['licenseok'] = '当您选择开始编辑本页,即寓示你同意将你贡献的内容按下列许可协议发布:';
$lang['searchmedia'] = '查找文件名:';
$lang['searchmedia_in'] = '在%s中查找';
-$lang['txt_upload'] = '选择要上传的文件';
-$lang['txt_filename'] = '上传并重命名为(可选)';
+$lang['txt_upload'] = '选择要上传的文件:';
+$lang['txt_filename'] = '上传并重命名为(可选):';
$lang['txt_overwrt'] = '覆盖已存在的同名文件';
$lang['maxuploadsize'] = '上传限制。每个文件 %s';
-$lang['lockedby'] = '目前已被下列人员锁定';
-$lang['lockexpire'] = '预计锁定解除于';
+$lang['lockedby'] = '目前已被下列人员锁定:';
+$lang['lockexpire'] = '预计锁定解除于:';
$lang['js']['willexpire'] = '您对本页的独有编辑权将于一分钟之后解除。\n为了防止与其他人的编辑冲突,请使用预览按钮重设计时器。';
$lang['js']['notsavedyet'] = '未保存的更改将丢失。
真的要继续?';
@@ -195,10 +200,15 @@ $lang['difflink'] = '到此差别页面的链接';
$lang['diff_type'] = '查看差异:';
$lang['diff_inline'] = '行内显示';
$lang['diff_side'] = '并排显示';
+$lang['diffprevrev'] = '前一修订版';
+$lang['diffnextrev'] = '后一修订版';
+$lang['difflastrev'] = '上一修订版';
+$lang['diffbothprevrev'] = '两侧同时换到之前的修订记录';
+$lang['diffbothnextrev'] = '两侧同时换到之后的修订记录';
$lang['line'] = '行';
-$lang['breadcrumb'] = '您的足迹';
-$lang['youarehere'] = '您在这里';
-$lang['lastmod'] = '最后更改';
+$lang['breadcrumb'] = '您的足迹:';
+$lang['youarehere'] = '您在这里:';
+$lang['lastmod'] = '最后更改:';
$lang['by'] = '由';
$lang['deleted'] = '移除';
$lang['created'] = '创建';
@@ -251,20 +261,18 @@ $lang['admin_register'] = '添加新用户';
$lang['metaedit'] = '编辑元数据';
$lang['metasaveerr'] = '写入元数据失败';
$lang['metasaveok'] = '元数据已保存';
-$lang['img_backto'] = '返回到';
-$lang['img_title'] = '标题';
-$lang['img_caption'] = '说明';
-$lang['img_date'] = '日期';
-$lang['img_fname'] = '名称';
-$lang['img_fsize'] = '大小';
-$lang['img_artist'] = '摄影师';
-$lang['img_copyr'] = '版权';
-$lang['img_format'] = '格式';
-$lang['img_camera'] = '相机';
-$lang['img_keywords'] = '关键字';
-$lang['img_width'] = '宽度';
-$lang['img_height'] = '高度';
-$lang['img_manager'] = '在媒体管理器中查看';
+$lang['img_title'] = '标题:';
+$lang['img_caption'] = '说明:';
+$lang['img_date'] = '日期:';
+$lang['img_fname'] = '名称:';
+$lang['img_fsize'] = '大小:';
+$lang['img_artist'] = '摄影师:';
+$lang['img_copyr'] = '版权:';
+$lang['img_format'] = '格式:';
+$lang['img_camera'] = '相机:';
+$lang['img_keywords'] = '关键字:';
+$lang['img_width'] = '宽度:';
+$lang['img_height'] = '高度:';
$lang['subscr_subscribe_success'] = '添加 %s 到 %s 的订阅列表';
$lang['subscr_subscribe_error'] = '添加 %s 到 %s 的订阅列表中出现错误';
$lang['subscr_subscribe_noaddress'] = '没有与您登录信息相关联的地址,您无法被添加到订阅列表';
diff --git a/inc/load.php b/inc/load.php
index 497dd6921..ac2812a0b 100644
--- a/inc/load.php
+++ b/inc/load.php
@@ -96,6 +96,16 @@ function load_autoload($name){
'DokuWiki_Remote_Plugin' => DOKU_PLUGIN.'remote.php',
'DokuWiki_Auth_Plugin' => DOKU_PLUGIN.'auth.php',
+ 'Doku_Renderer' => DOKU_INC.'inc/parser/renderer.php',
+ 'Doku_Renderer_xhtml' => DOKU_INC.'inc/parser/xhtml.php',
+ 'Doku_Renderer_code' => DOKU_INC.'inc/parser/code.php',
+ 'Doku_Renderer_xhtmlsummary' => DOKU_INC.'inc/parser/xhtmlsummary.php',
+ 'Doku_Renderer_metadata' => DOKU_INC.'inc/parser/metadata.php',
+
+ 'DokuCLI' => DOKU_INC.'inc/cli.php',
+ 'DokuCLI_Options' => DOKU_INC.'inc/cli.php',
+ 'DokuCLI_Colors' => DOKU_INC.'inc/cli.php',
+
);
if(isset($classes[$name])){
diff --git a/inc/mail.php b/inc/mail.php
index 0b60c0a5b..9994ac63e 100644
--- a/inc/mail.php
+++ b/inc/mail.php
@@ -40,6 +40,8 @@ if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '['
function mail_setup(){
global $conf;
global $USERINFO;
+ /** @var Input $INPUT */
+ global $INPUT;
// auto constructed address
$host = @parse_url(DOKU_URL,PHP_URL_HOST);
@@ -53,11 +55,8 @@ function mail_setup(){
$replace['@MAIL@'] = $noreply;
}
- if(!empty($_SERVER['REMOTE_USER'])){
- $replace['@USER@'] = $_SERVER['REMOTE_USER'];
- }else{
- $replace['@USER@'] = 'noreply';
- }
+ // use 'noreply' if no user
+ $replace['@USER@'] = $INPUT->server->str('REMOTE_USER', 'noreply', true);
if(!empty($USERINFO['name'])){
$replace['@NAME@'] = $USERINFO['name'];
diff --git a/inc/media.php b/inc/media.php
index 960b96e65..185d0a5ba 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -284,7 +284,7 @@ function media_upload_xhr($ns,$auth){
'copy'
);
unlink($path);
- if ($tmp) dir_delete($tmp);
+ if ($tmp) io_rmdir($tmp, true);
if (is_array($res)) {
msg($res[0], $res[1]);
return false;
@@ -501,7 +501,8 @@ function media_saveOldRevision($id){
$date = filemtime($oldf);
if (!$conf['mediarevisions']) return $date;
- if (!getRevisionInfo($id, $date, 8192, true)) {
+ $medialog = new MediaChangeLog($id);
+ if (!$medialog->getRevisionInfo($date)) {
// there was an external edit,
// there is no log entry for current version of file
if (!@file_exists(mediaMetaFN($id,'.changes'))) {
@@ -704,7 +705,7 @@ function media_tab_files_options(){
if ($checked == $option) {
$attrs['checked'] = 'checked';
}
- $form->addElement(form_makeRadioField($group, $option,
+ $form->addElement(form_makeRadioField($group . '_dwmedia', $option,
$lang['media_' . $group . '_' . $option],
$content[0] . '__' . $option,
$option, $attrs));
@@ -728,10 +729,23 @@ function _media_get_sort_type() {
return _media_get_display_param('sort', array('default' => 'name', 'date'));
}
+/**
+ * Returns type of listing for the list of files in media manager
+ *
+ * @author Kate Arzamastseva <pshns@ukr.net>
+ * @return string - list type
+ */
function _media_get_list_type() {
return _media_get_display_param('list', array('default' => 'thumbs', 'rows'));
}
+/**
+ * Get display parameters
+ *
+ * @param string $param name of parameter
+ * @param array $values allowed values, where default value has index key 'default'
+ * @return string the parameter value
+ */
function _media_get_display_param($param, $values) {
global $INPUT;
if (in_array($INPUT->str($param), $values)) {
@@ -859,6 +873,10 @@ function media_tab_history($image, $ns, $auth=null) {
/**
* Prints mediafile details
*
+ * @param string $image media id
+ * @param $auth
+ * @param int|bool $rev
+ * @param JpegMeta|bool $meta
* @author Kate Arzamastseva <pshns@ukr.net>
*/
function media_preview($image, $auth, $rev=false, $meta=false) {
@@ -1001,7 +1019,7 @@ function media_file_tags($meta) {
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]);
+ if(isset($tag[3]) && is_array($tag[3])) $t = array_merge($t,$tag[3]);
$value = media_getTag($t, $meta);
$tags[] = array('tag' => $tag, 'value' => $value);
}
@@ -1024,7 +1042,7 @@ function media_details($image, $auth, $rev=false, $meta=false) {
foreach($tags as $tag){
if ($tag['value']) {
$value = cleanText($tag['value']);
- echo '<dt>'.$lang[$tag['tag'][1]].':</dt><dd>';
+ echo '<dt>'.$lang[$tag['tag'][1]].'</dt><dd>';
if ($tag['tag'][2] == 'date') echo dformat($value);
else echo hsc($value);
echo '</dd>'.NL;
@@ -1039,7 +1057,6 @@ function media_details($image, $auth, $rev=false, $meta=false) {
* @author Kate Arzamastseva <pshns@ukr.net>
*/
function media_diff($image, $ns, $auth, $fromajax = false) {
- global $lang;
global $conf;
global $INPUT;
@@ -1077,7 +1094,8 @@ function media_diff($image, $ns, $auth, $fromajax = false) {
$l_rev = $rev1;
}else{ // no revision was given, compare previous to current
$r_rev = '';
- $revs = getRevisions($image, 0, 1, 8192, true);
+ $medialog = new MediaChangeLog($image);
+ $revs = $medialog->getRevisions(0, 1);
if (file_exists(mediaFN($image, $revs[0]))) {
$l_rev = $revs[0];
} else {
@@ -1098,9 +1116,15 @@ function media_diff($image, $ns, $auth, $fromajax = false) {
}
+/**
+ * Callback for media file diff
+ *
+ * @param $data
+ * @return bool|void
+ */
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]);
+ media_file_diff($data[0], $data[1], $data[2], $data[3], $data[4], $data[5]);
} else {
return false;
}
@@ -1201,7 +1225,7 @@ function media_file_diff($image, $l_rev, $r_rev, $ns, $auth, $fromajax){
foreach($tags as $tag){
$value = cleanText($tag['value']);
if (!$value) $value = '-';
- echo '<dt>'.$lang[$tag['tag'][1]].':</dt>';
+ echo '<dt>'.$lang[$tag['tag'][1]].'</dt>';
echo '<dd>';
if ($tag['highlighted']) {
echo '<strong>';
@@ -1424,17 +1448,23 @@ function media_printfile($item,$auth,$jump,$display_namespace=false){
echo '</div>'.NL;
}
-function media_printicon($filename){
+/**
+ * Display a media icon
+ *
+ * @param $filename
+ * @param string $size the size subfolder, if not specified 16x16 is used
+ * @return string
+ */
+function media_printicon($filename, $size=''){
list($ext) = mimetype(mediaFN($filename),false);
- if (@file_exists(DOKU_INC.'lib/images/fileicons/'.$ext.'.png')) {
- $icon = DOKU_BASE.'lib/images/fileicons/'.$ext.'.png';
+ if (@file_exists(DOKU_INC.'lib/images/fileicons/'.$size.'/'.$ext.'.png')) {
+ $icon = DOKU_BASE.'lib/images/fileicons/'.$size.'/'.$ext.'.png';
} else {
- $icon = DOKU_BASE.'lib/images/fileicons/file.png';
+ $icon = DOKU_BASE.'lib/images/fileicons/'.$size.'/file.png';
}
return '<img src="'.$icon.'" alt="'.$filename.'" class="icon" />';
-
}
/**
@@ -1458,7 +1488,7 @@ function media_printfile_thumbs($item,$auth,$jump=false,$display_namespace=false
echo '<a id="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 media_printicon($item['id'], '32x32');
echo '</a>';
}
echo '</dt>'.NL;
@@ -1559,7 +1589,7 @@ function media_printimgdetail($item, $fullscreen=false){
* @param string $amp - separator
* @param bool $abs
* @param bool $params_array
- * @return string - link
+ * @return string|array - link
*/
function media_managerURL($params=false, $amp='&amp;', $abs=false, $params_array=false) {
global $ID;
@@ -1624,10 +1654,10 @@ function media_uploadform($ns, $auth, $fullscreen = false){
$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_makeFileField('upload', $lang['txt_upload'], 'upload__file'));
$form->addElement(form_makeCloseTag('p'));
$form->addElement(form_makeOpenTag('p'));
- $form->addElement(form_makeTextField('mediaid', noNS($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'));
@@ -1757,7 +1787,7 @@ function media_nstree_item($item){
global $INPUT;
$pos = strrpos($item['id'], ':');
$label = substr($item['id'], $pos > 0 ? $pos + 1 : 0);
- if(!$item['label']) $item['label'] = $label;
+ if(empty($item['label'])) $item['label'] = $label;
$ret = '';
if (!($INPUT->str('do') == 'media'))
@@ -1819,7 +1849,7 @@ function media_resize_image($file, $ext, $w, $h=0){
if( $mtime > filemtime($file) ||
media_resize_imageIM($ext,$file,$info[0],$info[1],$local,$w,$h) ||
media_resize_imageGD($ext,$file,$info[0],$info[1],$local,$w,$h) ){
- if($conf['fperm']) chmod($local, $conf['fperm']);
+ if(!empty($conf['fperm'])) @chmod($local, $conf['fperm']);
return $local;
}
//still here? resizing failed
@@ -1880,7 +1910,7 @@ function media_crop_image($file, $ext, $w, $h=0){
if( $mtime > @filemtime($file) ||
media_crop_imageIM($ext,$file,$info[0],$info[1],$local,$cw,$ch,$cx,$cy) ||
media_resize_imageGD($ext,$file,$cw,$ch,$local,$cw,$ch,$cx,$cy) ){
- if($conf['fperm']) chmod($local, $conf['fperm']);
+ if(!empty($conf['fperm'])) @chmod($local, $conf['fperm']);
return media_resize_image($local,$ext, $w, $h);
}
@@ -2164,7 +2194,7 @@ function media_alternativefiles($src, $exts){
/**
* Check if video/audio is supported to be embedded.
*
- * @param string $src - mimetype of media file
+ * @param string $mime - mimetype of media file
* @param string $type - type of media files to check ('video', 'audio', or none)
* @return boolean
*
diff --git a/inc/pageutils.php b/inc/pageutils.php
index c8d3cf4bb..5f62926e4 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -17,8 +17,13 @@
* If the second parameter is true (default) the ID is cleaned.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $param the $_REQUEST variable name, default 'id'
+ * @param bool $clean if true, ID is cleaned
+ * @return mixed|string
*/
function getID($param='id',$clean=true){
+ /** @var Input $INPUT */
global $INPUT;
global $conf;
global $ACT;
@@ -27,7 +32,7 @@ function getID($param='id',$clean=true){
//construct page id from request URI
if(empty($id) && $conf['userewrite'] == 2){
- $request = $_SERVER['REQUEST_URI'];
+ $request = $INPUT->server->str('REQUEST_URI');
$script = '';
//get the script URL
@@ -36,15 +41,15 @@ function getID($param='id',$clean=true){
if($param != 'id') {
$relpath = 'lib/exe/';
}
- $script = $conf['basedir'].$relpath.utf8_basename($_SERVER['SCRIPT_FILENAME']);
-
- }elseif($_SERVER['PATH_INFO']){
- $request = $_SERVER['PATH_INFO'];
- }elseif($_SERVER['SCRIPT_NAME']){
- $script = $_SERVER['SCRIPT_NAME'];
- }elseif($_SERVER['DOCUMENT_ROOT'] && $_SERVER['SCRIPT_FILENAME']){
- $script = preg_replace ('/^'.preg_quote($_SERVER['DOCUMENT_ROOT'],'/').'/','',
- $_SERVER['SCRIPT_FILENAME']);
+ $script = $conf['basedir'].$relpath.utf8_basename($INPUT->server->str('SCRIPT_FILENAME'));
+
+ }elseif($INPUT->server->str('PATH_INFO')){
+ $request = $INPUT->server->str('PATH_INFO');
+ }elseif($INPUT->server->str('SCRIPT_NAME')){
+ $script = $INPUT->server->str('SCRIPT_NAME');
+ }elseif($INPUT->server->str('DOCUMENT_ROOT') && $INPUT->server->str('SCRIPT_FILENAME')){
+ $script = preg_replace ('/^'.preg_quote($INPUT->server->str('DOCUMENT_ROOT'),'/').'/','',
+ $INPUT->server->str('SCRIPT_FILENAME'));
$script = '/'.$script;
}
@@ -94,6 +99,7 @@ function getID($param='id',$clean=true){
* @author Andreas Gohr <andi@splitbrain.org>
* @param string $raw_id The pageid to clean
* @param boolean $ascii Force ASCII
+ * @return string cleaned id
*/
function cleanID($raw_id,$ascii=false){
global $conf;
@@ -144,6 +150,9 @@ function cleanID($raw_id,$ascii=false){
* Return namespacepart of a wiki ID
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id
+ * @return string|bool the namespace part or false if the given ID has no namespace (root)
*/
function getNS($id){
$pos = strrpos((string)$id,':');
@@ -157,6 +166,9 @@ function getNS($id){
* Returns the ID without the namespace
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id
+ * @return string
*/
function noNS($id) {
$pos = strrpos($id, ':');
@@ -171,6 +183,9 @@ function noNS($id) {
* Returns the current namespace
*
* @author Nathan Fritz <fritzn@crown.edu>
+ *
+ * @param string $id
+ * @return string
*/
function curNS($id) {
return noNS(getNS($id));
@@ -180,6 +195,9 @@ function curNS($id) {
* Returns the ID without the namespace or current namespace for 'start' pages
*
* @author Nathan Fritz <fritzn@crown.edu>
+ *
+ * @param string $id
+ * @return string
*/
function noNSorNS($id) {
global $conf;
@@ -200,6 +218,7 @@ function noNSorNS($id) {
* @param string $title The headline title
* @param array|bool $check Existing IDs (title => number)
* @return string the title
+ *
* @author Andreas Gohr <andi@splitbrain.org>
*/
function sectionID($title,&$check) {
@@ -230,6 +249,11 @@ function sectionID($title,&$check) {
* parameters as for wikiFN
*
* @author Chris Smith <chris@jalakai.co.uk>
+ *
+ * @param string $id page id
+ * @param string|int $rev empty or revision timestamp
+ * @param bool $clean flag indicating that $id should be cleaned (see wikiFN as well)
+ * @return bool exists?
*/
function page_exists($id,$rev='',$clean=true) {
return @file_exists(wikiFN($id,$rev,$clean));
@@ -244,6 +268,7 @@ function page_exists($id,$rev='',$clean=true) {
* @param $rev string page revision, empty string for current
* @param $clean bool flag indicating that $raw_id should be cleaned. Only set to false
* when $id is guaranteed to have been cleaned already.
+ * @return string full path
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
@@ -287,6 +312,9 @@ function wikiFN($raw_id,$rev='',$clean=true){
* Returns the full path to the file for locking the page while editing.
*
* @author Ben Coburn <btcoburn@silicodon.net>
+ *
+ * @param string $id page id
+ * @return string full path
*/
function wikiLockFN($id) {
global $conf;
@@ -298,6 +326,10 @@ function wikiLockFN($id) {
* returns the full path to the meta file specified by ID and extension
*
* @author Steven Danz <steven-danz@kc.rr.com>
+ *
+ * @param string $id page id
+ * @param string $ext file extension
+ * @return string full path
*/
function metaFN($id,$ext){
global $conf;
@@ -311,6 +343,10 @@ 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>
+ *
+ * @param string $id media id
+ * @param string $ext extension of media
+ * @return string
*/
function mediaMetaFN($id,$ext){
global $conf;
@@ -325,6 +361,9 @@ function mediaMetaFN($id,$ext){
*
* @author Esther Brunner <esther@kaffeehaus.ch>
* @author Michael Hamann <michael@content-space.de>
+ *
+ * @param string $id page id
+ * @return array
*/
function metaFiles($id){
$basename = metaFN($id, '');
@@ -340,6 +379,10 @@ function metaFiles($id){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $id media id
+ * @param string|int $rev empty string or revision timestamp
+ * @return string full path
*/
function mediaFN($id, $rev=''){
global $conf;
@@ -361,6 +404,8 @@ function mediaFN($id, $rev=''){
*
* @param string $id The id of the local file
* @param string $ext The file extension (usually txt)
+ * @return string full filepath to localized file
+ *
* @author Andreas Gohr <andi@splitbrain.org>
*/
function localeFN($id,$ext='txt'){
@@ -386,6 +431,11 @@ function localeFN($id,$ext='txt'){
* http://www.php.net/manual/en/function.realpath.php#57016
*
* @author <bart at mediawave dot nl>
+ *
+ * @param string $ns namespace which is context of id
+ * @param string $id relative id
+ * @param bool $clean flag indicating that id should be cleaned
+ * @return mixed|string
*/
function resolve_id($ns,$id,$clean=true){
global $conf;
@@ -431,6 +481,10 @@ function resolve_id($ns,$id,$clean=true){
* Returns a full media id
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $ns namespace which is context of id
+ * @param string &$page (reference) relative media id, updated to resolved id
+ * @param bool &$exists (reference) updated with existance of media
*/
function resolve_mediaid($ns,&$page,&$exists){
$page = resolve_id($ns,$page);
@@ -442,6 +496,10 @@ function resolve_mediaid($ns,&$page,&$exists){
* Returns a full page id
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $ns namespace which is context of id
+ * @param string &$page (reference) relative page id, updated to resolved id
+ * @param bool &$exists (reference) updated with existance of media
*/
function resolve_pageid($ns,&$page,&$exists){
global $conf;
@@ -533,6 +591,9 @@ function getCacheName($data,$ext=''){
* Checks a pageid against $conf['hidepages']
*
* @author Andreas Gohr <gohr@cosmocode.de>
+ *
+ * @param string $id page id
+ * @return bool
*/
function isHiddenPage($id){
$data = array(
@@ -543,6 +604,11 @@ function isHiddenPage($id){
return $data['hidden'];
}
+/**
+ * callback checks if page is hidden
+ *
+ * @param array $data event data - see isHiddenPage()
+ */
function _isHiddenPage(&$data) {
global $conf;
global $ACT;
@@ -560,6 +626,9 @@ function _isHiddenPage(&$data) {
* Reverse of isHiddenPage
*
* @author Andreas Gohr <gohr@cosmocode.de>
+ *
+ * @param string $id page id
+ * @return bool
*/
function isVisiblePage($id){
return !isHiddenPage($id);
@@ -572,8 +641,10 @@ function isVisiblePage($id){
* “*”. Output is escaped.
*
* @author Adrian Lang <lang@cosmocode.de>
+ *
+ * @param string $id page id
+ * @return string
*/
-
function prettyprint_id($id) {
if (!$id || $id === ':') {
return '*';
@@ -596,6 +667,10 @@ function prettyprint_id($id) {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @see urlencode
+ *
+ * @param string $file file name
+ * @param bool $safe if true, only encoded when non ASCII characters detected
+ * @return string
*/
function utf8_encodeFN($file,$safe=true){
global $conf;
@@ -621,6 +696,9 @@ function utf8_encodeFN($file,$safe=true){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @see urldecode
+ *
+ * @param string $file file name
+ * @return string
*/
function utf8_decodeFN($file){
global $conf;
diff --git a/inc/parser/code.php b/inc/parser/code.php
index 0b8e3ee02..00b956c27 100644
--- a/inc/parser/code.php
+++ b/inc/parser/code.php
@@ -5,28 +5,27 @@
* @author Andreas Gohr <andi@splitbrain.org>
*/
if(!defined('DOKU_INC')) die('meh.');
-require_once DOKU_INC . 'inc/parser/renderer.php';
class Doku_Renderer_code extends Doku_Renderer {
- var $_codeblock=0;
+ var $_codeblock = 0;
/**
* Send the wanted code block to the browser
*
* When the correct block was found it exits the script.
*/
- function code($text, $language = null, $filename='' ) {
+ function code($text, $language = null, $filename = '') {
global $INPUT;
if(!$language) $language = 'txt';
if(!$filename) $filename = 'snippet.'.$language;
$filename = utf8_basename($filename);
$filename = utf8_stripspecials($filename, '_');
- if($this->_codeblock == $INPUT->str('codeblock')){
+ if($this->_codeblock == $INPUT->str('codeblock')) {
header("Content-Type: text/plain; charset=utf-8");
header("Content-Disposition: attachment; filename=$filename");
header("X-Robots-Tag: noindex");
- echo trim($text,"\r\n");
+ echo trim($text, "\r\n");
exit;
}
@@ -36,7 +35,7 @@ class Doku_Renderer_code extends Doku_Renderer {
/**
* Wraps around code()
*/
- function file($text, $language = null, $filename='') {
+ function file($text, $language = null, $filename = '') {
$this->code($text, $language, $filename);
}
@@ -54,7 +53,7 @@ class Doku_Renderer_code extends Doku_Renderer {
*
* @returns string 'code'
*/
- function getFormat(){
+ function getFormat() {
return 'code';
}
}
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index 8ae991209..a1040d12e 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -12,6 +12,7 @@ class Doku_Handler {
var $status = array(
'section' => false,
+ 'doublequote' => 0,
);
var $rewriteBlocks = true;
@@ -401,11 +402,17 @@ class Doku_Handler {
function doublequoteopening($match, $state, $pos) {
$this->_addCall('doublequoteopening',array(), $pos);
+ $this->status['doublequote']++;
return true;
}
function doublequoteclosing($match, $state, $pos) {
- $this->_addCall('doublequoteclosing',array(), $pos);
+ if ($this->status['doublequote'] <= 0) {
+ $this->doublequoteopening($match, $state, $pos);
+ } else {
+ $this->_addCall('doublequoteclosing',array(), $pos);
+ $this->status['doublequote'] = max(0, --$this->status['doublequote']);
+ }
return true;
}
@@ -1149,6 +1156,9 @@ class Doku_Handler_Table {
var $currentCols = 0;
var $firstCell = false;
var $lastCellType = 'tablecell';
+ var $inTableHead = true;
+ var $currentRow = array('tableheader' => 0, 'tablecell' => 0);
+ var $countTableHeadRows = 0;
function Doku_Handler_Table(& $CallWriter) {
$this->CallWriter = & $CallWriter;
@@ -1216,15 +1226,24 @@ class Doku_Handler_Table {
$this->firstCell = true;
$this->lastCellType = 'tablecell';
$this->maxRows++;
+ if ($this->inTableHead) {
+ $this->currentRow = array('tablecell' => 0, 'tableheader' => 0);
+ }
}
function tableRowClose($call) {
+ if ($this->inTableHead && ($this->inTableHead = $this->isTableHeadRow())) {
+ $this->countTableHeadRows++;
+ }
// Strip off final cell opening and anything after it
while ( $discard = array_pop($this->tableCalls ) ) {
if ( $discard[0] == 'tablecell_open' || $discard[0] == 'tableheader_open') {
break;
}
+ if (!empty($this->currentRow[$discard[0]])) {
+ $this->currentRow[$discard[0]]--;
+ }
}
$this->tableCalls[] = array('tablerow_close', array(), $call[2]);
@@ -1233,7 +1252,20 @@ class Doku_Handler_Table {
}
}
+ function isTableHeadRow() {
+ $td = $this->currentRow['tablecell'];
+ $th = $this->currentRow['tableheader'];
+
+ if (!$th || $td > 2) return false;
+ if (2*$td > $th) return false;
+
+ return true;
+ }
+
function tableCell($call) {
+ if ($this->inTableHead) {
+ $this->currentRow[$call[0]]++;
+ }
if ( !$this->firstCell ) {
// Increase the span
@@ -1281,6 +1313,13 @@ class Doku_Handler_Table {
$cellKey = array();
$toDelete = array();
+ // if still in tableheader, then there can be no table header
+ // as all rows can't be within <THEAD>
+ if ($this->inTableHead) {
+ $this->inTableHead = false;
+ $this->countTableHeadRows = 0;
+ }
+
// Look for the colspan elements and increment the colspan on the
// previous non-empty opening cell. Once done, delete all the cells
// that contain colspans
@@ -1288,6 +1327,14 @@ class Doku_Handler_Table {
$call = $this->tableCalls[$key];
switch ($call[0]) {
+ case 'table_open' :
+ if($this->countTableHeadRows) {
+ array_splice($this->tableCalls, $key+1, 0, array(
+ array('tablethead_open', array(), $call[2]))
+ );
+ }
+ break;
+
case 'tablerow_open':
$lastRow++;
@@ -1357,15 +1404,19 @@ class Doku_Handler_Table {
} else {
$spanning_cell = null;
- for($i = $lastRow-1; $i > 0; $i--) {
- if ( $this->tableCalls[$cellKey[$i][$lastCell]][0] == 'tablecell_open' || $this->tableCalls[$cellKey[$i][$lastCell]][0] == 'tableheader_open' ) {
+ // can't cross thead/tbody boundary
+ if (!$this->countTableHeadRows || ($lastRow-1 != $this->countTableHeadRows)) {
+ for($i = $lastRow-1; $i > 0; $i--) {
- if ($this->tableCalls[$cellKey[$i][$lastCell]][1][2] >= $lastRow - $i) {
- $spanning_cell = $i;
- break;
- }
+ if ( $this->tableCalls[$cellKey[$i][$lastCell]][0] == 'tablecell_open' || $this->tableCalls[$cellKey[$i][$lastCell]][0] == 'tableheader_open' ) {
+
+ if ($this->tableCalls[$cellKey[$i][$lastCell]][1][2] >= $lastRow - $i) {
+ $spanning_cell = $i;
+ break;
+ }
+ }
}
}
if (is_null($spanning_cell)) {
@@ -1396,6 +1447,10 @@ class Doku_Handler_Table {
$key += 3;
}
+ if($this->countTableHeadRows == $lastRow) {
+ array_splice($this->tableCalls, $key+1, 0, array(
+ array('tablethead_close', array(), $call[2])));
+ }
break;
}
@@ -1438,7 +1493,7 @@ class Doku_Handler_Block {
var $blockOpen = array(
'header',
'listu_open','listo_open','listitem_open','listcontent_open',
- 'table_open','tablerow_open','tablecell_open','tableheader_open',
+ 'table_open','tablerow_open','tablecell_open','tableheader_open','tablethead_open',
'quote_open',
'code','file','hr','preformatted','rss',
'htmlblock','phpblock',
@@ -1448,7 +1503,7 @@ class Doku_Handler_Block {
var $blockClose = array(
'header',
'listu_close','listo_close','listitem_close','listcontent_close',
- 'table_close','tablerow_close','tablecell_close','tableheader_close',
+ 'table_close','tablerow_close','tablecell_close','tableheader_close','tablethead_close',
'quote_close',
'code','file','hr','preformatted','rss',
'htmlblock','phpblock',
diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php
index 8ba159d62..25bf3fe3d 100644
--- a/inc/parser/metadata.php
+++ b/inc/parser/metadata.php
@@ -6,131 +6,198 @@
*/
if(!defined('DOKU_INC')) die('meh.');
-if ( !defined('DOKU_LF') ) {
+if(!defined('DOKU_LF')) {
// Some whitespace to help View > Source
- define ('DOKU_LF',"\n");
+ define ('DOKU_LF', "\n");
}
-if ( !defined('DOKU_TAB') ) {
+if(!defined('DOKU_TAB')) {
// Some whitespace to help View > Source
- define ('DOKU_TAB',"\t");
+ define ('DOKU_TAB', "\t");
}
-require_once DOKU_INC . 'inc/parser/renderer.php';
-
/**
- * The Renderer
+ * The MetaData Renderer
+ *
+ * Metadata is additional information about a DokuWiki page that gets extracted mainly from the page's content
+ * but also it's own filesystem data (like the creation time). All metadata is stored in the fields $meta and
+ * $persistent.
+ *
+ * Some simplified rendering to $doc is done to gather the page's (text-only) abstract.
*/
class Doku_Renderer_metadata extends Doku_Renderer {
+ /** the approximate byte lenght to capture for the abstract */
+ const ABSTRACT_LEN = 250;
+
+ /** the maximum UTF8 character length for the abstract */
+ const ABSTRACT_MAX = 500;
+
+ /** @var array transient meta data, will be reset on each rendering */
+ public $meta = array();
- var $doc = '';
- var $meta = array();
- var $persistent = array();
+ /** @var array persistent meta data, will be kept until explicitly deleted */
+ public $persistent = array();
- var $headers = array();
- var $capture = true;
- var $store = '';
- var $firstimage = '';
+ /** @var array the list of headers used to create unique link ids */
+ protected $headers = array();
- function getFormat(){
+ /** @var string temporary $doc store */
+ protected $store = '';
+
+ /** @var string keeps the first image reference */
+ protected $firstimage = '';
+
+ /** @var bool determines if enough data for the abstract was collected, yet */
+ public $capture = true;
+
+ /** @var int number of bytes captured for abstract */
+ protected $captured = 0;
+
+ /**
+ * Returns the format produced by this renderer.
+ *
+ * @return string always 'metadata'
+ */
+ function getFormat() {
return 'metadata';
}
- function document_start(){
+ /**
+ * Initialize the document
+ *
+ * Sets up some of the persistent info about the page if it doesn't exist, yet.
+ */
+ function document_start() {
global $ID;
$this->headers = array();
// external pages are missing create date
- if(!$this->persistent['date']['created']){
+ if(!$this->persistent['date']['created']) {
$this->persistent['date']['created'] = filectime(wikiFN($ID));
}
- if(!isset($this->persistent['user'])){
+ if(!isset($this->persistent['user'])) {
$this->persistent['user'] = '';
}
- if(!isset($this->persistent['creator'])){
+ if(!isset($this->persistent['creator'])) {
$this->persistent['creator'] = '';
}
// reset metadata to persistent values
$this->meta = $this->persistent;
}
- function document_end(){
+ /**
+ * Finalize the document
+ *
+ * Stores collected data in the metadata
+ */
+ function document_end() {
global $ID;
// store internal info in metadata (notoc,nocache)
$this->meta['internal'] = $this->info;
- if (!isset($this->meta['description']['abstract'])){
+ if(!isset($this->meta['description']['abstract'])) {
// cut off too long abstracts
$this->doc = trim($this->doc);
- if (strlen($this->doc) > 500)
- $this->doc = utf8_substr($this->doc, 0, 500).'…';
+ if(strlen($this->doc) > self::ABSTRACT_MAX) {
+ $this->doc = utf8_substr($this->doc, 0, self::ABSTRACT_MAX).'…';
+ }
$this->meta['description']['abstract'] = $this->doc;
}
$this->meta['relation']['firstimage'] = $this->firstimage;
- if(!isset($this->meta['date']['modified'])){
+ if(!isset($this->meta['date']['modified'])) {
$this->meta['date']['modified'] = filemtime(wikiFN($ID));
}
}
+ /**
+ * Render plain text data
+ *
+ * This function takes care of the amount captured data and will stop capturing when
+ * enough abstract data is available
+ *
+ * @param $text
+ */
+ function cdata($text) {
+ if(!$this->capture) return;
+
+ $this->doc .= $text;
+
+ $this->captured += strlen($text);
+ if($this->captured > self::ABSTRACT_LEN) $this->capture = false;
+ }
+
+ /**
+ * Add an item to the TOC
+ *
+ * @param string $id the hash link
+ * @param string $text the text to display
+ * @param int $level the nesting level
+ */
function toc_additem($id, $text, $level) {
global $conf;
//only add items within configured levels
- if($level >= $conf['toptoclevel'] && $level <= $conf['maxtoclevel']){
+ if($level >= $conf['toptoclevel'] && $level <= $conf['maxtoclevel']) {
// the TOC is one of our standard ul list arrays ;-)
$this->meta['description']['tableofcontents'][] = array(
- 'hid' => $id,
- 'title' => $text,
- 'type' => 'ul',
- 'level' => $level-$conf['toptoclevel']+1
+ 'hid' => $id,
+ 'title' => $text,
+ 'type' => 'ul',
+ 'level' => $level - $conf['toptoclevel'] + 1
);
}
}
+ /**
+ * Render a heading
+ *
+ * @param string $text the text to display
+ * @param int $level header level
+ * @param int $pos byte position in the original source
+ */
function header($text, $level, $pos) {
- if (!isset($this->meta['title'])) $this->meta['title'] = $text;
+ if(!isset($this->meta['title'])) $this->meta['title'] = $text;
// add the header to the TOC
- $hid = $this->_headerToLink($text,'true');
+ $hid = $this->_headerToLink($text, 'true');
$this->toc_additem($hid, $text, $level);
// add to summary
- if ($this->capture && ($level > 1)) $this->doc .= DOKU_LF.$text.DOKU_LF;
+ $this->cdata(DOKU_LF.$text.DOKU_LF);
}
- function section_open($level){}
- function section_close(){}
-
- function cdata($text){
- if ($this->capture) $this->doc .= $text;
- }
-
- function p_open(){
- if ($this->capture) $this->doc .= DOKU_LF;
+ /**
+ * Open a paragraph
+ */
+ function p_open() {
+ $this->cdata(DOKU_LF);
}
- function p_close(){
- if ($this->capture){
- if (strlen($this->doc) > 250) $this->capture = false;
- else $this->doc .= DOKU_LF;
- }
+ /**
+ * Close a paragraph
+ */
+ function p_close() {
+ $this->cdata(DOKU_LF);
}
- function linebreak(){
- if ($this->capture) $this->doc .= DOKU_LF;
+ /**
+ * Create a line break
+ */
+ function linebreak() {
+ $this->cdata(DOKU_LF);
}
- function hr(){
- if ($this->capture){
- if (strlen($this->doc) > 250) $this->capture = false;
- else $this->doc .= DOKU_LF.'----------'.DOKU_LF;
- }
+ /**
+ * Create a horizontal line
+ */
+ function hr() {
+ $this->cdata(DOKU_LF.'----------'.DOKU_LF);
}
/**
@@ -143,7 +210,7 @@ class Doku_Renderer_metadata extends Doku_Renderer {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function footnote_open() {
- if ($this->capture){
+ if($this->capture) {
// move current content to store and record footnote
$this->store = $this->doc;
$this->doc = '';
@@ -159,141 +226,214 @@ class Doku_Renderer_metadata extends Doku_Renderer {
* @author Andreas Gohr
*/
function footnote_close() {
- if ($this->capture){
+ if($this->capture) {
// restore old content
- $this->doc = $this->store;
+ $this->doc = $this->store;
$this->store = '';
}
}
- function listu_open(){
- if ($this->capture) $this->doc .= DOKU_LF;
- }
-
- function listu_close(){
- if ($this->capture && (strlen($this->doc) > 250)) $this->capture = false;
- }
-
- function listo_open(){
- if ($this->capture) $this->doc .= DOKU_LF;
- }
-
- function listo_close(){
- if ($this->capture && (strlen($this->doc) > 250)) $this->capture = false;
+ /**
+ * Open an unordered list
+ */
+ function listu_open() {
+ $this->cdata(DOKU_LF);
}
- function listitem_open($level){
- if ($this->capture) $this->doc .= str_repeat(DOKU_TAB, $level).'* ';
+ /**
+ * Open an ordered list
+ */
+ function listo_open() {
+ $this->cdata(DOKU_LF);
}
- function listitem_close(){
- if ($this->capture) $this->doc .= DOKU_LF;
+ /**
+ * Open a list item
+ *
+ * @param int $level the nesting level
+ */
+ function listitem_open($level) {
+ $this->cdata(str_repeat(DOKU_TAB, $level).'* ');
}
- function listcontent_open(){}
- function listcontent_close(){}
-
- function unformatted($text){
- if ($this->capture) $this->doc .= $text;
+ /**
+ * Close a list item
+ */
+ function listitem_close() {
+ $this->cdata(DOKU_LF);
}
- function preformatted($text){
- if ($this->capture) $this->doc .= $text;
+ /**
+ * Output preformatted text
+ *
+ * @param string $text
+ */
+ function preformatted($text) {
+ $this->cdata($text);
}
- function file($text, $lang = null, $file = null){
- if ($this->capture){
- $this->doc .= DOKU_LF.$text;
- if (strlen($this->doc) > 250) $this->capture = false;
- else $this->doc .= DOKU_LF;
- }
+ /**
+ * Start a block quote
+ */
+ function quote_open() {
+ $this->cdata(DOKU_LF.DOKU_TAB.'"');
}
- function quote_open(){
- if ($this->capture) $this->doc .= DOKU_LF.DOKU_TAB.'"';
+ /**
+ * Stop a block quote
+ */
+ function quote_close() {
+ $this->cdata('"'.DOKU_LF);
}
- function quote_close(){
- if ($this->capture){
- $this->doc .= '"';
- if (strlen($this->doc) > 250) $this->capture = false;
- else $this->doc .= DOKU_LF;
- }
+ /**
+ * Display text as file content, optionally syntax highlighted
+ *
+ * @param string $text text to show
+ * @param string $lang programming language to use for syntax highlighting
+ * @param string $file file path label
+ */
+ function file($text, $lang = null, $file = null) {
+ $this->cdata(DOKU_LF.$text.DOKU_LF);
}
- function code($text, $language = null, $file = null){
- if ($this->capture){
- $this->doc .= DOKU_LF.$text;
- if (strlen($this->doc) > 250) $this->capture = false;
- else $this->doc .= DOKU_LF;
- }
+ /**
+ * Display text as code content, optionally syntax highlighted
+ *
+ * @param string $text text to show
+ * @param string $language programming language to use for syntax highlighting
+ * @param string $file file path label
+ */
+ function code($text, $language = null, $file = null) {
+ $this->cdata(DOKU_LF.$text.DOKU_LF);
}
- function acronym($acronym){
- if ($this->capture) $this->doc .= $acronym;
+ /**
+ * Format an acronym
+ *
+ * Uses $this->acronyms
+ *
+ * @param string $acronym
+ */
+ function acronym($acronym) {
+ $this->cdata($acronym);
}
- function smiley($smiley){
- if ($this->capture) $this->doc .= $smiley;
+ /**
+ * Format a smiley
+ *
+ * Uses $this->smiley
+ *
+ * @param string $smiley
+ */
+ function smiley($smiley) {
+ $this->cdata($smiley);
}
- function entity($entity){
- if ($this->capture) $this->doc .= $entity;
+ /**
+ * Format an entity
+ *
+ * Entities are basically small text replacements
+ *
+ * Uses $this->entities
+ *
+ * @param string $entity
+ */
+ function entity($entity) {
+ $this->cdata($entity);
}
- function multiplyentity($x, $y){
- if ($this->capture) $this->doc .= $x.'×'.$y;
+ /**
+ * Typographically format a multiply sign
+ *
+ * Example: ($x=640, $y=480) should result in "640×480"
+ *
+ * @param string|int $x first value
+ * @param string|int $y second value
+ */
+ function multiplyentity($x, $y) {
+ $this->cdata($x.'×'.$y);
}
- function singlequoteopening(){
+ /**
+ * Render an opening single quote char (language specific)
+ */
+ function singlequoteopening() {
global $lang;
- if ($this->capture) $this->doc .= $lang['singlequoteopening'];
+ $this->cdata($lang['singlequoteopening']);
}
- function singlequoteclosing(){
+ /**
+ * Render a closing single quote char (language specific)
+ */
+ function singlequoteclosing() {
global $lang;
- if ($this->capture) $this->doc .= $lang['singlequoteclosing'];
+ $this->cdata($lang['singlequoteclosing']);
}
+ /**
+ * Render an apostrophe char (language specific)
+ */
function apostrophe() {
global $lang;
- if ($this->capture) $this->doc .= $lang['apostrophe'];
+ $this->cdata($lang['apostrophe']);
}
- function doublequoteopening(){
+ /**
+ * Render an opening double quote char (language specific)
+ */
+ function doublequoteopening() {
global $lang;
- if ($this->capture) $this->doc .= $lang['doublequoteopening'];
+ $this->cdata($lang['doublequoteopening']);
}
- function doublequoteclosing(){
+ /**
+ * Render an closinging double quote char (language specific)
+ */
+ function doublequoteclosing() {
global $lang;
- if ($this->capture) $this->doc .= $lang['doublequoteclosing'];
+ $this->cdata($lang['doublequoteclosing']);
}
+ /**
+ * Render a CamelCase link
+ *
+ * @param string $link The link name
+ * @see http://en.wikipedia.org/wiki/CamelCase
+ */
function camelcaselink($link) {
$this->internallink($link, $link);
}
- function locallink($hash, $name = null){
+ /**
+ * Render a page local link
+ *
+ * @param string $hash hash link identifier
+ * @param string $name name for the link
+ */
+ function locallink($hash, $name = null) {
if(is_array($name)) {
$this->_firstimage($name['src']);
- if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
+ if($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
}
}
/**
* keep track of internal links in $this->meta['relation']['references']
+ *
+ * @param string $id page ID to link to. eg. 'wiki:syntax'
+ * @param string|array $name name for the link, array for media file
*/
- function internallink($id, $name = null){
+ function internallink($id, $name = null) {
global $ID;
if(is_array($name)) {
$this->_firstimage($name['src']);
- if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
+ if($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
}
$parts = explode('?', $id, 2);
- if (count($parts) === 2) {
+ if(count($parts) === 2) {
$id = $parts[0];
}
@@ -301,7 +441,7 @@ class Doku_Renderer_metadata extends Doku_Renderer {
// first resolve and clean up the $id
resolve_pageid(getNS($ID), $id, $exists);
- list($page, $hash) = explode('#', $id, 2);
+ @list($page) = explode('#', $id, 2);
// set metadata
$this->meta['relation']['references'][$page] = $exists;
@@ -309,84 +449,141 @@ class Doku_Renderer_metadata extends Doku_Renderer {
// p_set_metadata($id, $data);
// add link title to summary
- if ($this->capture){
+ if($this->capture) {
$name = $this->_getLinkTitle($name, $default, $id);
$this->doc .= $name;
}
}
- function externallink($url, $name = null){
+ /**
+ * Render an external link
+ *
+ * @param string $url full URL with scheme
+ * @param string|array $name name for the link, array for media file
+ */
+ function externallink($url, $name = null) {
if(is_array($name)) {
$this->_firstimage($name['src']);
- if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
+ if($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
}
- if ($this->capture){
- $this->doc .= $this->_getLinkTitle($name, '<' . $url . '>');
+ if($this->capture) {
+ $this->doc .= $this->_getLinkTitle($name, '<'.$url.'>');
}
}
- function interwikilink($match, $name = null, $wikiName, $wikiUri){
+ /**
+ * Render an interwiki link
+ *
+ * You may want to use $this->_resolveInterWiki() here
+ *
+ * @param string $match original link - probably not much use
+ * @param string|array $name name for the link, array for media file
+ * @param string $wikiName indentifier (shortcut) for the remote wiki
+ * @param string $wikiUri the fragment parsed from the original link
+ */
+ function interwikilink($match, $name = null, $wikiName, $wikiUri) {
if(is_array($name)) {
$this->_firstimage($name['src']);
- if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
+ if($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
}
- if ($this->capture){
- list($wikiUri, $hash) = explode('#', $wikiUri, 2);
+ if($this->capture) {
+ list($wikiUri) = explode('#', $wikiUri, 2);
$name = $this->_getLinkTitle($name, $wikiUri);
$this->doc .= $name;
}
}
- function windowssharelink($url, $name = null){
+ /**
+ * Link to windows share
+ *
+ * @param string $url the link
+ * @param string|array $name name for the link, array for media file
+ */
+ function windowssharelink($url, $name = null) {
if(is_array($name)) {
$this->_firstimage($name['src']);
- if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
+ if($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
}
- if ($this->capture){
- if ($name) $this->doc .= $name;
+ if($this->capture) {
+ if($name) $this->doc .= $name;
else $this->doc .= '<'.$url.'>';
}
}
- function emaillink($address, $name = null){
+ /**
+ * Render a linked E-Mail Address
+ *
+ * Should honor $conf['mailguard'] setting
+ *
+ * @param string $address Email-Address
+ * @param string|array $name name for the link, array for media file
+ */
+ function emaillink($address, $name = null) {
if(is_array($name)) {
$this->_firstimage($name['src']);
- if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
+ if($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
}
- if ($this->capture){
- if ($name) $this->doc .= $name;
+ if($this->capture) {
+ if($name) $this->doc .= $name;
else $this->doc .= '<'.$address.'>';
}
}
- function internalmedia($src, $title=null, $align=null, $width=null,
- $height=null, $cache=null, $linking=null){
- if ($this->capture && $title) $this->doc .= '['.$title.']';
+ /**
+ * Render an internal media file
+ *
+ * @param string $src media ID
+ * @param string $title descriptive text
+ * @param string $align left|center|right
+ * @param int $width width of media in pixel
+ * @param int $height height of media in pixel
+ * @param string $cache cache|recache|nocache
+ * @param string $linking linkonly|detail|nolink
+ */
+ function internalmedia($src, $title = null, $align = null, $width = null,
+ $height = null, $cache = null, $linking = null) {
+ if($this->capture && $title) $this->doc .= '['.$title.']';
$this->_firstimage($src);
$this->_recordMediaUsage($src);
}
- function externalmedia($src, $title=null, $align=null, $width=null,
- $height=null, $cache=null, $linking=null){
- if ($this->capture && $title) $this->doc .= '['.$title.']';
+ /**
+ * Render an external media file
+ *
+ * @param string $src full media URL
+ * @param string $title descriptive text
+ * @param string $align left|center|right
+ * @param int $width width of media in pixel
+ * @param int $height height of media in pixel
+ * @param string $cache cache|recache|nocache
+ * @param string $linking linkonly|detail|nolink
+ */
+ function externalmedia($src, $title = null, $align = null, $width = null,
+ $height = null, $cache = null, $linking = null) {
+ if($this->capture && $title) $this->doc .= '['.$title.']';
$this->_firstimage($src);
}
- function rss($url,$params) {
+ /**
+ * Render the output of an RSS feed
+ *
+ * @param string $url URL of the feed
+ * @param array $params Finetuning of the output
+ */
+ function rss($url, $params) {
$this->meta['relation']['haspart'][$url] = true;
$this->meta['date']['valid']['age'] =
- isset($this->meta['date']['valid']['age']) ?
- min($this->meta['date']['valid']['age'],$params['refresh']) :
- $params['refresh'];
+ isset($this->meta['date']['valid']['age']) ?
+ min($this->meta['date']['valid']['age'], $params['refresh']) :
+ $params['refresh'];
}
- //----------------------------------------------------------
- // Utils
+ #region Utils
/**
* Removes any Namespace from the given name but keeps
@@ -394,35 +591,36 @@ class Doku_Renderer_metadata extends Doku_Renderer {
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
- function _simpleTitle($name){
+ function _simpleTitle($name) {
global $conf;
if(is_array($name)) return '';
- if($conf['useslash']){
+ if($conf['useslash']) {
$nssep = '[:;/]';
- }else{
+ } else {
$nssep = '[:;]';
}
- $name = preg_replace('!.*'.$nssep.'!','',$name);
+ $name = preg_replace('!.*'.$nssep.'!', '', $name);
//if there is a hash we use the anchor name only
- $name = preg_replace('!.*#!','',$name);
+ $name = preg_replace('!.*#!', '', $name);
return $name;
}
/**
* Creates a linkid from a headline
*
+ * @author Andreas Gohr <andi@splitbrain.org>
* @param string $title The headline title
* @param boolean $create Create a new unique ID?
- * @author Andreas Gohr <andi@splitbrain.org>
+ * @return string
*/
- function _headerToLink($title, $create=false) {
- if($create){
- return sectionID($title,$this->headers);
- }else{
+ function _headerToLink($title, $create = false) {
+ if($create) {
+ return sectionID($title, $this->headers);
+ } else {
$check = false;
- return sectionID($title,$check);
+ return sectionID($title, $check);
}
}
@@ -430,17 +628,22 @@ class Doku_Renderer_metadata extends Doku_Renderer {
* Construct a title and handle images in titles
*
* @author Harry Fuecks <hfuecks@gmail.com>
+ * @param string|array $title either string title or media array
+ * @param string $default default title if nothing else is found
+ * @param null|string $id linked page id (used to extract title from first heading)
+ * @return string title text
*/
- function _getLinkTitle($title, $default, $id=null) {
- global $conf;
-
- $isImage = false;
- if (is_array($title)){
- if($title['title']) return '['.$title['title'].']';
- } else if (is_null($title) || trim($title)==''){
- if (useHeading('content') && $id){
- $heading = p_get_first_heading($id,METADATA_DONT_RENDER);
- if ($heading) return $heading;
+ function _getLinkTitle($title, $default, $id = null) {
+ if(is_array($title)) {
+ if($title['title']) {
+ return '['.$title['title'].']';
+ } else {
+ return $default;
+ }
+ } else if(is_null($title) || trim($title) == '') {
+ if(useHeading('content') && $id) {
+ $heading = p_get_first_heading($id, METADATA_DONT_RENDER);
+ if($heading) return $heading;
}
return $default;
} else {
@@ -448,27 +651,39 @@ class Doku_Renderer_metadata extends Doku_Renderer {
}
}
- function _firstimage($src){
+ /**
+ * Remember first image
+ *
+ * @param string $src image URL or ID
+ */
+ function _firstimage($src) {
if($this->firstimage) return;
global $ID;
- list($src,$hash) = explode('#',$src,2);
- if(!media_isexternal($src)){
- resolve_mediaid(getNS($ID),$src, $exists);
+ list($src) = explode('#', $src, 2);
+ if(!media_isexternal($src)) {
+ resolve_mediaid(getNS($ID), $src, $exists);
}
- if(preg_match('/.(jpe?g|gif|png)$/i',$src)){
+ if(preg_match('/.(jpe?g|gif|png)$/i', $src)) {
$this->firstimage = $src;
}
}
+ /**
+ * Store list of used media files in metadata
+ *
+ * @param string $src media ID
+ */
function _recordMediaUsage($src) {
global $ID;
- list ($src, $hash) = explode('#', $src, 2);
- if (media_isexternal($src)) return;
+ list ($src) = explode('#', $src, 2);
+ if(media_isexternal($src)) return;
resolve_mediaid(getNS($ID), $src, $exists);
$this->meta['relation']['media'][$src] = $exists;
}
+
+ #endregion
}
//Setup VIM: ex: et ts=4 :
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index 252bd9170..df01f3302 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -200,6 +200,11 @@ class Doku_Parser_Mode_Plugin extends DokuWiki_Plugin implements Doku_Parser_Mod
var $Lexer;
var $allowedModes = array();
+ /**
+ * Sort for applying this mode
+ *
+ * @return int
+ */
function getSort() {
trigger_error('getSort() not implemented in '.get_class($this), E_USER_WARNING);
}
diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php
index e3401fd48..09294539e 100644
--- a/inc/parser/renderer.php
+++ b/inc/parser/renderer.php
@@ -6,266 +6,753 @@
* @author Andreas Gohr <andi@splitbrain.org>
*/
if(!defined('DOKU_INC')) die('meh.');
-require_once DOKU_INC . 'inc/plugin.php';
-require_once DOKU_INC . 'inc/pluginutils.php';
/**
* An empty renderer, produces no output
*
* Inherits from DokuWiki_Plugin for giving additional functions to render plugins
+ *
+ * The renderer transforms the syntax instructions created by the parser and handler into the
+ * desired output format. For each instruction a corresponding method defined in this class will
+ * be called. That method needs to produce the desired output for the instruction and add it to the
+ * $doc field. When all instructions are processed, the $doc field contents will be cached by
+ * DokuWiki and sent to the user.
*/
class Doku_Renderer extends DokuWiki_Plugin {
- var $info = array(
+ /** @var array Settings, control the behavior of the renderer */
+ public $info = array(
'cache' => true, // may the rendered result cached?
'toc' => true, // render the TOC?
);
- var $doc = '';
+ /** @var array contains the smiley configuration, set in p_render() */
+ public $smileys = array();
+ /** @var array contains the entity configuration, set in p_render() */
+ public $entities = array();
+ /** @var array contains the acronym configuration, set in p_render() */
+ public $acronyms = array();
+ /** @var array contains the interwiki configuration, set in p_render() */
+ public $interwiki = array();
- // keep some config options
- var $acronyms = array();
- var $smileys = array();
- var $badwords = array();
- var $entities = array();
- var $interwiki = array();
+ /**
+ * @var string the rendered document, this will be cached after the renderer ran through
+ */
+ public $doc = '';
- // allows renderer to be used again, clean out any per-use values
+ /**
+ * clean out any per-use values
+ *
+ * This is called before each use of the renderer object and should be used to
+ * completely reset the state of the renderer to be reused for a new document
+ */
function reset() {
}
- function nocache() {
- $this->info['cache'] = false;
- }
-
- function notoc() {
- $this->info['toc'] = false;
+ /**
+ * Allow the plugin to prevent DokuWiki from reusing an instance
+ *
+ * Since most renderer plugins fail to implement Doku_Renderer::reset() we default
+ * to reinstantiating the renderer here
+ *
+ * @return bool false if the plugin has to be instantiated
+ */
+ function isSingleton() {
+ return false;
}
/**
* Returns the format produced by this renderer.
*
- * Has to be overidden by decendend classes
+ * Has to be overidden by sub classes
+ *
+ * @return string
*/
- function getFormat(){
+ function getFormat() {
trigger_error('getFormat() not implemented in '.get_class($this), E_USER_WARNING);
+ return '';
}
/**
- * Allow the plugin to prevent DokuWiki from reusing an instance
+ * Disable caching of this renderer's output
+ */
+ function nocache() {
+ $this->info['cache'] = false;
+ }
+
+ /**
+ * Disable TOC generation for this renderer's output
*
- * @return bool false if the plugin has to be instantiated
+ * This might not be used for certain sub renderer
*/
- function isSingleton() {
- return false;
+ function notoc() {
+ $this->info['toc'] = false;
}
/**
- * handle plugin rendering
+ * Handle plugin rendering
+ *
+ * Most likely this needs NOT to be overwritten by sub classes
*
- * @param string $name Plugin name
- * @param mixed $data custom data set by handler
+ * @param string $name Plugin name
+ * @param mixed $data custom data set by handler
* @param string $state matched state if any
* @param string $match raw matched syntax
*/
- function plugin($name,$data,$state='',$match=''){
- $plugin = plugin_load('syntax',$name);
- if($plugin != null){
- $plugin->render($this->getFormat(),$this,$data);
+ function plugin($name, $data, $state = '', $match = '') {
+ /** @var DokuWiki_Syntax_Plugin $plugin */
+ $plugin = plugin_load('syntax', $name);
+ if($plugin != null) {
+ $plugin->render($this->getFormat(), $this, $data);
}
}
/**
* handle nested render instructions
* this method (and nest_close method) should not be overloaded in actual renderer output classes
+ *
+ * @param array $instructions
*/
function nest($instructions) {
-
- foreach ( $instructions as $instruction ) {
+ foreach($instructions as $instruction) {
// execute the callback against ourself
- if (method_exists($this,$instruction[0])) {
+ if(method_exists($this, $instruction[0])) {
call_user_func_array(array($this, $instruction[0]), $instruction[1] ? $instruction[1] : array());
}
}
}
- // dummy closing instruction issued by Doku_Handler_Nest, normally the syntax mode should
- // override this instruction when instantiating Doku_Handler_Nest - however plugins will not
- // be able to - as their instructions require data.
- function nest_close() {}
+ /**
+ * dummy closing instruction issued by Doku_Handler_Nest
+ *
+ * normally the syntax mode should override this instruction when instantiating Doku_Handler_Nest -
+ * however plugins will not be able to - as their instructions require data.
+ */
+ function nest_close() {
+ }
- function document_start() {}
+ #region Syntax modes - sub classes will need to implement them to fill $doc
- function document_end() {}
+ /**
+ * Initialize the document
+ */
+ function document_start() {
+ }
- function render_TOC() { return ''; }
+ /**
+ * Finalize the document
+ */
+ function document_end() {
+ }
- function toc_additem($id, $text, $level) {}
+ /**
+ * Render the Table of Contents
+ *
+ * @return string
+ */
+ function render_TOC() {
+ return '';
+ }
- function header($text, $level, $pos) {}
+ /**
+ * Add an item to the TOC
+ *
+ * @param string $id the hash link
+ * @param string $text the text to display
+ * @param int $level the nesting level
+ */
+ function toc_additem($id, $text, $level) {
+ }
- function section_open($level) {}
+ /**
+ * Render a heading
+ *
+ * @param string $text the text to display
+ * @param int $level header level
+ * @param int $pos byte position in the original source
+ */
+ function header($text, $level, $pos) {
+ }
- function section_close() {}
+ /**
+ * Open a new section
+ *
+ * @param int $level section level (as determined by the previous header)
+ */
+ function section_open($level) {
+ }
- function cdata($text) {}
+ /**
+ * Close the current section
+ */
+ function section_close() {
+ }
- function p_open() {}
+ /**
+ * Render plain text data
+ *
+ * @param $text
+ */
+ function cdata($text) {
+ }
- function p_close() {}
+ /**
+ * Open a paragraph
+ */
+ function p_open() {
+ }
- function linebreak() {}
+ /**
+ * Close a paragraph
+ */
+ function p_close() {
+ }
- function hr() {}
+ /**
+ * Create a line break
+ */
+ function linebreak() {
+ }
- function strong_open() {}
+ /**
+ * Create a horizontal line
+ */
+ function hr() {
+ }
- function strong_close() {}
+ /**
+ * Start strong (bold) formatting
+ */
+ function strong_open() {
+ }
- function emphasis_open() {}
+ /**
+ * Stop strong (bold) formatting
+ */
+ function strong_close() {
+ }
- function emphasis_close() {}
+ /**
+ * Start emphasis (italics) formatting
+ */
+ function emphasis_open() {
+ }
- function underline_open() {}
+ /**
+ * Stop emphasis (italics) formatting
+ */
+ function emphasis_close() {
+ }
- function underline_close() {}
+ /**
+ * Start underline formatting
+ */
+ function underline_open() {
+ }
- function monospace_open() {}
+ /**
+ * Stop underline formatting
+ */
+ function underline_close() {
+ }
- function monospace_close() {}
+ /**
+ * Start monospace formatting
+ */
+ function monospace_open() {
+ }
- function subscript_open() {}
+ /**
+ * Stop monospace formatting
+ */
+ function monospace_close() {
+ }
- function subscript_close() {}
+ /**
+ * Start a subscript
+ */
+ function subscript_open() {
+ }
- function superscript_open() {}
+ /**
+ * Stop a subscript
+ */
+ function subscript_close() {
+ }
- function superscript_close() {}
+ /**
+ * Start a superscript
+ */
+ function superscript_open() {
+ }
- function deleted_open() {}
+ /**
+ * Stop a superscript
+ */
+ function superscript_close() {
+ }
- function deleted_close() {}
+ /**
+ * Start deleted (strike-through) formatting
+ */
+ function deleted_open() {
+ }
- function footnote_open() {}
+ /**
+ * Stop deleted (strike-through) formatting
+ */
+ function deleted_close() {
+ }
- function footnote_close() {}
+ /**
+ * Start a footnote
+ */
+ function footnote_open() {
+ }
+
+ /**
+ * Stop a footnote
+ */
+ function footnote_close() {
+ }
- function listu_open() {}
+ /**
+ * Open an unordered list
+ */
+ function listu_open() {
+ }
- function listu_close() {}
+ /**
+ * Close an unordered list
+ */
+ function listu_close() {
+ }
- function listo_open() {}
+ /**
+ * Open an ordered list
+ */
+ function listo_open() {
+ }
- function listo_close() {}
+ /**
+ * Close an ordered list
+ */
+ function listo_close() {
+ }
- function listitem_open($level) {}
+ /**
+ * Open a list item
+ *
+ * @param int $level the nesting level
+ */
+ function listitem_open($level) {
+ }
- function listitem_close() {}
+ /**
+ * Close a list item
+ */
+ function listitem_close() {
+ }
- function listcontent_open() {}
+ /**
+ * Start the content of a list item
+ */
+ function listcontent_open() {
+ }
- function listcontent_close() {}
+ /**
+ * Stop the content of a list item
+ */
+ function listcontent_close() {
+ }
- function unformatted($text) {}
+ /**
+ * Output unformatted $text
+ *
+ * Defaults to $this->cdata()
+ *
+ * @param string $text
+ */
+ function unformatted($text) {
+ $this->cdata($text);
+ }
- function php($text) {}
+ /**
+ * Output inline PHP code
+ *
+ * If $conf['phpok'] is true this should evaluate the given code and append the result
+ * to $doc
+ *
+ * @param string $text The PHP code
+ */
+ function php($text) {
+ }
- function phpblock($text) {}
+ /**
+ * Output block level PHP code
+ *
+ * If $conf['phpok'] is true this should evaluate the given code and append the result
+ * to $doc
+ *
+ * @param string $text The PHP code
+ */
+ function phpblock($text) {
+ }
- function html($text) {}
+ /**
+ * Output raw inline HTML
+ *
+ * If $conf['htmlok'] is true this should add the code as is to $doc
+ *
+ * @param string $text The HTML
+ */
+ function html($text) {
+ }
- function htmlblock($text) {}
+ /**
+ * Output raw block-level HTML
+ *
+ * If $conf['htmlok'] is true this should add the code as is to $doc
+ *
+ * @param string $text The HTML
+ */
+ function htmlblock($text) {
+ }
- function preformatted($text) {}
+ /**
+ * Output preformatted text
+ *
+ * @param string $text
+ */
+ function preformatted($text) {
+ }
- function quote_open() {}
+ /**
+ * Start a block quote
+ */
+ function quote_open() {
+ }
- function quote_close() {}
+ /**
+ * Stop a block quote
+ */
+ function quote_close() {
+ }
- function file($text, $lang = null, $file = null ) {}
+ /**
+ * Display text as file content, optionally syntax highlighted
+ *
+ * @param string $text text to show
+ * @param string $lang programming language to use for syntax highlighting
+ * @param string $file file path label
+ */
+ function file($text, $lang = null, $file = null) {
+ }
- function code($text, $lang = null, $file = null ) {}
+ /**
+ * Display text as code content, optionally syntax highlighted
+ *
+ * @param string $text text to show
+ * @param string $lang programming language to use for syntax highlighting
+ * @param string $file file path label
+ */
+ function code($text, $lang = null, $file = null) {
+ }
- function acronym($acronym) {}
+ /**
+ * Format an acronym
+ *
+ * Uses $this->acronyms
+ *
+ * @param string $acronym
+ */
+ function acronym($acronym) {
+ }
- function smiley($smiley) {}
+ /**
+ * Format a smiley
+ *
+ * Uses $this->smiley
+ *
+ * @param string $smiley
+ */
+ function smiley($smiley) {
+ }
- function wordblock($word) {}
+ /**
+ * Format an entity
+ *
+ * Entities are basically small text replacements
+ *
+ * Uses $this->entities
+ *
+ * @param string $entity
+ */
+ function entity($entity) {
+ }
- function entity($entity) {}
+ /**
+ * Typographically format a multiply sign
+ *
+ * Example: ($x=640, $y=480) should result in "640×480"
+ *
+ * @param string|int $x first value
+ * @param string|int $y second value
+ */
+ function multiplyentity($x, $y) {
+ }
- // 640x480 ($x=640, $y=480)
- function multiplyentity($x, $y) {}
+ /**
+ * Render an opening single quote char (language specific)
+ */
+ function singlequoteopening() {
+ }
- function singlequoteopening() {}
+ /**
+ * Render a closing single quote char (language specific)
+ */
+ function singlequoteclosing() {
+ }
- function singlequoteclosing() {}
+ /**
+ * Render an apostrophe char (language specific)
+ */
+ function apostrophe() {
+ }
- function apostrophe() {}
+ /**
+ * Render an opening double quote char (language specific)
+ */
+ function doublequoteopening() {
+ }
- function doublequoteopening() {}
+ /**
+ * Render an closinging double quote char (language specific)
+ */
+ function doublequoteclosing() {
+ }
- function doublequoteclosing() {}
+ /**
+ * Render a CamelCase link
+ *
+ * @param string $link The link name
+ * @see http://en.wikipedia.org/wiki/CamelCase
+ */
+ function camelcaselink($link) {
+ }
- // $link like 'SomePage'
- function camelcaselink($link) {}
+ /**
+ * Render a page local link
+ *
+ * @param string $hash hash link identifier
+ * @param string $name name for the link
+ */
+ function locallink($hash, $name = null) {
+ }
- function locallink($hash, $name = null) {}
+ /**
+ * Render a wiki internal link
+ *
+ * @param string $link page ID to link to. eg. 'wiki:syntax'
+ * @param string|array $title name for the link, array for media file
+ */
+ function internallink($link, $title = null) {
+ }
- // $link like 'wiki:syntax', $title could be an array (media)
- function internallink($link, $title = null) {}
+ /**
+ * Render an external link
+ *
+ * @param string $link full URL with scheme
+ * @param string|array $title name for the link, array for media file
+ */
+ function externallink($link, $title = null) {
+ }
- // $link is full URL with scheme, $title could be an array (media)
- function externallink($link, $title = null) {}
+ /**
+ * Render the output of an RSS feed
+ *
+ * @param string $url URL of the feed
+ * @param array $params Finetuning of the output
+ */
+ function rss($url, $params) {
+ }
- function rss ($url,$params) {}
+ /**
+ * Render an interwiki link
+ *
+ * You may want to use $this->_resolveInterWiki() here
+ *
+ * @param string $link original link - probably not much use
+ * @param string|array $title name for the link, array for media file
+ * @param string $wikiName indentifier (shortcut) for the remote wiki
+ * @param string $wikiUri the fragment parsed from the original link
+ */
+ function interwikilink($link, $title = null, $wikiName, $wikiUri) {
+ }
- // $link is the original link - probably not much use
- // $wikiName is an indentifier for the wiki
- // $wikiUri is the URL fragment to append to some known URL
- function interwikilink($link, $title = null, $wikiName, $wikiUri) {}
+ /**
+ * Link to file on users OS
+ *
+ * @param string $link the link
+ * @param string|array $title name for the link, array for media file
+ */
+ function filelink($link, $title = null) {
+ }
- // Link to file on users OS, $title could be an array (media)
- function filelink($link, $title = null) {}
+ /**
+ * Link to windows share
+ *
+ * @param string $link the link
+ * @param string|array $title name for the link, array for media file
+ */
+ function windowssharelink($link, $title = null) {
+ }
- // Link to a Windows share, , $title could be an array (media)
- function windowssharelink($link, $title = null) {}
+ /**
+ * Render a linked E-Mail Address
+ *
+ * Should honor $conf['mailguard'] setting
+ *
+ * @param string $address Email-Address
+ * @param string|array $name name for the link, array for media file
+ */
+ function emaillink($address, $name = null) {
+ }
-// function email($address, $title = null) {}
- function emaillink($address, $name = null) {}
+ /**
+ * Render an internal media file
+ *
+ * @param string $src media ID
+ * @param string $title descriptive text
+ * @param string $align left|center|right
+ * @param int $width width of media in pixel
+ * @param int $height height of media in pixel
+ * @param string $cache cache|recache|nocache
+ * @param string $linking linkonly|detail|nolink
+ */
+ function internalmedia($src, $title = null, $align = null, $width = null,
+ $height = null, $cache = null, $linking = null) {
+ }
- function internalmedia ($src, $title=null, $align=null, $width=null,
- $height=null, $cache=null, $linking=null) {}
+ /**
+ * Render an external media file
+ *
+ * @param string $src full media URL
+ * @param string $title descriptive text
+ * @param string $align left|center|right
+ * @param int $width width of media in pixel
+ * @param int $height height of media in pixel
+ * @param string $cache cache|recache|nocache
+ * @param string $linking linkonly|detail|nolink
+ */
+ function externalmedia($src, $title = null, $align = null, $width = null,
+ $height = null, $cache = null, $linking = null) {
+ }
- function externalmedia ($src, $title=null, $align=null, $width=null,
- $height=null, $cache=null, $linking=null) {}
+ /**
+ * Render a link to an internal media file
+ *
+ * @param string $src media ID
+ * @param string $title descriptive text
+ * @param string $align left|center|right
+ * @param int $width width of media in pixel
+ * @param int $height height of media in pixel
+ * @param string $cache cache|recache|nocache
+ */
+ function internalmedialink($src, $title = null, $align = null,
+ $width = null, $height = null, $cache = null) {
+ }
- function internalmedialink (
- $src,$title=null,$align=null,$width=null,$height=null,$cache=null
- ) {}
+ /**
+ * Render a link to an external media file
+ *
+ * @param string $src media ID
+ * @param string $title descriptive text
+ * @param string $align left|center|right
+ * @param int $width width of media in pixel
+ * @param int $height height of media in pixel
+ * @param string $cache cache|recache|nocache
+ */
+ function externalmedialink($src, $title = null, $align = null,
+ $width = null, $height = null, $cache = null) {
+ }
- function externalmedialink(
- $src,$title=null,$align=null,$width=null,$height=null,$cache=null
- ) {}
+ /**
+ * Start a table
+ *
+ * @param int $maxcols maximum number of columns
+ * @param int $numrows NOT IMPLEMENTED
+ * @param int $pos byte position in the original source
+ */
+ function table_open($maxcols = null, $numrows = null, $pos = null) {
+ }
- function table_open($maxcols = null, $numrows = null, $pos = null){}
+ /**
+ * Close a table
+ *
+ * @param int $pos byte position in the original source
+ */
+ function table_close($pos = null) {
+ }
- function table_close($pos = null){}
+ /**
+ * Open a table header
+ */
+ function tablethead_open() {
+ }
- function tablerow_open(){}
+ /**
+ * Close a table header
+ */
+ function tablethead_close() {
+ }
- function tablerow_close(){}
+ /**
+ * Open a table row
+ */
+ function tablerow_open() {
+ }
- function tableheader_open($colspan = 1, $align = null, $rowspan = 1){}
+ /**
+ * Close a table row
+ */
+ function tablerow_close() {
+ }
- function tableheader_close(){}
+ /**
+ * Open a table header cell
+ *
+ * @param int $colspan
+ * @param string $align left|center|right
+ * @param int $rowspan
+ */
+ function tableheader_open($colspan = 1, $align = null, $rowspan = 1) {
+ }
- function tablecell_open($colspan = 1, $align = null, $rowspan = 1){}
+ /**
+ * Close a table header cell
+ */
+ function tableheader_close() {
+ }
- function tablecell_close(){}
+ /**
+ * Open a table cell
+ *
+ * @param int $colspan
+ * @param string $align left|center|right
+ * @param int $rowspan
+ */
+ function tablecell_open($colspan = 1, $align = null, $rowspan = 1) {
+ }
+ /**
+ * Close a table cell
+ */
+ function tablecell_close() {
+ }
- // util functions follow, you probably won't need to reimplement them
+ #endregion
+ #region util functions, you probably won't need to reimplement them
/**
* Removes any Namespace from the given name but keeps
@@ -273,17 +760,17 @@ class Doku_Renderer extends DokuWiki_Plugin {
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
- function _simpleTitle($name){
+ function _simpleTitle($name) {
global $conf;
//if there is a hash we use the ancor name only
- list($name,$hash) = explode('#',$name,2);
+ @list($name, $hash) = explode('#', $name, 2);
if($hash) return $hash;
- if($conf['useslash']){
- $name = strtr($name,';/',';:');
- }else{
- $name = strtr($name,';',':');
+ if($conf['useslash']) {
+ $name = strtr($name, ';/', ';:');
+ } else {
+ $name = strtr($name, ';', ':');
}
return noNSorNS($name);
@@ -292,39 +779,47 @@ class Doku_Renderer extends DokuWiki_Plugin {
/**
* Resolve an interwikilink
*/
- function _resolveInterWiki(&$shortcut,$reference){
+ function _resolveInterWiki(&$shortcut, $reference, &$exists = null) {
//get interwiki URL
- if ( isset($this->interwiki[$shortcut]) ) {
+ if(isset($this->interwiki[$shortcut])) {
$url = $this->interwiki[$shortcut];
} else {
// Default to Google I'm feeling lucky
- $url = 'http://www.google.com/search?q={URL}&amp;btnI=lucky';
+ $url = 'http://www.google.com/search?q={URL}&amp;btnI=lucky';
$shortcut = 'go';
}
//split into hash and url part
- list($reference,$hash) = explode('#',$reference,2);
+ @list($reference, $hash) = explode('#', $reference, 2);
//replace placeholder
- if(preg_match('#\{(URL|NAME|SCHEME|HOST|PORT|PATH|QUERY)\}#',$url)){
+ if(preg_match('#\{(URL|NAME|SCHEME|HOST|PORT|PATH|QUERY)\}#', $url)) {
//use placeholders
- $url = str_replace('{URL}',rawurlencode($reference),$url);
- $url = str_replace('{NAME}',$reference,$url);
+ $url = str_replace('{URL}', rawurlencode($reference), $url);
+ $url = str_replace('{NAME}', $reference, $url);
$parsed = parse_url($reference);
if(!$parsed['port']) $parsed['port'] = 80;
- $url = str_replace('{SCHEME}',$parsed['scheme'],$url);
- $url = str_replace('{HOST}',$parsed['host'],$url);
- $url = str_replace('{PORT}',$parsed['port'],$url);
- $url = str_replace('{PATH}',$parsed['path'],$url);
- $url = str_replace('{QUERY}',$parsed['query'],$url);
- }else{
+ $url = str_replace('{SCHEME}', $parsed['scheme'], $url);
+ $url = str_replace('{HOST}', $parsed['host'], $url);
+ $url = str_replace('{PORT}', $parsed['port'], $url);
+ $url = str_replace('{PATH}', $parsed['path'], $url);
+ $url = str_replace('{QUERY}', $parsed['query'], $url);
+ } else {
//default
$url = $url.rawurlencode($reference);
}
+ //handle as wiki links
+ if($url{0} === ':') {
+ list($id, $urlparam) = explode('?', $url, 2);
+ $url = wl(cleanID($id), $urlparam);
+ $exists = page_exists($id);
+ }
if($hash) $url .= '#'.rawurlencode($hash);
return $url;
}
+
+ #endregion
}
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 80701cd2e..5c0353688 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -7,40 +7,53 @@
*/
if(!defined('DOKU_INC')) die('meh.');
-if ( !defined('DOKU_LF') ) {
+if(!defined('DOKU_LF')) {
// Some whitespace to help View > Source
- define ('DOKU_LF',"\n");
+ define ('DOKU_LF', "\n");
}
-if ( !defined('DOKU_TAB') ) {
+if(!defined('DOKU_TAB')) {
// Some whitespace to help View > Source
- define ('DOKU_TAB',"\t");
+ define ('DOKU_TAB', "\t");
}
-require_once DOKU_INC . 'inc/parser/renderer.php';
-require_once DOKU_INC . 'inc/html.php';
-
/**
- * The Renderer
+ * The XHTML Renderer
+ *
+ * This is DokuWiki's main renderer used to display page content in the wiki
*/
class Doku_Renderer_xhtml extends Doku_Renderer {
+ /** @var array store the table of contents */
+ public $toc = array();
- // @access public
- var $doc = ''; // will contain the whole document
- var $toc = array(); // will contain the Table of Contents
+ /** @var array A stack of section edit data */
+ protected $sectionedits = array();
- var $sectionedits = array(); // A stack of section edit data
- private $lastsecid = 0; // last section edit id, used by startSectionEdit
+ /** @var int last section edit id, used by startSectionEdit */
+ protected $lastsecid = 0;
+
+ /** @var array the list of headers used to create unique link ids */
+ protected $headers = array();
- var $headers = array();
/** @var array a list of footnotes, list starts at 1! */
- var $footnotes = array();
- var $lastlevel = 0;
- var $node = array(0,0,0,0,0);
- var $store = '';
+ protected $footnotes = array();
+
+ /** @var int current section level */
+ protected $lastlevel = 0;
+ /** @var array section node tracker */
+ protected $node = array(0, 0, 0, 0, 0);
- var $_counter = array(); // used as global counter, introduced for table classes
- var $_codeblock = 0; // counts the code and file blocks, used to provide download links
+ /** @var string temporary $doc store */
+ protected $store = '';
+
+ /** @var array global counter, for table classes etc. */
+ protected $_counter = array(); //
+
+ /** @var int counts the code and file blocks, used to provide download links */
+ protected $_codeblock = 0;
+
+ /** @var array list of allowed URL schemes */
+ protected $schemes = null;
/**
* Register a new edit section range
@@ -53,43 +66,53 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
*/
public function startSectionEdit($start, $type, $title = null) {
$this->sectionedits[] = array(++$this->lastsecid, $start, $type, $title);
- return 'sectionedit' . $this->lastsecid;
+ return 'sectionedit'.$this->lastsecid;
}
/**
* Finish an edit section range
*
- * @param $end int The byte position for the edit end; null for the rest of
+ * @param $end int The byte position for the edit end; null for the rest of
* the page
* @author Adrian Lang <lang@cosmocode.de>
*/
public function finishSectionEdit($end = null) {
list($id, $start, $type, $title) = array_pop($this->sectionedits);
- if (!is_null($end) && $end <= $start) {
+ if(!is_null($end) && $end <= $start) {
return;
}
- $this->doc .= "<!-- EDIT$id " . strtoupper($type) . ' ';
- if (!is_null($title)) {
- $this->doc .= '"' . str_replace('"', '', $title) . '" ';
+ $this->doc .= "<!-- EDIT$id ".strtoupper($type).' ';
+ if(!is_null($title)) {
+ $this->doc .= '"'.str_replace('"', '', $title).'" ';
}
- $this->doc .= "[$start-" . (is_null($end) ? '' : $end) . '] -->';
+ $this->doc .= "[$start-".(is_null($end) ? '' : $end).'] -->';
}
- function getFormat(){
+ /**
+ * Returns the format produced by this renderer.
+ *
+ * @return string always 'xhtml'
+ */
+ function getFormat() {
return 'xhtml';
}
-
+ /**
+ * Initialize the document
+ */
function document_start() {
//reset some internals
$this->toc = array();
$this->headers = array();
}
+ /**
+ * Finalize the document
+ */
function document_end() {
// Finish open section edits.
- while (count($this->sectionedits) > 0) {
- if ($this->sectionedits[count($this->sectionedits) - 1][1] <= 1) {
+ while(count($this->sectionedits) > 0) {
+ if($this->sectionedits[count($this->sectionedits) - 1][1] <= 1) {
// If there is only one section, do not write a section edit
// marker.
array_pop($this->sectionedits);
@@ -98,12 +121,12 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
}
- if ( count ($this->footnotes) > 0 ) {
+ if(count($this->footnotes) > 0) {
$this->doc .= '<div class="footnotes">'.DOKU_LF;
- foreach ( $this->footnotes as $id => $footnote ) {
+ foreach($this->footnotes as $id => $footnote) {
// check its not a placeholder that indicates actual footnote text is elsewhere
- if (substr($footnote, 0, 5) != "@@FNT") {
+ if(substr($footnote, 0, 5) != "@@FNT") {
// open the footnote and set the anchor and backlink
$this->doc .= '<div class="fn">';
@@ -113,8 +136,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// get any other footnotes that use the same markup
$alt = array_keys($this->footnotes, "@@FNT$id");
- if (count($alt)) {
- foreach ($alt as $ref) {
+ if(count($alt)) {
+ foreach($alt as $ref) {
// set anchor and backlink for the other footnotes
$this->doc .= ', <sup><a href="#fnt__'.($ref).'" id="fn__'.($ref).'" class="fn_bot">';
$this->doc .= ($ref).')</a></sup> '.DOKU_LF;
@@ -123,7 +146,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// add footnote markup and close this footnote
$this->doc .= $footnote;
- $this->doc .= '</div>' . DOKU_LF;
+ $this->doc .= '</div>'.DOKU_LF;
}
}
$this->doc .= '</div>'.DOKU_LF;
@@ -131,139 +154,221 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// Prepare the TOC
global $conf;
- if($this->info['toc'] && is_array($this->toc) && $conf['tocminheads'] && count($this->toc) >= $conf['tocminheads']){
+ if($this->info['toc'] && is_array($this->toc) && $conf['tocminheads'] && count($this->toc) >= $conf['tocminheads']) {
global $TOC;
$TOC = $this->toc;
}
// make sure there are no empty paragraphs
- $this->doc = preg_replace('#<p>\s*</p>#','',$this->doc);
+ $this->doc = preg_replace('#<p>\s*</p>#', '', $this->doc);
}
+ /**
+ * Add an item to the TOC
+ *
+ * @param string $id the hash link
+ * @param string $text the text to display
+ * @param int $level the nesting level
+ */
function toc_additem($id, $text, $level) {
global $conf;
//handle TOC
- if($level >= $conf['toptoclevel'] && $level <= $conf['maxtoclevel']){
- $this->toc[] = html_mktocitem($id, $text, $level-$conf['toptoclevel']+1);
+ if($level >= $conf['toptoclevel'] && $level <= $conf['maxtoclevel']) {
+ $this->toc[] = html_mktocitem($id, $text, $level - $conf['toptoclevel'] + 1);
}
}
+ /**
+ * Render a heading
+ *
+ * @param string $text the text to display
+ * @param int $level header level
+ * @param int $pos byte position in the original source
+ */
function header($text, $level, $pos) {
global $conf;
if(!$text) return; //skip empty headlines
- $hid = $this->_headerToLink($text,true);
+ $hid = $this->_headerToLink($text, true);
//only add items within configured levels
$this->toc_additem($hid, $text, $level);
// adjust $node to reflect hierarchy of levels
- $this->node[$level-1]++;
- if ($level < $this->lastlevel) {
- for ($i = 0; $i < $this->lastlevel-$level; $i++) {
- $this->node[$this->lastlevel-$i-1] = 0;
+ $this->node[$level - 1]++;
+ if($level < $this->lastlevel) {
+ for($i = 0; $i < $this->lastlevel - $level; $i++) {
+ $this->node[$this->lastlevel - $i - 1] = 0;
}
}
$this->lastlevel = $level;
- if ($level <= $conf['maxseclevel'] &&
+ if($level <= $conf['maxseclevel'] &&
count($this->sectionedits) > 0 &&
- $this->sectionedits[count($this->sectionedits) - 1][2] === 'section') {
+ $this->sectionedits[count($this->sectionedits) - 1][2] === 'section'
+ ) {
$this->finishSectionEdit($pos - 1);
}
// write the header
$this->doc .= DOKU_LF.'<h'.$level;
- if ($level <= $conf['maxseclevel']) {
- $this->doc .= ' class="' . $this->startSectionEdit($pos, 'section', $text) . '"';
+ if($level <= $conf['maxseclevel']) {
+ $this->doc .= ' class="'.$this->startSectionEdit($pos, 'section', $text).'"';
}
$this->doc .= ' id="'.$hid.'">';
$this->doc .= $this->_xmlEntities($text);
$this->doc .= "</h$level>".DOKU_LF;
}
+ /**
+ * Open a new section
+ *
+ * @param int $level section level (as determined by the previous header)
+ */
function section_open($level) {
- $this->doc .= '<div class="level' . $level . '">' . DOKU_LF;
+ $this->doc .= '<div class="level'.$level.'">'.DOKU_LF;
}
+ /**
+ * Close the current section
+ */
function section_close() {
$this->doc .= DOKU_LF.'</div>'.DOKU_LF;
}
+ /**
+ * Render plain text data
+ *
+ * @param $text
+ */
function cdata($text) {
$this->doc .= $this->_xmlEntities($text);
}
+ /**
+ * Open a paragraph
+ */
function p_open() {
$this->doc .= DOKU_LF.'<p>'.DOKU_LF;
}
+ /**
+ * Close a paragraph
+ */
function p_close() {
$this->doc .= DOKU_LF.'</p>'.DOKU_LF;
}
+ /**
+ * Create a line break
+ */
function linebreak() {
$this->doc .= '<br/>'.DOKU_LF;
}
+ /**
+ * Create a horizontal line
+ */
function hr() {
$this->doc .= '<hr />'.DOKU_LF;
}
+ /**
+ * Start strong (bold) formatting
+ */
function strong_open() {
$this->doc .= '<strong>';
}
+ /**
+ * Stop strong (bold) formatting
+ */
function strong_close() {
$this->doc .= '</strong>';
}
+ /**
+ * Start emphasis (italics) formatting
+ */
function emphasis_open() {
$this->doc .= '<em>';
}
+ /**
+ * Stop emphasis (italics) formatting
+ */
function emphasis_close() {
$this->doc .= '</em>';
}
+ /**
+ * Start underline formatting
+ */
function underline_open() {
$this->doc .= '<em class="u">';
}
+ /**
+ * Stop underline formatting
+ */
function underline_close() {
$this->doc .= '</em>';
}
+ /**
+ * Start monospace formatting
+ */
function monospace_open() {
$this->doc .= '<code>';
}
+ /**
+ * Stop monospace formatting
+ */
function monospace_close() {
$this->doc .= '</code>';
}
+ /**
+ * Start a subscript
+ */
function subscript_open() {
$this->doc .= '<sub>';
}
+ /**
+ * Stop a subscript
+ */
function subscript_close() {
$this->doc .= '</sub>';
}
+ /**
+ * Start a superscript
+ */
function superscript_open() {
$this->doc .= '<sup>';
}
+ /**
+ * Stop a superscript
+ */
function superscript_close() {
$this->doc .= '</sup>';
}
+ /**
+ * Start deleted (strike-through) formatting
+ */
function deleted_open() {
$this->doc .= '<del>';
}
+ /**
+ * Stop deleted (strike-through) formatting
+ */
function deleted_close() {
$this->doc .= '</del>';
}
@@ -299,14 +404,14 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$fnid++;
// recover footnote into the stack and restore old content
- $footnote = $this->doc;
- $this->doc = $this->store;
+ $footnote = $this->doc;
+ $this->doc = $this->store;
$this->store = '';
// check to see if this footnote has been seen before
$i = array_search($footnote, $this->footnotes);
- if ($i === false) {
+ if($i === false) {
// its a new footnote, add it to the $footnotes array
$this->footnotes[$fnid] = $footnote;
} else {
@@ -318,38 +423,71 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$this->doc .= '<sup><a href="#fn__'.$fnid.'" id="fnt__'.$fnid.'" class="fn_top">'.$fnid.')</a></sup>';
}
+ /**
+ * Open an unordered list
+ */
function listu_open() {
$this->doc .= '<ul>'.DOKU_LF;
}
+ /**
+ * Close an unordered list
+ */
function listu_close() {
$this->doc .= '</ul>'.DOKU_LF;
}
+ /**
+ * Open an ordered list
+ */
function listo_open() {
$this->doc .= '<ol>'.DOKU_LF;
}
+ /**
+ * Close an ordered list
+ */
function listo_close() {
$this->doc .= '</ol>'.DOKU_LF;
}
+ /**
+ * Open a list item
+ *
+ * @param int $level the nesting level
+ */
function listitem_open($level) {
$this->doc .= '<li class="level'.$level.'">';
}
+ /**
+ * Close a list item
+ */
function listitem_close() {
$this->doc .= '</li>'.DOKU_LF;
}
+ /**
+ * Start the content of a list item
+ */
function listcontent_open() {
$this->doc .= '<div class="li">';
}
+ /**
+ * Stop the content of a list item
+ */
function listcontent_close() {
$this->doc .= '</div>'.DOKU_LF;
}
+ /**
+ * Output unformatted $text
+ *
+ * Defaults to $this->cdata()
+ *
+ * @param string $text
+ */
function unformatted($text) {
$this->doc .= $this->_xmlEntities($text);
}
@@ -357,15 +495,15 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
/**
* Execute PHP code if allowed
*
- * @param string $text PHP code that is either executed or printed
- * @param string $wrapper html element to wrap result if $conf['phpok'] is okff
+ * @param string $text PHP code that is either executed or printed
+ * @param string $wrapper html element to wrap result if $conf['phpok'] is okff
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
- function php($text, $wrapper='code') {
+ function php($text, $wrapper = 'code') {
global $conf;
- if($conf['phpok']){
+ if($conf['phpok']) {
ob_start();
eval($text);
$this->doc .= ob_get_contents();
@@ -375,6 +513,14 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
}
+ /**
+ * Output block level PHP code
+ *
+ * If $conf['phpok'] is true this should evaluate the given code and append the result
+ * to $doc
+ *
+ * @param string $text The PHP code
+ */
function phpblock($text) {
$this->php($text, 'pre');
}
@@ -382,75 +528,110 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
/**
* Insert HTML if allowed
*
- * @param string $text html text
- * @param string $wrapper html element to wrap result if $conf['htmlok'] is okff
+ * @param string $text html text
+ * @param string $wrapper html element to wrap result if $conf['htmlok'] is okff
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
- function html($text, $wrapper='code') {
+ function html($text, $wrapper = 'code') {
global $conf;
- if($conf['htmlok']){
+ if($conf['htmlok']) {
$this->doc .= $text;
} else {
$this->doc .= p_xhtml_cached_geshi($text, 'html4strict', $wrapper);
}
}
+ /**
+ * Output raw block-level HTML
+ *
+ * If $conf['htmlok'] is true this should add the code as is to $doc
+ *
+ * @param string $text The HTML
+ */
function htmlblock($text) {
$this->html($text, 'pre');
}
+ /**
+ * Start a block quote
+ */
function quote_open() {
$this->doc .= '<blockquote><div class="no">'.DOKU_LF;
}
+ /**
+ * Stop a block quote
+ */
function quote_close() {
$this->doc .= '</div></blockquote>'.DOKU_LF;
}
+ /**
+ * Output preformatted text
+ *
+ * @param string $text
+ */
function preformatted($text) {
- $this->doc .= '<pre class="code">' . trim($this->_xmlEntities($text),"\n\r") . '</pre>'. DOKU_LF;
+ $this->doc .= '<pre class="code">'.trim($this->_xmlEntities($text), "\n\r").'</pre>'.DOKU_LF;
}
- function file($text, $language=null, $filename=null) {
- $this->_highlight('file',$text,$language,$filename);
+ /**
+ * Display text as file content, optionally syntax highlighted
+ *
+ * @param string $text text to show
+ * @param string $language programming language to use for syntax highlighting
+ * @param string $filename file path label
+ */
+ function file($text, $language = null, $filename = null) {
+ $this->_highlight('file', $text, $language, $filename);
}
- function code($text, $language=null, $filename=null) {
- $this->_highlight('code',$text,$language,$filename);
+ /**
+ * Display text as code content, optionally syntax highlighted
+ *
+ * @param string $text text to show
+ * @param string $language programming language to use for syntax highlighting
+ * @param string $filename file path label
+ */
+ function code($text, $language = null, $filename = null) {
+ $this->_highlight('code', $text, $language, $filename);
}
/**
* Use GeSHi to highlight language syntax in code and file blocks
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @param string $type code|file
+ * @param string $text text to show
+ * @param string $language programming language to use for syntax highlighting
+ * @param string $filename file path label
*/
- function _highlight($type, $text, $language=null, $filename=null) {
- global $conf;
+ function _highlight($type, $text, $language = null, $filename = null) {
global $ID;
global $lang;
- if($filename){
+ if($filename) {
// add icon
- list($ext) = mimetype($filename,false);
- $class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext);
+ list($ext) = mimetype($filename, false);
+ $class = preg_replace('/[^_\-a-z0-9]+/i', '_', $ext);
$class = 'mediafile mf_'.$class;
$this->doc .= '<dl class="'.$type.'">'.DOKU_LF;
- $this->doc .= '<dt><a href="'.exportlink($ID,'code',array('codeblock'=>$this->_codeblock)).'" title="'.$lang['download'].'" class="'.$class.'">';
+ $this->doc .= '<dt><a href="'.exportlink($ID, 'code', array('codeblock' => $this->_codeblock)).'" title="'.$lang['download'].'" class="'.$class.'">';
$this->doc .= hsc($filename);
$this->doc .= '</a></dt>'.DOKU_LF.'<dd>';
}
- if ($text{0} == "\n") {
+ if($text{0} == "\n") {
$text = substr($text, 1);
}
- if (substr($text, -1) == "\n") {
+ if(substr($text, -1) == "\n") {
$text = substr($text, 0, -1);
}
- if ( is_null($language) ) {
+ if(is_null($language)) {
$this->doc .= '<pre class="'.$type.'">'.$this->_xmlEntities($text).'</pre>'.DOKU_LF;
} else {
$class = 'code'; //we always need the code class to make the syntax highlighting apply
@@ -459,16 +640,23 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$this->doc .= "<pre class=\"$class $language\">".p_xhtml_cached_geshi($text, $language, '').'</pre>'.DOKU_LF;
}
- if($filename){
+ if($filename) {
$this->doc .= '</dd></dl>'.DOKU_LF;
}
$this->_codeblock++;
}
+ /**
+ * Format an acronym
+ *
+ * Uses $this->acronyms
+ *
+ * @param string $acronym
+ */
function acronym($acronym) {
- if ( array_key_exists($acronym, $this->acronyms) ) {
+ if(array_key_exists($acronym, $this->acronyms)) {
$title = $this->_xmlEntities($this->acronyms[$acronym]);
@@ -480,73 +668,109 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
}
+ /**
+ * Format a smiley
+ *
+ * Uses $this->smiley
+ *
+ * @param string $smiley
+ */
function smiley($smiley) {
- if ( array_key_exists($smiley, $this->smileys) ) {
- $title = $this->_xmlEntities($this->smileys[$smiley]);
+ if(array_key_exists($smiley, $this->smileys)) {
$this->doc .= '<img src="'.DOKU_BASE.'lib/images/smileys/'.$this->smileys[$smiley].
'" class="icon" alt="'.
- $this->_xmlEntities($smiley).'" />';
+ $this->_xmlEntities($smiley).'" />';
} else {
$this->doc .= $this->_xmlEntities($smiley);
}
}
- /*
- * not used
- function wordblock($word) {
- if ( array_key_exists($word, $this->badwords) ) {
- $this->doc .= '** BLEEP **';
- } else {
- $this->doc .= $this->_xmlEntities($word);
- }
- }
- */
-
+ /**
+ * Format an entity
+ *
+ * Entities are basically small text replacements
+ *
+ * Uses $this->entities
+ *
+ * @param string $entity
+ */
function entity($entity) {
- if ( array_key_exists($entity, $this->entities) ) {
+ if(array_key_exists($entity, $this->entities)) {
$this->doc .= $this->entities[$entity];
} else {
$this->doc .= $this->_xmlEntities($entity);
}
}
+ /**
+ * Typographically format a multiply sign
+ *
+ * Example: ($x=640, $y=480) should result in "640×480"
+ *
+ * @param string|int $x first value
+ * @param string|int $y second value
+ */
function multiplyentity($x, $y) {
$this->doc .= "$x&times;$y";
}
+ /**
+ * Render an opening single quote char (language specific)
+ */
function singlequoteopening() {
global $lang;
$this->doc .= $lang['singlequoteopening'];
}
+ /**
+ * Render a closing single quote char (language specific)
+ */
function singlequoteclosing() {
global $lang;
$this->doc .= $lang['singlequoteclosing'];
}
+ /**
+ * Render an apostrophe char (language specific)
+ */
function apostrophe() {
global $lang;
$this->doc .= $lang['apostrophe'];
}
+ /**
+ * Render an opening double quote char (language specific)
+ */
function doublequoteopening() {
global $lang;
$this->doc .= $lang['doublequoteopening'];
}
+ /**
+ * Render an closinging double quote char (language specific)
+ */
function doublequoteclosing() {
global $lang;
$this->doc .= $lang['doublequoteclosing'];
}
/**
+ * Render a CamelCase link
+ *
+ * @param string $link The link name
+ * @see http://en.wikipedia.org/wiki/CamelCase
*/
function camelcaselink($link) {
- $this->internallink($link,$link);
+ $this->internallink($link, $link);
}
-
- function locallink($hash, $name = null){
+ /**
+ * Render a page local link
+ *
+ * @param string $hash hash link identifier
+ * @param string $name name for the link
+ */
+ function locallink($hash, $name = null) {
global $ID;
$name = $this->_getLinkTitle($name, $hash, $isImage);
$hash = $this->_headerToLink($hash);
@@ -563,16 +787,22 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* elsewhere - no need to implement them in other renderers
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @param string $id pageid
+ * @param string|null $name link name
+ * @param string|null $search adds search url param
+ * @param bool $returnonly whether to return html or write to doc attribute
+ * @param string $linktype type to set use of headings
+ * @return void|string writes to doc attribute or returns html depends on $returnonly
*/
- function internallink($id, $name = null, $search=null,$returnonly=false,$linktype='content') {
+ function internallink($id, $name = null, $search = null, $returnonly = false, $linktype = 'content') {
global $conf;
global $ID;
global $INFO;
$params = '';
- $parts = explode('?', $id, 2);
- if (count($parts) === 2) {
- $id = $parts[0];
+ $parts = explode('?', $id, 2);
+ if(count($parts) === 2) {
+ $id = $parts[0];
$params = $parts[1];
}
@@ -580,7 +810,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// We need this check because _simpleTitle needs
// correct $id and resolve_pageid() use cleanID($id)
// (some things could be lost)
- if ($id === '') {
+ if($id === '') {
$id = $ID;
}
@@ -588,22 +818,22 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$default = $this->_simpleTitle($id);
// now first resolve and clean up the $id
- resolve_pageid(getNS($ID),$id,$exists);
+ resolve_pageid(getNS($ID), $id, $exists);
$name = $this->_getLinkTitle($name, $default, $isImage, $id, $linktype);
- if ( !$isImage ) {
- if ( $exists ) {
- $class='wikilink1';
+ if(!$isImage) {
+ if($exists) {
+ $class = 'wikilink1';
} else {
- $class='wikilink2';
- $link['rel']='nofollow';
+ $class = 'wikilink2';
+ $link['rel'] = 'nofollow';
}
} else {
- $class='media';
+ $class = 'media';
}
//keep hash anchor
- list($id,$hash) = explode('#',$id,2);
+ @list($id, $hash) = explode('#', $id, 2);
if(!empty($hash)) $hash = $this->_headerToLink($hash);
//prepare for formating
@@ -612,37 +842,43 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$link['pre'] = '';
$link['suf'] = '';
// highlight link to current page
- if ($id == $INFO['id']) {
- $link['pre'] = '<span class="curid">';
- $link['suf'] = '</span>';
+ if($id == $INFO['id']) {
+ $link['pre'] = '<span class="curid">';
+ $link['suf'] = '</span>';
}
- $link['more'] = '';
- $link['class'] = $class;
- $link['url'] = wl($id, $params);
- $link['name'] = $name;
- $link['title'] = $id;
+ $link['more'] = '';
+ $link['class'] = $class;
+ $link['url'] = wl($id, $params);
+ $link['name'] = $name;
+ $link['title'] = $id;
//add search string
- if($search){
- ($conf['userewrite']) ? $link['url'].='?' : $link['url'].='&amp;';
- if(is_array($search)){
- $search = array_map('rawurlencode',$search);
- $link['url'] .= 's[]='.join('&amp;s[]=',$search);
- }else{
+ if($search) {
+ ($conf['userewrite']) ? $link['url'] .= '?' : $link['url'] .= '&amp;';
+ if(is_array($search)) {
+ $search = array_map('rawurlencode', $search);
+ $link['url'] .= 's[]='.join('&amp;s[]=', $search);
+ } else {
$link['url'] .= 's='.rawurlencode($search);
}
}
//keep hash
- if($hash) $link['url'].='#'.$hash;
+ if($hash) $link['url'] .= '#'.$hash;
//output formatted
- if($returnonly){
+ if($returnonly) {
return $this->_formatLink($link);
- }else{
+ } else {
$this->doc .= $this->_formatLink($link);
}
}
+ /**
+ * Render an external link
+ *
+ * @param string $url full URL with scheme
+ * @param string|array $name name for the link, array for media file
+ */
function externallink($url, $name = null) {
global $conf;
@@ -650,21 +886,21 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// url might be an attack vector, only allow registered protocols
if(is_null($this->schemes)) $this->schemes = getSchemes();
- list($scheme) = explode('://',$url);
+ list($scheme) = explode('://', $url);
$scheme = strtolower($scheme);
- if(!in_array($scheme,$this->schemes)) $url = '';
+ if(!in_array($scheme, $this->schemes)) $url = '';
// is there still an URL?
- if(!$url){
+ if(!$url) {
$this->doc .= $name;
return;
}
// set class
- if ( !$isImage ) {
- $class='urlextern';
+ if(!$isImage) {
+ $class = 'urlextern';
} else {
- $class='media';
+ $class = 'media';
}
//prepare for formating
@@ -676,8 +912,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$link['class'] = $class;
$link['url'] = $url;
- $link['name'] = $name;
- $link['title'] = $this->_xmlEntities($url);
+ $link['name'] = $name;
+ $link['title'] = $this->_xmlEntities($url);
if($conf['relnofollow']) $link['more'] .= ' rel="nofollow"';
//output formatted
@@ -685,11 +921,19 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
/**
- */
+ * Render an interwiki link
+ *
+ * You may want to use $this->_resolveInterWiki() here
+ *
+ * @param string $match original link - probably not much use
+ * @param string|array $name name for the link, array for media file
+ * @param string $wikiName indentifier (shortcut) for the remote wiki
+ * @param string $wikiUri the fragment parsed from the original link
+ */
function interwikilink($match, $name = null, $wikiName, $wikiUri) {
global $conf;
- $link = array();
+ $link = array();
$link['target'] = $conf['target']['interwiki'];
$link['pre'] = '';
$link['suf'] = '';
@@ -697,21 +941,30 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$link['name'] = $this->_getLinkTitle($name, $wikiUri, $isImage);
//get interwiki URL
- $url = $this->_resolveInterWiki($wikiName,$wikiUri);
+ $exists = null;
+ $url = $this->_resolveInterWiki($wikiName, $wikiUri, $exists);
- if ( !$isImage ) {
- $class = preg_replace('/[^_\-a-z0-9]+/i','_',$wikiName);
+ if(!$isImage) {
+ $class = preg_replace('/[^_\-a-z0-9]+/i', '_', $wikiName);
$link['class'] = "interwiki iw_$class";
} else {
$link['class'] = 'media';
}
//do we stay at the same server? Use local target
- if( strpos($url,DOKU_URL) === 0 ){
+ if(strpos($url, DOKU_URL) === 0 OR strpos($url, DOKU_BASE) === 0) {
$link['target'] = $conf['target']['wiki'];
}
+ if($exists !== null && !$isImage) {
+ if($exists) {
+ $link['class'] .= ' wikilink1';
+ } else {
+ $link['class'] .= ' wikilink2';
+ $link['rel'] = 'nofollow';
+ }
+ }
- $link['url'] = $url;
+ $link['url'] = $url;
$link['title'] = htmlspecialchars($link['url']);
//output formatted
@@ -719,54 +972,66 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
/**
+ * Link to windows share
+ *
+ * @param string $url the link
+ * @param string|array $name name for the link, array for media file
*/
function windowssharelink($url, $name = null) {
global $conf;
- global $lang;
+
//simple setup
$link['target'] = $conf['target']['windows'];
$link['pre'] = '';
- $link['suf'] = '';
+ $link['suf'] = '';
$link['style'] = '';
$link['name'] = $this->_getLinkTitle($name, $url, $isImage);
- if ( !$isImage ) {
+ if(!$isImage) {
$link['class'] = 'windows';
} else {
$link['class'] = 'media';
}
$link['title'] = $this->_xmlEntities($url);
- $url = str_replace('\\','/',$url);
- $url = 'file:///'.$url;
- $link['url'] = $url;
+ $url = str_replace('\\', '/', $url);
+ $url = 'file:///'.$url;
+ $link['url'] = $url;
//output formatted
$this->doc .= $this->_formatLink($link);
}
+ /**
+ * Render a linked E-Mail Address
+ *
+ * Honors $conf['mailguard'] setting
+ *
+ * @param string $address Email-Address
+ * @param string|array $name name for the link, array for media file
+ */
function emaillink($address, $name = null) {
global $conf;
//simple setup
- $link = array();
+ $link = array();
$link['target'] = '';
$link['pre'] = '';
- $link['suf'] = '';
+ $link['suf'] = '';
$link['style'] = '';
$link['more'] = '';
$name = $this->_getLinkTitle($name, '', $isImage);
- if ( !$isImage ) {
- $link['class']='mail';
+ if(!$isImage) {
+ $link['class'] = 'mail';
} else {
- $link['class']='media';
+ $link['class'] = 'media';
}
$address = $this->_xmlEntities($address);
$address = obfuscate($address);
$title = $address;
- if(empty($name)){
+ if(empty($name)) {
$name = $address;
}
@@ -780,73 +1045,97 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$this->doc .= $this->_formatLink($link);
}
- function internalmedia ($src, $title=null, $align=null, $width=null,
- $height=null, $cache=null, $linking=null, $return=NULL) {
+ /**
+ * Render an internal media file
+ *
+ * @param string $src media ID
+ * @param string $title descriptive text
+ * @param string $align left|center|right
+ * @param int $width width of media in pixel
+ * @param int $height height of media in pixel
+ * @param string $cache cache|recache|nocache
+ * @param string $linking linkonly|detail|nolink
+ * @param bool $return return HTML instead of adding to $doc
+ * @return void|string
+ */
+ function internalmedia($src, $title = null, $align = null, $width = null,
+ $height = null, $cache = null, $linking = null, $return = false) {
global $ID;
- list($src,$hash) = explode('#',$src,2);
- resolve_mediaid(getNS($ID),$src, $exists);
+ list($src, $hash) = explode('#', $src, 2);
+ resolve_mediaid(getNS($ID), $src, $exists);
$noLink = false;
$render = ($linking == 'linkonly') ? false : true;
- $link = $this->_getMediaLinkConf($src, $title, $align, $width, $height, $cache, $render);
+ $link = $this->_getMediaLinkConf($src, $title, $align, $width, $height, $cache, $render);
- list($ext,$mime,$dl) = mimetype($src,false);
- if(substr($mime,0,5) == 'image' && $render){
- $link['url'] = ml($src,array('id'=>$ID,'cache'=>$cache),($linking=='direct'));
- }elseif(($mime == 'application/x-shockwave-flash' || media_supportedav($mime)) && $render){
+ list($ext, $mime) = mimetype($src, false);
+ if(substr($mime, 0, 5) == 'image' && $render) {
+ $link['url'] = ml($src, array('id' => $ID, 'cache' => $cache), ($linking == 'direct'));
+ } elseif(($mime == 'application/x-shockwave-flash' || media_supportedav($mime)) && $render) {
// don't link movies
$noLink = true;
- }else{
+ } else {
// add file icons
- $class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext);
+ $class = preg_replace('/[^_\-a-z0-9]+/i', '_', $ext);
$link['class'] .= ' mediafile mf_'.$class;
- $link['url'] = ml($src,array('id'=>$ID,'cache'=>$cache),true);
- if ($exists) $link['title'] .= ' (' . filesize_h(filesize(mediaFN($src))).')';
+ $link['url'] = ml($src, array('id' => $ID, 'cache' => $cache), true);
+ if($exists) $link['title'] .= ' ('.filesize_h(filesize(mediaFN($src))).')';
}
if($hash) $link['url'] .= '#'.$hash;
//markup non existing files
- if (!$exists) {
+ if(!$exists) {
$link['class'] .= ' wikilink2';
}
//output formatted
- if ($return) {
- if ($linking == 'nolink' || $noLink) return $link['name'];
+ if($return) {
+ if($linking == 'nolink' || $noLink) return $link['name'];
else return $this->_formatLink($link);
} else {
- if ($linking == 'nolink' || $noLink) $this->doc .= $link['name'];
+ if($linking == 'nolink' || $noLink) $this->doc .= $link['name'];
else $this->doc .= $this->_formatLink($link);
}
}
- function externalmedia ($src, $title=null, $align=null, $width=null,
- $height=null, $cache=null, $linking=null) {
- list($src,$hash) = explode('#',$src,2);
+ /**
+ * Render an external media file
+ *
+ * @param string $src full media URL
+ * @param string $title descriptive text
+ * @param string $align left|center|right
+ * @param int $width width of media in pixel
+ * @param int $height height of media in pixel
+ * @param string $cache cache|recache|nocache
+ * @param string $linking linkonly|detail|nolink
+ */
+ function externalmedia($src, $title = null, $align = null, $width = null,
+ $height = null, $cache = null, $linking = null) {
+ list($src, $hash) = explode('#', $src, 2);
$noLink = false;
$render = ($linking == 'linkonly') ? false : true;
- $link = $this->_getMediaLinkConf($src, $title, $align, $width, $height, $cache, $render);
+ $link = $this->_getMediaLinkConf($src, $title, $align, $width, $height, $cache, $render);
- $link['url'] = ml($src,array('cache'=>$cache));
+ $link['url'] = ml($src, array('cache' => $cache));
- list($ext,$mime,$dl) = mimetype($src,false);
- if(substr($mime,0,5) == 'image' && $render){
+ list($ext, $mime) = mimetype($src, false);
+ if(substr($mime, 0, 5) == 'image' && $render) {
// link only jpeg images
// if ($ext != 'jpg' && $ext != 'jpeg') $noLink = true;
- }elseif(($mime == 'application/x-shockwave-flash' || media_supportedav($mime)) && $render){
+ } elseif(($mime == 'application/x-shockwave-flash' || media_supportedav($mime)) && $render) {
// don't link movies
$noLink = true;
- }else{
+ } else {
// add file icons
- $class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext);
+ $class = preg_replace('/[^_\-a-z0-9]+/i', '_', $ext);
$link['class'] .= ' mediafile mf_'.$class;
}
if($hash) $link['url'] .= '#'.$hash;
//output formatted
- if ($linking == 'nolink' || $noLink) $this->doc .= $link['name'];
+ if($linking == 'nolink' || $noLink) $this->doc .= $link['name'];
else $this->doc .= $this->_formatLink($link);
}
@@ -855,7 +1144,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
- function rss ($url,$params){
+ function rss($url, $params) {
global $lang;
global $conf;
@@ -864,17 +1153,21 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$feed->set_feed_url($url);
//disable warning while fetching
- if (!defined('DOKU_E_LEVEL')) { $elvl = error_reporting(E_ERROR); }
+ if(!defined('DOKU_E_LEVEL')) {
+ $elvl = error_reporting(E_ERROR);
+ }
$rc = $feed->init();
- if (!defined('DOKU_E_LEVEL')) { error_reporting($elvl); }
+ if(isset($elvl)) {
+ error_reporting($elvl);
+ }
//decide on start and end
- if($params['reverse']){
- $mod = -1;
- $start = $feed->get_item_quantity()-1;
+ if($params['reverse']) {
+ $mod = -1;
+ $start = $feed->get_item_quantity() - 1;
$end = $start - ($params['max']);
$end = ($end < -1) ? -1 : $end;
- }else{
+ } else {
$mod = 1;
$start = 0;
$end = $feed->get_item_quantity();
@@ -882,36 +1175,38 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
$this->doc .= '<ul class="rss">';
- if($rc){
- for ($x = $start; $x != $end; $x += $mod) {
+ if($rc) {
+ for($x = $start; $x != $end; $x += $mod) {
$item = $feed->get_item($x);
$this->doc .= '<li><div class="li">';
// support feeds without links
$lnkurl = $item->get_permalink();
- if($lnkurl){
+ if($lnkurl) {
// title is escaped by SimplePie, we unescape here because it
// is escaped again in externallink() FS#1705
- $this->externallink($item->get_permalink(),
- html_entity_decode($item->get_title(), ENT_QUOTES, 'UTF-8'));
- }else{
+ $this->externallink(
+ $item->get_permalink(),
+ html_entity_decode($item->get_title(), ENT_QUOTES, 'UTF-8')
+ );
+ } else {
$this->doc .= ' '.$item->get_title();
}
- if($params['author']){
+ if($params['author']) {
$author = $item->get_author(0);
- if($author){
+ if($author) {
$name = $author->get_name();
if(!$name) $name = $author->get_email();
if($name) $this->doc .= ' '.$lang['by'].' '.$name;
}
}
- if($params['date']){
+ if($params['date']) {
$this->doc .= ' ('.$item->get_local_date($conf['dformat']).')';
}
- if($params['details']){
+ if($params['details']) {
$this->doc .= '<div class="detail">';
- if($conf['htmlok']){
+ if($conf['htmlok']) {
$this->doc .= $item->get_description();
- }else{
+ } else {
$this->doc .= strip_tags($item->get_description());
}
$this->doc .= '</div>';
@@ -919,11 +1214,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$this->doc .= '</div></li>';
}
- }else{
+ } else {
$this->doc .= '<li><div class="li">';
$this->doc .= '<em>'.$lang['rssfailed'].'</em>';
$this->externallink($url);
- if($conf['allowdebug']){
+ if($conf['allowdebug']) {
$this->doc .= '<!--'.hsc($feed->error).'-->';
}
$this->doc .= '</div></li>';
@@ -931,81 +1226,130 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$this->doc .= '</ul>';
}
- // $numrows not yet implemented
- function table_open($maxcols = null, $numrows = null, $pos = null){
- global $lang;
+ /**
+ * Start a table
+ *
+ * @param int $maxcols maximum number of columns
+ * @param int $numrows NOT IMPLEMENTED
+ * @param int $pos byte position in the original source
+ */
+ function table_open($maxcols = null, $numrows = null, $pos = null) {
// initialize the row counter used for classes
$this->_counter['row_counter'] = 0;
- $class = 'table';
- if ($pos !== null) {
- $class .= ' ' . $this->startSectionEdit($pos, 'table');
+ $class = 'table';
+ if($pos !== null) {
+ $class .= ' '.$this->startSectionEdit($pos, 'table');
}
- $this->doc .= '<div class="' . $class . '"><table class="inline">' .
- DOKU_LF;
+ $this->doc .= '<div class="'.$class.'"><table class="inline">'.
+ DOKU_LF;
}
- function table_close($pos = null){
+ /**
+ * Close a table
+ *
+ * @param int $pos byte position in the original source
+ */
+ function table_close($pos = null) {
$this->doc .= '</table></div>'.DOKU_LF;
- if ($pos !== null) {
+ if($pos !== null) {
$this->finishSectionEdit($pos);
}
}
- function tablerow_open(){
+ /**
+ * Open a table header
+ */
+ function tablethead_open() {
+ $this->doc .= DOKU_TAB.'<thead>'.DOKU_LF;
+ }
+
+ /**
+ * Close a table header
+ */
+ function tablethead_close() {
+ $this->doc .= DOKU_TAB.'</thead>'.DOKU_LF;
+ }
+
+ /**
+ * Open a table row
+ */
+ function tablerow_open() {
// initialize the cell counter used for classes
$this->_counter['cell_counter'] = 0;
- $class = 'row' . $this->_counter['row_counter']++;
- $this->doc .= DOKU_TAB . '<tr class="'.$class.'">' . DOKU_LF . DOKU_TAB . DOKU_TAB;
+ $class = 'row'.$this->_counter['row_counter']++;
+ $this->doc .= DOKU_TAB.'<tr class="'.$class.'">'.DOKU_LF.DOKU_TAB.DOKU_TAB;
}
- function tablerow_close(){
- $this->doc .= DOKU_LF . DOKU_TAB . '</tr>' . DOKU_LF;
+ /**
+ * Close a table row
+ */
+ function tablerow_close() {
+ $this->doc .= DOKU_LF.DOKU_TAB.'</tr>'.DOKU_LF;
}
- function tableheader_open($colspan = 1, $align = null, $rowspan = 1){
- $class = 'class="col' . $this->_counter['cell_counter']++;
- if ( !is_null($align) ) {
+ /**
+ * Open a table header cell
+ *
+ * @param int $colspan
+ * @param string $align left|center|right
+ * @param int $rowspan
+ */
+ function tableheader_open($colspan = 1, $align = null, $rowspan = 1) {
+ $class = 'class="col'.$this->_counter['cell_counter']++;
+ if(!is_null($align)) {
$class .= ' '.$align.'align';
}
$class .= '"';
- $this->doc .= '<th ' . $class;
- if ( $colspan > 1 ) {
- $this->_counter['cell_counter'] += $colspan-1;
+ $this->doc .= '<th '.$class;
+ if($colspan > 1) {
+ $this->_counter['cell_counter'] += $colspan - 1;
$this->doc .= ' colspan="'.$colspan.'"';
}
- if ( $rowspan > 1 ) {
+ if($rowspan > 1) {
$this->doc .= ' rowspan="'.$rowspan.'"';
}
$this->doc .= '>';
}
- function tableheader_close(){
+ /**
+ * Close a table header cell
+ */
+ function tableheader_close() {
$this->doc .= '</th>';
}
- function tablecell_open($colspan = 1, $align = null, $rowspan = 1){
- $class = 'class="col' . $this->_counter['cell_counter']++;
- if ( !is_null($align) ) {
+ /**
+ * Open a table cell
+ *
+ * @param int $colspan
+ * @param string $align left|center|right
+ * @param int $rowspan
+ */
+ function tablecell_open($colspan = 1, $align = null, $rowspan = 1) {
+ $class = 'class="col'.$this->_counter['cell_counter']++;
+ if(!is_null($align)) {
$class .= ' '.$align.'align';
}
$class .= '"';
$this->doc .= '<td '.$class;
- if ( $colspan > 1 ) {
- $this->_counter['cell_counter'] += $colspan-1;
+ if($colspan > 1) {
+ $this->_counter['cell_counter'] += $colspan - 1;
$this->doc .= ' colspan="'.$colspan.'"';
}
- if ( $rowspan > 1 ) {
+ if($rowspan > 1) {
$this->doc .= ' rowspan="'.$rowspan.'"';
}
$this->doc .= '>';
}
- function tablecell_close(){
+ /**
+ * Close a table cell
+ */
+ function tablecell_close() {
$this->doc .= '</td>';
}
- //----------------------------------------------------------
- // Utils
+ #region Utility functions
/**
* Build a link
@@ -1014,29 +1358,29 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
- function _formatLink($link){
+ function _formatLink($link) {
//make sure the url is XHTML compliant (skip mailto)
- if(substr($link['url'],0,7) != 'mailto:'){
- $link['url'] = str_replace('&','&amp;',$link['url']);
- $link['url'] = str_replace('&amp;amp;','&amp;',$link['url']);
+ if(substr($link['url'], 0, 7) != 'mailto:') {
+ $link['url'] = str_replace('&', '&amp;', $link['url']);
+ $link['url'] = str_replace('&amp;amp;', '&amp;', $link['url']);
}
//remove double encodings in titles
- $link['title'] = str_replace('&amp;amp;','&amp;',$link['title']);
+ $link['title'] = str_replace('&amp;amp;', '&amp;', $link['title']);
// be sure there are no bad chars in url or title
// (we can't do this for name because it can contain an img tag)
- $link['url'] = strtr($link['url'],array('>'=>'%3E','<'=>'%3C','"'=>'%22'));
- $link['title'] = strtr($link['title'],array('>'=>'&gt;','<'=>'&lt;','"'=>'&quot;'));
+ $link['url'] = strtr($link['url'], array('>' => '%3E', '<' => '%3C', '"' => '%22'));
+ $link['title'] = strtr($link['title'], array('>' => '&gt;', '<' => '&lt;', '"' => '&quot;'));
- $ret = '';
+ $ret = '';
$ret .= $link['pre'];
$ret .= '<a href="'.$link['url'].'"';
- if(!empty($link['class'])) $ret .= ' class="'.$link['class'].'"';
+ if(!empty($link['class'])) $ret .= ' class="'.$link['class'].'"';
if(!empty($link['target'])) $ret .= ' target="'.$link['target'].'"';
- if(!empty($link['title'])) $ret .= ' title="'.$link['title'].'"';
- if(!empty($link['style'])) $ret .= ' style="'.$link['style'].'"';
- if(!empty($link['rel'])) $ret .= ' rel="'.$link['rel'].'"';
- if(!empty($link['more'])) $ret .= ' '.$link['more'];
+ if(!empty($link['title'])) $ret .= ' title="'.$link['title'].'"';
+ if(!empty($link['style'])) $ret .= ' style="'.$link['style'].'"';
+ if(!empty($link['rel'])) $ret .= ' rel="'.$link['rel'].'"';
+ if(!empty($link['more'])) $ret .= ' '.$link['more'];
$ret .= '>';
$ret .= $link['name'];
$ret .= '</a>';
@@ -1048,120 +1392,112 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* Renders internal and external media
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @param string $src media ID
+ * @param string $title descriptive text
+ * @param string $align left|center|right
+ * @param int $width width of media in pixel
+ * @param int $height height of media in pixel
+ * @param string $cache cache|recache|nocache
+ * @param bool $render should the media be embedded inline or just linked
+ * @return string
*/
- function _media ($src, $title=null, $align=null, $width=null,
- $height=null, $cache=null, $render = true) {
+ function _media($src, $title = null, $align = null, $width = null,
+ $height = null, $cache = null, $render = true) {
$ret = '';
- list($ext,$mime,$dl) = mimetype($src);
- if(substr($mime,0,5) == 'image'){
+ list($ext, $mime) = mimetype($src);
+ if(substr($mime, 0, 5) == 'image') {
// first get the $title
- if (!is_null($title)) {
- $title = $this->_xmlEntities($title);
- }elseif($ext == 'jpg' || $ext == 'jpeg'){
+ if(!is_null($title)) {
+ $title = $this->_xmlEntities($title);
+ } elseif($ext == 'jpg' || $ext == 'jpeg') {
//try to use the caption from IPTC/EXIF
require_once(DOKU_INC.'inc/JpegMeta.php');
- $jpeg =new JpegMeta(mediaFN($src));
+ $jpeg = new JpegMeta(mediaFN($src));
if($jpeg !== false) $cap = $jpeg->getTitle();
- if($cap){
+ if(!empty($cap)) {
$title = $this->_xmlEntities($cap);
}
}
- if (!$render) {
+ if(!$render) {
// if the picture is not supposed to be rendered
// return the title of the picture
- if (!$title) {
+ if(!$title) {
// just show the sourcename
$title = $this->_xmlEntities(utf8_basename(noNS($src)));
}
return $title;
}
//add image tag
- $ret .= '<img src="'.ml($src,array('w'=>$width,'h'=>$height,'cache'=>$cache)).'"';
+ $ret .= '<img src="'.ml($src, array('w' => $width, 'h' => $height, 'cache' => $cache)).'"';
$ret .= ' class="media'.$align.'"';
- if ($title) {
- $ret .= ' title="' . $title . '"';
- $ret .= ' alt="' . $title .'"';
- }else{
+ if($title) {
+ $ret .= ' title="'.$title.'"';
+ $ret .= ' alt="'.$title.'"';
+ } else {
$ret .= ' alt=""';
}
- if ( !is_null($width) )
+ if(!is_null($width))
$ret .= ' width="'.$this->_xmlEntities($width).'"';
- if ( !is_null($height) )
+ if(!is_null($height))
$ret .= ' height="'.$this->_xmlEntities($height).'"';
$ret .= ' />';
- }elseif(media_supportedav($mime, 'video')){
+ } elseif(media_supportedav($mime, 'video') || media_supportedav($mime, 'audio')) {
// first get the $title
- if (!is_null($title)) {
- $title = $this->_xmlEntities($title);
- }
- if (!$title) {
- // just show the sourcename
- $title = $this->_xmlEntities(utf8_basename(noNS($src)));
- }
- if (!$render) {
- // if the video is not supposed to be rendered
- // return the title of the video
- return $title;
+ $title = !is_null($title) ? $this->_xmlEntities($title) : false;
+ if(!$render) {
+ // if the file is not supposed to be rendered
+ // return the title of the file (just the sourcename if there is no title)
+ return $title ? $title : $this->_xmlEntities(utf8_basename(noNS($src)));
}
- $att = array();
+ $att = array();
$att['class'] = "media$align";
+ if($title) {
+ $att['title'] = $title;
+ }
- //add video(s)
- $ret .= $this->_video($src, $width, $height, $att);
-
- }elseif(media_supportedav($mime, 'audio')){
- // first get the $title
- if (!is_null($title)) {
- $title = $this->_xmlEntities($title);
+ if(media_supportedav($mime, 'video')) {
+ //add video
+ $ret .= $this->_video($src, $width, $height, $att);
}
- if (!$title) {
- // just show the sourcename
- $title = $this->_xmlEntities(utf8_basename(noNS($src)));
+ if(media_supportedav($mime, 'audio')) {
+ //add audio
+ $ret .= $this->_audio($src, $att);
}
- if (!$render) {
- // if the video is not supposed to be rendered
- // return the title of the video
- return $title;
- }
-
- $att = array();
- $att['class'] = "media$align";
- //add audio
- $ret .= $this->_audio($src, $att);
-
- }elseif($mime == 'application/x-shockwave-flash'){
- if (!$render) {
+ } elseif($mime == 'application/x-shockwave-flash') {
+ if(!$render) {
// if the flash is not supposed to be rendered
// return the title of the flash
- if (!$title) {
+ if(!$title) {
// just show the sourcename
$title = utf8_basename(noNS($src));
}
return $this->_xmlEntities($title);
}
- $att = array();
+ $att = array();
$att['class'] = "media$align";
if($align == 'right') $att['align'] = 'right';
- if($align == 'left') $att['align'] = 'left';
- $ret .= html_flashobject(ml($src,array('cache'=>$cache),true,'&'),$width,$height,
- array('quality' => 'high'),
- null,
- $att,
- $this->_xmlEntities($title));
- }elseif($title){
+ if($align == 'left') $att['align'] = 'left';
+ $ret .= html_flashobject(
+ ml($src, array('cache' => $cache), true, '&'), $width, $height,
+ array('quality' => 'high'),
+ null,
+ $att,
+ $this->_xmlEntities($title)
+ );
+ } elseif($title) {
// well at least we have a title to display
$ret .= $this->_xmlEntities($title);
- }else{
+ } else {
// just show the sourcename
$ret .= $this->_xmlEntities(utf8_basename(noNS($src)));
}
@@ -1169,23 +1505,30 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
return $ret;
}
+ /**
+ * Escape string for output
+ *
+ * @param $string
+ * @return string
+ */
function _xmlEntities($string) {
- return htmlspecialchars($string,ENT_QUOTES,'UTF-8');
+ return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
}
/**
* Creates a linkid from a headline
*
+ * @author Andreas Gohr <andi@splitbrain.org>
* @param string $title The headline title
* @param boolean $create Create a new unique ID?
- * @author Andreas Gohr <andi@splitbrain.org>
+ * @return string
*/
- function _headerToLink($title,$create=false) {
- if($create){
- return sectionID($title,$this->headers);
- }else{
+ function _headerToLink($title, $create = false) {
+ if($create) {
+ return sectionID($title, $this->headers);
+ } else {
$check = false;
- return sectionID($title,$check);
+ return sectionID($title, $check);
}
}
@@ -1193,18 +1536,22 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* Construct a title and handle images in titles
*
* @author Harry Fuecks <hfuecks@gmail.com>
+ * @param string|array $title either string title or media array
+ * @param string $default default title if nothing else is found
+ * @param bool $isImage will be set to true if it's a media file
+ * @param null|string $id linked page id (used to extract title from first heading)
+ * @param string $linktype content|navigation
+ * @return string HTML of the title, might be full image tag or just escaped text
*/
- function _getLinkTitle($title, $default, & $isImage, $id=null, $linktype='content') {
- global $conf;
-
+ function _getLinkTitle($title, $default, &$isImage, $id = null, $linktype = 'content') {
$isImage = false;
- if ( is_array($title) ) {
+ if(is_array($title)) {
$isImage = true;
return $this->_imageTitle($title);
- } elseif ( is_null($title) || trim($title)=='') {
- if (useHeading($linktype) && $id) {
+ } elseif(is_null($title) || trim($title) == '') {
+ if(useHeading($linktype) && $id) {
$heading = p_get_first_heading($id);
- if ($heading) {
+ if($heading) {
return $this->_xmlEntities($heading);
}
}
@@ -1215,48 +1562,51 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
/**
- * Returns an HTML code for images used in link titles
+ * Returns HTML code for images used in link titles
*
- * @todo Resolve namespace on internal images
* @author Andreas Gohr <andi@splitbrain.org>
+ * @param string $img
+ * @return string HTML img tag or similar
*/
function _imageTitle($img) {
global $ID;
// some fixes on $img['src']
// see internalmedia() and externalmedia()
- list($img['src'],$hash) = explode('#',$img['src'],2);
- if ($img['type'] == 'internalmedia') {
- resolve_mediaid(getNS($ID),$img['src'],$exists);
+ list($img['src']) = explode('#', $img['src'], 2);
+ if($img['type'] == 'internalmedia') {
+ resolve_mediaid(getNS($ID), $img['src'], $exists);
}
- return $this->_media($img['src'],
- $img['title'],
- $img['align'],
- $img['width'],
- $img['height'],
- $img['cache']);
+ return $this->_media(
+ $img['src'],
+ $img['title'],
+ $img['align'],
+ $img['width'],
+ $img['height'],
+ $img['cache']
+ );
}
/**
- * _getMediaLinkConf is a helperfunction to internalmedia() and externalmedia()
- * which returns a basic link to a media.
+ * helperfunction to return a basic link to a media
*
- * @author Pierre Spring <pierre.spring@liip.ch>
- * @param string $src
- * @param string $title
- * @param string $align
- * @param string $width
- * @param string $height
- * @param string $cache
- * @param string $render
- * @access protected
- * @return array
+ * used in internalmedia() and externalmedia()
+ *
+ * @author Pierre Spring <pierre.spring@liip.ch>
+ * @param string $src media ID
+ * @param string $title descriptive text
+ * @param string $align left|center|right
+ * @param int $width width of media in pixel
+ * @param int $height height of media in pixel
+ * @param string $cache cache|recache|nocache
+ * @param bool $render should the media be embedded inline or just linked
+ * @return array associative array with link config
*/
function _getMediaLinkConf($src, $title, $align, $width, $height, $cache, $render) {
global $conf;
- $link = array();
+ $link = array();
$link['class'] = 'media';
$link['style'] = '';
$link['pre'] = '';
@@ -1269,51 +1619,49 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
return $link;
}
-
/**
* Embed video(s) in HTML
*
* @author Anika Henke <anika@selfthinker.org>
*
- * @param string $src - ID of video to embed
- * @param int $width - width of the video in pixels
- * @param int $height - height of the video in pixels
- * @param array $atts - additional attributes for the <video> tag
+ * @param string $src - ID of video to embed
+ * @param int $width - width of the video in pixels
+ * @param int $height - height of the video in pixels
+ * @param array $atts - additional attributes for the <video> tag
* @return string
*/
- function _video($src,$width,$height,$atts=null){
-
+ function _video($src, $width, $height, $atts = null) {
// prepare width and height
if(is_null($atts)) $atts = array();
$atts['width'] = (int) $width;
$atts['height'] = (int) $height;
- if(!$atts['width']) $atts['width'] = 320;
+ if(!$atts['width']) $atts['width'] = 320;
if(!$atts['height']) $atts['height'] = 240;
// prepare alternative formats
- $extensions = array('webm', 'ogv', 'mp4');
+ $extensions = array('webm', 'ogv', 'mp4');
$alternatives = media_alternativefiles($src, $extensions);
- $poster = media_alternativefiles($src, array('jpg', 'png'), true);
- $posterUrl = '';
- if (!empty($poster)) {
- $posterUrl = ml(reset($poster),array('cache'=>$cache),true,'&');
+ $poster = media_alternativefiles($src, array('jpg', 'png'), true);
+ $posterUrl = '';
+ if(!empty($poster)) {
+ $posterUrl = ml(reset($poster), '', true, '&');
}
$out = '';
// open video tag
$out .= '<video '.buildAttributes($atts).' controls="controls"';
- if ($posterUrl) $out .= ' poster="'.hsc($posterUrl).'"';
+ if($posterUrl) $out .= ' poster="'.hsc($posterUrl).'"';
$out .= '>'.NL;
$fallback = '';
// output source for each alternative video format
foreach($alternatives as $mime => $file) {
- $url = ml($file,array('cache'=>$cache),true,'&');
- $title = $this->_xmlEntities(utf8_basename(noNS($file)));
+ $url = ml($file, '', true, '&');
+ $title = $atts['title'] ? $atts['title'] : $this->_xmlEntities(utf8_basename(noNS($file)));
$out .= '<source src="'.hsc($url).'" type="'.$mime.'" />'.NL;
// alternative content (just a link to the file)
- $fallback .= $this->internalmedia($file, $title, NULL, NULL, NULL, $cache=NULL, $linking='linkonly', $return=true);
+ $fallback .= $this->internalmedia($file, $title, null, null, null, $cache = null, $linking = 'linkonly', $return = true);
}
// finish
@@ -1327,14 +1675,14 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
*
* @author Anika Henke <anika@selfthinker.org>
*
- * @param string $src - ID of audio to embed
- * @param array $atts - additional attributes for the <audio> tag
+ * @param string $src - ID of audio to embed
+ * @param array $atts - additional attributes for the <audio> tag
* @return string
*/
- function _audio($src,$atts=null){
+ function _audio($src, $atts = null) {
// prepare alternative formats
- $extensions = array('ogg', 'mp3', 'wav');
+ $extensions = array('ogg', 'mp3', 'wav');
$alternatives = media_alternativefiles($src, $extensions);
$out = '';
@@ -1344,12 +1692,12 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// output source for each alternative audio format
foreach($alternatives as $mime => $file) {
- $url = ml($file,array('cache'=>$cache),true,'&');
- $title = $this->_xmlEntities(utf8_basename(noNS($file)));
+ $url = ml($file, '', true, '&');
+ $title = $atts['title'] ? $atts['title'] : $this->_xmlEntities(utf8_basename(noNS($file)));
$out .= '<source src="'.hsc($url).'" type="'.$mime.'" />'.NL;
// alternative content (just a link to the file)
- $fallback .= $this->internalmedia($file, $title, NULL, NULL, NULL, $cache=NULL, $linking='linkonly', $return=true);
+ $fallback .= $this->internalmedia($file, $title, null, null, null, $cache = null, $linking = 'linkonly', $return = true);
}
// finish
@@ -1358,6 +1706,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
return $out;
}
+ #endregion
}
//Setup VIM: ex: et ts=4 :
diff --git a/inc/parser/xhtmlsummary.php b/inc/parser/xhtmlsummary.php
index 95f86cbef..867b71f6a 100644
--- a/inc/parser/xhtmlsummary.php
+++ b/inc/parser/xhtmlsummary.php
@@ -1,6 +1,5 @@
<?php
if(!defined('DOKU_INC')) die('meh.');
-require_once DOKU_INC . 'inc/parser/xhtml.php';
/**
* The summary XHTML form selects either up to the first two paragraphs
diff --git a/inc/parserutils.php b/inc/parserutils.php
index 4df273f11..9c2a0b570 100644
--- a/inc/parserutils.php
+++ b/inc/parserutils.php
@@ -112,8 +112,7 @@ function p_cached_output($file, $format='xhtml', $id='') {
} else {
$parsed = p_render($format, p_cached_instructions($file,false,$id), $info);
- if ($info['cache']) {
- $cache->storeCache($parsed); //save cachefile
+ if ($info['cache'] && $cache->storeCache($parsed)) { // storeCache() attempts to save cachefile
if($conf['allowdebug'] && $format=='xhtml') $parsed .= "\n<!-- no cachefile used, but created {$cache->cache} -->\n";
}else{
$cache->removeCache(); //try to delete cachefile
@@ -430,8 +429,9 @@ function p_render_metadata($id, $orig){
global $ID, $METADATA_RENDERERS;
// avoid recursive rendering processes for the same id
- if (isset($METADATA_RENDERERS[$id]))
+ if (isset($METADATA_RENDERERS[$id])) {
return $orig;
+ }
// store the original metadata in the global $METADATA_RENDERERS so p_set_metadata can use it
$METADATA_RENDERERS[$id] =& $orig;
@@ -444,8 +444,6 @@ function p_render_metadata($id, $orig){
$evt = new Doku_Event('PARSER_METADATA_RENDER', $orig);
if ($evt->advise_before()) {
- require_once DOKU_INC."inc/parser/metadata.php";
-
// get instructions
$instructions = p_cached_instructions(wikiFN($id),false,$id);
if(is_null($instructions)){
@@ -588,7 +586,7 @@ function p_sort_modes($a, $b){
function p_render($mode,$instructions,&$info){
if(is_null($instructions)) return '';
- $Renderer =& p_get_renderer($mode);
+ $Renderer = p_get_renderer($mode);
if (is_null($Renderer)) return null;
$Renderer->reset();
@@ -616,43 +614,53 @@ function p_render($mode,$instructions,&$info){
}
/**
+ * Figure out the correct renderer class to use for $mode,
+ * instantiate and return it
+ *
* @param $mode string Mode of the renderer to get
* @return null|Doku_Renderer The renderer
+ *
+ * @author Christopher Smith <chris@jalakai.co.uk>
*/
-function & p_get_renderer($mode) {
+function p_get_renderer($mode) {
/** @var Doku_Plugin_Controller $plugin_controller */
global $conf, $plugin_controller;
$rname = !empty($conf['renderer_'.$mode]) ? $conf['renderer_'.$mode] : $mode;
$rclass = "Doku_Renderer_$rname";
+ // if requested earlier or a bundled renderer
if( class_exists($rclass) ) {
$Renderer = new $rclass();
return $Renderer;
}
- // try default renderer first:
- $file = DOKU_INC."inc/parser/$rname.php";
- if(@file_exists($file)){
- require_once $file;
+ // not bundled, see if its an enabled renderer plugin & when $mode is 'xhtml', the renderer can supply that format.
+ $Renderer = $plugin_controller->load('renderer',$rname);
+ if ($Renderer && is_a($Renderer, 'Doku_Renderer') && ($mode != 'xhtml' || $mode == $Renderer->getFormat())) {
+ return $Renderer;
+ }
- if ( !class_exists($rclass) ) {
- trigger_error("Unable to resolve render class $rclass",E_USER_WARNING);
- msg("Renderer '$rname' for $mode not valid",-1);
- return null;
+ // there is a configuration error!
+ // not bundled, not a valid enabled plugin, use $mode to try to fallback to a bundled renderer
+ $rclass = "Doku_Renderer_$mode";
+ if ( class_exists($rclass) ) {
+ // viewers should see renderered output, so restrict the warning to admins only
+ $msg = "No renderer '$rname' found for mode '$mode', check your plugins";
+ if ($mode == 'xhtml') {
+ $msg .= " and the 'renderer_xhtml' config setting";
}
- $Renderer = new $rclass();
- }else{
- // Maybe a plugin/component is available?
- $Renderer = $plugin_controller->load('renderer',$rname);
+ $msg .= ".<br/>Attempting to fallback to the bundled renderer.";
+ msg($msg,-1,'','',MSG_ADMINS_ONLY);
- if(!isset($Renderer) || is_null($Renderer)){
- msg("No renderer '$rname' found for mode '$mode'",-1);
- return null;
- }
+ $Renderer = new $rclass;
+ $Renderer->nocache(); // fallback only (and may include admin alerts), don't cache
+ return $Renderer;
}
- return $Renderer;
+ // fallback failed, alert the world
+ msg("No renderer '$rname' found for mode '$mode'",-1);
+ return null;
}
/**
diff --git a/inc/plugin.php b/inc/plugin.php
index 95bdaee2b..fbfc0325f 100644
--- a/inc/plugin.php
+++ b/inc/plugin.php
@@ -30,18 +30,19 @@ class DokuWiki_Plugin {
* desc - Short description of the plugin (Text only)
* url - Website with more information on the plugin (eg. syntax description)
*/
- function getInfo(){
- $parts = explode('_',get_class($this));
- $info = DOKU_PLUGIN.'/'.$parts[2].'/plugin.info.txt';
+ function getInfo() {
+ $parts = explode('_', get_class($this));
+ $info = DOKU_PLUGIN . '/' . $parts[2] . '/plugin.info.txt';
if(@file_exists($info)) return confToHash($info);
- msg('getInfo() not implemented in '.get_class($this).
- ' and '.$info.' not found.<br />This is a bug in the '.
- $parts[2].' plugin and should be reported to the '.
- 'plugin author.',-1);
+ msg(
+ 'getInfo() not implemented in ' . get_class($this) . ' and ' . $info . ' not found.<br />' .
+ 'Verify you\'re running the latest version of the plugin. If the problem persists, send a ' .
+ 'bug report to the author of the ' . $parts[2] . ' plugin.', -1
+ );
return array(
- 'date' => '0000-00-00',
- 'name' => $parts[2].' plugin',
+ 'date' => '0000-00-00',
+ 'name' => $parts[2] . ' plugin',
);
}
@@ -252,10 +253,11 @@ class DokuWiki_Plugin {
*/
function __call($name, $arguments) {
if($name == 'render'){
+ dbg_deprecated('render_text()');
if(!isset($arguments[1])) $arguments[1] = 'xhtml';
return $this->render_text($arguments[0], $arguments[1]);
}
- trigger_error("no such method $name", E_ERROR);
+ trigger_error("no such method $name", E_USER_ERROR);
return null;
}
diff --git a/inc/pluginutils.php b/inc/pluginutils.php
index 894bbefb6..911c4e5c0 100644
--- a/inc/pluginutils.php
+++ b/inc/pluginutils.php
@@ -37,7 +37,7 @@ function plugin_list($type='',$all=false) {
* @param $name string name of the plugin to load
* @param $new bool true to return a new instance of the plugin, false to use an already loaded instance
* @param $disabled bool true to load even disabled plugins
- * @return DokuWiki_Plugin|DokuWiki_Syntax_Plugin|null the plugin object or null on failure
+ * @return DokuWiki_Plugin|null the plugin object or null on failure
*/
function plugin_load($type,$name,$new=false,$disabled=false) {
/** @var $plugin_controller Doku_Plugin_Controller */
diff --git a/inc/remote.php b/inc/remote.php
index 2ef28afd2..e27aa74f8 100644
--- a/inc/remote.php
+++ b/inc/remote.php
@@ -169,6 +169,9 @@ class RemoteAPI {
public function hasAccess() {
global $conf;
global $USERINFO;
+ /** @var Input $INPUT */
+ global $INPUT;
+
if (!$conf['remote']) {
return false;
}
@@ -179,7 +182,7 @@ class RemoteAPI {
return true;
}
- return auth_isMember($conf['remoteuser'], $_SERVER['REMOTE_USER'], (array) $USERINFO['grps']);
+ return auth_isMember($conf['remoteuser'], $INPUT->server->str('REMOTE_USER'), (array) $USERINFO['grps']);
}
/**
diff --git a/inc/search.php b/inc/search.php
index c2d31b959..5489dc2c0 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -141,7 +141,7 @@ function search_media(&$data,$base,$file,$type,$lvl,$opts){
//we do nothing with directories
if($type == 'd') {
- if(!$opts['depth']) return true; // recurse forever
+ if(empty($opts['depth'])) return true; // recurse forever
$depth = substr_count($file,'/');
if($depth >= $opts['depth']) return false; // depth reached
return true;
@@ -157,12 +157,12 @@ function search_media(&$data,$base,$file,$type,$lvl,$opts){
//check ACL for namespace (we have no ACL for mediafiles)
$info['perm'] = auth_quickaclcheck(getNS($info['id']).':*');
- if(!$opts['skipacl'] && $info['perm'] < AUTH_READ){
+ if(empty($opts['skipacl']) && $info['perm'] < AUTH_READ){
return false;
}
//check pattern filter
- if($opts['pattern'] && !@preg_match($opts['pattern'], $info['id'])){
+ if(!empty($opts['pattern']) && !@preg_match($opts['pattern'], $info['id'])){
return false;
}
@@ -176,7 +176,7 @@ function search_media(&$data,$base,$file,$type,$lvl,$opts){
}else{
$info['isimg'] = false;
}
- if($opts['hash']){
+ if(!empty($opts['hash'])){
$info['hash'] = md5(io_readFile(mediaFN($info['id']),false));
}
@@ -317,25 +317,25 @@ function pathID($path,$keeptxt=false){
* How the function behaves, depends on the options passed in the $opts
* array, where the following settings can be used.
*
- * depth int recursion depth. 0 for unlimited
- * keeptxt bool keep .txt extension for IDs
- * listfiles bool include files in listing
- * listdirs bool include namespaces in listing
- * pagesonly bool restrict files to pages
- * skipacl bool do not check for READ permission
- * sneakyacl bool don't recurse into nonreadable dirs
- * hash bool create MD5 hash for files
- * meta bool return file metadata
- * filematch string match files against this regexp
- * idmatch string match full ID against this regexp
- * dirmatch string match directory against this regexp when adding
- * nsmatch string match namespace against this regexp when adding
- * recmatch string match directory against this regexp when recursing
- * showmsg bool warn about non-ID files
- * showhidden bool show hidden files too
- * firsthead bool return first heading for pages
+ * depth int recursion depth. 0 for unlimited (default: 0)
+ * keeptxt bool keep .txt extension for IDs (default: false)
+ * listfiles bool include files in listing (default: false)
+ * listdirs bool include namespaces in listing (default: false)
+ * pagesonly bool restrict files to pages (default: false)
+ * skipacl bool do not check for READ permission (default: false)
+ * sneakyacl bool don't recurse into nonreadable dirs (default: false)
+ * hash bool create MD5 hash for files (default: false)
+ * meta bool return file metadata (default: false)
+ * filematch string match files against this regexp (default: '', so accept everything)
+ * idmatch string match full ID against this regexp (default: '', so accept everything)
+ * dirmatch string match directory against this regexp when adding (default: '', so accept everything)
+ * nsmatch string match namespace against this regexp when adding (default: '', so accept everything)
+ * recmatch string match directory against this regexp when recursing (default: '', so accept everything)
+ * showmsg bool warn about non-ID files (default: false)
+ * showhidden bool show hidden files(e.g. by hidepages config) too (default: false)
+ * firsthead bool return first heading for pages (default: false)
*
- * @param array &$data - Reference to the result data structure
+ * @param array &$data - Reference to the result data structure
* @param string $base - Base usually $conf['datadir']
* @param string $file - current file or directory relative to $base
* @param string $type - Type either 'd' for directory or 'f' for file
@@ -351,17 +351,18 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){
$return = true;
// get ID and check if it is a valid one
- $item['id'] = pathID($file,($type == 'd' || $opts['keeptxt']));
+ $item['id'] = pathID($file,($type == 'd' || !empty($opts['keeptxt'])));
if($item['id'] != cleanID($item['id'])){
- if($opts['showmsg'])
+ if(!empty($opts['showmsg'])){
msg(hsc($item['id']).' is not a valid file name for DokuWiki - skipped',-1);
+ }
return false; // skip non-valid files
}
$item['ns'] = getNS($item['id']);
if($type == 'd') {
// decide if to recursion into this directory is wanted
- if(!$opts['depth']){
+ if(empty($opts['depth'])){
$return = true; // recurse forever
}else{
$depth = substr_count($file,'/');
@@ -371,8 +372,12 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){
$return = true;
}
}
- if($return && !preg_match('/'.$opts['recmatch'].'/',$file)){
- $return = false; // doesn't match
+
+ if ($return) {
+ $match = empty($opts['recmatch']) || preg_match('/'.$opts['recmatch'].'/',$file);
+ if (!$match) {
+ return false; // doesn't match
+ }
}
}
@@ -407,7 +412,7 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){
$item['level'] = $lvl;
$item['open'] = $return;
- if($opts['meta']){
+ if(!empty($opts['meta'])){
$item['file'] = utf8_basename($file);
$item['size'] = filesize($base.'/'.$file);
$item['mtime'] = filemtime($base.'/'.$file);
@@ -417,8 +422,8 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){
}
if($type == 'f'){
- if($opts['hash']) $item['hash'] = md5(io_readFile($base.'/'.$file,false));
- if($opts['firsthead']) $item['title'] = p_get_first_heading($item['id'],METADATA_DONT_RENDER);
+ if(!empty($opts['hash'])) $item['hash'] = md5(io_readFile($base.'/'.$file,false));
+ if(!empty($opts['firsthead'])) $item['title'] = p_get_first_heading($item['id'],METADATA_DONT_RENDER);
}
// finally add the item
diff --git a/inc/subscription.php b/inc/subscription.php
index ddf2f39e6..aab6de926 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -256,8 +256,10 @@ class Subscription {
if(!$this->isenabled()) return false;
global $ID;
+ /** @var Input $INPUT */
+ global $INPUT;
if(!$id) $id = $ID;
- if(!$user) $user = $_SERVER['REMOTE_USER'];
+ if(!$user) $user = $INPUT->server->str('REMOTE_USER');
$subs = $this->subscribers($id, $user);
if(!count($subs)) return false;
@@ -288,17 +290,19 @@ class Subscription {
public function send_bulk($page) {
if(!$this->isenabled()) return 0;
- /** @var auth_basic $auth */
+ /** @var DokuWiki_Auth_Plugin $auth */
global $auth;
global $conf;
global $USERINFO;
+ /** @var Input $INPUT */
+ global $INPUT;
$count = 0;
$subscriptions = $this->subscribers($page, null, array('digest', 'list'));
// remember current user info
$olduinfo = $USERINFO;
- $olduser = $_SERVER['REMOTE_USER'];
+ $olduser = $INPUT->server->str('REMOTE_USER');
foreach($subscriptions as $target => $users) {
if(!$this->lock($target)) continue;
@@ -315,7 +319,7 @@ class Subscription {
// Work as the user to make sure ACLs apply correctly
$USERINFO = $auth->getUserData($user);
- $_SERVER['REMOTE_USER'] = $user;
+ $INPUT->server->set('REMOTE_USER',$user);
if($USERINFO === false) continue;
if(!$USERINFO['mail']) continue;
@@ -334,9 +338,10 @@ class Subscription {
foreach($changes as $rev) {
$n = 0;
while(!is_null($rev) && $rev['date'] >= $lastupdate &&
- ($_SERVER['REMOTE_USER'] === $rev['user'] ||
+ ($INPUT->server->str('REMOTE_USER') === $rev['user'] ||
$rev['type'] === DOKU_CHANGE_TYPE_MINOR_EDIT)) {
- $rev = getRevisions($rev['id'], $n++, 1);
+ $pagelog = new PageChangeLog($rev['id']);
+ $rev = $pagelog->getRevisions($n++, 1);
$rev = (count($rev) > 0) ? $rev[0] : null;
}
@@ -369,7 +374,7 @@ class Subscription {
// restore current user info
$USERINFO = $olduinfo;
- $_SERVER['REMOTE_USER'] = $olduser;
+ $INPUT->server->set('REMOTE_USER',$olduser);
return $count;
}
@@ -515,9 +520,10 @@ class Subscription {
* @return bool
*/
protected function send_digest($subscriber_mail, $id, $lastupdate) {
+ $pagelog = new PageChangeLog($id);
$n = 0;
do {
- $rev = getRevisions($id, $n++, 1);
+ $rev = $pagelog->getRevisions($n++, 1);
$rev = (count($rev) > 0) ? $rev[0] : null;
} while(!is_null($rev) && $rev > $lastupdate);
@@ -644,16 +650,20 @@ class Subscription {
* @todo move the whole functionality into this class, trigger SUBSCRIPTION_NOTIFY_ADDRESSLIST instead,
* use an array for the addresses within it
*
- * @param array &$data Containing $id (the page id), $self (whether the author
- * should be notified, $addresslist (current email address
- * list)
+ * @param array &$data Containing the entries:
+ * - $id (the page id),
+ * - $self (whether the author should be notified,
+ * - $addresslist (current email address list)
+ * - $replacements (array of additional string substitutions, @KEY@ to be replaced by value)
*/
public function notifyaddresses(&$data) {
if(!$this->isenabled()) return;
- /** @var auth_basic $auth */
+ /** @var DokuWiki_Auth_Plugin $auth */
global $auth;
global $conf;
+ /** @var Input $INPUT */
+ global $INPUT;
$id = $data['id'];
$self = $data['self'];
@@ -667,7 +677,7 @@ class Subscription {
$userinfo = $auth->getUserData($user);
if($userinfo === false) continue;
if(!$userinfo['mail']) continue;
- if(!$self && $user == $_SERVER['REMOTE_USER']) continue; //skip our own changes
+ if(!$self && $user == $INPUT->server->str('REMOTE_USER')) continue; //skip our own changes
$level = auth_aclcheck($id, $user, $userinfo['grps']);
if($level >= AUTH_READ) {
@@ -692,6 +702,7 @@ class Subscription {
* @deprecated 2012-12-07
*/
function subscription_addresslist(&$data) {
+ dbg_deprecated('class Subscription');
$sub = new Subscription();
$sub->notifyaddresses($data);
}
diff --git a/inc/template.php b/inc/template.php
index 0a6a9e4aa..c02c9f1ae 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -154,7 +154,7 @@ function tpl_content_core() {
html_resendpwd();
break;
case 'denied':
- print p_locale_xhtml('denied');
+ html_denied();
break;
case 'profile' :
html_updateprofile();
@@ -210,7 +210,7 @@ function tpl_toc($return = false) {
} else {
$tocok = true;
}
- $toc = $meta['description']['tableofcontents'];
+ $toc = isset($meta['description']['tableofcontents']) ? $meta['description']['tableofcontents'] : null;
if(!$tocok || !is_array($toc) || !$conf['tocminheads'] || count($toc) < $conf['tocminheads']) {
$toc = array();
}
@@ -291,6 +291,8 @@ function tpl_metaheaders($alt = true) {
global $lang;
global $conf;
global $updateVersion;
+ /** @var Input $INPUT */
+ global $INPUT;
// prepare the head array
$head = array();
@@ -316,15 +318,17 @@ function tpl_metaheaders($alt = true) {
}
if($alt) {
- $head['link'][] = array(
- 'rel' => 'alternate', 'type'=> 'application/rss+xml',
- 'title'=> $lang['btn_recent'], 'href'=> DOKU_BASE.'feed.php'
- );
- $head['link'][] = array(
- 'rel' => 'alternate', 'type'=> 'application/rss+xml',
- 'title'=> $lang['currentns'],
- 'href' => DOKU_BASE.'feed.php?mode=list&ns='.$INFO['namespace']
- );
+ if(actionOK('rss')) {
+ $head['link'][] = array(
+ 'rel' => 'alternate', 'type'=> 'application/rss+xml',
+ 'title'=> $lang['btn_recent'], 'href'=> DOKU_BASE.'feed.php'
+ );
+ $head['link'][] = array(
+ 'rel' => 'alternate', 'type'=> 'application/rss+xml',
+ 'title'=> $lang['currentns'],
+ 'href' => DOKU_BASE.'feed.php?mode=list&ns='.$INFO['namespace']
+ );
+ }
if(($ACT == 'show' || $ACT == 'search') && $INFO['writable']) {
$head['link'][] = array(
'rel' => 'edit',
@@ -333,7 +337,7 @@ function tpl_metaheaders($alt = true) {
);
}
- if($ACT == 'search') {
+ if(actionOK('rss') && $ACT == 'search') {
$head['link'][] = array(
'rel' => 'alternate', 'type'=> 'application/rss+xml',
'title'=> $lang['searchresult'],
@@ -401,7 +405,7 @@ function tpl_metaheaders($alt = true) {
// make $INFO and other vars available to JavaScripts
$json = new JSON();
$script = "var NS='".$INFO['namespace']."';";
- if($conf['useacl'] && !empty($_SERVER['REMOTE_USER'])) {
+ if($conf['useacl'] && $INPUT->server->str('REMOTE_USER')) {
$script .= "var SIG='".toolbar_signature()."';";
}
$script .= 'var JSINFO = '.$json->encode($JSINFO).';';
@@ -548,6 +552,7 @@ function tpl_actionlink($type, $pre = '', $suf = '', $inner = '', $return = fals
* @var string $method
* @var bool $nofollow
* @var array $params
+ * @var string $replacement
*/
extract($data);
if(strpos($id, '#') === 0) {
@@ -556,6 +561,9 @@ function tpl_actionlink($type, $pre = '', $suf = '', $inner = '', $return = fals
$linktarget = wl($id, $params);
}
$caption = $lang['btn_'.$type];
+ if(strpos($caption, '%s')){
+ $caption = sprintf($caption, $replacement);
+ }
$akey = $addTitle = '';
if($accesskey) {
$akey = 'accesskey="'.$accesskey.'" ';
@@ -603,17 +611,20 @@ function tpl_get_action($type) {
global $REV;
global $ACT;
global $conf;
+ /** @var Input $INPUT */
+ global $INPUT;
// check disabled actions and fix the badly named ones
if($type == 'history') $type = 'revisions';
if ($type == 'subscription') $type = 'subscribe';
if(!actionOK($type)) return false;
- $accesskey = null;
- $id = $ID;
- $method = 'get';
- $params = array('do' => $type);
- $nofollow = true;
+ $accesskey = null;
+ $id = $ID;
+ $method = 'get';
+ $params = array('do' => $type);
+ $nofollow = true;
+ $replacement = '';
switch($type) {
case 'edit':
// most complicated type - we need to decide on current action
@@ -637,7 +648,7 @@ function tpl_get_action($type) {
$accesskey = 'v';
}
} else {
- $params = array();
+ $params = array('do' => '');
$type = 'show';
$accesskey = 'v';
}
@@ -658,7 +669,7 @@ function tpl_get_action($type) {
break;
case 'top':
$accesskey = 't';
- $params = array();
+ $params = array('do' => '');
$id = '#dokuwiki__top';
break;
case 'back':
@@ -667,12 +678,17 @@ function tpl_get_action($type) {
return false;
}
$id = $parent;
- $params = array();
+ $params = array('do' => '');
+ $accesskey = 'b';
+ break;
+ case 'img_backto':
+ $params = array();
$accesskey = 'b';
+ $replacement = $ID;
break;
case 'login':
$params['sectok'] = getSecurityToken();
- if(isset($_SERVER['REMOTE_USER'])) {
+ if($INPUT->server->has('REMOTE_USER')) {
if(!actionOK('logout')) {
return false;
}
@@ -681,12 +697,12 @@ function tpl_get_action($type) {
}
break;
case 'register':
- if(!empty($_SERVER['REMOTE_USER'])) {
+ if($INPUT->server->str('REMOTE_USER')) {
return false;
}
break;
case 'resendpwd':
- if(!empty($_SERVER['REMOTE_USER'])) {
+ if($INPUT->server->str('REMOTE_USER')) {
return false;
}
break;
@@ -703,25 +719,40 @@ function tpl_get_action($type) {
$params['sectok'] = getSecurityToken();
break;
case 'subscribe':
- if(!$_SERVER['REMOTE_USER']) {
+ if(!$INPUT->server->str('REMOTE_USER')) {
return false;
}
break;
case 'backlink':
break;
case 'profile':
- if(!isset($_SERVER['REMOTE_USER'])) {
+ if(!$INPUT->server->has('REMOTE_USER')) {
return false;
}
break;
case 'media':
$params['ns'] = getNS($ID);
break;
+ case 'mediaManager':
+ // View image in media manager
+ global $IMG;
+ $imgNS = getNS($IMG);
+ $authNS = auth_quickaclcheck("$imgNS:*");
+ if ($authNS < AUTH_UPLOAD) {
+ return false;
+ }
+ $params = array(
+ 'ns' => $imgNS,
+ 'image' => $IMG,
+ 'do' => 'media'
+ );
+ //$type = 'media';
+ break;
default:
return '[unknown %s type]';
break;
}
- return compact('accesskey', 'type', 'id', 'method', 'params', 'nofollow');
+ return compact('accesskey', 'type', 'id', 'method', 'params', 'nofollow', 'replacement');
}
/**
@@ -805,7 +836,7 @@ function tpl_breadcrumbs($sep = '•') {
$crumbs_sep = ' <span class="bcsep">'.$sep.'</span> ';
//render crumbs, highlight the last one
- print '<span class="bchead">'.$lang['breadcrumb'].':</span>';
+ print '<span class="bchead">'.$lang['breadcrumb'].'</span>';
$last = count($crumbs);
$i = 0;
foreach($crumbs as $id => $name) {
@@ -845,7 +876,7 @@ function tpl_youarehere($sep = ' » ') {
$parts = explode(':', $ID);
$count = count($parts);
- echo '<span class="bchead">'.$lang['youarehere'].': </span>';
+ echo '<span class="bchead">'.$lang['youarehere'].' </span>';
// always print the startpage
echo '<span class="home">';
@@ -885,9 +916,11 @@ function tpl_youarehere($sep = ' » ') {
*/
function tpl_userinfo() {
global $lang;
- global $INFO;
- if(isset($_SERVER['REMOTE_USER'])) {
- print $lang['loggedinas'].': <bdi>'.hsc($INFO['userinfo']['name']).'</bdi> (<bdi>'.hsc($_SERVER['REMOTE_USER']).'</bdi>)';
+ /** @var Input $INPUT */
+ global $INPUT;
+
+ if($INPUT->server->str('REMOTE_USER')) {
+ print $lang['loggedinas'].' '.userlink();
return true;
}
return false;
@@ -929,7 +962,7 @@ function tpl_pageinfo($ret = false) {
$out .= '<bdi>'.$fn.'</bdi>';
$out .= ' · ';
$out .= $lang['lastmod'];
- $out .= ': ';
+ $out .= ' ';
$out .= $date;
if($INFO['editor']) {
$out .= ' '.$lang['by'].' ';
@@ -940,7 +973,7 @@ function tpl_pageinfo($ret = false) {
if($INFO['locked']) {
$out .= ' · ';
$out .= $lang['lockedby'];
- $out .= ': ';
+ $out .= ' ';
$out .= '<bdi>'.editorinfo($INFO['locked']).'</bdi>';
}
if($ret) {
@@ -1011,12 +1044,73 @@ function tpl_img_getTag($tags, $alt = '', $src = null) {
static $meta = null;
if(is_null($meta)) $meta = new JpegMeta($src);
if($meta === false) return $alt;
- $info = $meta->getField($tags);
+ $info = cleanText($meta->getField($tags));
if($info == false) return $alt;
return $info;
}
/**
+ * Returns a description list of the metatags of the current image
+ *
+ * @return string html of description list
+ */
+function tpl_img_meta() {
+ global $lang;
+
+ $tags = tpl_get_img_meta();
+
+ echo '<dl>';
+ foreach($tags as $tag) {
+ $label = $lang[$tag['langkey']];
+ if(!$label) $label = $tag['langkey'] . ':';
+
+ echo '<dt>'.$label.'</dt><dd>';
+ if ($tag['type'] == 'date') {
+ echo dformat($tag['value']);
+ } else {
+ echo hsc($tag['value']);
+ }
+ echo '</dd>';
+ }
+ echo '</dl>';
+}
+
+/**
+ * Returns metadata as configured in mediameta config file, ready for creating html
+ *
+ * @return array with arrays containing the entries:
+ * - string langkey key to lookup in the $lang var, if not found printed as is
+ * - string type type of value
+ * - string value tag value (unescaped)
+ */
+function tpl_get_img_meta() {
+
+ $config_files = getConfigFiles('mediameta');
+ foreach ($config_files as $config_file) {
+ if(@file_exists($config_file)) {
+ include($config_file);
+ }
+ }
+ /** @var array $fields the included array with metadata */
+
+ $tags = array();
+ foreach($fields as $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) {
+ $tags[] = array('langkey' => $tag[1], 'type' => $tag[2], 'value' => $value);
+ }
+ }
+ return $tags;
+}
+
+/**
* Prints the image with a link to the full sized version
*
* Only allowed in: detail.php
@@ -1030,6 +1124,7 @@ function tpl_img_getTag($tags, $alt = '', $src = null) {
*/
function tpl_img($maxwidth = 0, $maxheight = 0, $link = true, $params = null) {
global $IMG;
+ /** @var Input $INPUT */
global $INPUT;
$w = tpl_img_getTag('File.Width');
$h = tpl_img_getTag('File.Height');
@@ -1242,6 +1337,7 @@ function tpl_mediaContent($fromajax = false, $sort='natural') {
global $INUSE;
global $NS;
global $JUMPTO;
+ /** @var Input $INPUT */
global $INPUT;
$do = $INPUT->extract('do')->str('do');
@@ -1291,6 +1387,7 @@ function tpl_mediaFileList() {
global $NS;
global $JUMPTO;
global $lang;
+ /** @var Input $INPUT */
global $INPUT;
$opened_tab = $INPUT->str('tab_files');
@@ -1331,12 +1428,14 @@ function tpl_mediaFileList() {
* @author Kate Arzamastseva <pshns@ukr.net>
*/
function tpl_mediaFileDetails($image, $rev) {
- global $AUTH, $NS, $conf, $DEL, $lang, $INPUT;
+ global $conf, $DEL, $lang;
+ /** @var Input $INPUT */
+ global $INPUT;
$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;
+ $ns = getNS($image);
$do = $INPUT->str('mediado');
$opened_tab = $INPUT->str('tab_details');
@@ -1372,13 +1471,13 @@ function tpl_mediaFileDetails($image, $rev) {
echo '<div class="panelContent">'.NL;
if($opened_tab == 'view') {
- media_tab_view($image, $NS, $AUTH, $rev);
+ media_tab_view($image, $ns, null, $rev);
} elseif($opened_tab == 'edit' && !$removed) {
- media_tab_edit($image, $NS, $AUTH);
+ media_tab_edit($image, $ns);
} elseif($opened_tab == 'history' && $conf['mediarevisions']) {
- media_tab_history($image, $NS, $AUTH);
+ media_tab_history($image, $ns);
}
echo '</div>'.NL;
@@ -1409,12 +1508,14 @@ function tpl_actiondropdown($empty = '', $button = '&gt;') {
global $ID;
global $REV;
global $lang;
+ /** @var Input $INPUT */
+ global $INPUT;
echo '<form action="'.script().'" method="get" accept-charset="utf-8">';
echo '<div class="no">';
echo '<input type="hidden" name="id" value="'.$ID.'" />';
if($REV) echo '<input type="hidden" name="rev" value="'.$REV.'" />';
- if (!empty($_SERVER['REMOTE_USER'])) {
+ if ($INPUT->server->str('REMOTE_USER')) {
echo '<input type="hidden" name="sectok" value="'.getSecurityToken().'" />';
}
@@ -1780,11 +1881,14 @@ function tpl_media() {
*/
function tpl_classes() {
global $ACT, $conf, $ID, $INFO;
+ /** @var Input $INPUT */
+ global $INPUT;
+
$classes = array(
'dokuwiki',
'mode_'.$ACT,
'tpl_'.$conf['template'],
- !empty($_SERVER['REMOTE_USER']) ? 'loggedIn' : '',
+ $INPUT->server->bool('REMOTE_USER') ? 'loggedIn' : '',
$INFO['exists'] ? '' : 'notFound',
($ID == $conf['start']) ? 'home' : '',
);
diff --git a/inc/toolbar.php b/inc/toolbar.php
index d8d2f209b..7cc29e866 100644
--- a/inc/toolbar.php
+++ b/inc/toolbar.php
@@ -241,10 +241,12 @@ function toolbar_JSdefines($varname){
function toolbar_signature(){
global $conf;
global $INFO;
+ /** @var Input $INPUT */
+ global $INPUT;
$sig = $conf['signature'];
$sig = dformat(null,$sig);
- $sig = str_replace('@USER@',$_SERVER['REMOTE_USER'],$sig);
+ $sig = str_replace('@USER@',$INPUT->server->str('REMOTE_USER'),$sig);
$sig = str_replace('@NAME@',$INFO['userinfo']['name'],$sig);
$sig = str_replace('@MAIL@',$INFO['userinfo']['mail'],$sig);
$sig = str_replace('@DATE@',dformat(),$sig);
diff --git a/install.php b/install.php
index 779084cfa..767dd332f 100644
--- a/install.php
+++ b/install.php
@@ -57,6 +57,8 @@ $dokuwiki_hash = array(
'2012-09-10' => 'eb0b3fc90056fbc12bac6f49f7764df3',
'2013-05-10' => '7b62b75245f57f122d3e0f8ed7989623',
'2013-12-08' => '263c76af309fbf083867c18a34ff5214',
+ '2014-05-05' => '263c76af309fbf083867c18a34ff5214',
+ 'devel' => 'b3ddc3f793eac8c135176e535054c00a',
);
@@ -349,6 +351,16 @@ function store_data($d){
*/
EOT;
+ // add any config options set by a previous installer
+ $preset = __DIR__.'/install.conf';
+ if(file_exists($preset)){
+ $output .= "# preset config options\n";
+ $output .= file_get_contents($preset);
+ $output .= "\n\n";
+ $output .= "# options selected in installer\n";
+ @unlink($preset);
+ }
+
$output .= '$conf[\'title\'] = \''.addslashes($d['title'])."';\n";
$output .= '$conf[\'lang\'] = \''.addslashes($LC)."';\n";
$output .= '$conf[\'license\'] = \''.addslashes($d['license'])."';\n";
@@ -532,6 +544,11 @@ function check_functions(){
$ok = false;
}
+ if(ini_get('mbstring.func_overload') != 0){
+ $error[] = $lang['i_mbfuncoverload'];
+ $ok = false;
+ }
+
$funcs = explode(' ','addslashes call_user_func chmod copy fgets '.
'file file_exists fseek flush filesize ftell fopen '.
'glob header ignore_user_abort ini_get mail mkdir '.
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php
index 6e2011cd9..a200a3ded 100644
--- a/lib/exe/ajax.php
+++ b/lib/exe/ajax.php
@@ -41,7 +41,6 @@ if(function_exists($callfn)){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function ajax_qsearch(){
- global $conf;
global $lang;
global $INPUT;
@@ -89,15 +88,12 @@ function ajax_qsearch(){
* @author Mike Frysinger <vapier@gentoo.org>
*/
function ajax_suggestions() {
- global $conf;
- global $lang;
global $INPUT;
$query = cleanID($INPUT->post->str('q'));
if(empty($query)) $query = cleanID($INPUT->get->str('q'));
if(empty($query)) return;
- $data = array();
$data = ft_pageLookup($query);
if(!count($data)) return;
$data = array_keys($data);
@@ -214,7 +210,6 @@ function ajax_medians(){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function ajax_medialist(){
- global $conf;
global $NS;
global $INPUT;
@@ -234,13 +229,15 @@ function ajax_medialist(){
* @author Kate Arzamastseva <pshns@ukr.net>
*/
function ajax_mediadetails(){
- global $DEL, $NS, $IMG, $AUTH, $JUMPTO, $REV, $lang, $fullscreen, $conf, $INPUT;
+ global $IMG, $JUMPTO, $REV, $fullscreen, $INPUT;
$fullscreen = true;
require_once(DOKU_INC.'lib/exe/mediamanager.php');
+ $image = '';
if ($INPUT->has('image')) $image = cleanID($INPUT->str('image'));
if (isset($IMG)) $image = $IMG;
if (isset($JUMPTO)) $image = $JUMPTO;
+ $rev = false;
if (isset($REV) && !$JUMPTO) $rev = $REV;
html_msgarea();
@@ -255,8 +252,9 @@ function ajax_mediadiff(){
global $NS;
global $INPUT;
+ $image = '';
if ($INPUT->has('image')) $image = cleanID($INPUT->str('image'));
- $NS = $INPUT->post->str('ns');
+ $NS = getNS($image);
$auth = auth_quickaclcheck("$NS:*");
media_diff($image, $NS, $auth, true);
}
@@ -264,6 +262,7 @@ function ajax_mediadiff(){
function ajax_mediaupload(){
global $NS, $MSG, $INPUT;
+ $id = '';
if ($_FILES['qqfile']['tmp_name']) {
$id = $INPUT->post->str('mediaid', $_FILES['qqfile']['name']);
} elseif ($INPUT->get->has('qqfile')) {
@@ -280,44 +279,33 @@ function ajax_mediaupload(){
if ($_FILES['qqfile']['error']) unset($_FILES['qqfile']);
+ $res = false;
if ($_FILES['qqfile']['tmp_name']) $res = media_upload($NS, $AUTH, $_FILES['qqfile']);
if ($INPUT->get->has('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) {
+ if($res) {
+ $result = array(
+ 'success' => true,
+ 'link' => media_managerURL(array('ns' => $ns, 'image' => $NS . ':' . $id), '&'),
+ 'id' => $NS . ':' . $id,
+ 'ns' => $NS
+ );
+ } else {
$error = '';
- if (isset($MSG)) {
- foreach($MSG as $msg) $error .= $msg['msg'];
+ if(isset($MSG)) {
+ foreach($MSG as $msg) {
+ $error .= $msg['msg'];
+ }
}
- $result = array('error' => $msg['msg'], 'ns' => $NS);
+ $result = array(
+ 'error' => $error,
+ '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;
-}
-
/**
* Return sub index for index view
*
@@ -359,13 +347,11 @@ function ajax_linkwiz(){
$id = cleanID($id);
$nsd = utf8_encodeFN(str_replace(':','/',$ns));
- $idd = utf8_encodeFN(str_replace(':','/',$id));
$data = array();
if($q && !$ns){
// use index to lookup matching pages
- $pages = array();
$pages = ft_pageLookup($id,true);
// result contains matches in pages and namespaces
diff --git a/lib/exe/css.php b/lib/exe/css.php
index f273b7ee4..6c1d60751 100644
--- a/lib/exe/css.php
+++ b/lib/exe/css.php
@@ -56,7 +56,7 @@ function css_out(){
}
// cache influencers
- $tplinc = tpl_basedir($tpl);
+ $tplinc = tpl_incdir($tpl);
$cache_files = getConfigFiles('main');
$cache_files[] = $tplinc.'style.ini';
$cache_files[] = $tplinc.'style.local.ini'; // @deprecated
@@ -70,6 +70,7 @@ function css_out(){
$files[$mediatype] = array();
// load core styles
$files[$mediatype][DOKU_INC.'lib/styles/'.$mediatype.'.css'] = DOKU_BASE.'lib/styles/';
+
// load jQuery-UI theme
if ($mediatype == 'screen') {
$files[$mediatype][DOKU_INC.'lib/scripts/jquery/jquery-ui-theme/smoothness.css'] = DOKU_BASE.'lib/scripts/jquery/jquery-ui-theme/';
@@ -132,6 +133,9 @@ function css_out(){
$css = ob_get_contents();
ob_end_clean();
+ // strip any source maps
+ stripsourcemaps($css);
+
// apply style replacements
$css = css_applystyle($css, $styleini['replacements']);
@@ -551,7 +555,7 @@ function css_compress($css){
$css = preg_replace_callback('#(/\*)(.*?)(\*/)#s','css_comment_cb',$css);
//strip (incorrect but common) one line comments
- $css = preg_replace('/(?<!:)\/\/.*$/m','',$css);
+ $css = preg_replace_callback('/^.*\/\/.*$/m','css_onelinecomment_cb',$css);
// strip whitespaces
$css = preg_replace('![\r\n\t ]+!',' ',$css);
@@ -587,4 +591,58 @@ function css_comment_cb($matches){
return $matches[0];
}
+/**
+ * Callback for css_compress()
+ *
+ * Strips one line comments but makes sure it will not destroy url() constructs with slashes
+ *
+ * @param $matches
+ * @return string
+ */
+function css_onelinecomment_cb($matches) {
+ $line = $matches[0];
+
+ $i = 0;
+ $len = strlen($line);
+
+ while ($i< $len){
+ $nextcom = strpos($line, '//', $i);
+ $nexturl = stripos($line, 'url(', $i);
+
+ if($nextcom === false) {
+ // no more comments, we're done
+ $i = $len;
+ break;
+ }
+
+ // keep any quoted string that starts before a comment
+ $nextsqt = strpos($line, "'", $i);
+ $nextdqt = strpos($line, '"', $i);
+ if(min($nextsqt, $nextdqt) < $nextcom) {
+ $skipto = false;
+ if($nextsqt !== false && ($nextdqt === false || $nextsqt < $nextdqt)) {
+ $skipto = strpos($line, "'", $nextsqt+1) +1;
+ } else if ($nextdqt !== false) {
+ $skipto = strpos($line, '"', $nextdqt+1) +1;
+ }
+
+ if($skipto !== false) {
+ $i = $skipto;
+ continue;
+ }
+ }
+
+ if($nexturl === false || $nextcom < $nexturl) {
+ // no url anymore, strip comment and be done
+ $i = $nextcom;
+ break;
+ }
+
+ // we have an upcoming url
+ $i = strpos($line, ')', $nexturl);
+ }
+
+ return substr($line, 0, $i);
+}
+
//Setup VIM: ex: et ts=4 :
diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php
index 5f82ad0e0..933367e35 100644
--- a/lib/exe/fetch.php
+++ b/lib/exe/fetch.php
@@ -79,7 +79,7 @@ if (defined('SIMPLE_TEST')) {
//handle image resizing/cropping
if((substr($MIME, 0, 5) == 'image') && ($WIDTH || $HEIGHT)) {
- if($HEIGHT && $WDITH) {
+ if($HEIGHT && $WIDTH) {
$data['file'] = $FILE = media_crop_image($data['file'], $EXT, $WIDTH, $HEIGHT);
} else {
$data['file'] = $FILE = media_resize_image($data['file'], $EXT, $WIDTH, $HEIGHT);
diff --git a/lib/exe/js.php b/lib/exe/js.php
index 04413b409..bec12ef7a 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -137,6 +137,9 @@ function js_out(){
$js = ob_get_contents();
ob_end_clean();
+ // strip any source maps
+ stripsourcemaps($js);
+
// compress whitespace and comments
if($conf['compress']){
$js = js_compress($js);
@@ -163,7 +166,10 @@ function js_load($file){
// is it a include_once?
if($match[1]){
$base = utf8_basename($ifile);
- if($loaded[$base]) continue;
+ if($loaded[$base]){
+ $data = str_replace($match[0], '' ,$data);
+ continue;
+ }
$loaded[$base] = true;
}
@@ -220,6 +226,12 @@ function js_pluginstrings() {
return $pluginstrings;
}
+/**
+ * Return an two-dimensional array with strings from the language file of current active template.
+ *
+ * - $lang['js'] must be an array.
+ * - Nothing is returned for template without an entry for $lang['js']
+ */
function js_templatestrings() {
global $conf;
$templatestrings = array();
diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php
index d94a24c74..7044232ce 100644
--- a/lib/exe/mediamanager.php
+++ b/lib/exe/mediamanager.php
@@ -57,7 +57,7 @@
}
// give info on PHP caught upload errors
- if($_FILES['upload']['error']){
+ if(!empty($_FILES['upload']['error'])){
switch($_FILES['upload']['error']){
case 1:
case 2:
@@ -71,7 +71,7 @@
}
// handle upload
- if($_FILES['upload']['tmp_name']){
+ if(!empty($_FILES['upload']['tmp_name'])){
$JUMPTO = media_upload($NS,$AUTH);
if($JUMPTO) $NS = getNS($JUMPTO);
}
diff --git a/lib/images/fileicons/32x32/7z.png b/lib/images/fileicons/32x32/7z.png
new file mode 100644
index 000000000..9ba7da94a
--- /dev/null
+++ b/lib/images/fileicons/32x32/7z.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/asm.png b/lib/images/fileicons/32x32/asm.png
new file mode 100644
index 000000000..f1a1f322b
--- /dev/null
+++ b/lib/images/fileicons/32x32/asm.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/bash.png b/lib/images/fileicons/32x32/bash.png
new file mode 100644
index 000000000..c28404ed1
--- /dev/null
+++ b/lib/images/fileicons/32x32/bash.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/bz2.png b/lib/images/fileicons/32x32/bz2.png
new file mode 100644
index 000000000..7be9b7c06
--- /dev/null
+++ b/lib/images/fileicons/32x32/bz2.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/c.png b/lib/images/fileicons/32x32/c.png
new file mode 100644
index 000000000..0a01f8f3a
--- /dev/null
+++ b/lib/images/fileicons/32x32/c.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/cc.png b/lib/images/fileicons/32x32/cc.png
new file mode 100644
index 000000000..b09b3357f
--- /dev/null
+++ b/lib/images/fileicons/32x32/cc.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/conf.png b/lib/images/fileicons/32x32/conf.png
new file mode 100644
index 000000000..91a8a10de
--- /dev/null
+++ b/lib/images/fileicons/32x32/conf.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/cpp.png b/lib/images/fileicons/32x32/cpp.png
new file mode 100644
index 000000000..1ce35422c
--- /dev/null
+++ b/lib/images/fileicons/32x32/cpp.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/cs.png b/lib/images/fileicons/32x32/cs.png
new file mode 100644
index 000000000..d300f7551
--- /dev/null
+++ b/lib/images/fileicons/32x32/cs.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/csh.png b/lib/images/fileicons/32x32/csh.png
new file mode 100644
index 000000000..72ecbcc52
--- /dev/null
+++ b/lib/images/fileicons/32x32/csh.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/css.png b/lib/images/fileicons/32x32/css.png
new file mode 100644
index 000000000..638957637
--- /dev/null
+++ b/lib/images/fileicons/32x32/css.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/csv.png b/lib/images/fileicons/32x32/csv.png
new file mode 100644
index 000000000..3ee42f047
--- /dev/null
+++ b/lib/images/fileicons/32x32/csv.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/deb.png b/lib/images/fileicons/32x32/deb.png
new file mode 100644
index 000000000..8d625ccf2
--- /dev/null
+++ b/lib/images/fileicons/32x32/deb.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/diff.png b/lib/images/fileicons/32x32/diff.png
new file mode 100644
index 000000000..4dd98e7cc
--- /dev/null
+++ b/lib/images/fileicons/32x32/diff.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/doc.png b/lib/images/fileicons/32x32/doc.png
new file mode 100644
index 000000000..8369c1f73
--- /dev/null
+++ b/lib/images/fileicons/32x32/doc.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/docx.png b/lib/images/fileicons/32x32/docx.png
new file mode 100644
index 000000000..ce5dfb3d3
--- /dev/null
+++ b/lib/images/fileicons/32x32/docx.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/file.png b/lib/images/fileicons/32x32/file.png
new file mode 100644
index 000000000..52318f6e2
--- /dev/null
+++ b/lib/images/fileicons/32x32/file.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/gif.png b/lib/images/fileicons/32x32/gif.png
new file mode 100644
index 000000000..e39af08cc
--- /dev/null
+++ b/lib/images/fileicons/32x32/gif.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/gz.png b/lib/images/fileicons/32x32/gz.png
new file mode 100644
index 000000000..573ce7afd
--- /dev/null
+++ b/lib/images/fileicons/32x32/gz.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/h.png b/lib/images/fileicons/32x32/h.png
new file mode 100644
index 000000000..27c8ceaf3
--- /dev/null
+++ b/lib/images/fileicons/32x32/h.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/hpp.png b/lib/images/fileicons/32x32/hpp.png
new file mode 100644
index 000000000..04876a5d5
--- /dev/null
+++ b/lib/images/fileicons/32x32/hpp.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/htm.png b/lib/images/fileicons/32x32/htm.png
new file mode 100644
index 000000000..ec4f15ac6
--- /dev/null
+++ b/lib/images/fileicons/32x32/htm.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/html.png b/lib/images/fileicons/32x32/html.png
new file mode 100644
index 000000000..ec4f15ac6
--- /dev/null
+++ b/lib/images/fileicons/32x32/html.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/ico.png b/lib/images/fileicons/32x32/ico.png
new file mode 100644
index 000000000..0a219e6f2
--- /dev/null
+++ b/lib/images/fileicons/32x32/ico.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/java.png b/lib/images/fileicons/32x32/java.png
new file mode 100644
index 000000000..ee9cc4ccb
--- /dev/null
+++ b/lib/images/fileicons/32x32/java.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/jpeg.png b/lib/images/fileicons/32x32/jpeg.png
new file mode 100644
index 000000000..5fb71dd73
--- /dev/null
+++ b/lib/images/fileicons/32x32/jpeg.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/jpg.png b/lib/images/fileicons/32x32/jpg.png
new file mode 100644
index 000000000..5fb71dd73
--- /dev/null
+++ b/lib/images/fileicons/32x32/jpg.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/js.png b/lib/images/fileicons/32x32/js.png
new file mode 100644
index 000000000..9bbbfb709
--- /dev/null
+++ b/lib/images/fileicons/32x32/js.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/json.png b/lib/images/fileicons/32x32/json.png
new file mode 100644
index 000000000..583ece683
--- /dev/null
+++ b/lib/images/fileicons/32x32/json.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/lua.png b/lib/images/fileicons/32x32/lua.png
new file mode 100644
index 000000000..9e8fc9517
--- /dev/null
+++ b/lib/images/fileicons/32x32/lua.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/mp3.png b/lib/images/fileicons/32x32/mp3.png
new file mode 100644
index 000000000..1acd83276
--- /dev/null
+++ b/lib/images/fileicons/32x32/mp3.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/mp4.png b/lib/images/fileicons/32x32/mp4.png
new file mode 100644
index 000000000..03db6f450
--- /dev/null
+++ b/lib/images/fileicons/32x32/mp4.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/odc.png b/lib/images/fileicons/32x32/odc.png
new file mode 100644
index 000000000..9a34f2129
--- /dev/null
+++ b/lib/images/fileicons/32x32/odc.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/odf.png b/lib/images/fileicons/32x32/odf.png
new file mode 100644
index 000000000..e3b4333ad
--- /dev/null
+++ b/lib/images/fileicons/32x32/odf.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/odg.png b/lib/images/fileicons/32x32/odg.png
new file mode 100644
index 000000000..c3b192b2d
--- /dev/null
+++ b/lib/images/fileicons/32x32/odg.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/odi.png b/lib/images/fileicons/32x32/odi.png
new file mode 100644
index 000000000..6baa69407
--- /dev/null
+++ b/lib/images/fileicons/32x32/odi.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/odp.png b/lib/images/fileicons/32x32/odp.png
new file mode 100644
index 000000000..8e09dd6e4
--- /dev/null
+++ b/lib/images/fileicons/32x32/odp.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/ods.png b/lib/images/fileicons/32x32/ods.png
new file mode 100644
index 000000000..90892f3d4
--- /dev/null
+++ b/lib/images/fileicons/32x32/ods.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/odt.png b/lib/images/fileicons/32x32/odt.png
new file mode 100644
index 000000000..22ec1fffb
--- /dev/null
+++ b/lib/images/fileicons/32x32/odt.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/ogg.png b/lib/images/fileicons/32x32/ogg.png
new file mode 100644
index 000000000..f988fabc3
--- /dev/null
+++ b/lib/images/fileicons/32x32/ogg.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/ogv.png b/lib/images/fileicons/32x32/ogv.png
new file mode 100644
index 000000000..1083455fb
--- /dev/null
+++ b/lib/images/fileicons/32x32/ogv.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/pas.png b/lib/images/fileicons/32x32/pas.png
new file mode 100644
index 000000000..c2c05d2d1
--- /dev/null
+++ b/lib/images/fileicons/32x32/pas.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/pdf.png b/lib/images/fileicons/32x32/pdf.png
new file mode 100644
index 000000000..0efa0dc31
--- /dev/null
+++ b/lib/images/fileicons/32x32/pdf.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/php.png b/lib/images/fileicons/32x32/php.png
new file mode 100644
index 000000000..8f3c84e32
--- /dev/null
+++ b/lib/images/fileicons/32x32/php.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/pl.png b/lib/images/fileicons/32x32/pl.png
new file mode 100644
index 000000000..88aa2723f
--- /dev/null
+++ b/lib/images/fileicons/32x32/pl.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/png.png b/lib/images/fileicons/32x32/png.png
new file mode 100644
index 000000000..0ecd29691
--- /dev/null
+++ b/lib/images/fileicons/32x32/png.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/ppt.png b/lib/images/fileicons/32x32/ppt.png
new file mode 100644
index 000000000..84b523a23
--- /dev/null
+++ b/lib/images/fileicons/32x32/ppt.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/pptx.png b/lib/images/fileicons/32x32/pptx.png
new file mode 100644
index 000000000..1446cf4de
--- /dev/null
+++ b/lib/images/fileicons/32x32/pptx.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/ps.png b/lib/images/fileicons/32x32/ps.png
new file mode 100644
index 000000000..e1a74988d
--- /dev/null
+++ b/lib/images/fileicons/32x32/ps.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/py.png b/lib/images/fileicons/32x32/py.png
new file mode 100644
index 000000000..cf6e412f0
--- /dev/null
+++ b/lib/images/fileicons/32x32/py.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/rar.png b/lib/images/fileicons/32x32/rar.png
new file mode 100644
index 000000000..4af2a4d46
--- /dev/null
+++ b/lib/images/fileicons/32x32/rar.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/rb.png b/lib/images/fileicons/32x32/rb.png
new file mode 100644
index 000000000..b0dfd8980
--- /dev/null
+++ b/lib/images/fileicons/32x32/rb.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/rpm.png b/lib/images/fileicons/32x32/rpm.png
new file mode 100644
index 000000000..2ec5f4e1b
--- /dev/null
+++ b/lib/images/fileicons/32x32/rpm.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/rtf.png b/lib/images/fileicons/32x32/rtf.png
new file mode 100644
index 000000000..82add4fd7
--- /dev/null
+++ b/lib/images/fileicons/32x32/rtf.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/sh.png b/lib/images/fileicons/32x32/sh.png
new file mode 100644
index 000000000..93c093ea4
--- /dev/null
+++ b/lib/images/fileicons/32x32/sh.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/sql.png b/lib/images/fileicons/32x32/sql.png
new file mode 100644
index 000000000..f6436e725
--- /dev/null
+++ b/lib/images/fileicons/32x32/sql.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/swf.png b/lib/images/fileicons/32x32/swf.png
new file mode 100644
index 000000000..b43642905
--- /dev/null
+++ b/lib/images/fileicons/32x32/swf.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/sxc.png b/lib/images/fileicons/32x32/sxc.png
new file mode 100644
index 000000000..50676be6a
--- /dev/null
+++ b/lib/images/fileicons/32x32/sxc.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/sxd.png b/lib/images/fileicons/32x32/sxd.png
new file mode 100644
index 000000000..f715a8ff0
--- /dev/null
+++ b/lib/images/fileicons/32x32/sxd.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/sxi.png b/lib/images/fileicons/32x32/sxi.png
new file mode 100644
index 000000000..3d9f31d3b
--- /dev/null
+++ b/lib/images/fileicons/32x32/sxi.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/sxw.png b/lib/images/fileicons/32x32/sxw.png
new file mode 100644
index 000000000..bd8ab1436
--- /dev/null
+++ b/lib/images/fileicons/32x32/sxw.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/tar.png b/lib/images/fileicons/32x32/tar.png
new file mode 100644
index 000000000..4a420a22a
--- /dev/null
+++ b/lib/images/fileicons/32x32/tar.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/tgz.png b/lib/images/fileicons/32x32/tgz.png
new file mode 100644
index 000000000..8cf6af41a
--- /dev/null
+++ b/lib/images/fileicons/32x32/tgz.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/txt.png b/lib/images/fileicons/32x32/txt.png
new file mode 100644
index 000000000..d9ff7d595
--- /dev/null
+++ b/lib/images/fileicons/32x32/txt.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/wav.png b/lib/images/fileicons/32x32/wav.png
new file mode 100644
index 000000000..c39a8445f
--- /dev/null
+++ b/lib/images/fileicons/32x32/wav.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/webm.png b/lib/images/fileicons/32x32/webm.png
new file mode 100644
index 000000000..99b9c87b2
--- /dev/null
+++ b/lib/images/fileicons/32x32/webm.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/xls.png b/lib/images/fileicons/32x32/xls.png
new file mode 100644
index 000000000..7447d9cdf
--- /dev/null
+++ b/lib/images/fileicons/32x32/xls.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/xlsx.png b/lib/images/fileicons/32x32/xlsx.png
new file mode 100644
index 000000000..920217267
--- /dev/null
+++ b/lib/images/fileicons/32x32/xlsx.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/xml.png b/lib/images/fileicons/32x32/xml.png
new file mode 100644
index 000000000..4ea3b1f6c
--- /dev/null
+++ b/lib/images/fileicons/32x32/xml.png
Binary files differ
diff --git a/lib/images/fileicons/32x32/zip.png b/lib/images/fileicons/32x32/zip.png
new file mode 100644
index 000000000..f07d18e2c
--- /dev/null
+++ b/lib/images/fileicons/32x32/zip.png
Binary files differ
diff --git a/lib/images/fileicons/7z.png b/lib/images/fileicons/7z.png
index 52f7d5d72..037cd73a0 100644
--- a/lib/images/fileicons/7z.png
+++ b/lib/images/fileicons/7z.png
Binary files differ
diff --git a/lib/images/fileicons/README b/lib/images/fileicons/README
new file mode 100644
index 000000000..05385861e
--- /dev/null
+++ b/lib/images/fileicons/README
@@ -0,0 +1,2 @@
+For the generator of these files see
+https://github.com/splitbrain/file-icon-generator/blob/master/example-dokuwiki.php
diff --git a/lib/images/fileicons/asm.png b/lib/images/fileicons/asm.png
new file mode 100644
index 000000000..1281e12b8
--- /dev/null
+++ b/lib/images/fileicons/asm.png
Binary files differ
diff --git a/lib/images/fileicons/audio.png b/lib/images/fileicons/audio.png
deleted file mode 100644
index 98883256d..000000000
--- a/lib/images/fileicons/audio.png
+++ /dev/null
Binary files differ
diff --git a/lib/images/fileicons/bash.png b/lib/images/fileicons/bash.png
new file mode 100644
index 000000000..257584649
--- /dev/null
+++ b/lib/images/fileicons/bash.png
Binary files differ
diff --git a/lib/images/fileicons/bz2.png b/lib/images/fileicons/bz2.png
index 6ec2f98ef..a4bcc70a1 100644
--- a/lib/images/fileicons/bz2.png
+++ b/lib/images/fileicons/bz2.png
Binary files differ
diff --git a/lib/images/fileicons/c.png b/lib/images/fileicons/c.png
index 6f57337c7..f0d4e9aa1 100644
--- a/lib/images/fileicons/c.png
+++ b/lib/images/fileicons/c.png
Binary files differ
diff --git a/lib/images/fileicons/cc.png b/lib/images/fileicons/cc.png
new file mode 100644
index 000000000..e6f4c6457
--- /dev/null
+++ b/lib/images/fileicons/cc.png
Binary files differ
diff --git a/lib/images/fileicons/conf.png b/lib/images/fileicons/conf.png
index 20c20fa3d..94ace02cf 100644
--- a/lib/images/fileicons/conf.png
+++ b/lib/images/fileicons/conf.png
Binary files differ
diff --git a/lib/images/fileicons/cpp.png b/lib/images/fileicons/cpp.png
index 6f2797da5..4027e4beb 100644
--- a/lib/images/fileicons/cpp.png
+++ b/lib/images/fileicons/cpp.png
Binary files differ
diff --git a/lib/images/fileicons/cs.png b/lib/images/fileicons/cs.png
index d3afa112c..31b7f7661 100644
--- a/lib/images/fileicons/cs.png
+++ b/lib/images/fileicons/cs.png
Binary files differ
diff --git a/lib/images/fileicons/csh.png b/lib/images/fileicons/csh.png
new file mode 100644
index 000000000..cc21e7995
--- /dev/null
+++ b/lib/images/fileicons/csh.png
Binary files differ
diff --git a/lib/images/fileicons/css.png b/lib/images/fileicons/css.png
index 89c1537fd..abd16fa8e 100644
--- a/lib/images/fileicons/css.png
+++ b/lib/images/fileicons/css.png
Binary files differ
diff --git a/lib/images/fileicons/csv.png b/lib/images/fileicons/csv.png
index b604453c4..af37ba577 100644
--- a/lib/images/fileicons/csv.png
+++ b/lib/images/fileicons/csv.png
Binary files differ
diff --git a/lib/images/fileicons/deb.png b/lib/images/fileicons/deb.png
index 8fe57327a..9eb29019b 100644
--- a/lib/images/fileicons/deb.png
+++ b/lib/images/fileicons/deb.png
Binary files differ
diff --git a/lib/images/fileicons/diff.png b/lib/images/fileicons/diff.png
new file mode 100644
index 000000000..1775da014
--- /dev/null
+++ b/lib/images/fileicons/diff.png
Binary files differ
diff --git a/lib/images/fileicons/doc.png b/lib/images/fileicons/doc.png
index 79d8ff1cd..925494576 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 79d8ff1cd..5bae13f9e 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 8158a8a21..8f31d38ac 100644
--- a/lib/images/fileicons/file.png
+++ b/lib/images/fileicons/file.png
Binary files differ
diff --git a/lib/images/fileicons/gif.png b/lib/images/fileicons/gif.png
index 1d9dd562a..bcbb8366b 100644
--- a/lib/images/fileicons/gif.png
+++ b/lib/images/fileicons/gif.png
Binary files differ
diff --git a/lib/images/fileicons/gz.png b/lib/images/fileicons/gz.png
index 48f19596c..0a0a4b94f 100644
--- a/lib/images/fileicons/gz.png
+++ b/lib/images/fileicons/gz.png
Binary files differ
diff --git a/lib/images/fileicons/h.png b/lib/images/fileicons/h.png
new file mode 100644
index 000000000..4afe8f84f
--- /dev/null
+++ b/lib/images/fileicons/h.png
Binary files differ
diff --git a/lib/images/fileicons/hpp.png b/lib/images/fileicons/hpp.png
new file mode 100644
index 000000000..3ee7583d2
--- /dev/null
+++ b/lib/images/fileicons/hpp.png
Binary files differ
diff --git a/lib/images/fileicons/htm.png b/lib/images/fileicons/htm.png
index d45e4c19a..02e81932b 100644
--- a/lib/images/fileicons/htm.png
+++ b/lib/images/fileicons/htm.png
Binary files differ
diff --git a/lib/images/fileicons/html.png b/lib/images/fileicons/html.png
index d45e4c19a..02e81932b 100644
--- a/lib/images/fileicons/html.png
+++ b/lib/images/fileicons/html.png
Binary files differ
diff --git a/lib/images/fileicons/ico.png b/lib/images/fileicons/ico.png
index 1d9dd562a..93343717c 100644
--- a/lib/images/fileicons/ico.png
+++ b/lib/images/fileicons/ico.png
Binary files differ
diff --git a/lib/images/fileicons/index.php b/lib/images/fileicons/index.php
index f90e7e6f0..09b6c9df8 100644
--- a/lib/images/fileicons/index.php
+++ b/lib/images/fileicons/index.php
@@ -44,5 +44,24 @@ foreach (glob('*.png') as $img) {
?>
</div>
+<br style="clear: left" />
+
+<div class="white box">
+ <?php
+ foreach (glob('32x32/*.png') as $img) {
+ echo '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> ';
+ }
+ ?>
+</div>
+
+<div class="black box">
+ <?php
+ foreach (glob('32x32/*.png') as $img) {
+ echo '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> ';
+ }
+ ?>
+</div>
+
+
</body>
</html>
diff --git a/lib/images/fileicons/java.png b/lib/images/fileicons/java.png
index c5f2fd09f..cf6f5b4f5 100644
--- a/lib/images/fileicons/java.png
+++ b/lib/images/fileicons/java.png
Binary files differ
diff --git a/lib/images/fileicons/jpeg.png b/lib/images/fileicons/jpeg.png
index 1d9dd562a..29dea5761 100644
--- a/lib/images/fileicons/jpeg.png
+++ b/lib/images/fileicons/jpeg.png
Binary files differ
diff --git a/lib/images/fileicons/jpg.png b/lib/images/fileicons/jpg.png
index 1d9dd562a..29dea5761 100644
--- a/lib/images/fileicons/jpg.png
+++ b/lib/images/fileicons/jpg.png
Binary files differ
diff --git a/lib/images/fileicons/js.png b/lib/images/fileicons/js.png
index 0c314eb56..16e3f9538 100644
--- a/lib/images/fileicons/js.png
+++ b/lib/images/fileicons/js.png
Binary files differ
diff --git a/lib/images/fileicons/json.png b/lib/images/fileicons/json.png
new file mode 100644
index 000000000..96611cb53
--- /dev/null
+++ b/lib/images/fileicons/json.png
Binary files differ
diff --git a/lib/images/fileicons/lua.png b/lib/images/fileicons/lua.png
index 994c6e8f0..81fdeea40 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 411dad080..7c6d37184 100644
--- a/lib/images/fileicons/mp3.png
+++ b/lib/images/fileicons/mp3.png
Binary files differ
diff --git a/lib/images/fileicons/mp4.png b/lib/images/fileicons/mp4.png
index b89fc5299..ee5b91150 100644
--- a/lib/images/fileicons/mp4.png
+++ b/lib/images/fileicons/mp4.png
Binary files differ
diff --git a/lib/images/fileicons/odc.png b/lib/images/fileicons/odc.png
index 4d6676c3a..331140552 100644
--- a/lib/images/fileicons/odc.png
+++ b/lib/images/fileicons/odc.png
Binary files differ
diff --git a/lib/images/fileicons/odf.png b/lib/images/fileicons/odf.png
index cb88d68e6..eccae9e20 100644
--- a/lib/images/fileicons/odf.png
+++ b/lib/images/fileicons/odf.png
Binary files differ
diff --git a/lib/images/fileicons/odg.png b/lib/images/fileicons/odg.png
index a07216f4a..5224425e6 100644
--- a/lib/images/fileicons/odg.png
+++ b/lib/images/fileicons/odg.png
Binary files differ
diff --git a/lib/images/fileicons/odi.png b/lib/images/fileicons/odi.png
index a07216f4a..b57fd974d 100644
--- a/lib/images/fileicons/odi.png
+++ b/lib/images/fileicons/odi.png
Binary files differ
diff --git a/lib/images/fileicons/odp.png b/lib/images/fileicons/odp.png
index 2f2574af6..81d1023c0 100644
--- a/lib/images/fileicons/odp.png
+++ b/lib/images/fileicons/odp.png
Binary files differ
diff --git a/lib/images/fileicons/ods.png b/lib/images/fileicons/ods.png
index 4d6676c3a..77e6d5366 100644
--- a/lib/images/fileicons/ods.png
+++ b/lib/images/fileicons/ods.png
Binary files differ
diff --git a/lib/images/fileicons/odt.png b/lib/images/fileicons/odt.png
index f9c126efd..8490eec74 100644
--- a/lib/images/fileicons/odt.png
+++ b/lib/images/fileicons/odt.png
Binary files differ
diff --git a/lib/images/fileicons/ogg.png b/lib/images/fileicons/ogg.png
index 0a21eae65..38f615c99 100644
--- a/lib/images/fileicons/ogg.png
+++ b/lib/images/fileicons/ogg.png
Binary files differ
diff --git a/lib/images/fileicons/ogv.png b/lib/images/fileicons/ogv.png
index b89fc5299..a937dfc4c 100644
--- a/lib/images/fileicons/ogv.png
+++ b/lib/images/fileicons/ogv.png
Binary files differ
diff --git a/lib/images/fileicons/pas.png b/lib/images/fileicons/pas.png
new file mode 100644
index 000000000..0c14372d0
--- /dev/null
+++ b/lib/images/fileicons/pas.png
Binary files differ
diff --git a/lib/images/fileicons/pdf.png b/lib/images/fileicons/pdf.png
index 029dcffec..1bc154641 100644
--- a/lib/images/fileicons/pdf.png
+++ b/lib/images/fileicons/pdf.png
Binary files differ
diff --git a/lib/images/fileicons/php.png b/lib/images/fileicons/php.png
index f81e405de..2deb5d3b1 100644
--- a/lib/images/fileicons/php.png
+++ b/lib/images/fileicons/php.png
Binary files differ
diff --git a/lib/images/fileicons/pl.png b/lib/images/fileicons/pl.png
index 92f3f9754..a4fa92203 100644
--- a/lib/images/fileicons/pl.png
+++ b/lib/images/fileicons/pl.png
Binary files differ
diff --git a/lib/images/fileicons/png.png b/lib/images/fileicons/png.png
index 1d9dd562a..007270532 100644
--- a/lib/images/fileicons/png.png
+++ b/lib/images/fileicons/png.png
Binary files differ
diff --git a/lib/images/fileicons/ppt.png b/lib/images/fileicons/ppt.png
index b7afb2266..3355c2712 100644
--- a/lib/images/fileicons/ppt.png
+++ b/lib/images/fileicons/ppt.png
Binary files differ
diff --git a/lib/images/fileicons/pptx.png b/lib/images/fileicons/pptx.png
index b7afb2266..269cdb8fc 100644
--- a/lib/images/fileicons/pptx.png
+++ b/lib/images/fileicons/pptx.png
Binary files differ
diff --git a/lib/images/fileicons/ps.png b/lib/images/fileicons/ps.png
index 40a80baad..e61d1aa7e 100644
--- a/lib/images/fileicons/ps.png
+++ b/lib/images/fileicons/ps.png
Binary files differ
diff --git a/lib/images/fileicons/py.png b/lib/images/fileicons/py.png
index 15a727c54..f0ed0258c 100644
--- a/lib/images/fileicons/py.png
+++ b/lib/images/fileicons/py.png
Binary files differ
diff --git a/lib/images/fileicons/rar.png b/lib/images/fileicons/rar.png
index c761a4f7f..f15d4ce5b 100644
--- a/lib/images/fileicons/rar.png
+++ b/lib/images/fileicons/rar.png
Binary files differ
diff --git a/lib/images/fileicons/rb.png b/lib/images/fileicons/rb.png
index 408f708a1..0e59207fc 100644
--- a/lib/images/fileicons/rb.png
+++ b/lib/images/fileicons/rb.png
Binary files differ
diff --git a/lib/images/fileicons/rpm.png b/lib/images/fileicons/rpm.png
index 5cf727de0..831424ff5 100644
--- a/lib/images/fileicons/rpm.png
+++ b/lib/images/fileicons/rpm.png
Binary files differ
diff --git a/lib/images/fileicons/rtf.png b/lib/images/fileicons/rtf.png
index 99fe3d8fd..bbc425ca3 100644
--- a/lib/images/fileicons/rtf.png
+++ b/lib/images/fileicons/rtf.png
Binary files differ
diff --git a/lib/images/fileicons/sh.png b/lib/images/fileicons/sh.png
new file mode 100644
index 000000000..256067106
--- /dev/null
+++ b/lib/images/fileicons/sh.png
Binary files differ
diff --git a/lib/images/fileicons/sql.png b/lib/images/fileicons/sql.png
index a7b0684c7..6697943e2 100644
--- a/lib/images/fileicons/sql.png
+++ b/lib/images/fileicons/sql.png
Binary files differ
diff --git a/lib/images/fileicons/swf.png b/lib/images/fileicons/swf.png
index ecc7309ad..b45a72cc9 100644
--- a/lib/images/fileicons/swf.png
+++ b/lib/images/fileicons/swf.png
Binary files differ
diff --git a/lib/images/fileicons/sxc.png b/lib/images/fileicons/sxc.png
index 4d6676c3a..c96cf303f 100644
--- a/lib/images/fileicons/sxc.png
+++ b/lib/images/fileicons/sxc.png
Binary files differ
diff --git a/lib/images/fileicons/sxd.png b/lib/images/fileicons/sxd.png
index a07216f4a..124b928e1 100644
--- a/lib/images/fileicons/sxd.png
+++ b/lib/images/fileicons/sxd.png
Binary files differ
diff --git a/lib/images/fileicons/sxi.png b/lib/images/fileicons/sxi.png
index 2f2574af6..8a5e23033 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 f9c126efd..9a903791c 100644
--- a/lib/images/fileicons/sxw.png
+++ b/lib/images/fileicons/sxw.png
Binary files differ
diff --git a/lib/images/fileicons/tar.png b/lib/images/fileicons/tar.png
index a28c86f2d..e57029adc 100644
--- a/lib/images/fileicons/tar.png
+++ b/lib/images/fileicons/tar.png
Binary files differ
diff --git a/lib/images/fileicons/tgz.png b/lib/images/fileicons/tgz.png
index 48f19596c..25ef9e15a 100644
--- a/lib/images/fileicons/tgz.png
+++ b/lib/images/fileicons/tgz.png
Binary files differ
diff --git a/lib/images/fileicons/txt.png b/lib/images/fileicons/txt.png
index bb94949f6..4fd921655 100644
--- a/lib/images/fileicons/txt.png
+++ b/lib/images/fileicons/txt.png
Binary files differ
diff --git a/lib/images/fileicons/wav.png b/lib/images/fileicons/wav.png
index c167f4fdb..c8880c62e 100644
--- a/lib/images/fileicons/wav.png
+++ b/lib/images/fileicons/wav.png
Binary files differ
diff --git a/lib/images/fileicons/webm.png b/lib/images/fileicons/webm.png
index b89fc5299..55db61914 100644
--- a/lib/images/fileicons/webm.png
+++ b/lib/images/fileicons/webm.png
Binary files differ
diff --git a/lib/images/fileicons/xls.png b/lib/images/fileicons/xls.png
index 24911b802..5ac56f20d 100644
--- a/lib/images/fileicons/xls.png
+++ b/lib/images/fileicons/xls.png
Binary files differ
diff --git a/lib/images/fileicons/xlsx.png b/lib/images/fileicons/xlsx.png
index 24911b802..89c84c522 100644
--- a/lib/images/fileicons/xlsx.png
+++ b/lib/images/fileicons/xlsx.png
Binary files differ
diff --git a/lib/images/fileicons/xml.png b/lib/images/fileicons/xml.png
index ae9831b34..4480a6385 100644
--- a/lib/images/fileicons/xml.png
+++ b/lib/images/fileicons/xml.png
Binary files differ
diff --git a/lib/images/fileicons/zip.png b/lib/images/fileicons/zip.png
index fb8850c9a..4a36a35ff 100644
--- a/lib/images/fileicons/zip.png
+++ b/lib/images/fileicons/zip.png
Binary files differ
diff --git a/lib/images/interwiki/user.png b/lib/images/interwiki/user.png
new file mode 100644
index 000000000..79f35ccbd
--- /dev/null
+++ b/lib/images/interwiki/user.png
Binary files differ
diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php
index 6c7c28ff6..ebb097a04 100644
--- a/lib/plugins/acl/admin.php
+++ b/lib/plugins/acl/admin.php
@@ -268,7 +268,10 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
usort($data,array($this,'_tree_sort'));
$count = count($data);
if($count>0) for($i=1; $i<$count; $i++){
- if($data[$i-1]['id'] == $data[$i]['id'] && $data[$i-1]['type'] == $data[$i]['type']) unset($data[$i]);
+ if($data[$i-1]['id'] == $data[$i]['id'] && $data[$i-1]['type'] == $data[$i]['type']) {
+ unset($data[$i]);
+ $i++; // duplicate found, next $i can't be a duplicate, so skip forward one
+ }
}
return $data;
}
@@ -488,7 +491,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
function _html_list_acl($item){
$ret = '';
// what to display
- if($item['label']){
+ if(!empty($item['label'])){
$base = $item['label'];
}else{
$base = ':'.$item['id'];
@@ -496,8 +499,11 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
}
// highlight?
- if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id']))
+ if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id'])) {
$cl = ' cur';
+ } else {
+ $cl = '';
+ }
// namespace or page?
if($item['type']=='d'){
@@ -773,8 +779,8 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
}
echo '<select name="acl_t" class="edit">'.NL;
- echo ' <option value="__g__" class="aclgroup"'.$gsel.'>'.$this->getLang('acl_group').':</option>'.NL;
- echo ' <option value="__u__" class="acluser"'.$usel.'>'.$this->getLang('acl_user').':</option>'.NL;
+ echo ' <option value="__g__" class="aclgroup"'.$gsel.'>'.$this->getLang('acl_group').'</option>'.NL;
+ echo ' <option value="__u__" class="acluser"'.$usel.'>'.$this->getLang('acl_user').'</option>'.NL;
if (!empty($this->specials)) {
echo ' <optgroup label="&#160;">'.NL;
foreach($this->specials as $ug){
diff --git a/lib/plugins/acl/lang/ar/lang.php b/lib/plugins/acl/lang/ar/lang.php
index 4e44dab5f..89fe27a76 100644
--- a/lib/plugins/acl/lang/ar/lang.php
+++ b/lib/plugins/acl/lang/ar/lang.php
@@ -9,8 +9,8 @@
* @author uahello@gmail.com
*/
$lang['admin_acl'] = 'إدارة قوائم التحكم بالدخول';
-$lang['acl_group'] = 'مجموعة';
-$lang['acl_user'] = 'مستخدم';
+$lang['acl_group'] = 'مجموعة:';
+$lang['acl_user'] = 'مستخدم:';
$lang['acl_perms'] = 'ترخيص لـ';
$lang['page'] = 'صفحة';
$lang['namespace'] = 'فضاء التسمية';
diff --git a/lib/plugins/acl/lang/bg/lang.php b/lib/plugins/acl/lang/bg/lang.php
index 14e7d311c..648b91ef4 100644
--- a/lib/plugins/acl/lang/bg/lang.php
+++ b/lib/plugins/acl/lang/bg/lang.php
@@ -8,8 +8,8 @@
* @author Kiril <neohidra@gmail.com>
*/
$lang['admin_acl'] = 'Управление на списъците за достъп';
-$lang['acl_group'] = 'Група';
-$lang['acl_user'] = 'Потребител';
+$lang['acl_group'] = 'Група:';
+$lang['acl_user'] = 'Потребител:';
$lang['acl_perms'] = 'Права за';
$lang['page'] = 'Страница';
$lang['namespace'] = 'Именно пространство';
diff --git a/lib/plugins/acl/lang/ca-valencia/lang.php b/lib/plugins/acl/lang/ca-valencia/lang.php
index ef0ae92eb..bdfa7da22 100644
--- a/lib/plugins/acl/lang/ca-valencia/lang.php
+++ b/lib/plugins/acl/lang/ca-valencia/lang.php
@@ -8,8 +8,8 @@
* @author Bernat Arlandis <berarma@llenguaitecnologia.com>
*/
$lang['admin_acl'] = 'Gestor de les llistes de control d\'accés';
-$lang['acl_group'] = 'Grup';
-$lang['acl_user'] = 'Usuari';
+$lang['acl_group'] = 'Grup:';
+$lang['acl_user'] = 'Usuari:';
$lang['acl_perms'] = 'Permissos per a';
$lang['page'] = 'Pàgina';
$lang['namespace'] = 'Espai de noms';
diff --git a/lib/plugins/acl/lang/ca/lang.php b/lib/plugins/acl/lang/ca/lang.php
index 183db711b..bead981f0 100644
--- a/lib/plugins/acl/lang/ca/lang.php
+++ b/lib/plugins/acl/lang/ca/lang.php
@@ -10,8 +10,8 @@
* @author daniel@6temes.cat
*/
$lang['admin_acl'] = 'Gestió de la Llista de Control d\'Accés';
-$lang['acl_group'] = 'Grup';
-$lang['acl_user'] = 'Usuari';
+$lang['acl_group'] = 'Grup:';
+$lang['acl_user'] = 'Usuari:';
$lang['acl_perms'] = 'Permisos per a';
$lang['page'] = 'Pàgina';
$lang['namespace'] = 'Espai';
diff --git a/lib/plugins/acl/lang/cs/lang.php b/lib/plugins/acl/lang/cs/lang.php
index 8031612f7..497d53a4a 100644
--- a/lib/plugins/acl/lang/cs/lang.php
+++ b/lib/plugins/acl/lang/cs/lang.php
@@ -15,8 +15,8 @@
* @author mkucera66@seznam.cz
*/
$lang['admin_acl'] = 'Správa přístupových práv';
-$lang['acl_group'] = 'Skupina';
-$lang['acl_user'] = 'Uživatel';
+$lang['acl_group'] = 'Skupina:';
+$lang['acl_user'] = 'Uživatel:';
$lang['acl_perms'] = 'Práva pro';
$lang['page'] = 'Stránka';
$lang['namespace'] = 'Jmenný prostor';
diff --git a/lib/plugins/acl/lang/da/lang.php b/lib/plugins/acl/lang/da/lang.php
index 2558795fd..2f8086ac1 100644
--- a/lib/plugins/acl/lang/da/lang.php
+++ b/lib/plugins/acl/lang/da/lang.php
@@ -16,8 +16,8 @@
* @author Mikael Lyngvig <mikael@lyngvig.org>
*/
$lang['admin_acl'] = 'Rettighedsadministration';
-$lang['acl_group'] = 'Gruppe';
-$lang['acl_user'] = 'Bruger';
+$lang['acl_group'] = 'Gruppe:';
+$lang['acl_user'] = 'Bruger:';
$lang['acl_perms'] = 'Rettigheder for';
$lang['page'] = 'Dokument';
$lang['namespace'] = 'Navnerum';
diff --git a/lib/plugins/acl/lang/de-informal/lang.php b/lib/plugins/acl/lang/de-informal/lang.php
index 35df13dc0..6a04cc520 100644
--- a/lib/plugins/acl/lang/de-informal/lang.php
+++ b/lib/plugins/acl/lang/de-informal/lang.php
@@ -13,8 +13,8 @@
* @author Volker Bödker <volker@boedker.de>
*/
$lang['admin_acl'] = 'Zugangsverwaltung';
-$lang['acl_group'] = 'Gruppe';
-$lang['acl_user'] = 'Benutzer';
+$lang['acl_group'] = 'Gruppe:';
+$lang['acl_user'] = 'Benutzer:';
$lang['acl_perms'] = 'Rechte für';
$lang['page'] = 'Seite';
$lang['namespace'] = 'Namensraum';
diff --git a/lib/plugins/acl/lang/de/lang.php b/lib/plugins/acl/lang/de/lang.php
index 77de4b097..f25a2ea71 100644
--- a/lib/plugins/acl/lang/de/lang.php
+++ b/lib/plugins/acl/lang/de/lang.php
@@ -23,8 +23,8 @@
* @author Pierre Corell <info@joomla-praxis.de>
*/
$lang['admin_acl'] = 'Zugangsverwaltung';
-$lang['acl_group'] = 'Gruppe';
-$lang['acl_user'] = 'Benutzer';
+$lang['acl_group'] = 'Gruppe:';
+$lang['acl_user'] = 'Benutzer:';
$lang['acl_perms'] = 'Berechtigungen für';
$lang['page'] = 'Seite';
$lang['namespace'] = 'Namensraum';
diff --git a/lib/plugins/acl/lang/el/lang.php b/lib/plugins/acl/lang/el/lang.php
index dc4a9f034..09c8691e7 100644
--- a/lib/plugins/acl/lang/el/lang.php
+++ b/lib/plugins/acl/lang/el/lang.php
@@ -14,8 +14,8 @@
* @author Vasileios Karavasilis vasileioskaravasilis@gmail.com
*/
$lang['admin_acl'] = 'Διαχείριση Δικαιωμάτων Πρόσβασης';
-$lang['acl_group'] = 'Ομάδα';
-$lang['acl_user'] = 'Χρήστης';
+$lang['acl_group'] = 'Ομάδα:';
+$lang['acl_user'] = 'Χρήστης:';
$lang['acl_perms'] = 'Δικαιώματα για';
$lang['page'] = 'Σελίδα';
$lang['namespace'] = 'Φάκελος';
diff --git a/lib/plugins/acl/lang/en/lang.php b/lib/plugins/acl/lang/en/lang.php
index 779614d32..0c8648974 100644
--- a/lib/plugins/acl/lang/en/lang.php
+++ b/lib/plugins/acl/lang/en/lang.php
@@ -9,8 +9,8 @@
*/
$lang['admin_acl'] = 'Access Control List Management';
-$lang['acl_group'] = 'Group';
-$lang['acl_user'] = 'User';
+$lang['acl_group'] = 'Group:';
+$lang['acl_user'] = 'User:';
$lang['acl_perms'] = 'Permissions for';
$lang['page'] = 'Page';
$lang['namespace'] = 'Namespace';
diff --git a/lib/plugins/acl/lang/eo/lang.php b/lib/plugins/acl/lang/eo/lang.php
index a5f607341..f65995408 100644
--- a/lib/plugins/acl/lang/eo/lang.php
+++ b/lib/plugins/acl/lang/eo/lang.php
@@ -12,8 +12,8 @@
* @author Robert Bogenschneider <bogi@uea.org>
*/
$lang['admin_acl'] = 'Administrado de Alirkontrola Listo (ACL)';
-$lang['acl_group'] = 'Grupo';
-$lang['acl_user'] = 'Uzanto';
+$lang['acl_group'] = 'Grupo:';
+$lang['acl_user'] = 'Uzanto:';
$lang['acl_perms'] = 'Rajtoj por';
$lang['page'] = 'Paĝo';
$lang['namespace'] = 'Nomspaco';
diff --git a/lib/plugins/acl/lang/es/lang.php b/lib/plugins/acl/lang/es/lang.php
index cf503d4d1..da0dc8e38 100644
--- a/lib/plugins/acl/lang/es/lang.php
+++ b/lib/plugins/acl/lang/es/lang.php
@@ -26,8 +26,8 @@
* @author Mercè López mercelz@gmail.com
*/
$lang['admin_acl'] = 'Administración de lista de control de acceso';
-$lang['acl_group'] = 'Grupo';
-$lang['acl_user'] = 'Usuario';
+$lang['acl_group'] = 'Grupo:';
+$lang['acl_user'] = 'Usuario:';
$lang['acl_perms'] = 'Permiso para';
$lang['page'] = 'Página';
$lang['namespace'] = 'Espacio de nombres';
diff --git a/lib/plugins/acl/lang/et/help.txt b/lib/plugins/acl/lang/et/help.txt
new file mode 100644
index 000000000..a2c8e9e95
--- /dev/null
+++ b/lib/plugins/acl/lang/et/help.txt
@@ -0,0 +1,9 @@
+=== Kiir-spikker: ===
+
+Käesoleval leheküljel saad oma wiki nimeruumidele ja lehekülgedele lisada ning eemaldada õigusi.
+ * Vasemas paanis on näidatud kõik saada olevad nimeruumid ja leheküljed.
+ * Ülal olev vorm laseb sul vaadelda ja muuta valitud rühma või kasutaja õigusi.
+ * Allolevas tabelis näidatakse kõiki hetkel sättestatud reegleid ligipääsudele.
+Saad seda kasutada reeglite hulgi muutmiseks või kustutamiseks
+
+Mõistmaks paremini DokuWiki ligipääsu halduse toimimist, võiks abiks olla [[doku>acl|ACL-i ametliku dokumentatsiooniga]] tutvumine. \ No newline at end of file
diff --git a/lib/plugins/acl/lang/et/lang.php b/lib/plugins/acl/lang/et/lang.php
index bc4c73a16..d1a047aff 100644
--- a/lib/plugins/acl/lang/et/lang.php
+++ b/lib/plugins/acl/lang/et/lang.php
@@ -1,21 +1,30 @@
<?php
+
/**
- * Estonian language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Oliver S6ro <seem.iges@mail.ee>
* @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>
+ * @author Janar Leas <janar.leas@eesti.ee>
*/
$lang['admin_acl'] = 'Ligipääsukontrolli nimekirja haldamine';
-$lang['acl_group'] = 'Grupp';
-$lang['acl_user'] = 'Kasutaja';
+$lang['acl_group'] = 'Rühm:';
+$lang['acl_user'] = 'Kasutaja:';
$lang['acl_perms'] = 'Lubatud';
$lang['page'] = 'leht';
-$lang['namespace'] = 'alajaotus';
+$lang['namespace'] = 'Nimeruum';
$lang['btn_select'] = 'Vali';
+$lang['p_user_ns'] = 'Kasutaja <b class="aclgroup">%s</b> omab nimeruumis <b class="aclns">%s</b>: <i>%s</i> järgmisi õigusi.';
+$lang['p_group_ns'] = 'Rühma <b class="aclgroup">%s</b> liikmed omavad nimeruumis <b class="aclns">%s</b>: <i>%s</i> järgmisi õigusi.';
+$lang['p_choose_id'] = 'Sisesta ülal-olevasse vormi <b>kasutaja või rühm</b> nägemaks leheküljele <b class="aclpage">%s</b> sätestatud volitusi.';
+$lang['p_choose_ns'] = 'Sisesta ülal-olevasse vormi <b>kasutaja või rühm</b> nägemaks nimeruumile <b class="aclpage">%s</b> sätestatud volitusi.';
+$lang['p_inherited'] = 'Teadmiseks: Neid õigusi pole eralti määratletud, vaid on päritud teistest rühmadest või ülemast nimeruumist.';
+$lang['p_isadmin'] = 'Teadmiseks: Valitud rühm või kasutaja omab alati kõiki õigusi, kuna nii on sätestanud ülemkasutaja.';
+$lang['p_include'] = 'Kõrgemad õigused hõlmavad alamaid. Õigus loomine, üleslaadida ja kustutada rakenduvad nimeruumidele, mitte lehekülgedele.';
+$lang['where'] = 'Lehekülg/nimeruum';
$lang['who'] = 'Kasutaja/Grupp';
$lang['perm'] = 'Õigused';
$lang['acl_perm0'] = 'Pole';
diff --git a/lib/plugins/acl/lang/eu/lang.php b/lib/plugins/acl/lang/eu/lang.php
index b9285ff36..f051523d9 100644
--- a/lib/plugins/acl/lang/eu/lang.php
+++ b/lib/plugins/acl/lang/eu/lang.php
@@ -6,8 +6,8 @@
* @author Zigor Astarbe <astarbe@gmail.com>
*/
$lang['admin_acl'] = 'Atzipen Kontrol Listaren Kudeaketa';
-$lang['acl_group'] = 'Taldea';
-$lang['acl_user'] = 'Erabiltzailea';
+$lang['acl_group'] = 'Taldea:';
+$lang['acl_user'] = 'Erabiltzailea:';
$lang['acl_perms'] = 'Baimenak honetarako:';
$lang['page'] = 'Orria';
$lang['namespace'] = 'Izen-espazioa';
diff --git a/lib/plugins/acl/lang/fa/lang.php b/lib/plugins/acl/lang/fa/lang.php
index 24bebaeaf..3564f6a39 100644
--- a/lib/plugins/acl/lang/fa/lang.php
+++ b/lib/plugins/acl/lang/fa/lang.php
@@ -12,8 +12,8 @@
* @author AmirH Hassaneini <mytechmix@gmail.com>
*/
$lang['admin_acl'] = 'مدیریت کنترل دسترسی‌ها';
-$lang['acl_group'] = 'گروه';
-$lang['acl_user'] = 'کاربر';
+$lang['acl_group'] = 'گروه:';
+$lang['acl_user'] = 'کاربر:';
$lang['acl_perms'] = 'مجوز برای';
$lang['page'] = 'صفحه';
$lang['namespace'] = 'فضای‌نام';
diff --git a/lib/plugins/acl/lang/fi/lang.php b/lib/plugins/acl/lang/fi/lang.php
index 50224dfb4..2dfc35801 100644
--- a/lib/plugins/acl/lang/fi/lang.php
+++ b/lib/plugins/acl/lang/fi/lang.php
@@ -9,8 +9,8 @@
* @author Sami Olmari <sami@olmari.fi>
*/
$lang['admin_acl'] = 'Käyttöoikeudet (ACL)';
-$lang['acl_group'] = 'Ryhmä';
-$lang['acl_user'] = 'Käyttäjä';
+$lang['acl_group'] = 'Ryhmä:';
+$lang['acl_user'] = 'Käyttäjä:';
$lang['acl_perms'] = 'Oikeudet';
$lang['page'] = 'Sivu';
$lang['namespace'] = 'Nimiavaruus';
diff --git a/lib/plugins/acl/lang/fr/lang.php b/lib/plugins/acl/lang/fr/lang.php
index dc17cf79e..9539c5be5 100644
--- a/lib/plugins/acl/lang/fr/lang.php
+++ b/lib/plugins/acl/lang/fr/lang.php
@@ -28,8 +28,8 @@
* @author Bruno Veilleux <bruno.vey@gmail.com>
*/
$lang['admin_acl'] = 'Gestion de la liste des contrôles d\'accès (ACL)';
-$lang['acl_group'] = 'Groupe';
-$lang['acl_user'] = 'Utilisateur';
+$lang['acl_group'] = 'Groupe:';
+$lang['acl_user'] = 'Utilisateur:';
$lang['acl_perms'] = 'Autorisations pour';
$lang['page'] = 'Page';
$lang['namespace'] = 'Catégorie';
diff --git a/lib/plugins/acl/lang/gl/lang.php b/lib/plugins/acl/lang/gl/lang.php
index 3325bfd07..74d2a7943 100644
--- a/lib/plugins/acl/lang/gl/lang.php
+++ b/lib/plugins/acl/lang/gl/lang.php
@@ -7,8 +7,8 @@
* @author Rodrigo Rega <rodrigorega@gmail.com>
*/
$lang['admin_acl'] = 'Xestión da Lista de Control de Acceso (ACL)';
-$lang['acl_group'] = 'Grupo';
-$lang['acl_user'] = 'Usuario';
+$lang['acl_group'] = 'Grupo:';
+$lang['acl_user'] = 'Usuario:';
$lang['acl_perms'] = 'Permisos para';
$lang['page'] = 'Páxina';
$lang['namespace'] = 'Nome de espazo';
diff --git a/lib/plugins/acl/lang/he/lang.php b/lib/plugins/acl/lang/he/lang.php
index 6716081eb..2369b8010 100644
--- a/lib/plugins/acl/lang/he/lang.php
+++ b/lib/plugins/acl/lang/he/lang.php
@@ -10,8 +10,8 @@
* @author Yaron Shahrabani <sh.yaron@gmail.com>
*/
$lang['admin_acl'] = 'ניהול רשימת בקרת גישות';
-$lang['acl_group'] = 'קבוצה';
-$lang['acl_user'] = 'משתמש';
+$lang['acl_group'] = 'קבוצה:';
+$lang['acl_user'] = 'משתמש:';
$lang['acl_perms'] = 'הרשאות עבור';
$lang['page'] = 'דף';
$lang['namespace'] = 'מרחב שמות';
diff --git a/lib/plugins/acl/lang/hr/lang.php b/lib/plugins/acl/lang/hr/lang.php
index 8c21f1b0b..b12966c84 100644
--- a/lib/plugins/acl/lang/hr/lang.php
+++ b/lib/plugins/acl/lang/hr/lang.php
@@ -1,14 +1,15 @@
<?php
+
/**
- * Croatian language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @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_group'] = 'Grupa:';
+$lang['acl_user'] = 'Korisnik:';
$lang['acl_perms'] = 'Dozvole za';
$lang['page'] = 'Stranica';
$lang['namespace'] = 'Imenski prostor';
diff --git a/lib/plugins/acl/lang/ia/lang.php b/lib/plugins/acl/lang/ia/lang.php
index f7d076539..121424c47 100644
--- a/lib/plugins/acl/lang/ia/lang.php
+++ b/lib/plugins/acl/lang/ia/lang.php
@@ -6,8 +6,8 @@
* @author Martijn Dekker <martijn@inlv.org>
*/
$lang['admin_acl'] = 'Gestion de listas de controlo de accesso';
-$lang['acl_group'] = 'Gruppo';
-$lang['acl_user'] = 'Usator';
+$lang['acl_group'] = 'Gruppo:';
+$lang['acl_user'] = 'Usator:';
$lang['acl_perms'] = 'Permissiones pro';
$lang['page'] = 'Pagina';
$lang['namespace'] = 'Spatio de nomines';
diff --git a/lib/plugins/acl/lang/id/lang.php b/lib/plugins/acl/lang/id/lang.php
index 6f619c5ec..3b0ecf446 100644
--- a/lib/plugins/acl/lang/id/lang.php
+++ b/lib/plugins/acl/lang/id/lang.php
@@ -7,8 +7,8 @@
* @author Yustinus Waruwu <juswaruwu@gmail.com>
*/
$lang['admin_acl'] = 'Manajemen Daftar Pengendali Akses';
-$lang['acl_group'] = 'Grup';
-$lang['acl_user'] = 'User';
+$lang['acl_group'] = 'Grup:';
+$lang['acl_user'] = 'User:';
$lang['acl_perms'] = 'Ijin untuk';
$lang['page'] = 'Halaman';
$lang['namespace'] = 'Namespace';
diff --git a/lib/plugins/acl/lang/is/lang.php b/lib/plugins/acl/lang/is/lang.php
index b45faa80a..13ed7bfd7 100644
--- a/lib/plugins/acl/lang/is/lang.php
+++ b/lib/plugins/acl/lang/is/lang.php
@@ -6,8 +6,8 @@
* @author Ólafur Gunnlaugsson <oli@audiotools.com>
* @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca>
*/
-$lang['acl_group'] = 'Hópur';
-$lang['acl_user'] = 'Notandi';
+$lang['acl_group'] = 'Hópur:';
+$lang['acl_user'] = 'Notandi:';
$lang['page'] = 'Síða';
$lang['namespace'] = 'Nafnrými';
$lang['btn_select'] = 'Veldu';
diff --git a/lib/plugins/acl/lang/it/lang.php b/lib/plugins/acl/lang/it/lang.php
index ba2d0fd32..82827510f 100644
--- a/lib/plugins/acl/lang/it/lang.php
+++ b/lib/plugins/acl/lang/it/lang.php
@@ -17,8 +17,8 @@
* @author snarchio@gmail.com
*/
$lang['admin_acl'] = 'Gestione Lista Controllo Accessi (ACL)';
-$lang['acl_group'] = 'Gruppo';
-$lang['acl_user'] = 'Utente';
+$lang['acl_group'] = 'Gruppo:';
+$lang['acl_user'] = 'Utente:';
$lang['acl_perms'] = 'Permessi per';
$lang['page'] = 'Pagina';
$lang['namespace'] = 'Categoria';
diff --git a/lib/plugins/acl/lang/ja/lang.php b/lib/plugins/acl/lang/ja/lang.php
index 61fc1ea86..203ab96d2 100644
--- a/lib/plugins/acl/lang/ja/lang.php
+++ b/lib/plugins/acl/lang/ja/lang.php
@@ -12,8 +12,8 @@
* @author Satoshi Sahara <sahara.satoshi@gmail.com>
*/
$lang['admin_acl'] = 'アクセスコントロール管理';
-$lang['acl_group'] = 'グループ';
-$lang['acl_user'] = 'ユーザー';
+$lang['acl_group'] = 'グループ:';
+$lang['acl_user'] = 'ユーザー:';
$lang['acl_perms'] = '権限を追加';
$lang['page'] = '文書';
$lang['namespace'] = '名前空間';
diff --git a/lib/plugins/acl/lang/kk/lang.php b/lib/plugins/acl/lang/kk/lang.php
index f21b93132..28984fd6d 100644
--- a/lib/plugins/acl/lang/kk/lang.php
+++ b/lib/plugins/acl/lang/kk/lang.php
@@ -4,7 +4,7 @@
*
* @author Nurgozha Kaliaskarov astana08@gmail.com
*/
-$lang['acl_group'] = 'Группа';
-$lang['acl_user'] = 'Пайдаланушы';
+$lang['acl_group'] = 'Группа:';
+$lang['acl_user'] = 'Пайдаланушы:';
$lang['page'] = 'Бет';
$lang['acl_perm1'] = 'Оқу';
diff --git a/lib/plugins/acl/lang/ko/help.txt b/lib/plugins/acl/lang/ko/help.txt
index 9baeedbb9..80069b322 100644
--- a/lib/plugins/acl/lang/ko/help.txt
+++ b/lib/plugins/acl/lang/ko/help.txt
@@ -1,8 +1,8 @@
=== 빠른 도움말: ===
현재 문서에서 위키 이름공간과 문서에 대한 접근 권한을 추가하거나 삭제할 수 있습니다.
-* 왼쪽 영역에는 선택 가능한 이름공간과 문서 목록을 보여줍니다.
-* 위쪽 입력 양식에서 선택된 사용자와 그룹의 접근 권한을 보거나 바꿀 수 있습니다.
-* 아래 테이블에서 현재 설정된 모든 접근 제어 규칙을 볼 수 있으며, 즉시 여러 규칙을 삭제하거나 바꿀 수 있습니다.
+ * 왼쪽 영역에는 선택 가능한 이름공간과 문서 목록을 보여줍니다.
+ * 위쪽 입력 양식에서 선택된 사용자와 그룹의 접근 권한을 보거나 바꿀 수 있습니다.
+ * 아래 테이블에서 현재 설정된 모든 접근 제어 규칙을 볼 수 있으며, 즉시 여러 규칙을 삭제하거나 바꿀 수 있습니다.
도쿠위키에서 접근 제어가 어떻게 동작되는지 알아보려면 [[doku>ko:acl|ACL 공식 문서]]를 읽어보시기 바랍니다. \ No newline at end of file
diff --git a/lib/plugins/acl/lang/ko/lang.php b/lib/plugins/acl/lang/ko/lang.php
index 34b93a9f4..35563ff6c 100644
--- a/lib/plugins/acl/lang/ko/lang.php
+++ b/lib/plugins/acl/lang/ko/lang.php
@@ -15,8 +15,8 @@
* @author Garam <rowain8@gmail.com>
*/
$lang['admin_acl'] = '접근 제어 목록 관리';
-$lang['acl_group'] = '그룹';
-$lang['acl_user'] = '사용자';
+$lang['acl_group'] = '그룹:';
+$lang['acl_user'] = '사용자:';
$lang['acl_perms'] = '권한';
$lang['page'] = '문서';
$lang['namespace'] = '이름공간';
@@ -33,7 +33,7 @@ $lang['p_include'] = '더 높은 접근 권한은 하위를 포함
$lang['current'] = '현재 ACL 규칙';
$lang['where'] = '문서/이름공간';
$lang['who'] = '사용자/그룹';
-$lang['perm'] = '접근 권한';
+$lang['perm'] = '권한';
$lang['acl_perm0'] = '없음';
$lang['acl_perm1'] = '읽기';
$lang['acl_perm2'] = '편집';
diff --git a/lib/plugins/acl/lang/la/lang.php b/lib/plugins/acl/lang/la/lang.php
index 941de1f79..3779ba745 100644
--- a/lib/plugins/acl/lang/la/lang.php
+++ b/lib/plugins/acl/lang/la/lang.php
@@ -5,8 +5,8 @@
* @author Massimiliano Vassalli <vassalli.max@gmail.com>
*/
$lang['admin_acl'] = 'Administratio Indicis Custodiae Aditus';
-$lang['acl_group'] = 'Grex';
-$lang['acl_user'] = 'Sodalis';
+$lang['acl_group'] = 'Grex:';
+$lang['acl_user'] = 'Sodalis:';
$lang['acl_perms'] = 'Facultas:';
$lang['page'] = 'Pagina';
$lang['namespace'] = 'Genus';
diff --git a/lib/plugins/acl/lang/lt/lang.php b/lib/plugins/acl/lang/lt/lang.php
index f11944746..ef339177b 100644
--- a/lib/plugins/acl/lang/lt/lang.php
+++ b/lib/plugins/acl/lang/lt/lang.php
@@ -8,8 +8,8 @@
* @author Arunas Vaitekunas <aras@fan.lt>
*/
$lang['admin_acl'] = 'Priėjimo Kontrolės Sąrašų valdymas';
-$lang['acl_group'] = 'Grupė';
-$lang['acl_user'] = 'Vartotojas';
+$lang['acl_group'] = 'Grupė:';
+$lang['acl_user'] = 'Vartotojas:';
$lang['acl_perms'] = 'Leidimai';
$lang['page'] = 'Puslapis';
$lang['namespace'] = 'Pavadinimas';
diff --git a/lib/plugins/acl/lang/lv/lang.php b/lib/plugins/acl/lang/lv/lang.php
index f478b32c6..c0acdd733 100644
--- a/lib/plugins/acl/lang/lv/lang.php
+++ b/lib/plugins/acl/lang/lv/lang.php
@@ -1,13 +1,13 @@
<?php
+
/**
- * latvian language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Aivars Miška <allefm@gmail.com>
*/
$lang['admin_acl'] = 'Piekļuves tiesību vadība';
-$lang['acl_group'] = 'Grupa';
-$lang['acl_user'] = 'Lietotājs';
+$lang['acl_group'] = 'Grupa:';
+$lang['acl_user'] = 'Lietotājs:';
$lang['acl_perms'] = 'Tiesības';
$lang['page'] = 'Lapa';
$lang['namespace'] = 'Nodaļa';
diff --git a/lib/plugins/acl/lang/mk/lang.php b/lib/plugins/acl/lang/mk/lang.php
index d576c3d1d..27f41e776 100644
--- a/lib/plugins/acl/lang/mk/lang.php
+++ b/lib/plugins/acl/lang/mk/lang.php
@@ -4,8 +4,8 @@
*
* @author Dimitar Talevski <dimi3.14@gmail.com>
*/
-$lang['acl_group'] = 'Група';
-$lang['acl_user'] = 'Корисник';
+$lang['acl_group'] = 'Група:';
+$lang['acl_user'] = 'Корисник:';
$lang['acl_perms'] = 'Пермисии за';
$lang['page'] = 'Страница';
$lang['btn_select'] = 'Избери';
diff --git a/lib/plugins/acl/lang/mr/lang.php b/lib/plugins/acl/lang/mr/lang.php
index 978df758a..1094ed768 100644
--- a/lib/plugins/acl/lang/mr/lang.php
+++ b/lib/plugins/acl/lang/mr/lang.php
@@ -8,8 +8,8 @@
* @author shantanoo@gmail.com
*/
$lang['admin_acl'] = 'Access Control List व्यवस्थापन';
-$lang['acl_group'] = 'गट';
-$lang['acl_user'] = 'सदस्य';
+$lang['acl_group'] = 'गट:';
+$lang['acl_user'] = 'सदस्य:';
$lang['acl_perms'] = 'परवानगी \'च्या साठी';
$lang['page'] = 'पान';
$lang['namespace'] = 'नेमस्पेस';
diff --git a/lib/plugins/acl/lang/ne/lang.php b/lib/plugins/acl/lang/ne/lang.php
index 5e6196a30..481b39ad2 100644
--- a/lib/plugins/acl/lang/ne/lang.php
+++ b/lib/plugins/acl/lang/ne/lang.php
@@ -8,8 +8,8 @@
* @author Saroj Dhakal<lotusnagarkot@yahoo.com>
*/
$lang['admin_acl'] = 'एक्सेस कन्ट्रोल लिस्ट व्यवस्थापन';
-$lang['acl_group'] = 'समूह';
-$lang['acl_user'] = 'प्रोगकर्ता';
+$lang['acl_group'] = 'समूह:';
+$lang['acl_user'] = 'प्रोगकर्ता:';
$lang['acl_perms'] = 'को लागि अनुमति';
$lang['page'] = 'पृष्ठ';
$lang['namespace'] = 'नेमस्पेस';
diff --git a/lib/plugins/acl/lang/nl/lang.php b/lib/plugins/acl/lang/nl/lang.php
index abb81ae06..a73d13344 100644
--- a/lib/plugins/acl/lang/nl/lang.php
+++ b/lib/plugins/acl/lang/nl/lang.php
@@ -23,8 +23,8 @@
* @author Remon <no@email.local>
*/
$lang['admin_acl'] = 'Toegangsrechten';
-$lang['acl_group'] = 'Groep';
-$lang['acl_user'] = 'Gebruiker';
+$lang['acl_group'] = 'Groep:';
+$lang['acl_user'] = 'Gebruiker:';
$lang['acl_perms'] = 'Permissies voor';
$lang['page'] = 'Pagina';
$lang['namespace'] = 'Namespace';
diff --git a/lib/plugins/acl/lang/no/lang.php b/lib/plugins/acl/lang/no/lang.php
index 82cdd5eef..b9664794d 100644
--- a/lib/plugins/acl/lang/no/lang.php
+++ b/lib/plugins/acl/lang/no/lang.php
@@ -20,8 +20,8 @@
* @author Egil Hansen <egil@rosetta.no>
*/
$lang['admin_acl'] = 'Administrasjon av lister for adgangskontroll (ACL)';
-$lang['acl_group'] = 'Gruppe';
-$lang['acl_user'] = 'Bruker';
+$lang['acl_group'] = 'Gruppe:';
+$lang['acl_user'] = 'Bruker:';
$lang['acl_perms'] = 'Rettigheter for';
$lang['page'] = 'Side';
$lang['namespace'] = 'Navnerom';
diff --git a/lib/plugins/acl/lang/pl/lang.php b/lib/plugins/acl/lang/pl/lang.php
index 42ce7fdaf..4fa4e8b9d 100644
--- a/lib/plugins/acl/lang/pl/lang.php
+++ b/lib/plugins/acl/lang/pl/lang.php
@@ -16,8 +16,8 @@
* @author Aoi Karasu <aoikarasu@gmail.com>
*/
$lang['admin_acl'] = 'Zarządzanie uprawnieniami';
-$lang['acl_group'] = 'Grupa';
-$lang['acl_user'] = 'Użytkownik';
+$lang['acl_group'] = 'Grupa:';
+$lang['acl_user'] = 'Użytkownik:';
$lang['acl_perms'] = 'Uprawnienia użytkownika';
$lang['page'] = 'Strona';
$lang['namespace'] = 'Katalog';
diff --git a/lib/plugins/acl/lang/pt-br/lang.php b/lib/plugins/acl/lang/pt-br/lang.php
index ef0ae6c8b..227927524 100644
--- a/lib/plugins/acl/lang/pt-br/lang.php
+++ b/lib/plugins/acl/lang/pt-br/lang.php
@@ -22,8 +22,8 @@
* @author Victor Westmann <victor.westmann@gmail.com>
*/
$lang['admin_acl'] = 'Administração da Lista de Controles de Acesso';
-$lang['acl_group'] = 'Grupo';
-$lang['acl_user'] = 'Usuário';
+$lang['acl_group'] = 'Grupo:';
+$lang['acl_user'] = 'Usuário:';
$lang['acl_perms'] = 'Permissões para';
$lang['page'] = 'Página';
$lang['namespace'] = 'Espaço de nomes';
diff --git a/lib/plugins/acl/lang/pt/lang.php b/lib/plugins/acl/lang/pt/lang.php
index 4c2114d67..aef174612 100644
--- a/lib/plugins/acl/lang/pt/lang.php
+++ b/lib/plugins/acl/lang/pt/lang.php
@@ -11,8 +11,8 @@
* @author José Campos zecarlosdecampos@gmail.com
*/
$lang['admin_acl'] = 'Gestão de ACLs';
-$lang['acl_group'] = 'Grupo';
-$lang['acl_user'] = 'Utilizador';
+$lang['acl_group'] = 'Grupo:';
+$lang['acl_user'] = 'Utilizador:';
$lang['acl_perms'] = 'Permissão para';
$lang['page'] = 'Documento';
$lang['namespace'] = 'Namespace';
diff --git a/lib/plugins/acl/lang/ro/lang.php b/lib/plugins/acl/lang/ro/lang.php
index 4d093216b..0d281f049 100644
--- a/lib/plugins/acl/lang/ro/lang.php
+++ b/lib/plugins/acl/lang/ro/lang.php
@@ -13,8 +13,8 @@
* @author Emanuel-Emeric Andrași <em.andrasi@mandrivausers.ro>
*/
$lang['admin_acl'] = 'Managementul Listei de Control a Accesului';
-$lang['acl_group'] = 'Grup';
-$lang['acl_user'] = 'Utilizator';
+$lang['acl_group'] = 'Grup:';
+$lang['acl_user'] = 'Utilizator:';
$lang['acl_perms'] = 'Autorizare pentru';
$lang['page'] = 'Pagina';
$lang['namespace'] = 'Spaţiu de nume';
diff --git a/lib/plugins/acl/lang/ru/help.txt b/lib/plugins/acl/lang/ru/help.txt
index ecb2fe3d0..e1b76c2c7 100644
--- a/lib/plugins/acl/lang/ru/help.txt
+++ b/lib/plugins/acl/lang/ru/help.txt
@@ -5,4 +5,4 @@
* Форма выше позволяет вам просмотреть и изменить права доступа для выбранного пользователя или группы.
* Текущие права доступа отображены в таблице ниже. Вы можете использовать её для быстрого удаления или изменения правил.
-Прочтение [[doku>acl|официальной документации по ACL]] может помочь вам в полном понимании работы управления правами доступа в «ДокуВики».
+Прочтение [[doku>acl|официальной документации по правам доступа]] может помочь вам в полном понимании работы управления правами доступа в «Докувики».
diff --git a/lib/plugins/acl/lang/ru/lang.php b/lib/plugins/acl/lang/ru/lang.php
index ff4740676..b49d216f9 100644
--- a/lib/plugins/acl/lang/ru/lang.php
+++ b/lib/plugins/acl/lang/ru/lang.php
@@ -19,8 +19,8 @@
* @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua)
*/
$lang['admin_acl'] = 'Управление списками контроля доступа';
-$lang['acl_group'] = 'Группа';
-$lang['acl_user'] = 'Пользователь';
+$lang['acl_group'] = 'Группа:';
+$lang['acl_user'] = 'Пользователь:';
$lang['acl_perms'] = 'Права доступа для';
$lang['page'] = 'Страница';
$lang['namespace'] = 'Пространство имён';
diff --git a/lib/plugins/acl/lang/sk/lang.php b/lib/plugins/acl/lang/sk/lang.php
index 51837d4b4..001218304 100644
--- a/lib/plugins/acl/lang/sk/lang.php
+++ b/lib/plugins/acl/lang/sk/lang.php
@@ -9,8 +9,8 @@
* @author Martin Michalek <michalek.dev@gmail.com>
*/
$lang['admin_acl'] = 'Správa zoznamu prístupových práv';
-$lang['acl_group'] = 'Skupina';
-$lang['acl_user'] = 'Užívateľ';
+$lang['acl_group'] = 'Skupina:';
+$lang['acl_user'] = 'Užívateľ:';
$lang['acl_perms'] = 'Práva pre';
$lang['page'] = 'Stránka';
$lang['namespace'] = 'Menný priestor';
diff --git a/lib/plugins/acl/lang/sl/lang.php b/lib/plugins/acl/lang/sl/lang.php
index 303b18cff..84c2088e8 100644
--- a/lib/plugins/acl/lang/sl/lang.php
+++ b/lib/plugins/acl/lang/sl/lang.php
@@ -9,8 +9,8 @@
* @author Matej Urbančič (mateju@svn.gnome.org)
*/
$lang['admin_acl'] = 'Upravljanje dostopa';
-$lang['acl_group'] = 'Skupina';
-$lang['acl_user'] = 'Uporabnik';
+$lang['acl_group'] = 'Skupina:';
+$lang['acl_user'] = 'Uporabnik:';
$lang['acl_perms'] = 'Dovoljenja za';
$lang['page'] = 'Stran';
$lang['namespace'] = 'Imenski prostor';
diff --git a/lib/plugins/acl/lang/sq/lang.php b/lib/plugins/acl/lang/sq/lang.php
index 30fc99bb0..3edd70947 100644
--- a/lib/plugins/acl/lang/sq/lang.php
+++ b/lib/plugins/acl/lang/sq/lang.php
@@ -5,8 +5,8 @@
* @author Leonard Elezi leonard.elezi@depinfo.info
*/
$lang['admin_acl'] = 'Menaxhimi i Listës së Kontrollit të Aksesit';
-$lang['acl_group'] = 'Grup';
-$lang['acl_user'] = 'Përdorues';
+$lang['acl_group'] = 'Grup:';
+$lang['acl_user'] = 'Përdorues:';
$lang['acl_perms'] = 'Të drejta për';
$lang['page'] = 'Faqe';
$lang['namespace'] = 'Hapësira e Emrit';
diff --git a/lib/plugins/acl/lang/sr/lang.php b/lib/plugins/acl/lang/sr/lang.php
index 20fbb0382..0a94418c7 100644
--- a/lib/plugins/acl/lang/sr/lang.php
+++ b/lib/plugins/acl/lang/sr/lang.php
@@ -9,8 +9,8 @@
* @author Miroslav Šolti <solti.miroslav@gmail.com>
*/
$lang['admin_acl'] = 'Управљање листом контроле приступа';
-$lang['acl_group'] = 'Група';
-$lang['acl_user'] = 'Корисник';
+$lang['acl_group'] = 'Група:';
+$lang['acl_user'] = 'Корисник:';
$lang['acl_perms'] = 'Дозволе за';
$lang['page'] = 'Страница';
$lang['namespace'] = 'Именски простор';
diff --git a/lib/plugins/acl/lang/sv/lang.php b/lib/plugins/acl/lang/sv/lang.php
index f226542e6..34c1c6624 100644
--- a/lib/plugins/acl/lang/sv/lang.php
+++ b/lib/plugins/acl/lang/sv/lang.php
@@ -18,8 +18,8 @@
* @author Smorkster Andersson smorkster@gmail.com
*/
$lang['admin_acl'] = 'Hantera behörighetslistan (ACL)';
-$lang['acl_group'] = 'Grupp';
-$lang['acl_user'] = 'Användare';
+$lang['acl_group'] = 'Grupp:';
+$lang['acl_user'] = 'Användare:';
$lang['acl_perms'] = 'Behörighet för';
$lang['page'] = 'Sida';
$lang['namespace'] = 'Namnrymd';
diff --git a/lib/plugins/acl/lang/th/lang.php b/lib/plugins/acl/lang/th/lang.php
index 472c33cdc..55b707b5c 100644
--- a/lib/plugins/acl/lang/th/lang.php
+++ b/lib/plugins/acl/lang/th/lang.php
@@ -1,15 +1,16 @@
<?php
+
/**
- * Thai language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Komgrit Niyomrath <n.komgrit@gmail.com>
* @author Kittithat Arnontavilas mrtomyum@gmail.com
* @author Kittithat Arnontavilas <mrtomyum@gmail.com>
* @author Thanasak Sompaisansin <jombthep@gmail.com>
*/
$lang['admin_acl'] = 'จัดการรายชื่อเพื่อควบคุมการเข้าถึง (Access Control List:ACL)';
-$lang['acl_group'] = 'กลุ่ม';
-$lang['acl_user'] = 'ผู้ใช้';
+$lang['acl_group'] = 'กลุ่ม:';
+$lang['acl_user'] = 'ผู้ใช้:';
$lang['acl_perms'] = 'สิทธิสำหรับ';
$lang['page'] = 'เพจ';
$lang['namespace'] = 'เนมสเปซ';
diff --git a/lib/plugins/acl/lang/tr/lang.php b/lib/plugins/acl/lang/tr/lang.php
index a9699a5f9..3c3e3dbc1 100644
--- a/lib/plugins/acl/lang/tr/lang.php
+++ b/lib/plugins/acl/lang/tr/lang.php
@@ -11,8 +11,8 @@
* @author farukerdemoncel@gmail.com
*/
$lang['admin_acl'] = 'Erişim Kontrol Listesi (ACL) Yönetimi';
-$lang['acl_group'] = 'Grup';
-$lang['acl_user'] = 'Kullanıcı';
+$lang['acl_group'] = 'Grup:';
+$lang['acl_user'] = 'Kullanıcı:';
$lang['acl_perms'] = 'Şunun için yetkiler:';
$lang['page'] = 'Sayfa';
$lang['namespace'] = 'Namespace';
diff --git a/lib/plugins/acl/lang/uk/lang.php b/lib/plugins/acl/lang/uk/lang.php
index 97c66d8a2..4d8b52e1b 100644
--- a/lib/plugins/acl/lang/uk/lang.php
+++ b/lib/plugins/acl/lang/uk/lang.php
@@ -11,8 +11,8 @@
* @author Ulrikhe Lukoie <lukoie@gmail>.com
*/
$lang['admin_acl'] = 'Керування списками контролю доступу';
-$lang['acl_group'] = 'Група';
-$lang['acl_user'] = 'Користувач';
+$lang['acl_group'] = 'Група:';
+$lang['acl_user'] = 'Користувач:';
$lang['acl_perms'] = 'Права доступу для';
$lang['page'] = 'Сторінка';
$lang['namespace'] = 'Простір імен';
diff --git a/lib/plugins/acl/lang/vi/lang.php b/lib/plugins/acl/lang/vi/lang.php
index 4fc3388ff..8ca888cae 100644
--- a/lib/plugins/acl/lang/vi/lang.php
+++ b/lib/plugins/acl/lang/vi/lang.php
@@ -6,8 +6,8 @@
* @author NukeViet <admin@nukeviet.vn>
*/
$lang['admin_acl'] = 'Quản lý danh sách quyền truy cập';
-$lang['acl_group'] = 'Nhóm';
-$lang['acl_user'] = 'Thành viên';
+$lang['acl_group'] = 'Nhóm:';
+$lang['acl_user'] = 'Thành viên:';
$lang['acl_perms'] = 'Cấp phép cho';
$lang['page'] = 'Trang';
$lang['namespace'] = 'Thư mục';
diff --git a/lib/plugins/acl/lang/zh-tw/lang.php b/lib/plugins/acl/lang/zh-tw/lang.php
index a56435318..c37727212 100644
--- a/lib/plugins/acl/lang/zh-tw/lang.php
+++ b/lib/plugins/acl/lang/zh-tw/lang.php
@@ -15,8 +15,8 @@
* @author Ichirou Uchiki <syaoranhinata@gmail.com>
*/
$lang['admin_acl'] = '管理存取控制表 (ACL)';
-$lang['acl_group'] = '群組';
-$lang['acl_user'] = '使用者';
+$lang['acl_group'] = '群組:';
+$lang['acl_user'] = '使用者:';
$lang['acl_perms'] = '設定權限於';
$lang['page'] = '頁面';
$lang['namespace'] = '分類名稱';
diff --git a/lib/plugins/acl/lang/zh/lang.php b/lib/plugins/acl/lang/zh/lang.php
index 029446cca..4294e6034 100644
--- a/lib/plugins/acl/lang/zh/lang.php
+++ b/lib/plugins/acl/lang/zh/lang.php
@@ -17,8 +17,8 @@
* @author Shuo-Ting Jian <shoting@gmail.com>
*/
$lang['admin_acl'] = '访问控制列表(ACL)管理器';
-$lang['acl_group'] = '组';
-$lang['acl_user'] = '用户';
+$lang['acl_group'] = '组:';
+$lang['acl_user'] = '用户:';
$lang['acl_perms'] = '许可给';
$lang['page'] = '页面';
$lang['namespace'] = '命名空间';
diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php
index dc66d6380..b04735639 100644
--- a/lib/plugins/auth.php
+++ b/lib/plugins/auth.php
@@ -316,11 +316,11 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin {
*
* @author Chris Smith <chris@jalakai.co.uk>
* @param int $start index of first user to be returned
- * @param int $limit max number of users to be returned
+ * @param int $limit max number of users to be returned, 0 for unlimited
* @param array $filter array of field/pattern pairs, null for no filter
* @return array list of userinfo (refer getUserData for internal userinfo details)
*/
- public function retrieveUsers($start = 0, $limit = -1, $filter = null) {
+ public function retrieveUsers($start = 0, $limit = 0, $filter = null) {
msg("authorisation method does not support mass retrieval of user data", -1);
return array();
}
diff --git a/lib/plugins/authad/action.php b/lib/plugins/authad/action.php
new file mode 100644
index 000000000..97be9897e
--- /dev/null
+++ b/lib/plugins/authad/action.php
@@ -0,0 +1,91 @@
+<?php
+/**
+ * DokuWiki Plugin addomain (Action Component)
+ *
+ * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
+ * @author Andreas Gohr <gohr@cosmocode.de>
+ */
+
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
+
+/**
+ * Class action_plugin_addomain
+ */
+class action_plugin_authad extends DokuWiki_Action_Plugin {
+
+ /**
+ * Registers a callback function for a given event
+ */
+ public function register(Doku_Event_Handler &$controller) {
+
+ $controller->register_hook('AUTH_LOGIN_CHECK', 'BEFORE', $this, 'handle_auth_login_check');
+ $controller->register_hook('HTML_LOGINFORM_OUTPUT', 'BEFORE', $this, 'handle_html_loginform_output');
+
+ }
+
+ /**
+ * Adds the selected domain as user postfix when attempting a login
+ *
+ * @param Doku_Event $event
+ * @param array $param
+ */
+ public function handle_auth_login_check(Doku_Event &$event, $param) {
+ global $INPUT;
+
+ /** @var auth_plugin_authad $auth */
+ global $auth;
+ if(!is_a($auth, 'auth_plugin_authad')) return; // AD not even used
+
+ if($INPUT->str('dom')) {
+ $usr = $auth->cleanUser($event->data['user']);
+ $dom = $auth->_userDomain($usr);
+ if(!$dom) {
+ $usr = "$usr@".$INPUT->str('dom');
+ }
+ $INPUT->post->set('u', $usr);
+ $event->data['user'] = $usr;
+ }
+ }
+
+ /**
+ * Shows a domain selection in the login form when more than one domain is configured
+ *
+ * @param Doku_Event $event
+ * @param array $param
+ */
+ public function handle_html_loginform_output(Doku_Event &$event, $param) {
+ global $INPUT;
+ /** @var auth_plugin_authad $auth */
+ global $auth;
+ if(!is_a($auth, 'auth_plugin_authad')) return; // AD not even used
+ $domains = $auth->_getConfiguredDomains();
+ if(count($domains) <= 1) return; // no choice at all
+
+ /** @var Doku_Form $form */
+ $form =& $event->data;
+
+ // any default?
+ $dom = '';
+ if($INPUT->has('u')) {
+ $usr = $auth->cleanUser($INPUT->str('u'));
+ $dom = $auth->_userDomain($usr);
+
+ // update user field value
+ if($dom) {
+ $usr = $auth->_userName($usr);
+ $pos = $form->findElementByAttribute('name', 'u');
+ $ele =& $form->getElementAt($pos);
+ $ele['value'] = $usr;
+ }
+ }
+
+ // add select box
+ $element = form_makeListboxField('dom', $domains, $dom, $this->getLang('domain'), '', 'block');
+ $pos = $form->findElementByAttribute('name', 'p');
+ $form->insertElement($pos + 1, $element);
+ }
+
+}
+
+// vim:ts=4:sw=4:et: \ No newline at end of file
diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php
index e1d758fb8..0860e5756 100644
--- a/lib/plugins/authad/auth.php
+++ b/lib/plugins/authad/auth.php
@@ -332,11 +332,11 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
* @param array $filter array of field/pattern pairs, null for no filter
* @return array userinfo (refer getUserData for internal userinfo details)
*/
- public function retrieveUsers($start = 0, $limit = -1, $filter = array()) {
+ public function retrieveUsers($start = 0, $limit = 0, $filter = array()) {
$adldap = $this->_adldap(null);
if(!$adldap) return false;
- if($this->users === null) {
+ if(!$this->users) {
//get info for given user
$result = $adldap->user()->all();
if (!$result) return array();
@@ -357,7 +357,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
}
if($this->_filter($user, $info)) {
$result[$user] = $info;
- if(($limit >= 0) && (++$count >= $limit)) break;
+ if(($limit > 0) && (++$count >= $limit)) break;
}
}
return $result;
@@ -512,6 +512,31 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
}
/**
+ * Returns a list of configured domains
+ *
+ * The default domain has an empty string as key
+ *
+ * @return array associative array(key => domain)
+ */
+ public function _getConfiguredDomains() {
+ $domains = array();
+ if(empty($this->conf['account_suffix'])) return $domains; // not configured yet
+
+ // add default domain, using the name from account suffix
+ $domains[''] = ltrim($this->conf['account_suffix'], '@');
+
+ // find additional domains
+ foreach($this->conf as $key => $val) {
+ if(is_array($val) && isset($val['account_suffix'])) {
+ $domains[$key] = ltrim($val['account_suffix'], '@');
+ }
+ }
+ ksort($domains);
+
+ return $domains;
+ }
+
+ /**
* Check provided user and userinfo for matching patterns
*
* The patterns are set up with $this->_constructPattern()
diff --git a/lib/plugins/authad/lang/de/lang.php b/lib/plugins/authad/lang/de/lang.php
new file mode 100644
index 000000000..eea511d1b
--- /dev/null
+++ b/lib/plugins/authad/lang/de/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Andreas Gohr <gohr@cosmocode.de>
+ */
+$lang['domain'] = 'Anmelde-Domäne';
diff --git a/lib/plugins/authad/lang/en/lang.php b/lib/plugins/authad/lang/en/lang.php
new file mode 100644
index 000000000..e2967d662
--- /dev/null
+++ b/lib/plugins/authad/lang/en/lang.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ * English language file for addomain plugin
+ *
+ * @author Andreas Gohr <gohr@cosmocode.de>
+ */
+
+$lang['domain'] = 'Logon Domain';
+
+//Setup VIM: ex: et ts=4 :
diff --git a/lib/plugins/authad/lang/eo/lang.php b/lib/plugins/authad/lang/eo/lang.php
new file mode 100644
index 000000000..be4abc123
--- /dev/null
+++ b/lib/plugins/authad/lang/eo/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Robert Bogenschneider <bogi@uea.org>
+ */
+$lang['domain'] = 'Ensaluta domajno';
diff --git a/lib/plugins/authad/lang/es/lang.php b/lib/plugins/authad/lang/es/lang.php
new file mode 100644
index 000000000..c5b242cba
--- /dev/null
+++ b/lib/plugins/authad/lang/es/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Juan De La Cruz <juann.dlc@gmail.com>
+ */
+$lang['domain'] = 'Dominio de inicio';
diff --git a/lib/plugins/authad/lang/es/settings.php b/lib/plugins/authad/lang/es/settings.php
index 98b78056b..970259c9c 100644
--- a/lib/plugins/authad/lang/es/settings.php
+++ b/lib/plugins/authad/lang/es/settings.php
@@ -5,11 +5,19 @@
*
* @author monica <may.dorado@gmail.com>
* @author Antonio Bueno <atnbueno@gmail.com>
+ * @author Juan De La Cruz <juann.dlc@gmail.com>
+ * @author Eloy <ej.perezgomez@gmail.com>
*/
-$lang['account_suffix'] = 'Su cuenta, sufijo. Ejem. <code> @ my.domain.org </ code>';
+$lang['account_suffix'] = 'Su cuenta, sufijo. Ejem. <code> @ my.domain.org </code>';
$lang['base_dn'] = 'Su base DN. Ejem. <code>DC=my,DC=dominio,DC=org</code>';
$lang['domain_controllers'] = 'Una lista separada por coma de los controladores de dominios. Ejem. <code>srv1.dominio.org,srv2.dominio.org</code>';
$lang['admin_username'] = 'Un usuario con privilegios de Active Directory con acceso a los datos de cualquier otro usuario. Opcional, pero es necesario para determinadas acciones como el envío de suscripciones de correos electrónicos.';
$lang['admin_password'] = 'La contraseña del usuario anterior.';
$lang['sso'] = 'En caso de inicio de sesión usará ¿Kerberos o NTLM?';
$lang['sso_charset'] = 'La codificación con que tu servidor web pasará el nombre de usuario Kerberos o NTLM. Si es UTF-8 o latin-1 dejar en blanco. Requiere la extensión iconv.';
+$lang['real_primarygroup'] = 'Resolver el grupo primario real en vez de asumir "Domain Users" (más lento)';
+$lang['use_ssl'] = '¿Usar conexión SSL? Si se usa, no habilitar TLS abajo.';
+$lang['use_tls'] = '¿Usar conexión TLS? Si se usa, no habilitar SSL arriba.';
+$lang['debug'] = 'Mostrar información adicional de depuración sobre los errores?';
+$lang['expirywarn'] = 'Días por adelantado para avisar al usuario de que contraseña expirará. 0 para deshabilitar.';
+$lang['additional'] = 'Una lista separada por comas de atributos AD adicionales a obtener de los datos de usuario. Usado por algunos plugins.';
diff --git a/lib/plugins/authad/lang/fr/lang.php b/lib/plugins/authad/lang/fr/lang.php
new file mode 100644
index 000000000..2de362e41
--- /dev/null
+++ b/lib/plugins/authad/lang/fr/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author ggallon <gwenael.gallon@mac.com>
+ */
+$lang['domain'] = 'Domaine de connexion';
diff --git a/lib/plugins/authad/lang/hr/lang.php b/lib/plugins/authad/lang/hr/lang.php
new file mode 100644
index 000000000..f750c91b5
--- /dev/null
+++ b/lib/plugins/authad/lang/hr/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['domain'] = 'Domena za prijavu';
diff --git a/lib/plugins/authad/lang/hr/settings.php b/lib/plugins/authad/lang/hr/settings.php
new file mode 100644
index 000000000..a024b10b7
--- /dev/null
+++ b/lib/plugins/authad/lang/hr/settings.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['account_suffix'] = 'Vaš sufiks korisničkog imena. Npr. <code>@my.domain.org</code>';
+$lang['base_dn'] = 'Vaš bazni DN. Npr. <code>DC=my,DC=domain,DC=org</code>';
+$lang['domain_controllers'] = 'Zarezom odvojena lista domenskih kontrolera. Npr. <code>srv1.domain.org,srv2.domain.org</code>';
+$lang['admin_username'] = 'Privilegirani korisnik Active Directory-a s pristupom svim korisničkim podacima. Opcionalno, ali potrebno za određene akcije kao što je slanje pretplatničkih poruka.';
+$lang['admin_password'] = 'Lozinka gore navedenoga korisnika.';
+$lang['sso'] = 'Da li će Single-Sign-On prijava biti korištena preko Kerberosa ili NTLM-a?';
+$lang['sso_charset'] = 'Znakovni set koji će se koristiti Kerberos ili NTLM pri slanju imena korisnika. Prazno za UTF-8 ili latin-1. Zahtjeva iconv ekstenziju.';
+$lang['real_primarygroup'] = 'Da li da se razluči stvarna primarna grupa umjesto pretpostavke da je to "Domain Users" (sporije !).';
+$lang['use_ssl'] = 'Koristi SSL vezu? Ako da, dolje ne koristi TLS!';
+$lang['use_tls'] = 'Koristi TLS vezu? Ako da, gore ne koristi SSL!';
+$lang['debug'] = 'Prikaži dodatni debug ispis u slučaju greške? ';
+$lang['expirywarn'] = 'Upozori korisnike o isteku lozinke ovoliko dana. 0 za onemogućavanje. ';
+$lang['additional'] = 'Zarezom odvojena lista dodatnih AD atributa koji se dohvaćaju iz korisničkih podataka. Koristi se u nekim dodatcima (plugin).';
diff --git a/lib/plugins/authad/lang/hu/lang.php b/lib/plugins/authad/lang/hu/lang.php
new file mode 100644
index 000000000..7bb6084b0
--- /dev/null
+++ b/lib/plugins/authad/lang/hu/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Marton Sebok <sebokmarton@gmail.com>
+ */
+$lang['domain'] = 'Bejelentkezési tartomány';
diff --git a/lib/plugins/authad/lang/hu/settings.php b/lib/plugins/authad/lang/hu/settings.php
index 05acbdc2d..be0592d68 100644
--- a/lib/plugins/authad/lang/hu/settings.php
+++ b/lib/plugins/authad/lang/hu/settings.php
@@ -11,11 +11,11 @@ $lang['base_dn'] = 'Bázis DN, pl. <code>DC=my,DC=domain,DC=org</c
$lang['domain_controllers'] = 'Tartománykezelők listája vesszővel elválasztva, pl. <code>srv1.domain.org,srv2.domain.org</code>.';
$lang['admin_username'] = 'Privilegizált AD felhasználó, aki az összes feéhasználó adatait elérheti. Elhagyható, de bizonyos funkciókhoz, például a feliratkozási e-mailek kiküldéséhez szükséges.';
$lang['admin_password'] = 'Ehhez tartozó jelszó.';
-$lang['sso'] = 'Single-Sign-On Kerberos-szal vagy NTML használata?';
+$lang['sso'] = 'Kerberos egyszeri bejelentkezés vagy NTLM használata?';
$lang['sso_charset'] = 'A webkiszolgáló karakterkészlete megfelel a Kerberos- és NTLM-felhasználóneveknek. Üres UTF-8 és Latin-1-hez. Szükséges az iconv bővítmény.';
$lang['real_primarygroup'] = 'A valódi elsődleges csoport feloldása a "Tartományfelhasználók" csoport használata helyett? (lassabb)';
$lang['use_ssl'] = 'SSL használata? Ha használjuk, tiltsuk le a TLS-t!';
$lang['use_tls'] = 'TLS használata? Ha használjuk, tiltsuk le az SSL-t!';
-$lang['debug'] = 'Debug-üzenetek megjelenítése?';
+$lang['debug'] = 'További hibakeresési üzenetek megjelenítése hiba esetén';
$lang['expirywarn'] = 'Felhasználók értesítése ennyi nappal a jelszavuk lejárata előtt. 0 a funkció kikapcsolásához.';
-$lang['additional'] = 'Vesszővel elválasztott lista a további AD attribútumok lekéréshez. Néhány plugin használhatja.';
+$lang['additional'] = 'Vesszővel elválasztott lista a további AD attribútumok lekéréséhez. Néhány bővítmény használhatja.';
diff --git a/lib/plugins/authad/lang/ja/lang.php b/lib/plugins/authad/lang/ja/lang.php
new file mode 100644
index 000000000..b40aa5da3
--- /dev/null
+++ b/lib/plugins/authad/lang/ja/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author PzF_X <jp_minecraft@yahoo.co.jp>
+ */
+$lang['domain'] = 'ログオン時のドメイン';
diff --git a/lib/plugins/authad/lang/ja/settings.php b/lib/plugins/authad/lang/ja/settings.php
index f308249ef..118e8348c 100644
--- a/lib/plugins/authad/lang/ja/settings.php
+++ b/lib/plugins/authad/lang/ja/settings.php
@@ -5,6 +5,7 @@
*
* @author Satoshi Sahara <sahara.satoshi@gmail.com>
* @author Hideaki SAWADA <chuno@live.jp>
+ * @author PzF_X <jp_minecraft@yahoo.co.jp>
*/
$lang['account_suffix'] = 'アカウントの接尾語。例:<code>@my.domain.org</code>';
$lang['base_dn'] = 'ベースDN。例:<code>DC=my,DC=domain,DC=org</code>';
@@ -12,6 +13,7 @@ $lang['domain_controllers'] = 'ドメインコントローラのカンマ区
$lang['admin_username'] = '全ユーザーデータへのアクセス権のある特権Active Directoryユーザー。任意ですが、メール通知の登録等の特定の動作に必要。';
$lang['admin_password'] = '上記ユーザーのパスワード';
$lang['sso'] = 'Kerberos か NTLM を使ったシングルサインオン(SSO)をしますか?';
+$lang['sso_charset'] = 'サーバーは空のUTF-8かLatin-1でKerberosかNTLMユーザネームを送信します。iconv拡張モジュールが必要です。';
$lang['real_primarygroup'] = '"Domain Users" を仮定する代わりに本当のプライマリグループを解決する(低速)';
$lang['use_ssl'] = 'SSL接続を使用しますか?使用した場合、下のSSLを有効にしないでください。';
$lang['use_tls'] = 'TLS接続を使用しますか?使用した場合、上のSSLを有効にしないでください。';
diff --git a/lib/plugins/authad/lang/ko/lang.php b/lib/plugins/authad/lang/ko/lang.php
new file mode 100644
index 000000000..5a2416b2c
--- /dev/null
+++ b/lib/plugins/authad/lang/ko/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Myeongjin <aranet100@gmail.com>
+ */
+$lang['domain'] = '로그온 도메인';
diff --git a/lib/plugins/authad/lang/lv/lang.php b/lib/plugins/authad/lang/lv/lang.php
new file mode 100644
index 000000000..74becf756
--- /dev/null
+++ b/lib/plugins/authad/lang/lv/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Aivars Miška <allefm@gmail.com>
+ */
+$lang['domain'] = 'Iežurnālēšanās domēns';
diff --git a/lib/plugins/authad/lang/lv/settings.php b/lib/plugins/authad/lang/lv/settings.php
new file mode 100644
index 000000000..5272d27d0
--- /dev/null
+++ b/lib/plugins/authad/lang/lv/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Aivars Miška <allefm@gmail.com>
+ */
+$lang['account_suffix'] = 'Jūsu konta sufikss. Piemēram, <code>@my.domain.org</code>';
+$lang['domain_controllers'] = 'Ar komatiem atdalīts domēna kontroleru saraksts. Piemēram, <code>srv1.domain.org,srv2.domain.org</code>';
+$lang['admin_password'] = 'Minētā lietotāja parole.';
+$lang['expirywarn'] = 'Cik dienas iepriekš brīdināt lietotāju par paroles termiņa beigām. Ierakstīt 0, lai atspējotu.';
diff --git a/lib/plugins/authad/lang/nl/lang.php b/lib/plugins/authad/lang/nl/lang.php
new file mode 100644
index 000000000..ea8419069
--- /dev/null
+++ b/lib/plugins/authad/lang/nl/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Rene <wllywlnt@yahoo.com>
+ */
+$lang['domain'] = 'Inlog Domein';
diff --git a/lib/plugins/authad/lang/no/settings.php b/lib/plugins/authad/lang/no/settings.php
new file mode 100644
index 000000000..bab5ce67d
--- /dev/null
+++ b/lib/plugins/authad/lang/no/settings.php
@@ -0,0 +1,9 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Christopher Schive <chschive@frisurf.no>
+ */
+$lang['admin_password'] = 'Passordet til brukeren over.';
+$lang['expirywarn'] = 'Antall dager på forhånd brukeren varsles om at passordet utgår. 0 for å deaktivere.';
diff --git a/lib/plugins/authad/lang/pl/settings.php b/lib/plugins/authad/lang/pl/settings.php
index 4e397fc98..91cadca6f 100644
--- a/lib/plugins/authad/lang/pl/settings.php
+++ b/lib/plugins/authad/lang/pl/settings.php
@@ -5,6 +5,7 @@
*
* @author Tomasz Bosak <bosak.tomasz@gmail.com>
* @author Paweł Jan Czochański <czochanski@gmail.com>
+ * @author Mati <mackosa@wp.pl>
*/
$lang['account_suffix'] = 'Przyrostek twojej nazwy konta np. <code>@my.domain.org</code>';
$lang['base_dn'] = 'Twoje bazowe DN. Na przykład: <code>DC=my,DC=domain,DC=org</code>';
diff --git a/lib/plugins/authad/lang/pt/lang.php b/lib/plugins/authad/lang/pt/lang.php
new file mode 100644
index 000000000..f307bc901
--- /dev/null
+++ b/lib/plugins/authad/lang/pt/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Paulo Silva <paulotsilva@yahoo.com>
+ */
+$lang['domain'] = 'Domínio de Início de Sessão';
diff --git a/lib/plugins/authad/lang/pt/settings.php b/lib/plugins/authad/lang/pt/settings.php
index 45eff5e96..dc60d7259 100644
--- a/lib/plugins/authad/lang/pt/settings.php
+++ b/lib/plugins/authad/lang/pt/settings.php
@@ -4,7 +4,12 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author André Neves <drakferion@gmail.com>
+ * @author Murilo <muriloricci@hotmail.com>
+ * @author Paulo Silva <paulotsilva@yahoo.com>
*/
+$lang['account_suffix'] = 'O sufixo da sua conta. Por exemplo, <code>@my.domain.org</code>';
+$lang['domain_controllers'] = 'Uma lista separada por vírgulas de Controladores de Domínio (AD DC). Ex.: <code>srv1.domain.org,srv2.domain.org</code>';
+$lang['admin_username'] = 'Um utilizador com privilégios na Active Directory que tenha acesso aos dados de todos os outros utilizadores. Opcional, mas necessário para certas ações como enviar emails de subscrição.';
$lang['admin_password'] = 'A senha para o utilizador acima.';
$lang['sso'] = 'Deve ser usado o Single-Sign-On via Kerberos ou NTLM?';
$lang['use_ssl'] = 'Usar ligação SSL? Se usada, não ative TLS abaixo.';
diff --git a/lib/plugins/authad/lang/ru/lang.php b/lib/plugins/authad/lang/ru/lang.php
new file mode 100644
index 000000000..6f3c03e39
--- /dev/null
+++ b/lib/plugins/authad/lang/ru/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
+ */
+$lang['domain'] = 'Домен';
diff --git a/lib/plugins/authad/lang/ru/settings.php b/lib/plugins/authad/lang/ru/settings.php
index e662300d7..c9c6d9f88 100644
--- a/lib/plugins/authad/lang/ru/settings.php
+++ b/lib/plugins/authad/lang/ru/settings.php
@@ -7,7 +7,9 @@
* @author Aleksandr Selivanov <alexgearbox@gmail.com>
* @author Artur <ncuxxx@gmail.com>
* @author Erli Moen <evseev.jr@gmail.com>
+ * @author Владимир <id37736@yandex.ru>
*/
+$lang['account_suffix'] = 'Суффикс вашего аккаунта типа <code>@my.domain.org</code>';
$lang['domain_controllers'] = 'Список DNS-серверов, разделенных запятой. Например:<code>srv1.domain.org,srv2.domain.org</code>';
$lang['admin_password'] = 'Пароль для указанного пользователя.';
$lang['sso'] = 'Использовать SSO (Single-Sign-On) через Kerberos или NTLM?';
diff --git a/lib/plugins/authad/lang/sl/settings.php b/lib/plugins/authad/lang/sl/settings.php
index bae467d6d..5849ea431 100644
--- a/lib/plugins/authad/lang/sl/settings.php
+++ b/lib/plugins/authad/lang/sl/settings.php
@@ -4,5 +4,8 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author matej <mateju@svn.gnome.org>
+ * @author Jernej Vidmar <jernej.vidmar@vidmarboehm.com>
*/
+$lang['admin_password'] = 'Geslo zgoraj omenjenega uporabnika';
+$lang['use_tls'] = 'Uporabi TLS povezavo? Če da, ne vključi SSL povezave zgoraj.';
$lang['debug'] = 'Ali naj bodo prikazane dodatne podrobnosti napak?';
diff --git a/lib/plugins/authad/lang/zh/lang.php b/lib/plugins/authad/lang/zh/lang.php
new file mode 100644
index 000000000..2a05aa168
--- /dev/null
+++ b/lib/plugins/authad/lang/zh/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author lainme <lainme993@gmail.com>
+ */
+$lang['domain'] = '登录域';
diff --git a/lib/plugins/authad/plugin.info.txt b/lib/plugins/authad/plugin.info.txt
index 3af1ddfbe..8774fcf3c 100644
--- a/lib/plugins/authad/plugin.info.txt
+++ b/lib/plugins/authad/plugin.info.txt
@@ -1,7 +1,7 @@
base authad
author Andreas Gohr
email andi@splitbrain.org
-date 2013-04-25
+date 2014-02-14
name Active Directory Auth Plugin
desc Provides user authentication against a Microsoft Active Directory
url http://www.dokuwiki.org/plugin:authad
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php
index 31e2c5135..0d5e130ea 100644
--- a/lib/plugins/authldap/auth.php
+++ b/lib/plugins/authldap/auth.php
@@ -36,8 +36,8 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
return;
}
- // auth_ldap currently just handles authentication, so no
- // capabilities are set
+ // Add the capabilities to change the password
+ $this->cando['modPass'] = true;
}
/**
@@ -143,6 +143,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
* @author Dan Allen <dan.j.allen@gmail.com>
* @author <evaldas.auryla@pheur.org>
* @author Stephane Chazelas <stephane.chazelas@emerson.com>
+ * @author Steffen Schoch <schoch@dsb.net>
*
* @param string $user
* @param bool $inbind authldap specific, true if in bind phase
@@ -240,9 +241,17 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
ldap_free_result($sr);
if(is_array($result)) foreach($result as $grp) {
- if(!empty($grp[$this->getConf('groupkey')][0])) {
- $this->_debug('LDAP usergroup: '.htmlspecialchars($grp[$this->getConf('groupkey')][0]), 0, __LINE__, __FILE__);
- $info['grps'][] = $grp[$this->getConf('groupkey')][0];
+ if(!empty($grp[$this->getConf('groupkey')])) {
+ $group = $grp[$this->getConf('groupkey')];
+ if(is_array($group)){
+ $group = $group[0];
+ } else {
+ $this->_debug('groupkey did not return a detailled result', 0, __LINE__, __FILE__);
+ }
+ if($group === '') continue;
+
+ $this->_debug('LDAP usergroup: '.htmlspecialchars($group), 0, __LINE__, __FILE__);
+ $info['grps'][] = $group;
}
}
}
@@ -255,6 +264,62 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
}
/**
+ * Definition of the function modifyUser in order to modify the password
+ */
+
+ function modifyUser($user,$changes){
+
+ // open the connection to the ldap
+ if(!$this->_openLDAP()){
+ msg('LDAP cannot connect: '. htmlspecialchars(ldap_error($this->con)));
+ return false;
+ }
+
+ // find the information about the user, in particular the "dn"
+ $info = $this->getUserData($user,true);
+ if(empty($info['dn'])) {
+ msg('LDAP cannot find your user dn');
+ return false;
+ }
+ $dn = $info['dn'];
+
+ // find the old password of the user
+ list($loginuser,$loginsticky,$loginpass) = auth_getCookie();
+ if ($loginuser !== null) { // the user is currently logged in
+ $secret = auth_cookiesalt(!$loginsticky, true);
+ $pass = auth_decrypt($loginpass, $secret);
+
+ // bind with the ldap
+ if(!@ldap_bind($this->con, $dn, $pass)){
+ msg('LDAP user bind failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
+ return false;
+ }
+ } elseif ($this->getConf('binddn') && $this->getConf('bindpw')) {
+ // we are changing the password on behalf of the user (eg: forgotten password)
+ // bind with the superuser ldap
+ if (!@ldap_bind($this->con, $this->getConf('binddn'), $this->getConf('bindpw'))){
+ $this->_debug('LDAP bind as superuser: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
+ return false;
+ }
+ }
+ else {
+ return false; // no otherway
+ }
+
+ // Generate the salted hashed password for LDAP
+ $phash = new PassHash();
+ $hash = $phash->hash_ssha($changes['pass']);
+
+ // change the password
+ if(!@ldap_mod_replace($this->con, $dn,array('userpassword' => $hash))){
+ msg('LDAP mod replace failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con)));
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
* Most values in LDAP are case-insensitive
*
* @return bool
@@ -272,7 +337,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
* @param array $filter array of field/pattern pairs, null for no filter
* @return array of userinfo (refer getUserData for internal userinfo details)
*/
- function retrieveUsers($start = 0, $limit = -1, $filter = array()) {
+ function retrieveUsers($start = 0, $limit = 0, $filter = array()) {
if(!$this->_openLDAP()) return false;
if(is_null($this->users)) {
@@ -307,7 +372,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
}
if($this->_filter($user, $info)) {
$result[$user] = $info;
- if(($limit >= 0) && (++$count >= $limit)) break;
+ if(($limit > 0) && (++$count >= $limit)) break;
}
}
return $result;
diff --git a/lib/plugins/authldap/lang/es/settings.php b/lib/plugins/authldap/lang/es/settings.php
index f8c3ad014..6991546d3 100644
--- a/lib/plugins/authldap/lang/es/settings.php
+++ b/lib/plugins/authldap/lang/es/settings.php
@@ -4,8 +4,22 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Antonio Bueno <atnbueno@gmail.com>
+ * @author Eloy <ej.perezgomez@gmail.com>
*/
+$lang['server'] = 'Tu servidor LDAP. Puede ser el nombre del host (<code>localhost</code>) o una URL completa (<code>ldap://server.tld:389</code>)';
+$lang['port'] = 'Servidor LDAP en caso de que no se diera la URL completa anteriormente.';
+$lang['usertree'] = 'Donde encontrar cuentas de usuario. Ej. <code>ou=People, dc=server, dc=tld</code>';
+$lang['grouptree'] = 'Donde encontrar grupos de usuarios. Ej. <code>ou=Group, dc=server, dc=tld</code>';
+$lang['userfilter'] = 'Filtro LDAP para la busqueda de cuentas de usuario. P. E. <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = 'Filtro LDAP para la busqueda de grupos. P. E. <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = 'La versión del protocolo a usar. Puede que necesites poner esto a <code>3</code>';
$lang['starttls'] = 'Usar conexiones TLS?';
+$lang['referrals'] = '¿Deben ser seguidas las referencias?';
+$lang['deref'] = '¿Cómo desreferenciar los alias?';
+$lang['bindpw'] = 'Contraseña del usuario de arriba.';
+$lang['userscope'] = 'Limitar ámbito de búsqueda para búsqueda de usuarios';
+$lang['groupscope'] = 'Limitar ámbito de búsqueda para búsqueda de grupos';
+$lang['groupkey'] = 'Pertenencia al grupo desde cualquier atributo de usuario (en lugar de grupos AD estándar) p.e., grupo a partir departamento o número de teléfono';
$lang['debug'] = 'Mostrar información adicional para depuración de errores';
$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
diff --git a/lib/plugins/authldap/lang/et/settings.php b/lib/plugins/authldap/lang/et/settings.php
new file mode 100644
index 000000000..f4933b6bf
--- /dev/null
+++ b/lib/plugins/authldap/lang/et/settings.php
@@ -0,0 +1,9 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Janar Leas <janar.leas@eesti.ee>
+ */
+$lang['grouptree'] = 'Kus kohast kasutaja rühmi otsida. Nt. <code>ou=Rühm, dc=server, dc=tld</code>';
+$lang['groupscope'] = 'Piiritle otsingu ulatus rühma otsinguga';
diff --git a/lib/plugins/authldap/lang/hr/settings.php b/lib/plugins/authldap/lang/hr/settings.php
new file mode 100644
index 000000000..44caeacc8
--- /dev/null
+++ b/lib/plugins/authldap/lang/hr/settings.php
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['server'] = 'Vaš LDAP server. Upišite ili naziv računala (<code>localhost</code>) ili puni URL (<code>ldap://server.tld:389</code>)';
+$lang['port'] = 'LDAP server port, ako gore nije specificiran puni URL.';
+$lang['usertree'] = 'Gdje da nađem korisničke prijave. Npr. <code>ou=People, dc=server, dc=tld</code>';
+$lang['grouptree'] = 'Gdje da nađem korisničke grupe. Npr. <code>ou=Group, dc=server, dc=tld</code>';
+$lang['userfilter'] = 'LDAP filter za pretragu korisničkih prijava. Npr. <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = 'LDAP filter za pretragu grupa. Npr. <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = 'Protokol koji se koristi. Možda će te trebati postaviti na <code>3</code>';
+$lang['starttls'] = 'Korisni TLS vezu?';
+$lang['referrals'] = 'Da li da slijedim uputnice?';
+$lang['deref'] = 'Kako da razlikujem aliase?';
+$lang['binddn'] = 'DN opcionalnog korisnika ako anonimni korisnik nije dovoljan. Npr. <code>cn=admin, dc=my, dc=home</code>';
+$lang['bindpw'] = 'Lozinka gore navedenog korisnika';
+$lang['userscope'] = 'Ograniči područje za pretragu korisnika';
+$lang['groupscope'] = 'Ograniči područje za pretragu grupa';
+$lang['groupkey'] = 'Članstvo grupa iz svih atributa korisnika (umjesto standardnih AD grupa) npr. grupa iz odjela ili telefonskog broja';
+$lang['debug'] = 'Prikaži dodatne informacije u slučaju greške';
diff --git a/lib/plugins/authldap/lang/hu/settings.php b/lib/plugins/authldap/lang/hu/settings.php
index 041f82755..1e6608dab 100644
--- a/lib/plugins/authldap/lang/hu/settings.php
+++ b/lib/plugins/authldap/lang/hu/settings.php
@@ -4,9 +4,10 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Marton Sebok <sebokmarton@gmail.com>
+ * @author Marina Vladi <deldadam@gmail.com>
*/
-$lang['server'] = 'LDAP-szerver. Hosztnév (<code>localhost</code>) vagy abszolút URL portszámmal (<code>ldap://server.tld:389</code>)';
-$lang['port'] = 'LDAP-szerver port, ha nem URL lett megadva';
+$lang['server'] = 'LDAP-szerver. Kiszolgálónév (<code>localhost</code>) vagy teljes URL-cím (<code>ldap://server.tld:389</code>)';
+$lang['port'] = 'LDAP-kiszolgáló portja, ha URL-cím nem lett megadva';
$lang['usertree'] = 'Hol találom a felhasználókat? Pl. <code>ou=People, dc=server, dc=tld</code>';
$lang['grouptree'] = 'Hol találom a csoportokat? Pl. <code>ou=Group, dc=server, dc=tld</code>';
$lang['userfilter'] = 'LDAP szűrő a felhasználók kereséséhez, pl. <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
@@ -20,7 +21,7 @@ $lang['bindpw'] = 'Ehhez tartozó jelszó.';
$lang['userscope'] = 'A keresési tartomány korlátozása erre a felhasználókra való keresésnél';
$lang['groupscope'] = 'A keresési tartomány korlátozása erre a csoportokra való keresésnél';
$lang['groupkey'] = 'Csoport meghatározása a következő attribútumból (az alapértelmezett AD csoporttagság helyett), pl. a szervezeti egység vagy a telefonszám';
-$lang['debug'] = 'Debug-üzenetek megjelenítése?';
+$lang['debug'] = 'Továbi hibakeresési információk megjelenítése hiba esetén';
$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
$lang['deref_o_2'] = 'LDAP_DEREF_FINDING';
diff --git a/lib/plugins/authldap/lang/it/settings.php b/lib/plugins/authldap/lang/it/settings.php
index eba7cde6e..858c694b8 100644
--- a/lib/plugins/authldap/lang/it/settings.php
+++ b/lib/plugins/authldap/lang/it/settings.php
@@ -5,6 +5,7 @@
*
* @author Edmondo Di Tucci <snarchio@gmail.com>
* @author Claudio Lanconelli <lancos@libero.it>
+ * @author Francesco <francesco.cavalli@hotmail.com>
*/
$lang['server'] = 'Il tuo server LDAP. Inserire o l\'hostname (<code>localhost</code>) oppure un URL completo (<code>ldap://server.tld:389</code>)';
$lang['port'] = 'Porta del server LDAP se non è stato fornito un URL completo più sopra.';
@@ -14,6 +15,11 @@ $lang['userfilter'] = 'Filtro per cercare l\'account utente LDAP. Eg.
$lang['groupfilter'] = 'Filtro per cercare i gruppi LDAP. Eg. <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
$lang['version'] = 'Versione protocollo da usare. Pu<code>3</code>';
$lang['starttls'] = 'Usare la connessione TSL?';
+$lang['deref'] = 'Come differenziare un alias?';
$lang['userscope'] = 'Limita il contesto di ricerca per la ricerca degli utenti';
$lang['groupscope'] = 'Limita il contesto di ricerca per la ricerca dei gruppi';
$lang['debug'] = 'In caso di errori mostra ulteriori informazioni di debug';
+$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
+$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
+$lang['deref_o_2'] = 'LDAP_DEREF_FINDING';
+$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS';
diff --git a/lib/plugins/authldap/lang/ja/settings.php b/lib/plugins/authldap/lang/ja/settings.php
index 6dec9a576..6cff0ea67 100644
--- a/lib/plugins/authldap/lang/ja/settings.php
+++ b/lib/plugins/authldap/lang/ja/settings.php
@@ -6,8 +6,9 @@
* @author Satoshi Sahara <sahara.satoshi@gmail.com>
* @author Hideaki SAWADA <sawadakun@live.jp>
* @author Hideaki SAWADA <chuno@live.jp>
+ * @author PzF_X <jp_minecraft@yahoo.co.jp>
*/
-$lang['server'] = 'LDAPサーバー。ホスト名(<code>localhost</code)又は完全修飾URL(<code>ldap://server.tld:389</code>)';
+$lang['server'] = 'LDAPサーバー。ホスト名(<code>localhost</code>)又は完全修飾URL(<code>ldap://server.tld:389</code>)';
$lang['port'] = '上記が完全修飾URLでない場合、LDAPサーバーポート';
$lang['usertree'] = 'ユーザーアカウントを探す場所。例:<code>ou=People, dc=server, dc=tld</code>';
$lang['grouptree'] = 'ユーザーグループを探す場所。例:<code>ou=Group, dc=server, dc=tld</code>';
@@ -15,8 +16,14 @@ $lang['userfilter'] = 'ユーザーアカウントを探すためのL
$lang['groupfilter'] = 'グループを探すLDAP抽出条件。例:<code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
$lang['version'] = '使用するプロトコルのバージョン。<code>3</code>を設定する必要がある場合があります。';
$lang['starttls'] = 'TLS接続を使用しますか?';
+$lang['referrals'] = '紹介に従いますか?';
+$lang['deref'] = 'どのように間接参照のエイリアスにしますか?';
$lang['binddn'] = '匿名バインドでは不十分な場合、オプションバインドユーザーのDN。例:<code>cn=admin, dc=my, dc=home</code>';
$lang['bindpw'] = '上記ユーザーのパスワード';
+$lang['userscope'] = 'ユーザー検索の範囲を限定させる';
+$lang['groupscope'] = 'グループ検索の範囲を限定させる';
+$lang['groupkey'] = 'ユーザー属性をグループのメンバーシップから設定します(代わりに標準のADグループ)。
+例えば、部署や電話番号などです。';
$lang['debug'] = 'エラーに関して追加のデバッグ情報を表示する。';
$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
diff --git a/lib/plugins/authldap/lang/ko/settings.php b/lib/plugins/authldap/lang/ko/settings.php
index ae8dc7ab6..e663ba063 100644
--- a/lib/plugins/authldap/lang/ko/settings.php
+++ b/lib/plugins/authldap/lang/ko/settings.php
@@ -13,8 +13,8 @@ $lang['userfilter'] = '사용자 계정을 찾을 LDAP 필터. 예를
$lang['groupfilter'] = '그룹을 찾을 LDAP 필터. 예를 들어 <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
$lang['version'] = '사용할 프로토콜 버전. <code>3</code>으로 설정해야 할 수도 있습니다';
$lang['starttls'] = 'TLS 연결을 사용하겠습니까?';
-$lang['referrals'] = '참고(referrals)를 허용하겠습니까? ';
-$lang['deref'] = '어떻게 별명을 간접 참고하겠습니까?';
+$lang['referrals'] = '참조(referrals)를 허용하겠습니까? ';
+$lang['deref'] = '어떻게 별명을 간접 참조하겠습니까?';
$lang['binddn'] = '익명 바인드가 충분하지 않으면 선택적인 바인드 사용자의 DN. 예를 들어 <code>cn=admin, dc=my, dc=home</code>';
$lang['bindpw'] = '위 사용자의 비밀번호';
$lang['userscope'] = '사용자 검색에 대한 검색 범위 제한';
diff --git a/lib/plugins/authldap/lang/lv/settings.php b/lib/plugins/authldap/lang/lv/settings.php
new file mode 100644
index 000000000..90986e4f1
--- /dev/null
+++ b/lib/plugins/authldap/lang/lv/settings.php
@@ -0,0 +1,9 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Aivars Miška <allefm@gmail.com>
+ */
+$lang['starttls'] = 'Lietot TLS savienojumus?';
+$lang['bindpw'] = 'Lietotāja parole';
diff --git a/lib/plugins/authldap/lang/no/settings.php b/lib/plugins/authldap/lang/no/settings.php
new file mode 100644
index 000000000..6bedb2991
--- /dev/null
+++ b/lib/plugins/authldap/lang/no/settings.php
@@ -0,0 +1,9 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Christopher Schive <chschive@frisurf.no>
+ */
+$lang['port'] = 'LDAP serverport dersom ingen full URL var gitt over.';
+$lang['starttls'] = 'Bruke TLS-forbindelser?';
diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php
index 2b93e0fd4..5677e06a3 100644
--- a/lib/plugins/authldap/lang/ru/settings.php
+++ b/lib/plugins/authldap/lang/ru/settings.php
@@ -6,6 +6,14 @@
* @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua)
* @author Aleksandr Selivanov <alexgearbox@gmail.com>
* @author Erli Moen <evseev.jr@gmail.com>
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
+ * @author Владимир <id37736@yandex.ru>
*/
+$lang['starttls'] = 'Использовать TLS подключения?';
$lang['deref'] = 'Как расшифровывать псевдонимы?';
$lang['bindpw'] = 'Пароль для указанного пользователя.';
+$lang['debug'] = 'Показывать дополнительную отладочную информацию при ошибках';
+$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
+$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
+$lang['deref_o_2'] = 'LDAP_DEREF_FINDING';
+$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS';
diff --git a/lib/plugins/authldap/lang/sl/settings.php b/lib/plugins/authldap/lang/sl/settings.php
index f180226fc..f63070390 100644
--- a/lib/plugins/authldap/lang/sl/settings.php
+++ b/lib/plugins/authldap/lang/sl/settings.php
@@ -4,5 +4,7 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author matej <mateju@svn.gnome.org>
+ * @author Jernej Vidmar <jernej.vidmar@vidmarboehm.com>
*/
$lang['starttls'] = 'Ali naj se uporabijo povezave TLS?';
+$lang['bindpw'] = 'Geslo uporabnika zgoraj';
diff --git a/lib/plugins/authldap/lang/tr/settings.php b/lib/plugins/authldap/lang/tr/settings.php
new file mode 100644
index 000000000..843b7ef9c
--- /dev/null
+++ b/lib/plugins/authldap/lang/tr/settings.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author ilker rifat kapaç <irifat@gmail.com>
+ */
+$lang['bindpw'] = 'Üstteki kullanıcının şifresi';
diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php
index 036644a67..1e6e6a4a9 100644
--- a/lib/plugins/authmysql/auth.php
+++ b/lib/plugins/authmysql/auth.php
@@ -352,13 +352,18 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
* @param array|string $filter array of field/pattern pairs
* @return array userinfo (refer getUserData for internal userinfo details)
*/
- public function retrieveUsers($first = 0, $limit = 10, $filter = array()) {
+ public function retrieveUsers($first = 0, $limit = 0, $filter = array()) {
$out = array();
if($this->_openDB()) {
$this->_lockTables("READ");
$sql = $this->_createSQLFilter($this->getConf('getUsers'), $filter);
- $sql .= " ".$this->getConf('SortOrder')." LIMIT $first, $limit";
+ $sql .= " ".$this->getConf('SortOrder');
+ if($limit) {
+ $sql .= " LIMIT $first, $limit";
+ } elseif($first) {
+ $sql .= " LIMIT $first";
+ }
$result = $this->_queryDB($sql);
if(!empty($result)) {
diff --git a/lib/plugins/authmysql/lang/es/settings.php b/lib/plugins/authmysql/lang/es/settings.php
index 64d422102..b82620fc6 100644
--- a/lib/plugins/authmysql/lang/es/settings.php
+++ b/lib/plugins/authmysql/lang/es/settings.php
@@ -4,9 +4,36 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Antonio Bueno <atnbueno@gmail.com>
+ * @author Eloy <ej.perezgomez@gmail.com>
+ * @author Antonio Castilla <antoniocastilla@trazoide.com>
*/
$lang['server'] = 'Tu servidor MySQL';
$lang['user'] = 'Nombre de usuario MySQL';
+$lang['password'] = 'Contraseña para el usuario de arriba.';
$lang['database'] = 'Base de datos a usar';
$lang['charset'] = 'Codificación usada en la base de datos';
$lang['debug'] = 'Mostrar información adicional para depuración de errores';
+$lang['forwardClearPass'] = 'Enviar las contraseñas de usuario comotexto plano a las siguientes sentencias de SQL, en lugar de utilizar la opción passcrypt';
+$lang['TablesToLock'] = 'Lista separada por comasde las tablas a bloquear durante operaciones de escritura';
+$lang['checkPass'] = 'Sentencia SQL para verificar las contraseñas';
+$lang['getUserInfo'] = 'Sentencia SQL para obtener información del usuario';
+$lang['getGroups'] = 'Sentencia SQL para obtener la pertenencia a grupos de un usuario';
+$lang['getUsers'] = 'Sentencia SQL para listar todos los usuarios';
+$lang['FilterLogin'] = 'Cláusula SQL para filtrar usuarios por su nombre de usuario';
+$lang['FilterName'] = 'Cláusula SQL para filtrar usuarios por su nombre completo';
+$lang['FilterEmail'] = 'Cláusula SQL para filtrar usuarios por su dirección de correo electrónico';
+$lang['FilterGroup'] = 'Cláusula SQL para filtrar usuarios por su pertenencia a grupos';
+$lang['SortOrder'] = 'Cláusula SQL para ordenar usuarios';
+$lang['addUser'] = 'Sentencia SQL para agregar un nuevo usuario';
+$lang['addGroup'] = 'Sentencia SQL para agregar un nuevo grupo';
+$lang['addUserGroup'] = 'Sentencia SQL para agregar un usuario a un grupo existente';
+$lang['delGroup'] = 'Sentencia SQL para eliminar un grupo';
+$lang['getUserID'] = 'Sentencia SQL para obtener la clave primaria de un usuario';
+$lang['delUser'] = 'Sentencia SQL para eliminar un usuario';
+$lang['delUserRefs'] = 'Sentencia SQL para eliminar un usuario de todos los grupos';
+$lang['updateUser'] = 'Sentencia SQL para actualizar un perfil de usuario';
+$lang['delUserGroup'] = 'Sentencia SQL para eliminar un usuario de un grupo dado';
+$lang['getGroupID'] = 'Sentencia SQL para obtener la clave principal de un grupo dado';
+$lang['debug_o_0'] = 'ninguno';
+$lang['debug_o_1'] = 'sólo errores';
+$lang['debug_o_2'] = 'todas las consultas SQL';
diff --git a/lib/plugins/authmysql/lang/hr/settings.php b/lib/plugins/authmysql/lang/hr/settings.php
new file mode 100644
index 000000000..0ef389f46
--- /dev/null
+++ b/lib/plugins/authmysql/lang/hr/settings.php
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['server'] = 'Vaš MySQL server';
+$lang['user'] = 'MySQL korisničko ime';
+$lang['password'] = 'Lozinka gore navedenog korisnika';
+$lang['database'] = 'Baza koja se koristi';
+$lang['charset'] = 'Znakovni set koji se koristi u bazi';
+$lang['debug'] = 'Prikaz dodatnih debug informacija';
+$lang['forwardClearPass'] = 'Proslijedi korisničku lozinku kao čisti tekst u SQL upitu niže, umjesto korištenja passcrypt opcije';
+$lang['TablesToLock'] = 'Zarezom odvojena lista tabela koje trebaju biti zaključane pri operacijama pisanja';
+$lang['checkPass'] = 'SQL izraz za provjeru lozinki';
+$lang['getUserInfo'] = 'SQL izraz za dohvaćanje informacija o korisniku';
+$lang['getGroups'] = 'SQL izraz za dohvaćanje članstva u grupama';
+$lang['getUsers'] = 'SQL izraz za ispis svih korisnika';
+$lang['FilterLogin'] = 'SQL izraz za izdvajanje korisnika po korisničkom imenu';
+$lang['FilterName'] = 'SQL izraz za izdvajanje korisnika po punom imenu';
+$lang['FilterEmail'] = 'SQL izraz za izdvajanje korisnika po email adresi';
+$lang['FilterGroup'] = 'SQL izraz za izdvajanje korisnika po članstvu u grupama';
+$lang['SortOrder'] = 'SQL izraz za sortiranje korisnika';
+$lang['addUser'] = 'SQL izraz za dodavanje novih korisnika';
+$lang['addGroup'] = 'SQL izraz za dodavanje novih grupa';
+$lang['addUserGroup'] = 'SQL izraz za dodavanje korisnika u postojeću grupu';
+$lang['delGroup'] = 'SQL izraz za uklanjanje grupe';
+$lang['getUserID'] = 'SQL izraz za dobivanje primarnog ključa korisnika';
+$lang['delUser'] = 'SQL izraz za brisanje korisnika';
+$lang['delUserRefs'] = 'SQL izraz za uklanjanje korisnika iz grupe';
+$lang['updateUser'] = 'SQL izraz za ažuriranje korisničkog profila';
+$lang['UpdateLogin'] = 'UPDATE izraz za ažuriranje korisničkog imena';
+$lang['UpdatePass'] = 'UPDATE izraz za ažuriranje korisničke lozinke';
+$lang['UpdateEmail'] = 'UPDATE izraz za ažuriranje korisničke email adrese';
+$lang['UpdateName'] = 'UPDATE izraz za ažuriranje punog imena korisnika';
+$lang['UpdateTarget'] = 'Limit izraz za identificiranje korisnika pri ažuriranju';
+$lang['delUserGroup'] = 'SQL izraz za uklanjanje korisnika iz zadane grupe';
+$lang['getGroupID'] = 'SQL izraz za dobivanje primarnoga ključa zadane grupe';
+$lang['debug_o_0'] = 'ništa';
+$lang['debug_o_1'] = 'u slučaju greške';
+$lang['debug_o_2'] = 'svi SQL upiti';
diff --git a/lib/plugins/authmysql/lang/hu/settings.php b/lib/plugins/authmysql/lang/hu/settings.php
index 5936203fa..cf7b26bb9 100644
--- a/lib/plugins/authmysql/lang/hu/settings.php
+++ b/lib/plugins/authmysql/lang/hu/settings.php
@@ -6,8 +6,8 @@
* @author Marton Sebok <sebokmarton@gmail.com>
* @author Marina Vladi <deldadam@gmail.com>
*/
-$lang['server'] = 'MySQL-szerver';
-$lang['user'] = 'MySQL felhasználónév';
+$lang['server'] = 'MySQL-kiszolgáló';
+$lang['user'] = 'MySQL-felhasználónév';
$lang['password'] = 'Fenti felhasználó jelszava';
$lang['database'] = 'Adatbázis';
$lang['charset'] = 'Az adatbázisban használt karakterkészlet';
diff --git a/lib/plugins/authmysql/lang/it/settings.php b/lib/plugins/authmysql/lang/it/settings.php
index e493ec7e9..10c0de96f 100644
--- a/lib/plugins/authmysql/lang/it/settings.php
+++ b/lib/plugins/authmysql/lang/it/settings.php
@@ -4,5 +4,34 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Claudio Lanconelli <lancos@libero.it>
+ * @author Mirko <malisan.mirko@gmail.com>
+ * @author Francesco <francesco.cavalli@hotmail.com>
*/
+$lang['server'] = 'Il tuo server MySQL';
+$lang['user'] = 'User name di MySQL';
+$lang['database'] = 'Database da usare';
+$lang['charset'] = 'Set di caratteri usato nel database';
$lang['debug'] = 'Mostra ulteriori informazioni di debug';
+$lang['TablesToLock'] = 'Lista, separata da virgola, delle tabelle che devono essere bloccate in scrittura';
+$lang['checkPass'] = 'Istruzione SQL per il controllo password';
+$lang['getUserInfo'] = 'Istruzione SQL per recuperare le informazioni utente';
+$lang['getUsers'] = 'Istruzione SQL per listare tutti gli utenti';
+$lang['FilterLogin'] = 'Istruzione SQL per per filtrare gli utenti in funzione del "login name"';
+$lang['SortOrder'] = 'Istruzione SQL per ordinare gli utenti';
+$lang['addUser'] = 'Istruzione SQL per aggiungere un nuovo utente';
+$lang['addGroup'] = 'Istruzione SQL per aggiungere un nuovo gruppo';
+$lang['addUserGroup'] = 'Istruzione SQL per aggiungere un utente ad un gruppo esistente';
+$lang['delGroup'] = 'Istruzione SQL per imuovere un gruppo';
+$lang['getUserID'] = 'Istruzione SQL per recuperare la primary key di un utente';
+$lang['delUser'] = 'Istruzione SQL per cancellare un utente';
+$lang['delUserRefs'] = 'Istruzione SQL per rimuovere un utente da tutti i gruppi';
+$lang['updateUser'] = 'Istruzione SQL per aggiornare il profilo utente';
+$lang['UpdateLogin'] = 'Clausola per aggiornare il "login name" dell\'utente';
+$lang['UpdatePass'] = 'Clausola per aggiornare la password utente';
+$lang['UpdateEmail'] = 'Clausola per aggiornare l\'email utente';
+$lang['UpdateName'] = 'Clausola per aggiornare il nome completo';
+$lang['delUserGroup'] = 'Istruzione SQL per rimuovere un utente da un dato gruppo';
+$lang['getGroupID'] = 'Istruzione SQL per avere la primary key di un dato gruppo';
+$lang['debug_o_0'] = 'Nulla';
+$lang['debug_o_1'] = 'Solo in errore';
+$lang['debug_o_2'] = 'Tutte le query SQL';
diff --git a/lib/plugins/authmysql/lang/lv/settings.php b/lib/plugins/authmysql/lang/lv/settings.php
new file mode 100644
index 000000000..8550363c9
--- /dev/null
+++ b/lib/plugins/authmysql/lang/lv/settings.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Aivars Miška <allefm@gmail.com>
+ */
+$lang['user'] = 'MySQL lietotāja vārds';
+$lang['password'] = 'Lietotāja parole';
+$lang['delUser'] = 'SQL pieprasījums lietotāja dzēšanai';
diff --git a/lib/plugins/authmysql/lang/pl/settings.php b/lib/plugins/authmysql/lang/pl/settings.php
index 88cbd5d6f..9dc798ee0 100644
--- a/lib/plugins/authmysql/lang/pl/settings.php
+++ b/lib/plugins/authmysql/lang/pl/settings.php
@@ -4,6 +4,7 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Paweł Jan Czochański <czochanski@gmail.com>
+ * @author Mati <mackosa@wp.pl>
*/
$lang['server'] = 'Twój server MySQL';
$lang['user'] = 'Nazwa użytkownika MySQL';
@@ -12,3 +13,4 @@ $lang['database'] = 'Używana baza danych';
$lang['charset'] = 'Zestaw znaków uzyty w bazie danych';
$lang['debug'] = 'Wyświetlaj dodatkowe informacje do debugowania.';
$lang['checkPass'] = 'Zapytanie SQL wykorzystywane do sprawdzania haseł.';
+$lang['debug_o_2'] = 'wszystkie zapytania SQL';
diff --git a/lib/plugins/authmysql/lang/tr/settings.php b/lib/plugins/authmysql/lang/tr/settings.php
new file mode 100644
index 000000000..ca6a7c6ad
--- /dev/null
+++ b/lib/plugins/authmysql/lang/tr/settings.php
@@ -0,0 +1,41 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author ilker rifat kapaç <irifat@gmail.com>
+ * @author İlker R. Kapaç <irifat@gmail.com>
+ */
+$lang['server'] = 'Sizin MySQL sunucunuz';
+$lang['user'] = 'MySQL kullanıcısının adı';
+$lang['password'] = 'Üstteki kullanıcı için şifre';
+$lang['database'] = 'Kullanılacak veritabanı';
+$lang['charset'] = 'Veritabanında kullanılacak karakter seti';
+$lang['debug'] = 'İlave hata ayıklama bilgisini görüntüle';
+$lang['checkPass'] = 'Şifreleri kontrol eden SQL ifadesi';
+$lang['getUserInfo'] = 'Kullanıcı bilgilerini getiren SQL ifadesi';
+$lang['getGroups'] = 'Kullanıcının grup üyeliklerini getiren SQL ifadesi';
+$lang['getUsers'] = 'Tüm kullanıcıları listeleyen SQL ifadesi';
+$lang['FilterLogin'] = 'Kullanıcıları giriş yaptıkları isimlere göre süzmek için SQL şartı';
+$lang['FilterName'] = 'Kullanıcıları tam isimlerine göre süzmek için SQL şartı';
+$lang['FilterEmail'] = 'Kullanıcıları e-posta adreslerine göre süzmek için SQL şartı';
+$lang['FilterGroup'] = 'Kullanıcıları üye oldukları grup isimlerine göre süzmek için SQL şartı';
+$lang['SortOrder'] = 'Kullanıcıları sıralamak için SQL şartı';
+$lang['addUser'] = 'Yeni bir kullanıcı ekleyen SQL ifadesi';
+$lang['addGroup'] = 'Yeni bir grup ekleyen SQL ifadesi';
+$lang['addUserGroup'] = 'Varolan gruba yeni bir kullanıcı ekleyen SQL ifadesi';
+$lang['delGroup'] = 'Grup silen SQL ifadesi';
+$lang['getUserID'] = 'Kullanıcının birincil anahtarını getiren SQL ifadesi';
+$lang['delUser'] = 'Kullanıcı silen SQL ifadesi';
+$lang['delUserRefs'] = 'Kullanıcıyı tüm gruplardan çıkartan SQL ifadesi';
+$lang['updateUser'] = 'Kullanıcı profilini güncelleyen SQL ifadesi';
+$lang['UpdateLogin'] = 'Kullanıcının giriş yaptığı ismi güncelleyen, güncelleme şartı';
+$lang['UpdatePass'] = 'Kullanıcının şifresini güncelleyen, güncelleme şartı';
+$lang['UpdateEmail'] = 'Kullanıcının e-posta adresini güncelleyen, güncelleme şartı';
+$lang['UpdateName'] = 'Kullanıcının tam adını güncelleyen, güncelleme şartı';
+$lang['UpdateTarget'] = 'Güncelleme esnasında kullanıcıyı belirleyen, sınır şartı';
+$lang['delUserGroup'] = 'Kullanıcıyı verilen gruptan silen SQL ifadesi';
+$lang['getGroupID'] = 'Verilen grubun birincil anahtarını getiren SQL ifadesi';
+$lang['debug_o_0'] = 'hiçbiri';
+$lang['debug_o_1'] = 'sadece hata olduğunda';
+$lang['debug_o_2'] = 'tüm SQL sorguları';
diff --git a/lib/plugins/authpgsql/auth.php b/lib/plugins/authpgsql/auth.php
index 3f8ff3249..e51b39858 100644
--- a/lib/plugins/authpgsql/auth.php
+++ b/lib/plugins/authpgsql/auth.php
@@ -148,13 +148,15 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql {
* @param array $filter array of field/pattern pairs
* @return array userinfo (refer getUserData for internal userinfo details)
*/
- public function retrieveUsers($first = 0, $limit = 10, $filter = array()) {
+ public function retrieveUsers($first = 0, $limit = 0, $filter = array()) {
$out = array();
if($this->_openDB()) {
$this->_lockTables("READ");
$sql = $this->_createSQLFilter($this->conf['getUsers'], $filter);
- $sql .= " ".$this->conf['SortOrder']." LIMIT $limit OFFSET $first";
+ $sql .= " ".$this->conf['SortOrder'];
+ if($limit) $sql .= " LIMIT $limit";
+ if($first) $sql .= " OFFSET $first";
$result = $this->_queryDB($sql);
foreach($result as $user)
diff --git a/lib/plugins/authpgsql/lang/es/settings.php b/lib/plugins/authpgsql/lang/es/settings.php
new file mode 100644
index 000000000..2e02fc0ec
--- /dev/null
+++ b/lib/plugins/authpgsql/lang/es/settings.php
@@ -0,0 +1,26 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Antonio Bueno <atnbueno@gmail.com>
+ * @author Antonio Castilla <antoniocastilla@trazoide.com>
+ */
+$lang['server'] = 'Su servidor PostgreSQL';
+$lang['port'] = 'Puerto de su servidor PostgreSQL';
+$lang['user'] = 'Nombre de usuario PostgreSQL';
+$lang['password'] = 'Contraseña del usuario indicado';
+$lang['database'] = 'Base de datos a usar';
+$lang['debug'] = 'Muestra la información de depuración adicional';
+$lang['forwardClearPass'] = 'Pasar las contraseñas de usuario en texto plano a las siguientes sentencias de SQL, en lugar de utilizar la opción passcrypt';
+$lang['checkPass'] = 'Sentencia SQL para el control de las contraseñas';
+$lang['getUserInfo'] = 'Sentencia SQL para recuperar información del usuario';
+$lang['getGroups'] = 'Sentencia SQL para recuperar la pertenencia a grupos de un usuario';
+$lang['getUsers'] = 'Sentencia SQL para enumerar todos los usuarios';
+$lang['addUser'] = 'Sentencia de SQL para agregar un nuevo usuario';
+$lang['addGroup'] = 'Sentencia de SQL para agregar un nuevo grupo';
+$lang['addUserGroup'] = 'Sentencia SQL para agregar un usuario a un grupo existente';
+$lang['delGroup'] = 'Instrucción SQL para eliminar un grupo';
+$lang['getUserID'] = 'Sentencia SQL para obtener la clave principal de un usuario';
+$lang['delUser'] = 'Sentencia SQL para eliminar un usuario';
+$lang['getGroupID'] = 'Sentencia SQL para obtener la clave principal de un grupo dado';
diff --git a/lib/plugins/authpgsql/lang/hr/settings.php b/lib/plugins/authpgsql/lang/hr/settings.php
new file mode 100644
index 000000000..7ae4cec77
--- /dev/null
+++ b/lib/plugins/authpgsql/lang/hr/settings.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['server'] = 'Vaš PostgreSQL server';
+$lang['port'] = 'Port vašeg PostgreSQL servera';
+$lang['user'] = 'PostgreSQL korisničko ime';
+$lang['password'] = 'Lozinka gore navedenoga korisnika';
+$lang['database'] = 'Baza koja se koristi';
+$lang['debug'] = 'Prikaz dodatnih dijagnostičkih informacija';
+$lang['forwardClearPass'] = 'Proslijed lozinku kao običan tekst u SQL izrazima koji slijede, umjesto korištenja passcrypt opcije';
+$lang['checkPass'] = 'SQL izraz za provjeru lozinke';
+$lang['getUserInfo'] = 'SQL izraz za dohvat korisničkih informacija';
+$lang['getGroups'] = 'SQL izraz za dohvat korisničkog članstva u grupama';
+$lang['getUsers'] = 'SQL izraz za ispis svih korisnika';
+$lang['FilterLogin'] = 'SQL izraz za filtriranje korisnika po korisničkom imenu';
+$lang['FilterName'] = 'SQL izraz za filtriranje korisnika po punom imenu';
+$lang['FilterEmail'] = 'SQL izraz za filtriranje korisnika po email adresi';
+$lang['FilterGroup'] = 'SQL izraz za filtriranje korisnika po članstvu u grupama';
+$lang['SortOrder'] = 'SQL izraz za sortiranje korisnika';
+$lang['addUser'] = 'SQL izraz za dodavanje novog korisnika';
+$lang['addGroup'] = 'SQL izraz za dodavanje nove grupe';
+$lang['addUserGroup'] = 'SQL izraz za dodavanje korisnika u postojeću grupu';
+$lang['delGroup'] = 'SQL izraz za brisanje grupe';
+$lang['getUserID'] = 'SQL izraz za dohvaćanje primarnog ključa korisnika';
+$lang['delUser'] = 'SQL izraz za brisanje korisnika';
+$lang['delUserRefs'] = 'SQL izraz za uklanjanje korisnika iz svih grupa';
+$lang['updateUser'] = 'SQL izraz za ažuriranje korisničkog profila';
+$lang['UpdateLogin'] = 'UPDATE izraz za ažuriranje korisničkog imena';
+$lang['UpdatePass'] = 'UPDATE izraz za ažuriranje korisničke lozinke';
+$lang['UpdateEmail'] = 'UPDATE izraz za ažuriranje korisničke email adrese';
+$lang['UpdateName'] = 'UPDATE izraz za ažuriranje korisničkog punog imena';
+$lang['UpdateTarget'] = 'Limitirajući izraz za identificiranje korisnika pri ažuriranju';
+$lang['delUserGroup'] = 'SQL izraz za uklanjanje korisnika iz navedenih grupa';
+$lang['getGroupID'] = 'SQL izraz za dobivanje primarnog ključa navedene grupe';
diff --git a/lib/plugins/authpgsql/lang/it/settings.php b/lib/plugins/authpgsql/lang/it/settings.php
new file mode 100644
index 000000000..baf40a468
--- /dev/null
+++ b/lib/plugins/authpgsql/lang/it/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Francesco <francesco.cavalli@hotmail.com>
+ */
+$lang['server'] = 'Il tuo server PostgreSQL ';
+$lang['port'] = 'La porta del tuo server PostgreSQL ';
+$lang['user'] = 'Lo username PostgreSQL';
+$lang['database'] = 'Database da usare';
diff --git a/lib/plugins/authpgsql/lang/lv/settings.php b/lib/plugins/authpgsql/lang/lv/settings.php
new file mode 100644
index 000000000..889b9566c
--- /dev/null
+++ b/lib/plugins/authpgsql/lang/lv/settings.php
@@ -0,0 +1,9 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Aivars Miška <allefm@gmail.com>
+ */
+$lang['password'] = 'Lietotāja parole';
+$lang['delUser'] = 'SQL pieprasījums lietotāja dzēšanai';
diff --git a/lib/plugins/authpgsql/lang/pl/settings.php b/lib/plugins/authpgsql/lang/pl/settings.php
new file mode 100644
index 000000000..25a2afd4f
--- /dev/null
+++ b/lib/plugins/authpgsql/lang/pl/settings.php
@@ -0,0 +1,9 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Mati <mackosa@wp.pl>
+ */
+$lang['server'] = 'Twój serwer PostgreSQL';
+$lang['database'] = 'Baza danych do użycia';
diff --git a/lib/plugins/authpgsql/lang/ru/settings.php b/lib/plugins/authpgsql/lang/ru/settings.php
index 48dd2a87c..65cbce8df 100644
--- a/lib/plugins/authpgsql/lang/ru/settings.php
+++ b/lib/plugins/authpgsql/lang/ru/settings.php
@@ -5,12 +5,14 @@
*
* @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua)
* @author Aleksandr Selivanov <alexgearbox@gmail.com>
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
*/
$lang['server'] = 'Ваш PostgreSQL-сервер';
$lang['port'] = 'Порт вашего PostgreSQL-сервера';
$lang['user'] = 'Имя пользователя PostgreSQL';
$lang['password'] = 'Пароль для указанного пользователя.';
$lang['database'] = 'Имя базы данных';
+$lang['debug'] = 'Отображать дополнительную отладочную информацию';
$lang['checkPass'] = 'Выражение SQL, осуществляющее проверку пароля';
$lang['getUserInfo'] = 'Выражение SQL, осуществляющее извлечение информации о пользователе';
$lang['getGroups'] = 'Выражение SQL, осуществляющее извлечение информации о членстве пользователе в группах';
diff --git a/lib/plugins/authpgsql/lang/tr/settings.php b/lib/plugins/authpgsql/lang/tr/settings.php
new file mode 100644
index 000000000..f6fef9cde
--- /dev/null
+++ b/lib/plugins/authpgsql/lang/tr/settings.php
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author İlker R. Kapaç <irifat@gmail.com>
+ */
+$lang['server'] = 'PostgreSQL sunucunuz';
+$lang['port'] = 'PostgreSQL sunucunuzun kapısı (port)';
+$lang['user'] = 'PostgreSQL kullanıcısının adı';
+$lang['password'] = 'Yukarıdaki kullanıcı için şifre';
+$lang['database'] = 'Kullanılacak veritabanı';
+$lang['debug'] = 'İlave hata ayıklama bilgisini görüntüle';
diff --git a/lib/plugins/authplain/_test/escaping.test.php b/lib/plugins/authplain/_test/escaping.test.php
new file mode 100644
index 000000000..cd5294157
--- /dev/null
+++ b/lib/plugins/authplain/_test/escaping.test.php
@@ -0,0 +1,82 @@
+<?php
+
+/**
+ * These tests are designed to test the capacity of pluginauth to handle
+ * correct escaping of colon field delimiters and backslashes in user content.
+ *
+ * (Note that these tests set some Real Names, etc. that are may not be
+ * valid in the broader dokuwiki context, but the tests ensure that
+ * authplain won't get unexpectedly surprised.)
+ *
+ * @group plugin_authplain
+ * @group plugins
+ */
+class helper_plugin_authplain_escaping_test extends DokuWikiTest {
+
+ protected $pluginsEnabled = array('authplain');
+ protected $auth;
+
+ protected function reloadUsers() {
+ /* auth caches data loaded from file, but recreated object forces reload */
+ $this->auth = new auth_plugin_authplain();
+ }
+
+ function setUp() {
+ global $config_cascade;
+ parent::setUp();
+ $name = $config_cascade['plainauth.users']['default'];
+ copy($name, $name.".orig");
+ $this->reloadUsers();
+ }
+
+ function tearDown() {
+ global $config_cascade;
+ parent::tearDown();
+ $name = $config_cascade['plainauth.users']['default'];
+ copy($name.".orig", $name);
+ }
+
+ public function testMediawikiPasswordHash() {
+ global $conf;
+ $conf['passcrypt'] = 'mediawiki';
+ $this->auth->createUser("mwuser", "12345", "Mediawiki User", "me@example.com");
+ $this->reloadUsers();
+ $this->assertTrue($this->auth->checkPass("mwuser", "12345"));
+ $mwuser = $this->auth->getUserData("mwuser");
+ $this->assertStringStartsWith(":B:",$mwuser['pass']);
+ $this->assertEquals("Mediawiki User",$mwuser['name']);
+ }
+
+ public function testNameWithColons() {
+ $name = ":Colon: User:";
+ $this->auth->createUser("colonuser", "password", $name, "me@example.com");
+ $this->reloadUsers();
+ $user = $this->auth->getUserData("colonuser");
+ $this->assertEquals($name,$user['name']);
+ }
+
+ public function testNameWithBackslashes() {
+ $name = "\\Slash\\ User\\";
+ $this->auth->createUser("slashuser", "password", $name, "me@example.com");
+ $this->reloadUsers();
+ $user = $this->auth->getUserData("slashuser");
+ $this->assertEquals($name,$user['name']);
+ }
+
+ public function testModifyUser() {
+ global $conf;
+ $conf['passcrypt'] = 'mediawiki';
+ $user = $this->auth->getUserData("testuser");
+ $user['name'] = "\\New:Crazy:Name\\";
+ $user['pass'] = "awesome new password";
+ $this->auth->modifyUser("testuser", $user);
+ $this->reloadUsers();
+
+ $saved = $this->auth->getUserData("testuser");
+ $this->assertEquals($saved['name'], $user['name']);
+ $this->assertTrue($this->auth->checkPass("testuser", $user['pass']));
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/lib/plugins/authplain/auth.php b/lib/plugins/authplain/auth.php
index 8c4ce0dd9..e53f56667 100644
--- a/lib/plugins/authplain/auth.php
+++ b/lib/plugins/authplain/auth.php
@@ -84,6 +84,27 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin {
}
/**
+ * Creates a string suitable for saving as a line
+ * in the file database
+ * (delimiters escaped, etc.)
+ *
+ * @param string $user
+ * @param string $pass
+ * @param string $name
+ * @param string $mail
+ * @param array $grps list of groups the user is in
+ * @return string
+ */
+ protected function _createUserLine($user, $pass, $name, $mail, $grps) {
+ $groups = join(',', $grps);
+ $userline = array($user, $pass, $name, $mail, $groups);
+ $userline = str_replace('\\', '\\\\', $userline); // escape \ as \\
+ $userline = str_replace(':', '\\:', $userline); // escape : as \:
+ $userline = join(':', $userline)."\n";
+ return $userline;
+ }
+
+ /**
* Create a new User
*
* Returns false if the user already exists, null when an error
@@ -115,8 +136,7 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin {
if(!is_array($grps)) $grps = array($conf['defaultgroup']);
// prepare user line
- $groups = join(',', $grps);
- $userline = join(':', array($user, $pass, $name, $mail, $groups))."\n";
+ $userline = $this->_createUserLine($user, $pass, $name, $mail, $grps);
if(io_saveFile($config_cascade['plainauth.users']['default'], $userline, true)) {
$this->users[$user] = compact('pass', 'name', 'mail', 'grps');
@@ -157,8 +177,7 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin {
$userinfo[$field] = $value;
}
- $groups = join(',', $userinfo['grps']);
- $userline = join(':', array($newuser, $userinfo['pass'], $userinfo['name'], $userinfo['mail'], $groups))."\n";
+ $userline = $this->_createUserLine($newuser, $userinfo['pass'], $userinfo['name'], $userinfo['mail'], $userinfo['grps']);
if(!$this->deleteUsers(array($user))) {
msg('Unable to modify user data. Please inform the Wiki-Admin', -1);
@@ -308,7 +327,11 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin {
$line = trim($line);
if(empty($line)) continue;
- $row = explode(":", $line, 5);
+ /* NB: preg_split can be deprecated/replaced with str_getcsv once dokuwiki is min php 5.3 */
+ $row = preg_split('/(?<![^\\\\]\\\\)\:/', $line, 5); // allow for : escaped as \:
+ $row = str_replace('\\:', ':', $row);
+ $row = str_replace('\\\\', '\\', $row);
+
$groups = array_values(array_filter(explode(",", $row[4])));
$this->users[$row[0]]['pass'] = $row[1];
diff --git a/lib/plugins/config/lang/bg/lang.php b/lib/plugins/config/lang/bg/lang.php
index d0df38cae..64ddb1eae 100644
--- a/lib/plugins/config/lang/bg/lang.php
+++ b/lib/plugins/config/lang/bg/lang.php
@@ -67,7 +67,7 @@ $lang['fmode'] = 'Режим (права) за създаване на фа
$lang['allowdebug'] = 'Включване на режи debug - <b>изключете, ако не е нужен!</b>';
/* Display Settings */
-$lang['recent'] = 'Скорошни промени - брой еленти на страница';
+$lang['recent'] = 'Скорошни промени - брой елементи на страница';
$lang['recent_days'] = 'Колко от скорошните промени да се пазят (дни)';
$lang['breadcrumbs'] = 'Брой на следите. За изключване на функцията задайте 0.';
$lang['youarehere'] = 'Йерархични следи (в този случай можете да изключите горната опция)';
@@ -167,7 +167,7 @@ $lang['compress'] = 'Компактен CSS и javascript изглед';
$lang['cssdatauri'] = 'Максимален размер, в байтове, до който изображенията посочени в .CSS файл ще бъдат вграждани в стила (stylesheet), за да се намали броя на HTTP заявките. Техниката не работи за версиите на IE преди 8! Препоръчителни стойности: <code>400</code> до <code>600</code> байта. Въведете <code>0</code> за изключване.';
$lang['send404'] = 'Пращане на "HTTP 404/Page Not Found" за несъществуващи страници';
$lang['broken_iua'] = 'Отметнете, ако ignore_user_abort функцията не работи. Може да попречи на търсенето в страниците. Знае се, че комбинацията IIS+PHP/CGI е лоша. Вижте <a href="http://bugs.splitbrain.org/?do=details&amp;task_id=852">Грешка 852</a> за повече информация.';
-$lang['xsendfile'] = 'Ползване на Х-Sendfile header, за да може уебсървъра да дава статични файлове? Вашият уебсървър трябва да го поддържа.';
+$lang['xsendfile'] = 'Ползване на Х-Sendfile header, за да може уебсървъра да дава статични файлове? Вашият уеб сървър трябва да го поддържа.';
$lang['renderer_xhtml'] = 'Представяне на основните изходни данни (xhtml) от Wiki-то с';
$lang['renderer__core'] = '%s (ядрото на DokuWiki)';
$lang['renderer__plugin'] = '%s (приставка)';
diff --git a/lib/plugins/config/lang/de/lang.php b/lib/plugins/config/lang/de/lang.php
index e55081a91..d398ebf84 100644
--- a/lib/plugins/config/lang/de/lang.php
+++ b/lib/plugins/config/lang/de/lang.php
@@ -41,7 +41,7 @@ $lang['_links'] = 'Links';
$lang['_media'] = 'Medien';
$lang['_notifications'] = 'Benachrichtigung';
$lang['_syndication'] = 'Syndication (RSS)';
-$lang['_advanced'] = 'Erweitertet';
+$lang['_advanced'] = 'Erweitert';
$lang['_network'] = 'Netzwerk';
$lang['_msg_setting_undefined'] = 'Keine Konfigurationsmetadaten.';
$lang['_msg_setting_no_class'] = 'Keine Konfigurationsklasse.';
diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php
index cdef85a85..5e5218aff 100644
--- a/lib/plugins/config/lang/en/lang.php
+++ b/lib/plugins/config/lang/en/lang.php
@@ -101,6 +101,7 @@ $lang['disableactions_subscription'] = 'Subscribe/Unsubscribe';
$lang['disableactions_wikicode'] = 'View source/Export Raw';
$lang['disableactions_profile_delete'] = 'Delete Own Account';
$lang['disableactions_other'] = 'Other actions (comma separated)';
+$lang['disableactions_rss'] = 'XML Syndication (RSS)';
$lang['auth_security_timeout'] = 'Authentication Security Timeout (seconds)';
$lang['securecookie'] = 'Should cookies set via HTTPS only be sent via HTTPS by the browser? Disable this option when only the login of your wiki is secured with SSL but browsing the wiki is done unsecured.';
$lang['remote'] = 'Enable the remote API system. This allows other applications to access the wiki via XML-RPC or other mechanisms.';
@@ -245,10 +246,11 @@ $lang['xsendfile_o_2'] = 'Standard X-Sendfile header';
$lang['xsendfile_o_3'] = 'Proprietary Nginx X-Accel-Redirect header';
/* Display user info */
-$lang['showuseras_o_loginname'] = 'Login name';
-$lang['showuseras_o_username'] = "User's full name";
-$lang['showuseras_o_email'] = "User's e-mail addresss (obfuscated according to mailguard setting)";
-$lang['showuseras_o_email_link'] = "User's e-mail addresss as a mailto: link";
+$lang['showuseras_o_loginname'] = 'Login name';
+$lang['showuseras_o_username'] = "User's full name";
+$lang['showuseras_o_username_link'] = "User's full name as interwiki user link";
+$lang['showuseras_o_email'] = "User's e-mail addresss (obfuscated according to mailguard setting)";
+$lang['showuseras_o_email_link'] = "User's e-mail addresss as a mailto: link";
/* useheading options */
$lang['useheading_o_0'] = 'Never';
diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php
index 05f8470f7..8dae23110 100644
--- a/lib/plugins/config/settings/config.class.php
+++ b/lib/plugins/config/settings/config.class.php
@@ -18,6 +18,7 @@ if (!class_exists('configuration')) {
var $_heading = ''; // heading string written at top of config file - don't include comment indicators
var $_loaded = false; // set to true after configuration files are loaded
var $_metadata = array(); // holds metadata describing the settings
+ /** @var setting[] */
var $setting = array(); // array of setting objects
var $locked = false; // configuration is considered locked if it can't be updated
var $show_disabled_plugins = false;
@@ -31,8 +32,10 @@ if (!class_exists('configuration')) {
/**
* constructor
+ *
+ * @param string $datafile path to config metadata file
*/
- function configuration($datafile) {
+ public function configuration($datafile) {
global $conf, $config_cascade;
if (!@file_exists($datafile)) {
@@ -55,7 +58,10 @@ if (!class_exists('configuration')) {
$this->retrieve_settings();
}
- function retrieve_settings() {
+ /**
+ * Retrieve and stores settings in setting[] attribute
+ */
+ public function retrieve_settings() {
global $conf;
$no_default_check = array('setting_fieldset', 'setting_undefined', 'setting_no_class');
@@ -100,7 +106,15 @@ if (!class_exists('configuration')) {
}
}
- function save_settings($id, $header='', $backup=true) {
+ /**
+ * Stores setting[] array to file
+ *
+ * @param string $id Name of plugin, which saves the settings
+ * @param string $header Text at the top of the rewritten settings file
+ * @param bool $backup backup current file? (remove any existing backup)
+ * @return bool succesful?
+ */
+ public function save_settings($id, $header='', $backup=true) {
global $conf;
if ($this->locked) return false;
@@ -138,13 +152,19 @@ if (!class_exists('configuration')) {
/**
* Update last modified time stamp of the config file
*/
- function touch_settings(){
+ public function touch_settings(){
if ($this->locked) return false;
$file = end($this->_local_files);
return @touch($file);
}
- function _read_config_group($files) {
+ /**
+ * Read and merge given config files
+ *
+ * @param array $files file paths
+ * @return array config settings
+ */
+ protected function _read_config_group($files) {
$config = array();
foreach ($files as $file) {
$config = array_merge($config, $this->_read_config($file));
@@ -154,7 +174,10 @@ if (!class_exists('configuration')) {
}
/**
- * return an array of config settings
+ * Return an array of config settings
+ *
+ * @param string $file file path
+ * @return array config settings
*/
function _read_config($file) {
@@ -206,7 +229,14 @@ if (!class_exists('configuration')) {
return $config;
}
- function _out_header($id, $header) {
+ /**
+ * Returns header of rewritten settings file
+ *
+ * @param string $id plugin name of which generated this output
+ * @param string $header additional text for at top of the file
+ * @return string text of header
+ */
+ protected function _out_header($id, $header) {
$out = '';
if ($this->_format == 'php') {
$out .= '<'.'?php'."\n".
@@ -221,7 +251,12 @@ if (!class_exists('configuration')) {
return $out;
}
- function _out_footer() {
+ /**
+ * Returns footer of rewritten settings file
+ *
+ * @return string text of footer
+ */
+ protected function _out_footer() {
$out = '';
if ($this->_format == 'php') {
$out .= "\n// end auto-generated content\n";
@@ -230,9 +265,13 @@ if (!class_exists('configuration')) {
return $out;
}
- // configuration is considered locked if there is no local settings filename
- // or the directory its in is not writable or the file exists and is not writable
- function _is_locked() {
+ /**
+ * Configuration is considered locked if there is no local settings filename
+ * or the directory its in is not writable or the file exists and is not writable
+ *
+ * @return bool true: locked, false: writable
+ */
+ protected function _is_locked() {
if (!$this->_local_files) return true;
$local = $this->_local_files[0];
@@ -247,7 +286,7 @@ if (!class_exists('configuration')) {
* not used ... conf's contents are an array!
* reduce any multidimensional settings to one dimension using CM_KEYMARKER
*/
- function _flatten($conf,$prefix='') {
+ protected function _flatten($conf,$prefix='') {
$out = array();
@@ -264,6 +303,12 @@ if (!class_exists('configuration')) {
return $out;
}
+ /**
+ * Returns array of plugin names
+ *
+ * @return array plugin names
+ * @triggers PLUGIN_CONFIG_PLUGINLIST event
+ */
function get_plugin_list() {
if (is_null($this->_plugin_list)) {
$list = plugin_list('',$this->show_disabled_plugins);
@@ -281,6 +326,9 @@ if (!class_exists('configuration')) {
/**
* load metadata for plugin and template settings
+ *
+ * @param string $tpl name of active template
+ * @return array metadata of settings
*/
function get_plugintpl_metadata($tpl){
$file = '/conf/metadata.php';
@@ -321,7 +369,10 @@ if (!class_exists('configuration')) {
}
/**
- * load default settings for plugins and templates
+ * Load default settings for plugins and templates
+ *
+ * @param string $tpl name of active template
+ * @return array default settings
*/
function get_plugintpl_default($tpl){
$file = '/conf/default.php';
@@ -368,7 +419,11 @@ if (!class_exists('setting')) {
static protected $_validCautions = array('warning','danger','security');
- function setting($key, $params=null) {
+ /**
+ * @param string $key
+ * @param array|null $params array with metadata of setting
+ */
+ public function setting($key, $params=null) {
$this->_key = $key;
if (is_array($params)) {
@@ -379,9 +434,13 @@ if (!class_exists('setting')) {
}
/**
- * receives current values for the setting $key
+ * Receives current values for the setting $key
+ *
+ * @param mixed $default default setting value
+ * @param mixed $local local setting value
+ * @param mixed $protected protected setting value
*/
- function initialize($default, $local, $protected) {
+ public function initialize($default, $local, $protected) {
if (isset($default)) $this->_default = $default;
if (isset($local)) $this->_local = $local;
if (isset($protected)) $this->_protected = $protected;
@@ -395,7 +454,7 @@ if (!class_exists('setting')) {
* @param mixed $input the new value
* @return boolean true if changed, false otherwise (incl. on error)
*/
- function update($input) {
+ public function update($input) {
if (is_null($input)) return false;
if ($this->is_protected()) return false;
@@ -413,9 +472,13 @@ if (!class_exists('setting')) {
}
/**
- * @return array(string $label_html, string $input_html)
+ * Build html for label and input of setting
+ *
+ * @param DokuWiki_Plugin $plugin object of config plugin
+ * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting
+ * @return array(string $label_html, string $input_html)
*/
- function html(&$plugin, $echo=false) {
+ public function html(&$plugin, $echo=false) {
$value = '';
$disable = '';
@@ -439,9 +502,9 @@ if (!class_exists('setting')) {
}
/**
- * generate string to save setting value to file according to $fmt
+ * Generate string to save setting value to file according to $fmt
*/
- function out($var, $fmt='php') {
+ public function out($var, $fmt='php') {
if ($this->is_protected()) return '';
if (is_null($this->_local) || ($this->_default == $this->_local)) return '';
@@ -457,17 +520,45 @@ if (!class_exists('setting')) {
return $out;
}
- function prompt(&$plugin) {
+ /**
+ * Returns the localized prompt
+ *
+ * @param DokuWiki_Plugin $plugin object of config plugin
+ * @return string text
+ */
+ public function prompt(&$plugin) {
$prompt = $plugin->getLang($this->_key);
if (!$prompt) $prompt = htmlspecialchars(str_replace(array('____','_'),' ',$this->_key));
return $prompt;
}
- function is_protected() { return !is_null($this->_protected); }
- function is_default() { return !$this->is_protected() && is_null($this->_local); }
- function error() { return $this->_error; }
+ /**
+ * Is setting protected
+ *
+ * @return bool
+ */
+ public function is_protected() { return !is_null($this->_protected); }
+
+ /**
+ * Is setting the default?
+ *
+ * @return bool
+ */
+ public function is_default() { return !$this->is_protected() && is_null($this->_local); }
+
+ /**
+ * Has an error?
+ *
+ * @return bool
+ */
+ public function error() { return $this->_error; }
- function caution() {
+ /**
+ * Returns caution
+ *
+ * @return bool|string caution string, otherwise false for invalid caution
+ */
+ public function caution() {
if (!empty($this->_caution)) {
if (!in_array($this->_caution, setting::$_validCautions)) {
trigger_error('Invalid caution string ('.$this->_caution.') in metadata for setting "'.$this->_key.'"', E_USER_WARNING);
@@ -486,7 +577,14 @@ if (!class_exists('setting')) {
return false;
}
- function _out_key($pretty=false,$url=false) {
+ /**
+ * Returns setting key, eventually with referer to config: namespace at dokuwiki.org
+ *
+ * @param bool $pretty create nice key
+ * @param bool $url provide url to config: namespace
+ * @return string key
+ */
+ public function _out_key($pretty=false,$url=false) {
if($pretty){
$out = str_replace(CM_KEYMARKER,"»",$this->_key);
if ($url && !strstr($out,'»')) {//provide no urls for plugins, etc.
diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php
index f9dabfeb0..aaa32cd70 100644
--- a/lib/plugins/config/settings/config.metadata.php
+++ b/lib/plugins/config/settings/config.metadata.php
@@ -116,7 +116,7 @@ $meta['fullpath'] = array('onoff','_caution' => 'security');
$meta['typography'] = array('multichoice','_choices' => array(0,1,2));
$meta['dformat'] = array('string');
$meta['signature'] = array('string');
-$meta['showuseras'] = array('multichoice','_choices' => array('loginname','username','email','email_link'));
+$meta['showuseras'] = array('multichoice','_choices' => array('loginname','username','username_link','email','email_link'));
$meta['toptoclevel'] = array('multichoice','_choices' => array(1,2,3,4,5)); // 5 toc levels
$meta['tocminheads'] = array('multichoice','_choices' => array(0,1,2,3,4,5,10,15,20));
$meta['maxtoclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5));
@@ -138,7 +138,7 @@ $meta['manager'] = array('string');
$meta['profileconfirm'] = array('onoff');
$meta['rememberme'] = array('onoff');
$meta['disableactions'] = array('disableactions',
- '_choices' => array('backlink','index','recent','revisions','search','subscription','register','resendpwd','profile','profile_delete','edit','wikicode','check'),
+ '_choices' => array('backlink','index','recent','revisions','search','subscription','register','resendpwd','profile','profile_delete','edit','wikicode','check', 'rss'),
'_combine' => array('subscription' => array('subscribe','unsubscribe'), 'wikicode' => array('source','export_raw')));
$meta['auth_security_timeout'] = array('numeric');
$meta['securecookie'] = array('onoff');
diff --git a/lib/plugins/extension/action.php b/lib/plugins/extension/action.php
index 3f2ccaace..9e48f134b 100644
--- a/lib/plugins/extension/action.php
+++ b/lib/plugins/extension/action.php
@@ -28,25 +28,23 @@ class action_plugin_extension extends DokuWiki_Action_Plugin {
* @param Doku_Event $event
* @param $param
*/
- public function info(Doku_Event &$event, $param){
+ public function info(Doku_Event &$event, $param) {
global $USERINFO;
global $INPUT;
-
if($event->data != 'plugin_extension') return;
$event->preventDefault();
$event->stopPropagation();
- if(empty($_SERVER['REMOTE_USER']) || !auth_isadmin($_SERVER['REMOTE_USER'], $USERINFO['grps'])){
+ if(empty($_SERVER['REMOTE_USER']) || !auth_isadmin($_SERVER['REMOTE_USER'], $USERINFO['grps'])) {
http_status(403);
echo 'Forbidden';
exit;
}
- header('Content-Type: text/html; charset=utf-8');
-
$ext = $INPUT->str('ext');
if(!$ext) {
+ http_status(400);
echo 'no extension given';
return;
}
@@ -55,11 +53,32 @@ class action_plugin_extension extends DokuWiki_Action_Plugin {
$extension = plugin_load('helper', 'extension_extension');
$extension->setExtension($ext);
- /** @var helper_plugin_extension_list $list */
- $list = plugin_load('helper', 'extension_list');
-
-
- echo $list->make_info($extension);
+ $act = $INPUT->str('act');
+ switch($act) {
+ case 'enable':
+ case 'disable':
+ $json = new JSON();
+ $extension->$act(); //enables/disables
+
+ $reverse = ($act == 'disable') ? 'enable' : 'disable';
+
+ $return = array(
+ 'state' => $act.'d', // isn't English wonderful? :-)
+ 'reverse' => $reverse,
+ 'label' => $extension->getLang('btn_'.$reverse)
+ );
+
+ header('Content-Type: application/json');
+ echo $json->encode($return);
+ break;
+
+ case 'info':
+ default:
+ /** @var helper_plugin_extension_list $list */
+ $list = plugin_load('helper', 'extension_list');
+ header('Content-Type: text/html; charset=utf-8');
+ echo $list->make_info($extension);
+ }
}
}
diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php
index 7958cd2da..2aca0e218 100644
--- a/lib/plugins/extension/helper/extension.php
+++ b/lib/plugins/extension/helper/extension.php
@@ -57,6 +57,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
if(substr($id, 0 , 9) == 'template:'){
$this->base = substr($id, 9);
$this->is_template = true;
+ } else {
+ $this->is_template = false;
}
$this->localInfo = array();
@@ -290,7 +292,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
*/
public function getUpdateDate() {
if (!empty($this->managerData['updated'])) return $this->managerData['updated'];
- return false;
+ return $this->getInstallDate();
}
/**
@@ -575,6 +577,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
try {
$installed = $this->installArchive("$tmp/upload.archive", true, $basename);
+ $this->updateManagerData('', $installed);
// purge cache
$this->purgeCache();
}catch (Exception $e){
@@ -594,12 +597,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
try {
$path = $this->download($url);
$installed = $this->installArchive($path, true);
+ $this->updateManagerData($url, $installed);
- // purge caches
- foreach($installed as $ext => $info){
- $this->setExtension($ext);
- $this->purgeCache();
- }
+ // purge cache
+ $this->purgeCache();
}catch (Exception $e){
throw $e;
}
@@ -613,8 +614,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
* @return array The list of installed extensions
*/
public function installOrUpdate() {
- $path = $this->download($this->getDownloadURL());
+ $url = $this->getDownloadURL();
+ $path = $this->download($url);
$installed = $this->installArchive($path, $this->isInstalled(), $this->getBase());
+ $this->updateManagerData($url, $installed);
// refresh extension information
if (!isset($installed[$this->getID()])) {
@@ -729,6 +732,37 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
}
/**
+ * Save the given URL and current datetime in the manager.dat file of all installed extensions
+ *
+ * @param string $url Where the extension was downloaded from. (empty for manual installs via upload)
+ * @param array $installed Optional list of installed plugins
+ */
+ protected function updateManagerData($url = '', $installed = null) {
+ $origID = $this->getID();
+
+ if(is_null($installed)) {
+ $installed = array($origID);
+ }
+
+ foreach($installed as $ext => $info) {
+ if($this->getID() != $ext) $this->setExtension($ext);
+ if($url) {
+ $this->managerData['downloadurl'] = $url;
+ } elseif(isset($this->managerData['downloadurl'])) {
+ unset($this->managerData['downloadurl']);
+ }
+ if(isset($this->managerData['installed'])) {
+ $this->managerData['updated'] = date('r');
+ } else {
+ $this->managerData['installed'] = date('r');
+ }
+ $this->writeManagerData();
+ }
+
+ if($this->getID() != $origID) $this->setExtension($origID);
+ }
+
+ /**
* Read the manager.dat file
*/
protected function readManagerData() {
diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php
index 01a5c516a..47edca8c1 100644
--- a/lib/plugins/extension/helper/list.php
+++ b/lib/plugins/extension/helper/list.php
@@ -188,10 +188,17 @@ class helper_plugin_extension_list extends DokuWiki_Plugin {
* @return string The HTML code
*/
function make_screenshot(helper_plugin_extension_extension $extension) {
- if($extension->getScreenshotURL()) {
+ $screen = $extension->getScreenshotURL();
+ $thumb = $extension->getThumbnailURL();
+
+ if($screen) {
+ // use protocol independent URLs for images coming from us #595
+ $screen = str_replace('http://www.dokuwiki.org', '//www.dokuwiki.org', $screen);
+ $thumb = str_replace('http://www.dokuwiki.org', '//www.dokuwiki.org', $thumb);
+
$title = sprintf($this->getLang('screenshot'), hsc($extension->getDisplayName()));
- $img = '<a href="'.hsc($extension->getScreenshotURL()).'" target="_blank" class="extension_screenshot">'.
- '<img alt="'.$title.'" width="120" height="70" src="'.hsc($extension->getThumbnailURL()).'" />'.
+ $img = '<a href="'.hsc($screen).'" target="_blank" class="extension_screenshot">'.
+ '<img alt="'.$title.'" width="120" height="70" src="'.hsc($thumb).'" />'.
'</a>';
} elseif($extension->isTemplate()) {
$img = '<img alt="" width="120" height="70" src="'.DOKU_BASE.'lib/plugins/extension/images/template.png" />';
diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php
index 1f603a866..6ffe89eb7 100644
--- a/lib/plugins/extension/helper/repository.php
+++ b/lib/plugins/extension/helper/repository.php
@@ -31,7 +31,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin {
$request_data = array('fmt' => 'php');
$request_needed = false;
foreach ($list as $name) {
- $cache = new cache('##extension_manager##'.$name, 'repo');
+ $cache = new cache('##extension_manager##'.$name, '.repo');
$result = null;
if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) {
$this->loaded_extensions[$name] = true;
@@ -46,7 +46,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin {
if ($data !== false) {
$extensions = unserialize($data);
foreach ($extensions as $extension) {
- $cache = new cache('##extension_manager##'.$extension['plugin'], 'repo');
+ $cache = new cache('##extension_manager##'.$extension['plugin'], '.repo');
$cache->storeCache(serialize($extension));
}
} else {
@@ -63,7 +63,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin {
*/
public function hasAccess() {
if ($this->has_access === null) {
- $cache = new cache('##extension_manager###hasAccess', 'repo');
+ $cache = new cache('##extension_manager###hasAccess', '.repo');
$result = null;
if (!$cache->useCache(array('age' => 3600 * 24, 'purge'=>1))) {
$httpclient = new DokuHTTPClient();
@@ -90,7 +90,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin {
* @return array The data or null if nothing was found (possibly no repository access)
*/
public function getData($name) {
- $cache = new cache('##extension_manager##'.$name, 'repo');
+ $cache = new cache('##extension_manager##'.$name, '.repo');
$result = null;
if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) {
$this->loaded_extensions[$name] = true;
@@ -130,7 +130,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin {
// store cache info for each extension
foreach($result as $ext){
$name = $ext['plugin'];
- $cache = new cache('##extension_manager##'.$name, 'repo');
+ $cache = new cache('##extension_manager##'.$name, '.repo');
$cache->storeCache(serialize($ext));
$ids[] = $name;
}
diff --git a/lib/plugins/extension/images/disabled.png b/lib/plugins/extension/images/disabled.png
index 7a0dbb3b5..93a813642 100644
--- a/lib/plugins/extension/images/disabled.png
+++ b/lib/plugins/extension/images/disabled.png
Binary files differ
diff --git a/lib/plugins/extension/images/enabled.png b/lib/plugins/extension/images/enabled.png
index 7c051cda1..92d958802 100644
--- a/lib/plugins/extension/images/enabled.png
+++ b/lib/plugins/extension/images/enabled.png
Binary files differ
diff --git a/lib/plugins/extension/images/license.txt b/lib/plugins/extension/images/license.txt
index 254b9cdf6..44e176ac9 100644
--- a/lib/plugins/extension/images/license.txt
+++ b/lib/plugins/extension/images/license.txt
@@ -1,4 +1,4 @@
-enabled.png - CC-BY-ND, (c) Emey87 http://www.iconfinder.com/icondetails/65590/48/lightbulb_icon
-disabled.png - CC-BY-ND, (c) Emey87 http://www.iconfinder.com/icondetails/65589/48/idea_lightbulb_off_icon
+enabled.png - CC0, (c) Tanguy Ortolo
+disabled.png - public domain, (c) Tango Desktop Project http://commons.wikimedia.org/wiki/File:Dialog-information.svg
plugin.png - public domain, (c) nicubunu, http://openclipart.org/detail/15093/blue-jigsaw-piece-07-by-nicubunu
template.png - public domain, (c) mathec, http://openclipart.org/detail/166596/palette-by-mathec
diff --git a/lib/plugins/extension/lang/de/intro_install.txt b/lib/plugins/extension/lang/de/intro_install.txt
new file mode 100644
index 000000000..4ecebe959
--- /dev/null
+++ b/lib/plugins/extension/lang/de/intro_install.txt
@@ -0,0 +1 @@
+Hier können Sie Plugins und Templates von Hand installieren indem Sie sie hochladen oder eine Download-URL angeben. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/de/intro_plugins.txt b/lib/plugins/extension/lang/de/intro_plugins.txt
new file mode 100644
index 000000000..1a1521050
--- /dev/null
+++ b/lib/plugins/extension/lang/de/intro_plugins.txt
@@ -0,0 +1 @@
+Dies sind die Plugins, die bereits installiert sind. Sie können sie hier an- oder abschalten oder sie komplett deinstallieren. Außerdem werden hier Updates zu den installiereten Plugins angezeigt. Bitte lesen Sie vor einem Update die zugehörige Dokumentation. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/de/intro_search.txt b/lib/plugins/extension/lang/de/intro_search.txt
new file mode 100644
index 000000000..7df8de185
--- /dev/null
+++ b/lib/plugins/extension/lang/de/intro_search.txt
@@ -0,0 +1 @@
+Dieser Tab gibt Ihnen Zugriff auf alle vorhandenen Plugins und Templates für DokuWiki. Bitte bedenken sie das jede installierte Erweiterung ein Sicherheitsrisiko darstellen kann. Sie sollten vor einer Installation die [[doku>security#plugin_security|Plugin Security]] Informationen lesen. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/de/intro_templates.txt b/lib/plugins/extension/lang/de/intro_templates.txt
new file mode 100644
index 000000000..d71ce6237
--- /dev/null
+++ b/lib/plugins/extension/lang/de/intro_templates.txt
@@ -0,0 +1 @@
+Dies sind die in Ihrem Dokuwiki installierten Templates. Sie können das gewünschte Template im [[?do=admin&page=config|Konfigurations Manager]] aktivieren. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/de/lang.php b/lib/plugins/extension/lang/de/lang.php
new file mode 100644
index 000000000..b0e3b4ff7
--- /dev/null
+++ b/lib/plugins/extension/lang/de/lang.php
@@ -0,0 +1,90 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author H. Richard <wanderer379@t-online.de>
+ * @author Joerg <scooter22@gmx.de>
+ * @author Simon <st103267@stud.uni-stuttgart.de>
+ * @author Hoisl <hoisl@gmx.at>
+ */
+$lang['menu'] = 'Erweiterungen verwalten';
+$lang['tab_plugins'] = 'Installierte Plugins';
+$lang['tab_templates'] = 'Installierte Templates';
+$lang['tab_search'] = 'Suchen und Installieren';
+$lang['tab_install'] = 'Händisch installieren';
+$lang['notimplemented'] = 'Dieses Fähigkeit/Eigenschaft wurde noch nicht implementiert';
+$lang['notinstalled'] = 'Diese Erweiterung ist nicht installiert';
+$lang['alreadyenabled'] = 'Diese Erweiterung ist bereits aktiviert';
+$lang['alreadydisabled'] = 'Diese Erweiterung ist bereits deaktiviert';
+$lang['pluginlistsaveerror'] = 'Es gab einen Fehler beim Speichern der Plugin-Liste';
+$lang['unknownauthor'] = 'Unbekannter Autor';
+$lang['unknownversion'] = 'Unbekannte Version';
+$lang['btn_info'] = 'Zeige weitere Info';
+$lang['btn_update'] = 'Update';
+$lang['btn_uninstall'] = 'Deinstallation';
+$lang['btn_enable'] = 'Aktivieren';
+$lang['btn_disable'] = 'Deaktivieren';
+$lang['btn_install'] = 'Installieren';
+$lang['btn_reinstall'] = 'Neu installieren';
+$lang['js']['reallydel'] = 'Wollen Sie diese Erweiterung wirklich löschen?';
+$lang['search_for'] = 'Erweiterung suchen:';
+$lang['search'] = 'Suchen';
+$lang['extensionby'] = '<strong>%s</strong> von %s';
+$lang['screenshot'] = 'Bildschirmfoto von %s';
+$lang['popularity'] = 'Popularität: %s%%';
+$lang['homepage_link'] = 'Doku';
+$lang['bugs_features'] = 'Bugs';
+$lang['tags'] = 'Schlagworte';
+$lang['author_hint'] = 'Suche weitere Erweiterungen dieses Autors';
+$lang['installed'] = 'Installiert:';
+$lang['downloadurl'] = 'URL zum Herunterladen';
+$lang['repository'] = 'Quelle:';
+$lang['unknown'] = '<em>unbekannt</em>';
+$lang['installed_version'] = 'Installierte Version';
+$lang['install_date'] = 'Ihr letztes Update:';
+$lang['available_version'] = 'Verfügbare Version: ';
+$lang['compatible'] = 'Kompatibel mit:';
+$lang['depends'] = 'Benötigt:';
+$lang['similar'] = 'Ist ähnlich zu:';
+$lang['conflicts'] = 'Nicht kompatibel mit:';
+$lang['donate'] = 'Nützlich?';
+$lang['donate_action'] = 'Spendieren Sie dem Autor einen Kaffee!';
+$lang['repo_retry'] = 'Neu versuchen';
+$lang['provides'] = 'Enthält';
+$lang['status'] = 'Status';
+$lang['status_installed'] = 'installiert';
+$lang['status_not_installed'] = 'nicht installiert';
+$lang['status_protected'] = 'geschützt';
+$lang['status_enabled'] = 'aktiviert';
+$lang['status_disabled'] = 'deaktiviert';
+$lang['status_unmodifiable'] = 'unveränderlich';
+$lang['status_plugin'] = 'Plugin';
+$lang['status_template'] = 'Template';
+$lang['status_bundled'] = 'gebündelt';
+$lang['msg_enabled'] = 'Plugin %s ist aktiviert';
+$lang['msg_disabled'] = 'Erweiterung %s ist deaktiviert';
+$lang['msg_delete_success'] = 'Erweiterung wurde entfernt';
+$lang['msg_template_install_success'] = 'Das Template %s wurde erfolgreich installiert';
+$lang['msg_template_update_success'] = 'Das Update des Templates %s war erfolgreich ';
+$lang['msg_plugin_install_success'] = 'Das Plugin %s wurde erfolgreich installiert';
+$lang['msg_plugin_update_success'] = 'Das Update des Plugins %s war erfolgreich';
+$lang['msg_upload_failed'] = 'Fehler beim Hochladen der Datei';
+$lang['missing_dependency'] = '<strong>fehlende oder deaktivierte Abhängigkeit:<strong>%s';
+$lang['security_issue'] = '<strong>Sicherheitsproblem:</strong> %s';
+$lang['security_warning'] = '<strong>Sicherheitswarnung:</strong> %s';
+$lang['update_available'] = '<strong>Update:</strong> Version %s steht zum Download bereit.';
+$lang['wrong_folder'] = '<strong>Plugin wurde nicht korrekt installiert:</strong> Benennen Sie das Plugin-Verzeichnis "%s" in "%s" um.';
+$lang['url_change'] = '<strong>URL geändert:</strong> Die Download URL wurde seit dem letzten Download geändert. Internetadresse vor Aktualisierung der Erweiterung auf Gültigkeit prüfen.<br />Neu: %s<br />Alt: %s';
+$lang['error_badurl'] = 'URLs sollten mit http oder https beginnen';
+$lang['error_dircreate'] = 'Temporären Ordner konnte nicht erstellt werden, um Download zu empfangen';
+$lang['error_download'] = 'Download der Datei: %s nicht möglich.';
+$lang['error_decompress'] = 'Die heruntergeladene Datei konnte nicht entpackt werden. Dies kann die Folge eines fehlerhaften Downloads sein. In diesem Fall sollten Sie versuchen den Vorgang zu wiederholen. Es kann auch die Folge eines unbekannten Kompressionsformates sein, in diesem ​​Fall müssen Sie die Datei selber herunterladen und manuell installieren.';
+$lang['error_findfolder'] = 'Das Erweiterungs-Verzeichnis konnte nicht identifiziert werden, laden und installieren sie die Datei manuell.';
+$lang['error_copy'] = 'Beim Versuch Dateien in den Ordner <em>%s</em>: zu installieren trat ein Kopierfehler auf. Die Dateizugriffsberechtigungen könnten falsch sein. Dies kann an einem unvollständig installierten Plugin liegen und beeinträchtigt somit die Stabilität Ihre Wiki-Installation.';
+$lang['noperms'] = 'Das Erweiterungs-Verzeichnis ist schreibgeschützt';
+$lang['notplperms'] = 'Das Template-Verzeichnis ist schreibgeschützt';
+$lang['nopluginperms'] = 'Das Plugin-Verzeichnis ist schreibgeschützt';
+$lang['git'] = 'Diese Erweiterung wurde über git installiert und sollte daher nicht hier aktualisiert werden.';
+$lang['install_url'] = 'Von Webadresse (URL) installieren';
+$lang['install_upload'] = 'Erweiterung hochladen:';
diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php
index 5224f694a..72c9b9e2d 100644
--- a/lib/plugins/extension/lang/en/lang.php
+++ b/lib/plugins/extension/lang/en/lang.php
@@ -96,4 +96,6 @@ $lang['nopluginperms'] = 'Plugin directory is not writable';
$lang['git'] = 'This extension was installed via git, you may not want to update it here.';
$lang['install_url'] = 'Install from URL:';
-$lang['install_upload'] = 'Upload Extension:'; \ No newline at end of file
+$lang['install_upload'] = 'Upload Extension:';
+
+$lang['repo_error'] = 'The plugin repository could not be contacted. Make sure your server is allowed to contact www.dokuwiki.org and check your proxy settings.'; \ No newline at end of file
diff --git a/lib/plugins/extension/lang/eo/intro_install.txt b/lib/plugins/extension/lang/eo/intro_install.txt
new file mode 100644
index 000000000..d9c63da1d
--- /dev/null
+++ b/lib/plugins/extension/lang/eo/intro_install.txt
@@ -0,0 +1 @@
+Tie vi povas permane instali kromaĵojn kaj ŝablonojn tra alŝuto aŭ indiko de URL por rekta elŝuto. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/eo/intro_plugins.txt b/lib/plugins/extension/lang/eo/intro_plugins.txt
new file mode 100644
index 000000000..cc7ae6628
--- /dev/null
+++ b/lib/plugins/extension/lang/eo/intro_plugins.txt
@@ -0,0 +1 @@
+Jenaj kromaĵoj momente estas instalitaj en via DokuWiki. Vi povas ebligi, malebligi aŭ eĉ tute malinstali ilin tie. Ankaŭ montriĝos aktualigoj de kromaĵoj -- certiĝu, ke vi legis la dokumentadon de la kromaĵo antaŭ aktualigo. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/eo/intro_search.txt b/lib/plugins/extension/lang/eo/intro_search.txt
new file mode 100644
index 000000000..5d194948c
--- /dev/null
+++ b/lib/plugins/extension/lang/eo/intro_search.txt
@@ -0,0 +1 @@
+Tiu tabelo donas aliron al ĉiuj haveblaj eksteraj kromaĵoj kaj ŝablonoj por DokuWiki. Bonvolu konscii, ke instali eksteran kodaĵon povas enkonduki **sekurecriskon**, prefere legu antaŭe pri [[doku>security#plugin_security|sekureco de kromaĵo]]. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/eo/intro_templates.txt b/lib/plugins/extension/lang/eo/intro_templates.txt
new file mode 100644
index 000000000..6dc0ef671
--- /dev/null
+++ b/lib/plugins/extension/lang/eo/intro_templates.txt
@@ -0,0 +1 @@
+Jenaj ŝablonoj momente instaliĝis en via DokuWiki. Elektu la ŝablonon por uzi en la [[?do=admin&page=config|Opcia administrilo]]. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/eo/lang.php b/lib/plugins/extension/lang/eo/lang.php
new file mode 100644
index 000000000..6ce840be8
--- /dev/null
+++ b/lib/plugins/extension/lang/eo/lang.php
@@ -0,0 +1,87 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Robert Bogenschneider <bogi@uea.org>
+ */
+$lang['menu'] = 'Aldonaĵa administrado';
+$lang['tab_plugins'] = 'Instalitaj kromaĵoj';
+$lang['tab_templates'] = 'Instalitaj ŝablonoj';
+$lang['tab_search'] = 'Serĉi kaj instali';
+$lang['tab_install'] = 'Permana instalado';
+$lang['notimplemented'] = 'Tiu funkcio ankoraŭ ne realiĝis';
+$lang['notinstalled'] = 'Tiu aldonaĵo ne estas instalita';
+$lang['alreadyenabled'] = 'Tiu aldonaĵo jam ebliĝis';
+$lang['alreadydisabled'] = 'Tiu aldonaĵo jam malebliĝis';
+$lang['pluginlistsaveerror'] = 'Okazis eraro dum la kromaĵlisto konserviĝis';
+$lang['unknownauthor'] = 'Nekonata aŭtoro';
+$lang['unknownversion'] = 'Nekonata versio';
+$lang['btn_info'] = 'Montri pliajn informojn';
+$lang['btn_update'] = 'Aktualigi';
+$lang['btn_uninstall'] = 'Malinstali';
+$lang['btn_enable'] = 'Ebligi';
+$lang['btn_disable'] = 'Malebligi';
+$lang['btn_install'] = 'Instali';
+$lang['btn_reinstall'] = 'Re-instali';
+$lang['js']['reallydel'] = 'Ĉu vere malinstali la aldonaĵon?';
+$lang['search_for'] = 'Serĉi la aldonaĵon:';
+$lang['search'] = 'Serĉi';
+$lang['extensionby'] = '<strong>%s</strong> fare de %s';
+$lang['screenshot'] = 'Ekrankopio de %s';
+$lang['popularity'] = 'Populareco: %s%%';
+$lang['homepage_link'] = 'Dokumentoj';
+$lang['bugs_features'] = 'Cimoj';
+$lang['tags'] = 'Etikedoj:';
+$lang['author_hint'] = 'Serĉi aldonaĵojn laŭ tiu aŭtoro:';
+$lang['installed'] = 'Instalitaj:';
+$lang['downloadurl'] = 'URL por elŝuti:';
+$lang['repository'] = 'Kodbranĉo:';
+$lang['unknown'] = '<em>nekonata</em>';
+$lang['installed_version'] = 'Instalita versio:';
+$lang['install_date'] = 'Via lasta aktualigo:';
+$lang['available_version'] = 'Havebla versio:';
+$lang['compatible'] = 'Kompatibla kun:';
+$lang['depends'] = 'Dependas de:';
+$lang['similar'] = 'Simila al:';
+$lang['conflicts'] = 'Konfliktas kun:';
+$lang['donate'] = 'Ĉu vi ŝatas tion?';
+$lang['donate_action'] = 'Aĉetu kafon al la aŭtoro!';
+$lang['repo_retry'] = 'Reprovi';
+$lang['provides'] = 'Provizas per:';
+$lang['status'] = 'Statuso:';
+$lang['status_installed'] = 'instalita';
+$lang['status_not_installed'] = 'ne instalita';
+$lang['status_protected'] = 'protektita';
+$lang['status_enabled'] = 'ebligita';
+$lang['status_disabled'] = 'malebligita';
+$lang['status_unmodifiable'] = 'neŝanĝebla';
+$lang['status_plugin'] = 'kromaĵo';
+$lang['status_template'] = 'ŝablono';
+$lang['status_bundled'] = 'kunliverita';
+$lang['msg_enabled'] = 'Kromaĵo %s ebligita';
+$lang['msg_disabled'] = 'Kromaĵo %s malebligita';
+$lang['msg_delete_success'] = 'Aldonaĵo malinstaliĝis';
+$lang['msg_template_install_success'] = 'Ŝablono %s sukcese instaliĝis';
+$lang['msg_template_update_success'] = 'Ŝablono %s sukcese aktualiĝis';
+$lang['msg_plugin_install_success'] = 'Kromaĵo %s sukcese instaliĝis';
+$lang['msg_plugin_update_success'] = 'Kromaĵo %s sukcese aktualiĝis';
+$lang['msg_upload_failed'] = 'Ne eblis alŝuti la dosieron';
+$lang['missing_dependency'] = '<strong>Mankanta aŭ malebligita dependeco:</strong> %s';
+$lang['security_issue'] = '<strong>Sekureca problemo:</strong> %s';
+$lang['security_warning'] = '<strong>Sekureca averto:</strong> %s';
+$lang['update_available'] = '<strong>Aktualigo:</strong> Nova versio %s haveblas.';
+$lang['wrong_folder'] = '<strong>Kromaĵo instalita malĝuste:</strong> Renomu la kromaĵdosierujon "%s" al "%s".';
+$lang['url_change'] = '<strong>URL ŝanĝita:</strong> La elŝuta URL ŝanĝiĝis ekde la lasta elŝuto. Kontrolu, ĉu la nova URL validas antaŭ aktualigi aldonaĵon.<br />Nova: %s<br />Malnova: %s';
+$lang['error_badurl'] = 'URLoj komenciĝu per http aŭ https';
+$lang['error_dircreate'] = 'Ne eblis krei portempan dosierujon por akcepti la elŝuton';
+$lang['error_download'] = 'Ne eblis elŝuti la dosieron: %s';
+$lang['error_decompress'] = 'Ne eblis malpaki la elŝutitan dosieron. Kialo povus esti fuŝa elŝuto, kaj vi reprovu; aŭ la pakiga formato estas nekonata, kaj vi devas elŝuti kaj instali permane.';
+$lang['error_findfolder'] = 'Ne eblis rekoni la aldonaĵ-dosierujon, vi devas elŝuti kaj instali permane';
+$lang['error_copy'] = 'Okazis kopiad-eraro dum la provo instali dosierojn por la dosierujo <em>%s</em>: la disko povus esti plena aŭ la alirpermesoj por dosieroj malĝustaj. Rezulto eble estas nur parte instalita kromaĵo, kiu malstabiligas vian vikion';
+$lang['noperms'] = 'La aldonaĵ-dosierujo ne estas skribebla';
+$lang['notplperms'] = 'La ŝablon-dosierujo ne estas skribebla';
+$lang['nopluginperms'] = 'La kromaĵ-dosierujo ne estas skribebla';
+$lang['git'] = 'Tiu aldonaĵo estis instalita pere de git, eble vi ne aktualigu ĝin ĉi tie.';
+$lang['install_url'] = 'Instali de URL:';
+$lang['install_upload'] = 'Alŝuti aldonaĵon:';
diff --git a/lib/plugins/extension/lang/es/intro_install.txt b/lib/plugins/extension/lang/es/intro_install.txt
new file mode 100644
index 000000000..533396b27
--- /dev/null
+++ b/lib/plugins/extension/lang/es/intro_install.txt
@@ -0,0 +1 @@
+Aquí se puede instalar manualmente los plugins y las plantillas, ya sea cargándolos o dando una URL de descarga directa. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/es/intro_templates.txt b/lib/plugins/extension/lang/es/intro_templates.txt
new file mode 100644
index 000000000..4ede9a1a9
--- /dev/null
+++ b/lib/plugins/extension/lang/es/intro_templates.txt
@@ -0,0 +1 @@
+Estas son las plantillas actualmente instalados en su DokuWiki. Puede seleccionar la plantilla que se utilizará en [[?do=admin&page=config|Configuration Manager]] \ No newline at end of file
diff --git a/lib/plugins/extension/lang/es/lang.php b/lib/plugins/extension/lang/es/lang.php
new file mode 100644
index 000000000..63742c3b3
--- /dev/null
+++ b/lib/plugins/extension/lang/es/lang.php
@@ -0,0 +1,84 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Antonio Bueno <atnbueno@gmail.com>
+ * @author Antonio Castilla <antoniocastilla@trazoide.com>
+ * @author Jonathan Hernández <me@jhalicea.com>
+ */
+$lang['menu'] = 'Administrador de Extensiones ';
+$lang['tab_plugins'] = 'Plugins instalados';
+$lang['tab_templates'] = 'Plantillas instaladas';
+$lang['tab_search'] = 'Buscar e instalar';
+$lang['tab_install'] = 'Instalación manual';
+$lang['notimplemented'] = 'Esta característica no se ha implementado aún';
+$lang['notinstalled'] = 'Esta expensión no está instalada';
+$lang['alreadyenabled'] = 'Esta extensión ya había sido activada';
+$lang['alreadydisabled'] = 'Esta extensión ya había sido desactivada';
+$lang['pluginlistsaveerror'] = 'Se ha producido un error al guardar la lista de plugins';
+$lang['unknownauthor'] = 'autor desconocido';
+$lang['unknownversion'] = 'versión desconocida';
+$lang['btn_info'] = 'Mostrar más información';
+$lang['btn_update'] = 'Actualizar';
+$lang['btn_uninstall'] = 'Desinstalar';
+$lang['btn_enable'] = 'Activar';
+$lang['btn_disable'] = 'Desactivar';
+$lang['btn_install'] = 'Instalar';
+$lang['btn_reinstall'] = 'Reinstalar';
+$lang['js']['reallydel'] = '¿Realmente quiere desinstalar esta extensión?';
+$lang['search_for'] = 'Extensión de búsqueda :';
+$lang['search'] = 'Buscar';
+$lang['extensionby'] = '<strong>%s</strong> por %s';
+$lang['screenshot'] = 'Captura de %s';
+$lang['popularity'] = 'Popularidad:%s%%';
+$lang['homepage_link'] = 'Documentos';
+$lang['bugs_features'] = 'Bugs';
+$lang['tags'] = 'Etiquetas:';
+$lang['author_hint'] = 'Buscar extensiones de este autor';
+$lang['installed'] = 'Instalado:';
+$lang['downloadurl'] = 'URL de descarga:';
+$lang['repository'] = 'Repositorio:';
+$lang['unknown'] = '<em>desconocido</em>';
+$lang['installed_version'] = 'Versión instalada:';
+$lang['install_date'] = 'Tú última actualización:';
+$lang['available_version'] = 'Versión disponible:';
+$lang['compatible'] = 'Compatible con:';
+$lang['depends'] = 'Dependencias:';
+$lang['similar'] = 'Similar a:';
+$lang['conflicts'] = 'Conflictos con:';
+$lang['donate'] = '¿Cómo está?';
+$lang['donate_action'] = '¡Págale un café al autor!';
+$lang['repo_retry'] = 'Trate otra vez';
+$lang['provides'] = 'Provee: ';
+$lang['status'] = 'Estado:';
+$lang['status_installed'] = 'instalado';
+$lang['status_not_installed'] = 'no instalado';
+$lang['status_protected'] = 'protegido';
+$lang['status_enabled'] = 'activado';
+$lang['status_disabled'] = 'desactivado';
+$lang['status_unmodifiable'] = 'no modificable';
+$lang['status_plugin'] = 'plugin';
+$lang['status_template'] = 'plantilla';
+$lang['status_bundled'] = 'agrupado';
+$lang['msg_enabled'] = 'Plugin %s activado';
+$lang['msg_disabled'] = 'Plugin %s desactivado';
+$lang['msg_delete_success'] = 'Extensión desinstalada';
+$lang['msg_template_install_success'] = 'Plantilla %s instalada con éxito';
+$lang['msg_template_update_success'] = 'Plantilla %s actualizada con éxito';
+$lang['msg_plugin_install_success'] = 'Plugin %s instalado con éxito';
+$lang['msg_plugin_update_success'] = 'Plugin %s actualizado con éxito';
+$lang['msg_upload_failed'] = 'Falló la carga del archivo';
+$lang['missing_dependency'] = '<strong>Dependencia deshabilitada o perdida:</strong> %s';
+$lang['security_issue'] = '<strong>Problema de seguridad:</strong> %s';
+$lang['security_warning'] = '<strong>Aviso de seguridad:</strong> %s';
+$lang['update_available'] = '<strong>Actualizar:</strong> Nueva versión %s disponible.';
+$lang['wrong_folder'] = '<strong>"Plugin" instalado incorrectamente:</strong> Cambie el nombre del directorio del plugin "%s" a "%s".';
+$lang['url_change'] = '<strong>URL actualizada:</strong> El Download URL ha cambiado desde el último download. Verifica si el nuevo URL es valido antes de actualizar la extensión .<br />Nuevo: %s<br />Viejo: %s';
+$lang['error_badurl'] = 'URLs deberían empezar con http o https';
+$lang['error_dircreate'] = 'No es posible de crear un directorio temporero para poder recibir el download';
+$lang['error_download'] = 'No es posible descargar el documento: %s';
+$lang['git'] = 'Esta extensión fue instalada a través de git, quizás usted no quiera actualizarla aquí mismo.';
+$lang['install_url'] = 'Instalar desde URL:';
+$lang['install_upload'] = 'Subir Extensión:';
+$lang['repo_error'] = 'El repositorio de plugins no puede ser contactado. Asegúrese que su servidor pueda contactar www.dokuwiki.org y verificar la configuración de su proxy.';
diff --git a/lib/plugins/extension/lang/fr/intro_install.txt b/lib/plugins/extension/lang/fr/intro_install.txt
new file mode 100644
index 000000000..5d287b818
--- /dev/null
+++ b/lib/plugins/extension/lang/fr/intro_install.txt
@@ -0,0 +1 @@
+Ici, vous pouvez installer des extensions, greffons et thèmes. Soit en les téléversant, soit en indiquant un URL de téléchargement. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/fr/intro_plugins.txt b/lib/plugins/extension/lang/fr/intro_plugins.txt
new file mode 100644
index 000000000..a40b863d2
--- /dev/null
+++ b/lib/plugins/extension/lang/fr/intro_plugins.txt
@@ -0,0 +1 @@
+Voilà la liste des extensions actuellement installées. À partir d'ici, vous pouvez les activer, les désactiver ou même les désinstaller complètement. Cette page affiche également les mises à jour. Assurez vous de lire la documentation avant de faire la mise à jour. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/fr/intro_search.txt b/lib/plugins/extension/lang/fr/intro_search.txt
new file mode 100644
index 000000000..418e35972
--- /dev/null
+++ b/lib/plugins/extension/lang/fr/intro_search.txt
@@ -0,0 +1 @@
+Cet onglet vous donne accès à toutes les extensions de tierces parties. Restez conscients qu'installer du code de tierce partie peut poser un problème de **sécurité**. Vous voudrez peut-être au préalable lire l'article sur la [[doku>fr:security##securite_des_plugins|sécurité des plugins]]. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/fr/intro_templates.txt b/lib/plugins/extension/lang/fr/intro_templates.txt
new file mode 100644
index 000000000..a0a1336ea
--- /dev/null
+++ b/lib/plugins/extension/lang/fr/intro_templates.txt
@@ -0,0 +1 @@
+Voici la liste des thèmes actuellement installés. Le [[?do=admin&page=config|gestionnaire de configuration]] vous permet de choisir le thème à utiliser. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/fr/lang.php b/lib/plugins/extension/lang/fr/lang.php
new file mode 100644
index 000000000..88234efd0
--- /dev/null
+++ b/lib/plugins/extension/lang/fr/lang.php
@@ -0,0 +1,88 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Schplurtz le Déboulonné <schplurtz@laposte.net>
+ */
+$lang['menu'] = 'Gestionnaire d\'extension';
+$lang['tab_plugins'] = 'Greffons installés';
+$lang['tab_templates'] = 'Thèmes installés';
+$lang['tab_search'] = 'Rechercher et installer';
+$lang['tab_install'] = 'Installation manuelle';
+$lang['notimplemented'] = 'Cette fonctionnalité n\'est pas encore installée';
+$lang['notinstalled'] = 'Cette extension n\'est pas installée';
+$lang['alreadyenabled'] = 'Cette extension a déjà été installée';
+$lang['alreadydisabled'] = 'Cette extension a déjà été désactivée';
+$lang['pluginlistsaveerror'] = 'Une erreur s\'est produite lors de l\'enregistrement de la liste des greffons.';
+$lang['unknownauthor'] = 'Auteur inconnu';
+$lang['unknownversion'] = 'Version inconnue';
+$lang['btn_info'] = 'Montrer plus d\'informations';
+$lang['btn_update'] = 'Mettre à jour';
+$lang['btn_uninstall'] = 'Désinstaller';
+$lang['btn_enable'] = 'Activer';
+$lang['btn_disable'] = 'Désactiver';
+$lang['btn_install'] = 'Installer';
+$lang['btn_reinstall'] = 'Réinstaller';
+$lang['js']['reallydel'] = 'Vraiment désinstaller cette extension';
+$lang['search_for'] = 'Rechercher l\'extension :';
+$lang['search'] = 'Chercher';
+$lang['extensionby'] = '<strong>%s</strong> de %s';
+$lang['screenshot'] = 'Aperçu de %s';
+$lang['popularity'] = 'Popularité : %s%%';
+$lang['homepage_link'] = 'Documents';
+$lang['bugs_features'] = 'Bugs';
+$lang['tags'] = 'Étiquettes :';
+$lang['author_hint'] = 'Chercher les extensions de cet auteur';
+$lang['installed'] = 'Installés :';
+$lang['downloadurl'] = 'URL de téléchargement :';
+$lang['repository'] = 'Entrepôt : ';
+$lang['unknown'] = '<em>inconnu</em>';
+$lang['installed_version'] = 'Version installée :';
+$lang['install_date'] = 'Votre dernière mise à jour :';
+$lang['available_version'] = 'Version disponible :';
+$lang['compatible'] = 'Compatible avec :';
+$lang['depends'] = 'Dépend de :';
+$lang['similar'] = 'Similaire à :';
+$lang['conflicts'] = 'En conflit avec :';
+$lang['donate'] = 'Vous aimez ?';
+$lang['donate_action'] = 'Payer un café à l\'auteur !';
+$lang['repo_retry'] = 'Réessayer';
+$lang['provides'] = 'Fournit :';
+$lang['status'] = 'État :';
+$lang['status_installed'] = 'installé';
+$lang['status_not_installed'] = 'non installé';
+$lang['status_protected'] = 'protégé';
+$lang['status_enabled'] = 'activé';
+$lang['status_disabled'] = 'désactivé';
+$lang['status_unmodifiable'] = 'non modifiable';
+$lang['status_plugin'] = 'greffon';
+$lang['status_template'] = 'thème';
+$lang['status_bundled'] = 'fourni';
+$lang['msg_enabled'] = 'Greffon %s activé';
+$lang['msg_disabled'] = 'Greffon %s désactivé';
+$lang['msg_delete_success'] = 'Extension désinstallée';
+$lang['msg_template_install_success'] = 'Thème %s installée avec succès';
+$lang['msg_template_update_success'] = 'Thème %s mis à jour avec succès';
+$lang['msg_plugin_install_success'] = 'Greffon %s installé avec succès';
+$lang['msg_plugin_update_success'] = 'Greffon %s mis à jour avec succès';
+$lang['msg_upload_failed'] = 'Téléversement échoué';
+$lang['missing_dependency'] = '<strong>Dépendance absente ou désactivée :</strong> %s';
+$lang['security_issue'] = '<strong>Problème de sécurité :</strong> %s';
+$lang['security_warning'] = '<strong>Avertissement deSécurité :</strong> %s';
+$lang['update_available'] = '<strong>Mise à jour :</strong> La version %s est disponible.';
+$lang['wrong_folder'] = '<strong>Greffon installé incorrectement :</strong> Renomer le dossier du greffon "%s" en "%s".';
+$lang['url_change'] = '<strong>URL modifié :</strong> L\'URL de téléchargement a changé depuis le dernier téléchargement. Vérifiez si l\'URL est valide avant de mettre à jour l\'extension.<br />Nouvel URL : %s<br />Ancien : %s';
+$lang['error_badurl'] = 'Les URL doivent commencer par http ou https';
+$lang['error_dircreate'] = 'Impossible de créer le dossier temporaire pour le téléchargement.';
+$lang['error_download'] = 'Impossible de télécharger le fichier : %s';
+$lang['error_decompress'] = 'Impossible de décompresser le fichier téléchargé. C\'est peut être le résultat d\'une erreur de téléchargement, auquel cas vous devriez réessayer. Le format de compression est peut-être inconnu. Dans ce cas il vous faudra procéder à une installation manuelle.';
+$lang['error_findfolder'] = 'Impossible d\'idnetifier le dossier de l\'extension. vous devez procéder à une installation manuelle.';
+$lang['error_copy'] = 'Une erreur de copie de fichier s\'est produite lors de l\'installation des fichiers dans le dossier <em>%s</em>. Il se peut que le disque soit plein, ou que les permissions d\'accès aux fichiers soient incorrectes. Il est possible que le greffon soit partiellement installé et que cela laisse votre installation de DoluWiki instable.';
+$lang['noperms'] = 'Impossible d\'écrire dans le dossier des extensions.';
+$lang['notplperms'] = 'Impossible d\'écrire dans le dossier des thèmes.';
+$lang['nopluginperms'] = 'Impossible d\'écrire dans le dossier des greffons.';
+$lang['git'] = 'Cette extension a été installé via git, vous voudrez peut-être ne pas la mettre à jour ici.';
+$lang['install_url'] = 'Installez depuis l\'URL :';
+$lang['install_upload'] = 'Téléversez l\'extension :';
+$lang['repo_error'] = 'L\'entrepôt d\'extensions est injoignable. Veuillez vous assurer que le server web est autorisé à contacter www.dokuwiki.org et vérifier les réglages de proxy.';
diff --git a/lib/plugins/extension/lang/hr/intro_install.txt b/lib/plugins/extension/lang/hr/intro_install.txt
new file mode 100644
index 000000000..fc2d22f52
--- /dev/null
+++ b/lib/plugins/extension/lang/hr/intro_install.txt
@@ -0,0 +1 @@
+Ovdje možete ručno instalirati dodatak (plugin) i predložak (template) bilo učitavanjem ili specificiranjem URL-a za direktno učitavanje. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/hr/intro_plugins.txt b/lib/plugins/extension/lang/hr/intro_plugins.txt
new file mode 100644
index 000000000..fdc629d62
--- /dev/null
+++ b/lib/plugins/extension/lang/hr/intro_plugins.txt
@@ -0,0 +1 @@
+Ovo su dodaci (plugin) trenutno instalirani na Vašem DokuWiku-u. Možete ih omogućiti, onemogućiti ili u potpunosti deinstalirati. Nadogradnje dodataka su također prikazane, obavezno pročitajte dokumentaciju dodatka prije nadogradnje. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/hr/intro_search.txt b/lib/plugins/extension/lang/hr/intro_search.txt
new file mode 100644
index 000000000..93bf4b000
--- /dev/null
+++ b/lib/plugins/extension/lang/hr/intro_search.txt
@@ -0,0 +1 @@
+Ovaj tab vam pruža pristup dostupnim dodatcima i predlošcima za DokuWiki od treće strane. Molimo budite svjesni da instaliranje koda od treće strane može biti **sigurnosni rizik**, možda želite prvo pročitati o [[doku>security#plugin_security|sigurnosti dodataka]]. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/hr/intro_templates.txt b/lib/plugins/extension/lang/hr/intro_templates.txt
new file mode 100644
index 000000000..968906cf9
--- /dev/null
+++ b/lib/plugins/extension/lang/hr/intro_templates.txt
@@ -0,0 +1 @@
+Ovo su predlošci trenutno instalirani na Vašem DokuWiki-u. Možete odabrati koji se predložak koristi na [[?do=admin&page=config|Upravitelju postavki]]. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/hr/lang.php b/lib/plugins/extension/lang/hr/lang.php
new file mode 100644
index 000000000..7bf483e39
--- /dev/null
+++ b/lib/plugins/extension/lang/hr/lang.php
@@ -0,0 +1,16 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['menu'] = 'Upravitelj dodataka';
+$lang['tab_plugins'] = 'Instalirani dodatci';
+$lang['tab_templates'] = 'Instalirani predlošci';
+$lang['tab_search'] = 'Potraži i instaliraj';
+$lang['tab_install'] = 'Ručno instaliranje';
+$lang['notimplemented'] = 'Ova mogućnost još nije napravljena';
+$lang['notinstalled'] = 'Dodatak nije instaliran';
+$lang['alreadyenabled'] = 'Ovaj dodatak je već omogućen';
+$lang['alreadydisabled'] = 'Ovaj dodatak je već onemogućen';
diff --git a/lib/plugins/extension/lang/hu/intro_install.txt b/lib/plugins/extension/lang/hu/intro_install.txt
new file mode 100644
index 000000000..8427e7dc6
--- /dev/null
+++ b/lib/plugins/extension/lang/hu/intro_install.txt
@@ -0,0 +1 @@
+Itt új modulokat és sablonokat telepíthetsz feltöltéssel vagy a csomagra hivatkozó URL megadásával. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/hu/intro_plugins.txt b/lib/plugins/extension/lang/hu/intro_plugins.txt
new file mode 100644
index 000000000..8a3e92ddb
--- /dev/null
+++ b/lib/plugins/extension/lang/hu/intro_plugins.txt
@@ -0,0 +1 @@
+A DokuWiki rendszerben telepített modulok az alábbiak. Engedélyezheted, letilthatod vagy teljesen le is törölheted ezeket. A modulokhoz tartozó frissítések is itt láthatók, viszont frissítés előtt mindenképp olvasd el az utasításokat a modul dokumentációjában is! \ No newline at end of file
diff --git a/lib/plugins/extension/lang/hu/intro_search.txt b/lib/plugins/extension/lang/hu/intro_search.txt
new file mode 100644
index 000000000..87a2a5d64
--- /dev/null
+++ b/lib/plugins/extension/lang/hu/intro_search.txt
@@ -0,0 +1 @@
+Ezen a fülön harmadik fél által készített modulokat és sablonokat találsz a DokuWiki-hez. Ne feledd, hogy a harmadik féltől származó kódok **biztonsági kockázatot** jelenthetnek, ennek a [[doku>security#plugin_security|modulok biztonsága]] oldalon olvashatsz utána a telepítés előtt. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/hu/intro_templates.txt b/lib/plugins/extension/lang/hu/intro_templates.txt
new file mode 100644
index 000000000..c0ad92b35
--- /dev/null
+++ b/lib/plugins/extension/lang/hu/intro_templates.txt
@@ -0,0 +1 @@
+A DokuWiki rendszerben telepített sablonok az alábbiak. A használt sablont a [[?do=admin&page=config|Beállítóközpontban]] választhatod ki. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/hu/lang.php b/lib/plugins/extension/lang/hu/lang.php
new file mode 100644
index 000000000..a27b5a307
--- /dev/null
+++ b/lib/plugins/extension/lang/hu/lang.php
@@ -0,0 +1,88 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Marton Sebok <sebokmarton@gmail.com>
+ */
+$lang['menu'] = 'Bővítménykezelő';
+$lang['tab_plugins'] = 'Telepített modulok';
+$lang['tab_templates'] = 'Telepített sablonok';
+$lang['tab_search'] = 'Keresés és telepítés';
+$lang['tab_install'] = 'Kézi telepítés';
+$lang['notimplemented'] = 'Ez a funkció még nincs implementálva';
+$lang['notinstalled'] = 'Ez a bővítmény nincs telepítve';
+$lang['alreadyenabled'] = 'Ez a bővítmény már engedélyezve van';
+$lang['alreadydisabled'] = 'Ez a bővítmény már le van tiltva';
+$lang['pluginlistsaveerror'] = 'Hiba történt a modulok listájának mentésekor';
+$lang['unknownauthor'] = 'Ismeretlen szerző';
+$lang['unknownversion'] = 'Ismeretlen verzió';
+$lang['btn_info'] = 'További információk megjelenítése';
+$lang['btn_update'] = 'Frissítés';
+$lang['btn_uninstall'] = 'Törlés';
+$lang['btn_enable'] = 'Engedélyezés';
+$lang['btn_disable'] = 'Letiltás';
+$lang['btn_install'] = 'Telepítés';
+$lang['btn_reinstall'] = 'Újratelepítés';
+$lang['js']['reallydel'] = 'Biztosan törlöd ezt a bővítményt?';
+$lang['search_for'] = 'Bővítmények keresése:';
+$lang['search'] = 'Keresés';
+$lang['extensionby'] = '<strong>%s</strong>, %s szerzőtől';
+$lang['screenshot'] = '%s képernyőképe';
+$lang['popularity'] = 'Népszerűség: %s%%';
+$lang['homepage_link'] = 'Dokumentáció';
+$lang['bugs_features'] = 'Hibák';
+$lang['tags'] = 'Címkék:';
+$lang['author_hint'] = 'Bővítmények keresése ettől a szerzőtől';
+$lang['installed'] = 'Telepítve:';
+$lang['downloadurl'] = 'Csomag URL:';
+$lang['repository'] = 'Repository:';
+$lang['unknown'] = '<em>ismeretlen</em>';
+$lang['installed_version'] = 'Telepített verzió:';
+$lang['install_date'] = 'Utoljára frissítve:';
+$lang['available_version'] = 'Elérhető verzió:';
+$lang['compatible'] = 'Kompatibilis rendszerek:';
+$lang['depends'] = 'Függőségek:';
+$lang['similar'] = 'Hasonló bővítmények:';
+$lang['conflicts'] = 'Ütközést okozó bővítmények:';
+$lang['donate'] = 'Tetszik?';
+$lang['donate_action'] = 'Hívd meg a szerzőjét egy kávéra!';
+$lang['repo_retry'] = 'Újra';
+$lang['provides'] = 'Szolgáltatások:';
+$lang['status'] = 'Állapot:';
+$lang['status_installed'] = 'telepítve';
+$lang['status_not_installed'] = 'nincs telepítve';
+$lang['status_protected'] = 'védett';
+$lang['status_enabled'] = 'engedélyezve';
+$lang['status_disabled'] = 'letiltva';
+$lang['status_unmodifiable'] = 'nem lehet módosítani';
+$lang['status_plugin'] = 'modul';
+$lang['status_template'] = 'sablon';
+$lang['status_bundled'] = 'beépített';
+$lang['msg_enabled'] = 'A(z) %s modul engedélyezve';
+$lang['msg_disabled'] = 'A(z) %s modul letiltva';
+$lang['msg_delete_success'] = 'A bővítmény törölve';
+$lang['msg_template_install_success'] = 'A(z) %s sablon sikeresen telepítve';
+$lang['msg_template_update_success'] = 'A(z) %s sablon sikeresen frissítve';
+$lang['msg_plugin_install_success'] = 'A(z) %s modul sikeresen telepítve';
+$lang['msg_plugin_update_success'] = 'A(z) %s modul sikeresen frissítve';
+$lang['msg_upload_failed'] = 'A fájl feltöltése sikertelen';
+$lang['missing_dependency'] = '<strong>Hiányzó vagy letiltott függőség:</strong> %s';
+$lang['security_issue'] = '<strong>Biztonsági probléma:</strong> %s';
+$lang['security_warning'] = '<strong>Biztonsági figyelmeztetés:</strong> %s';
+$lang['update_available'] = '<strong>Frissítés:</strong> Elérhető %s új verziója.';
+$lang['wrong_folder'] = '<strong>A modul telepítése sikertelen:</strong> Nevezd át a modul könyvtárát "%s" névről "%s" névre!';
+$lang['url_change'] = '<strong>Az URL megváltozott:</strong> A csomag URL-je megváltozott az utolsó letöltés óta. A bővítmény frissítése előtt ellenőrizd az új URL helyességét!<br />Új: %s<br />Régi: %s';
+$lang['error_badurl'] = 'Az URL-nek "http"-vel vagy "https"-sel kell kezdődnie';
+$lang['error_dircreate'] = 'A letöltéshez az ideiglenes könyvtár létrehozása sikertelen';
+$lang['error_download'] = 'A(z) %s fájl letöltése sikertelen';
+$lang['error_decompress'] = 'A letöltött fájlt nem lehet kicsomagolni. Ezt okozhatja a fájl sérülése (ebben az esetben próbáld újra letölteni) vagy egy ismeretlen tömörítési formátum használata (ilyenkor kézzel kell telepítened).';
+$lang['error_findfolder'] = 'A bővítményhez tartozó könyvtárat nem sikerült megállapítani, kézzel kell letöltened és telepítened';
+$lang['error_copy'] = 'Egy fájl másolása közben hiba történt a <em>%s</em> könyvtárban: lehet, hogy a lemez megtelt vagy nincsenek megfelelő írási jogaid. A telepítés megszakadása a modul hibás működését eredményezheti és instabil állapotba hozhatja a wikit';
+$lang['noperms'] = 'A bővítmény könyvtára nem írható';
+$lang['notplperms'] = 'A sablon könyvtára nem írható';
+$lang['nopluginperms'] = 'A modul könyvtára nem írható';
+$lang['git'] = 'Ezt a bővítményt git-tel telepítették, lehet, hogy nem itt célszerű frissíteni';
+$lang['install_url'] = 'Telepítés erről az URL-ről:';
+$lang['install_upload'] = 'Bővítmény feltöltése:';
+$lang['repo_error'] = 'A modul repository-ja nem érhető el. Bizonyosodj meg róla, hogy a szervereden engedélyezett a www.dokuwiki.org cím elérése és ellenőrizd a proxy beállításaidat!';
diff --git a/lib/plugins/extension/lang/it/lang.php b/lib/plugins/extension/lang/it/lang.php
new file mode 100644
index 000000000..fbf163d57
--- /dev/null
+++ b/lib/plugins/extension/lang/it/lang.php
@@ -0,0 +1,41 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Francesco <francesco.cavalli@hotmail.com>
+ */
+$lang['btn_enable'] = 'Abilita';
+$lang['btn_disable'] = 'Disabilita';
+$lang['btn_install'] = 'Installa';
+$lang['btn_reinstall'] = 'Reinstalla';
+$lang['search'] = 'Cerca';
+$lang['homepage_link'] = 'Documenti';
+$lang['bugs_features'] = 'Bug';
+$lang['tags'] = 'Tag:';
+$lang['author_hint'] = 'Cerca estensioni per questo autore';
+$lang['installed'] = 'Installato:';
+$lang['downloadurl'] = 'URL download:';
+$lang['repository'] = 'Repository';
+$lang['installed_version'] = 'Versione installata';
+$lang['install_date'] = 'Il tuo ultimo aggiornamento:';
+$lang['available_version'] = 'Versione disponibile:';
+$lang['compatible'] = 'Compatibile con:';
+$lang['similar'] = 'Simile a:';
+$lang['donate'] = 'Simile a questo?';
+$lang['repo_retry'] = 'Riprova';
+$lang['status'] = 'Status:';
+$lang['status_installed'] = 'installato';
+$lang['status_not_installed'] = 'non installato';
+$lang['status_protected'] = 'protetto';
+$lang['status_enabled'] = 'abilitato';
+$lang['status_disabled'] = 'disabilitato';
+$lang['status_unmodifiable'] = 'inmodificabile';
+$lang['status_plugin'] = 'plugin';
+$lang['status_template'] = 'modello';
+$lang['error_badurl'] = 'URLs deve iniziare con http o https';
+$lang['error_dircreate'] = 'Impossibile creare una cartella temporanea per ricevere il download';
+$lang['error_download'] = 'Impossibile scaricare il file: %s';
+$lang['notplperms'] = 'Il modello di cartella non è scrivibile';
+$lang['nopluginperms'] = 'La cartella plugin non è scrivibile';
+$lang['install_url'] = 'Installa da URL:';
diff --git a/lib/plugins/extension/lang/ja/intro_install.txt b/lib/plugins/extension/lang/ja/intro_install.txt
new file mode 100644
index 000000000..9f99b8202
--- /dev/null
+++ b/lib/plugins/extension/lang/ja/intro_install.txt
@@ -0,0 +1 @@
+アップロードするかダウンロードURLを指定して、手動でプラグインやテンプレートをインストールできます。
diff --git a/lib/plugins/extension/lang/ja/intro_plugins.txt b/lib/plugins/extension/lang/ja/intro_plugins.txt
new file mode 100644
index 000000000..b8251c7e8
--- /dev/null
+++ b/lib/plugins/extension/lang/ja/intro_plugins.txt
@@ -0,0 +1 @@
+このDokuWikiに現在インストールされているプラグインです。これらプラグインを有効化、無効化、アンインストールできます。更新はできる場合のみ表示されます。更新前に、プラグインの解説をお読みください。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/ja/intro_search.txt b/lib/plugins/extension/lang/ja/intro_search.txt
new file mode 100644
index 000000000..66d977b1b
--- /dev/null
+++ b/lib/plugins/extension/lang/ja/intro_search.txt
@@ -0,0 +1 @@
+このタブでは、DokuWiki用の利用可能なすべてのサードパーティのプラグインとテンプレートにアクセスできます。サードパーティ製のコードには、**セキュリティ上のリスク**の可能性があることに注意してください、最初に[[doku>ja:security#プラグインのセキュリティ|プラグインのセキュリティ]]を読むことをお勧めします。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/ja/intro_templates.txt b/lib/plugins/extension/lang/ja/intro_templates.txt
new file mode 100644
index 000000000..5de6d2f0d
--- /dev/null
+++ b/lib/plugins/extension/lang/ja/intro_templates.txt
@@ -0,0 +1 @@
+このDokuWikiに現在インストールされているテンプレートです。使用するテンプレートは[[?do=admin&page=config|設定管理]]で選択できます。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/ja/lang.php b/lib/plugins/extension/lang/ja/lang.php
new file mode 100644
index 000000000..dec46d629
--- /dev/null
+++ b/lib/plugins/extension/lang/ja/lang.php
@@ -0,0 +1,89 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Hideaki SAWADA <chuno@live.jp>
+ * @author PzF_X <jp_minecraft@yahoo.co.jp>
+ */
+$lang['menu'] = '拡張機能管理';
+$lang['tab_plugins'] = 'インストール済プラグイン';
+$lang['tab_templates'] = 'インストール済テンプレート';
+$lang['tab_search'] = '検索とインストール';
+$lang['tab_install'] = '手動インストール';
+$lang['notimplemented'] = 'この機能は未実装です。';
+$lang['notinstalled'] = 'この拡張機能はインストールされていません。';
+$lang['alreadyenabled'] = 'この拡張機能は有効です。';
+$lang['alreadydisabled'] = 'この拡張機能は無効です。';
+$lang['pluginlistsaveerror'] = 'プラグイン一覧の保存中にエラーが発生しました。';
+$lang['unknownauthor'] = '作者不明';
+$lang['unknownversion'] = 'バージョン不明';
+$lang['btn_info'] = '詳細情報を表示する。';
+$lang['btn_update'] = '更新';
+$lang['btn_uninstall'] = 'アンインストール';
+$lang['btn_enable'] = '有効化';
+$lang['btn_disable'] = '無効化';
+$lang['btn_install'] = 'インストール';
+$lang['btn_reinstall'] = '再インストール';
+$lang['js']['reallydel'] = 'この拡張機能を本当にアンインストールしますか?';
+$lang['search_for'] = '拡張機能の検索:';
+$lang['search'] = '検索';
+$lang['extensionby'] = '<strong>%s</strong> 作者: %s';
+$lang['screenshot'] = '%s のスクリーンショット';
+$lang['popularity'] = '利用状況:%s%%';
+$lang['homepage_link'] = '解説';
+$lang['bugs_features'] = 'バグ';
+$lang['tags'] = 'タグ:';
+$lang['author_hint'] = 'この作者で拡張機能を検索';
+$lang['installed'] = 'インストール済:';
+$lang['downloadurl'] = 'ダウンロード URL:';
+$lang['repository'] = 'リポジトリ:';
+$lang['unknown'] = '<em>不明</em>';
+$lang['installed_version'] = 'インストール済バージョン:';
+$lang['install_date'] = '最終更新日:';
+$lang['available_version'] = '利用可能バージョン:';
+$lang['compatible'] = '互換:';
+$lang['depends'] = '依存:';
+$lang['similar'] = '類似:';
+$lang['conflicts'] = '競合:';
+$lang['donate'] = 'お気に入り?';
+$lang['donate_action'] = '寄付先';
+$lang['repo_retry'] = '再実行';
+$lang['provides'] = '提供:';
+$lang['status'] = '状態:';
+$lang['status_installed'] = 'インストール済';
+$lang['status_not_installed'] = '未インストール';
+$lang['status_protected'] = '保護されています';
+$lang['status_enabled'] = '有効';
+$lang['status_disabled'] = '無効';
+$lang['status_unmodifiable'] = '編集不可';
+$lang['status_plugin'] = 'プラグイン';
+$lang['status_template'] = 'テンプレート';
+$lang['status_bundled'] = '同梱';
+$lang['msg_enabled'] = '%s プラグインを有効化しました。';
+$lang['msg_disabled'] = '%s プラグインを無効化しました。';
+$lang['msg_delete_success'] = '拡張機能をアンインストールしました。';
+$lang['msg_template_install_success'] = '%s テンプレートをインストールできました。';
+$lang['msg_template_update_success'] = '%s テンプレートを更新できました。';
+$lang['msg_plugin_install_success'] = '%s プラグインをインストールできました。';
+$lang['msg_plugin_update_success'] = '%s プラグインを更新できました。';
+$lang['msg_upload_failed'] = 'ファイルのアップロードに失敗しました。';
+$lang['missing_dependency'] = '<strong>依存関係が欠落または無効:</strong> %s';
+$lang['security_issue'] = '<strong>セキュリティ問題:</strong> %s';
+$lang['security_warning'] = '<strong>セキュリティ警告:</strong> %s';
+$lang['update_available'] = '<strong>更新:</strong> %sの新バージョンが利用可能です。';
+$lang['wrong_folder'] = '<strong>プラグインは正しくインストールされませんでした:</strong> プラグインのディレクトリを "%s" から "%s" へ変更して下さい。';
+$lang['url_change'] = '<strong>URL が変更されました:</strong> 最後にダウンロードした後、ダウンロード URL が変更されました。拡張機能のアップデート前に新 URL が正しいかを確認して下さい。<br />新:%s<br />旧:%s';
+$lang['error_badurl'] = 'URLはhttpかhttpsで始まる必要があります。';
+$lang['error_dircreate'] = 'ダウンロード用の一時フォルダが作成できません。';
+$lang['error_download'] = 'ファイルをダウンロードできません:%s';
+$lang['error_decompress'] = 'ダウンロードしたファイルを解凍できません。ダウンロードの失敗の結果であれば、再度試して下さい。圧縮形式が不明の場合は、手動でダウンロード・インストールしてください。';
+$lang['error_findfolder'] = '拡張機能ディレクトリを認識できません。手動でダウンロード・インストールしてください。';
+$lang['error_copy'] = '<em>%s</em> ディレクトリのファイルをインストールしようとした時、ファイルコピーエラーが発生しました:ディスクがいっぱいかもしれませんし、ファイルのアクセス権が正しくないかもしれません。プラグインが一部分インストールされ、wiki が不安定になるかもしれません。';
+$lang['noperms'] = '拡張機能ディレクトリが書き込み不可です。';
+$lang['notplperms'] = 'テンプレートディレクトリが書き込み不可です。';
+$lang['nopluginperms'] = 'プラグインディレクトリが書き込み不可です。';
+$lang['git'] = 'この拡張機能は Git 経由でインストールされており、ここで更新すべきでないかもしれません。';
+$lang['install_url'] = 'URL からインストール:';
+$lang['install_upload'] = '拡張機能をアップロード:';
+$lang['repo_error'] = 'プラグインのリポジトリに接続できません。サーバーが www.dokuwiki.org に接続できることやプロキシの設定を確認して下さい。';
diff --git a/lib/plugins/extension/lang/ko/intro_install.txt b/lib/plugins/extension/lang/ko/intro_install.txt
new file mode 100644
index 000000000..269df29cc
--- /dev/null
+++ b/lib/plugins/extension/lang/ko/intro_install.txt
@@ -0,0 +1 @@
+여기에 플러그인과 템플릿을 수동으로 올리거나 직접 다운로드 URL을 제공하여 수동으로 설치할 수 있습니다. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/ko/intro_plugins.txt b/lib/plugins/extension/lang/ko/intro_plugins.txt
new file mode 100644
index 000000000..9ac7a3d89
--- /dev/null
+++ b/lib/plugins/extension/lang/ko/intro_plugins.txt
@@ -0,0 +1 @@
+도쿠위키에 현재 설치된 플러그인입니다. 여기에서 플러그인을 활성화 또는 비활성화하거나 심지어 완전히 제거할 수 있습니다. 또한 플러그인 업데이트는 여기에 보여집니다. 업데이트하기 전에 플러그인의 설명문서를 읽으십시오. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/ko/intro_search.txt b/lib/plugins/extension/lang/ko/intro_search.txt
new file mode 100644
index 000000000..b6760264e
--- /dev/null
+++ b/lib/plugins/extension/lang/ko/intro_search.txt
@@ -0,0 +1 @@
+이 탭은 도쿠위키를 위한 사용할 수 있는 모든 타사 플러그인과 템플릿에 접근하도록 제공합니다. 타사 코드를 설치하면 **보안 위험에 노출**될 수 있음을 유의하십시오, 먼저 [[doku>security#plugin_security|플러그인 보안]]에 대해 읽을 수 있습니다. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/ko/intro_templates.txt b/lib/plugins/extension/lang/ko/intro_templates.txt
new file mode 100644
index 000000000..d4320b880
--- /dev/null
+++ b/lib/plugins/extension/lang/ko/intro_templates.txt
@@ -0,0 +1 @@
+도쿠위키에 현재 설치된 템플릿입니다. [[?do=admin&page=config|환경 설정 관리자]]에서 사용하는 템플릿을 선택할 수 있습니다. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/ko/lang.php b/lib/plugins/extension/lang/ko/lang.php
new file mode 100644
index 000000000..53c9b4481
--- /dev/null
+++ b/lib/plugins/extension/lang/ko/lang.php
@@ -0,0 +1,89 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Young gon Cha <garmede@gmail.com>
+ * @author Myeongjin <aranet100@gmail.com>
+ */
+$lang['menu'] = '확장 기능 관리자';
+$lang['tab_plugins'] = '설치된 플러그인';
+$lang['tab_templates'] = '설치된 템플릿';
+$lang['tab_search'] = '검색하고 설치';
+$lang['tab_install'] = '수동 설치';
+$lang['notimplemented'] = '이 기능은 아직 구현되지 않았습니다';
+$lang['notinstalled'] = '이 확장 기능은 설치되어 있지 않습니다';
+$lang['alreadyenabled'] = '이 확장 기능이 이미 활성화되어 있습니다';
+$lang['alreadydisabled'] = '이 확장 기능이 이미 비활성화되어 있습니다';
+$lang['pluginlistsaveerror'] = '플러그인 목록을 저장하는 중 오류가 있었습니다';
+$lang['unknownauthor'] = '알 수 없는 저자';
+$lang['unknownversion'] = '알 수 없는 버전';
+$lang['btn_info'] = '정보 더 보기';
+$lang['btn_update'] = '업데이트';
+$lang['btn_uninstall'] = '제거';
+$lang['btn_enable'] = '활성화';
+$lang['btn_disable'] = '비활성화';
+$lang['btn_install'] = '설치';
+$lang['btn_reinstall'] = '다시 설치';
+$lang['js']['reallydel'] = '정말 이 확장 기능을 제거하겠습니까?';
+$lang['search_for'] = '확장 기능 검색:';
+$lang['search'] = '검색';
+$lang['extensionby'] = '<strong>%s</strong> (저자 %s)';
+$lang['screenshot'] = '%s의 스크린샷';
+$lang['popularity'] = '인기: %s%%';
+$lang['homepage_link'] = '문서';
+$lang['bugs_features'] = '버그';
+$lang['tags'] = '태그:';
+$lang['author_hint'] = '이 저자로 확장 기능 검색';
+$lang['installed'] = '설치됨:';
+$lang['downloadurl'] = '다운로드 URL:';
+$lang['repository'] = '저장소:';
+$lang['unknown'] = '<em>알 수 없음</em>';
+$lang['installed_version'] = '설치된 버전:';
+$lang['install_date'] = '마지막 업데이트:';
+$lang['available_version'] = '가능한 버전:';
+$lang['compatible'] = '다음과의 호환성:';
+$lang['depends'] = '다음에 의존:';
+$lang['similar'] = '다음과 비슷:';
+$lang['conflicts'] = '다음과 충돌:';
+$lang['donate'] = '이것이 좋나요?';
+$lang['donate_action'] = '저자에게 커피를 사주세요!';
+$lang['repo_retry'] = '다시 시도';
+$lang['provides'] = '제공:';
+$lang['status'] = '상태:';
+$lang['status_installed'] = '설치됨';
+$lang['status_not_installed'] = '설치되지 않음';
+$lang['status_protected'] = '보호됨';
+$lang['status_enabled'] = '활성화됨';
+$lang['status_disabled'] = '비활성화됨';
+$lang['status_unmodifiable'] = '수정할 수 없음';
+$lang['status_plugin'] = '플러그인';
+$lang['status_template'] = '템플릿';
+$lang['status_bundled'] = '포함';
+$lang['msg_enabled'] = '%s 플러그인이 활성화되었습니다';
+$lang['msg_disabled'] = '%s 플러그인이 비활성화되었습니다';
+$lang['msg_delete_success'] = '확장 기능이 제거되었습니다';
+$lang['msg_template_install_success'] = '%s 템플릿을 성공적으로 설치했습니다';
+$lang['msg_template_update_success'] = '%s 템플릿을 성공적으로 업데이트했습니다';
+$lang['msg_plugin_install_success'] = '%s 플러그인을 성공적으로 설치했습니다';
+$lang['msg_plugin_update_success'] = '%s 플러그인을 성공적으로 업데이트했습니다';
+$lang['msg_upload_failed'] = '파일 올리기에 실패했습니다';
+$lang['missing_dependency'] = '<strong>의존성을 잃었거나 비활성화되어 있습니다:</strong> %s';
+$lang['security_issue'] = '<strong>보안 문제:</strong> %s';
+$lang['security_warning'] = '<strong>보안 경고:</strong> %s';
+$lang['update_available'] = '<strong>업데이트:</strong> 새 버전 %s(을)를 사용할 수 있습니다.';
+$lang['wrong_folder'] = '<strong>플러그인이 올바르지 않게 설치됨:</strong> 플러그인 디렉터리를 "%s"에서 "%s"로 이름을 바꾸세요.';
+$lang['url_change'] = '<strong>URL이 바뀜:</strong> 다운로드 URL이 최신 다운로드 이래로 바뀌었습니다. 확장 기능을 업데이트하기 전에 새 URL이 올바른지 확인하세요.<br />새 URL: %s<br />오래된 URL: %s';
+$lang['error_badurl'] = 'URL은 http나 https로 시작해야 합니다';
+$lang['error_dircreate'] = '다운로드를 받을 임시 폴더를 만들 수 없습니다';
+$lang['error_download'] = '파일을 다운로드할 수 없습니다: %s';
+$lang['error_decompress'] = '다운로드한 파일의 압축을 풀 수 없습니다. 이는 아마도 잘못된 다운로드의 결과로, 이럴 경우 다시 시도해야 합니다; 또는 압축 형식을 알 수 없으며, 이럴 경우 수동으로 다운로드하고 설치해야 합니다.';
+$lang['error_findfolder'] = '확장 기능 디렉터리를 식별할 수 없습니다, 수동으로 다운로드하고 설치해야 합니다';
+$lang['error_copy'] = '<em>%s</em> 디렉터리에 파일을 설치하는 동안 파일 복사 오류가 발생했습니다: 디스크가 꽉 찼거나 파일 접근 권한이 잘못되었을 수도 있습니다. 플러그인 설치가 부분적으로 되었거나 불안정하게 위키 설치가 되었을 수 있습니다.';
+$lang['noperms'] = '확장 기능 디렉터리에 쓸 수 없습니다';
+$lang['notplperms'] = '임시 디렉터리에 쓸 수 없습니다';
+$lang['nopluginperms'] = '플러그인 디렉터리에 쓸 수 없습니다';
+$lang['git'] = '이 확장 기능은 git을 통해 설치되었으며, 여기에서 업데이트할 수 없을 수 있습니다.';
+$lang['install_url'] = 'URL에서 설치:';
+$lang['install_upload'] = '확장 기능 올리기:';
+$lang['repo_error'] = '플러그인 저장소에 연결할 수 없습니다. 서버가 www.dokuwiki.org에 연결할 수 있는지 확인하고 프록시 설정을 확인하세요.';
diff --git a/lib/plugins/extension/lang/lv/intro_templates.txt b/lib/plugins/extension/lang/lv/intro_templates.txt
new file mode 100644
index 000000000..1014c7c1e
--- /dev/null
+++ b/lib/plugins/extension/lang/lv/intro_templates.txt
@@ -0,0 +1 @@
+DokuWiki ir instalēti šādi šabloni. Lietojamo šablonu var norādīt [[?do=admin&page=config|Konfigurācijas lapā]]. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/lv/lang.php b/lib/plugins/extension/lang/lv/lang.php
new file mode 100644
index 000000000..e7e9bdfd9
--- /dev/null
+++ b/lib/plugins/extension/lang/lv/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Aivars Miška <allefm@gmail.com>
+ */
+$lang['msg_delete_success'] = 'Papildinājums atinstalēts';
diff --git a/lib/plugins/extension/lang/nl/intro_install.txt b/lib/plugins/extension/lang/nl/intro_install.txt
new file mode 100644
index 000000000..6a0b41055
--- /dev/null
+++ b/lib/plugins/extension/lang/nl/intro_install.txt
@@ -0,0 +1 @@
+Hier kunt u handmatig plugins en templates installeren door deze te uploaden of door een directe download URL op te geven. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/nl/intro_plugins.txt b/lib/plugins/extension/lang/nl/intro_plugins.txt
new file mode 100644
index 000000000..e12bdf0f8
--- /dev/null
+++ b/lib/plugins/extension/lang/nl/intro_plugins.txt
@@ -0,0 +1 @@
+Dit zijn de momenteel in uw Dokuwiki geïnstalleerde plugins. U kunt deze hier aan of uitschakelen danwel geheel deïnstalleren. Plugin updates zijn hier ook opgenomen, lees de plugin documentatie voordat u update. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/nl/intro_search.txt b/lib/plugins/extension/lang/nl/intro_search.txt
new file mode 100644
index 000000000..f0c8d7435
--- /dev/null
+++ b/lib/plugins/extension/lang/nl/intro_search.txt
@@ -0,0 +1 @@
+Deze tab verschaft u toegang tot alle plugins en templates vervaardigd door derden en bestemd voor Dokuwiki. Houdt er rekening mee dat indien u Plugins van derden installeert deze een **veiligheids risico ** kunnen bevatten, geadviseerd wordt om eerst te lezen [[doku>security#plugin_security|plugin security]]. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/nl/intro_templates.txt b/lib/plugins/extension/lang/nl/intro_templates.txt
new file mode 100644
index 000000000..52c96cef7
--- /dev/null
+++ b/lib/plugins/extension/lang/nl/intro_templates.txt
@@ -0,0 +1 @@
+Deze templates zijn thans in DokuWiki geïnstalleerd. U kunt een template selecteren middels [[?do=admin&page=config|Configuration Manager]] . \ No newline at end of file
diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php
new file mode 100644
index 000000000..a54924e93
--- /dev/null
+++ b/lib/plugins/extension/lang/nl/lang.php
@@ -0,0 +1,90 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Rene <wllywlnt@yahoo.com>
+ * @author Gerrit Uitslag <klapinklapin@gmail.com>
+ * @author Johan Vervloet <johan.vervloet@gmail.com>
+ */
+$lang['menu'] = 'Uitbreidingen';
+$lang['tab_plugins'] = 'Geïnstalleerde Plugins';
+$lang['tab_templates'] = 'Geïnstalleerde Templates';
+$lang['tab_search'] = 'Zoek en installeer';
+$lang['tab_install'] = 'Handmatige installatie';
+$lang['notimplemented'] = 'Deze toepassing is nog niet geïnstalleerd';
+$lang['notinstalled'] = 'Deze uitbreiding is nog niet geïnstalleerd';
+$lang['alreadyenabled'] = 'Deze uitbreiding is reeds ingeschakeld';
+$lang['alreadydisabled'] = 'Deze uitbreiding is reeds uitgeschakeld';
+$lang['pluginlistsaveerror'] = 'Fout bij het opslaan van de plugin lijst';
+$lang['unknownauthor'] = 'Onbekende auteur';
+$lang['unknownversion'] = 'Onbekende versie';
+$lang['btn_info'] = 'Toon meer informatie';
+$lang['btn_update'] = 'Update';
+$lang['btn_uninstall'] = 'Deinstalleer';
+$lang['btn_enable'] = 'Schakel aan';
+$lang['btn_disable'] = 'Schakel uit';
+$lang['btn_install'] = 'Installeer';
+$lang['btn_reinstall'] = 'Her-installeer';
+$lang['js']['reallydel'] = 'Wilt u deze uitbreiding deinstalleren?';
+$lang['search_for'] = 'Zoek Uitbreiding:';
+$lang['search'] = 'Zoek';
+$lang['extensionby'] = '<strong>%s</strong> by %s';
+$lang['screenshot'] = 'Schermafdruk bij %s';
+$lang['popularity'] = 'Populariteit:%s%%';
+$lang['homepage_link'] = 'Documentatie';
+$lang['bugs_features'] = 'Bugs';
+$lang['tags'] = 'Tags:';
+$lang['author_hint'] = 'Zoek uitbreidingen van deze auteur:';
+$lang['installed'] = 'Geinstalleerd:';
+$lang['downloadurl'] = 'Download URL:';
+$lang['repository'] = 'Centrale opslag:';
+$lang['unknown'] = '<em>onbekend</em>';
+$lang['installed_version'] = 'Geïnstalleerde versie:';
+$lang['install_date'] = 'Uw laatste update:';
+$lang['available_version'] = 'Beschikbare versie:';
+$lang['compatible'] = 'Compatible met:';
+$lang['depends'] = 'Afhankelijk van:';
+$lang['similar'] = 'Soortgelijk:';
+$lang['conflicts'] = 'Conflicteerd met:';
+$lang['donate'] = 'Vindt u dit leuk?';
+$lang['donate_action'] = 'Koop een kop koffie voor de auteur!';
+$lang['repo_retry'] = 'Herhaal';
+$lang['provides'] = 'Zorgt voor:';
+$lang['status'] = 'Status:';
+$lang['status_installed'] = 'Geïnstalleerd';
+$lang['status_not_installed'] = 'niet geïnstalleerd ';
+$lang['status_protected'] = 'beschermd';
+$lang['status_enabled'] = 'ingeschakeld';
+$lang['status_disabled'] = 'uitgeschakeld';
+$lang['status_unmodifiable'] = 'Niet wijzigbaar';
+$lang['status_plugin'] = 'plugin';
+$lang['status_template'] = 'template';
+$lang['status_bundled'] = 'Gebundeld';
+$lang['msg_enabled'] = 'Plugin %s ingeschakeld';
+$lang['msg_disabled'] = 'Plugin %s uitgeschakeld';
+$lang['msg_delete_success'] = 'Uitbreiding gedeinstalleerd';
+$lang['msg_template_install_success'] = 'Template %s werd succesvol geïnstalleerd';
+$lang['msg_template_update_success'] = 'Template %s werd succesvol geüpdatet';
+$lang['msg_plugin_install_success'] = 'Plugin %s werd succesvol geïnstalleerd';
+$lang['msg_plugin_update_success'] = 'Plugin %s werd succesvol geüpdatet';
+$lang['msg_upload_failed'] = 'Uploaden van het bestand is mislukt';
+$lang['missing_dependency'] = '<strong>niet aanwezige of uitgeschakelde afhankelijkheid</strong> %s';
+$lang['security_issue'] = '<strong>Veiligheids kwestie:</strong> %s';
+$lang['security_warning'] = '<strong>Veiligheids Waarschuwing</strong> %s';
+$lang['update_available'] = '<strong>Update:</strong> Nieuwe versie %s is beschikbaar.';
+$lang['wrong_folder'] = '<strong>Plugin onjuist geïnstalleerd:</strong> Hernoem de plugin directory van "%s" naar"%s"';
+$lang['url_change'] = '<strong>URL gewijzigd:</strong> Download URL is gewijzigd sinds de laatste download. Controleer of de nieuwe URL juist is voordat u de uitbreiding updatet. <br />Nieuw:%s<Br /> Vorig: %s';
+$lang['error_badurl'] = 'URLs moeten beginnen met http of https';
+$lang['error_dircreate'] = 'De tijdelijke map kon niet worden gemaakt om de download te ontvangen';
+$lang['error_download'] = 'Het is niet mogelijk het bestand te downloaden: %s';
+$lang['error_decompress'] = 'Onmogelijk om het gedownloade bestand uit te pakken. Dit is wellicht het gevolg van een onvolledige/onjuiste download, in welk geval u het nog eens moet proberen; of het compressie formaat is onbekend in welk geval u het bestand handmatig moet downloaden en installeren.';
+$lang['error_findfolder'] = 'Onmogelijk om de uitbreidings directory te vinden, u moet het zelf downloaden en installeren';
+$lang['error_copy'] = 'Er was een bestand kopieer fout tijdens het installeren van bestanden in directory <em>%s</em>: de schijf kan vol zijn of de bestand toegangs rechten kunnen onjuist zijn. Dit kan tot gevolg hebben dat de plugin slechts gedeeltelijk werd geïnstalleerd waardoor uw wiki installatie onstabiel is ';
+$lang['noperms'] = 'Uitbreidings directory is niet schrijfbaar';
+$lang['notplperms'] = 'Template directory is niet schrijfbaar';
+$lang['nopluginperms'] = 'Plugin directory is niet schrijfbaar';
+$lang['git'] = 'De uitbreiding werd geïnstalleerd via git, u wilt deze hier wellicht niet aanpassen.';
+$lang['install_url'] = 'Installeer vanaf URL:';
+$lang['install_upload'] = 'Upload Uitbreiding:';
+$lang['repo_error'] = 'Er kon geen verbinding worden gemaakt met de centrale plugin opslag. Controleer of de server verbinding mag maken met www.dokuwiki.org en controleer de proxy instellingen.';
diff --git a/lib/plugins/extension/lang/pl/lang.php b/lib/plugins/extension/lang/pl/lang.php
new file mode 100644
index 000000000..4fdca79c9
--- /dev/null
+++ b/lib/plugins/extension/lang/pl/lang.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Mati <mackosa@wp.pl>
+ */
+$lang['menu'] = 'Menedżer rozszerzeń';
+$lang['tab_plugins'] = 'Zainstalowane dodatki';
+$lang['tab_search'] = 'Znajdź i zainstaluj';
+$lang['notinstalled'] = 'Te rozszerzenie nie zostało zainstalowane';
+$lang['alreadyenabled'] = 'Te rozszerzenie jest już uruchomione';
+$lang['unknownauthor'] = 'Nieznany autor';
+$lang['unknownversion'] = 'Nieznana wersja';
+$lang['btn_info'] = 'Pokaż więcej informacji';
+$lang['btn_enable'] = 'Uruchom';
+$lang['btn_disable'] = 'Wyłącz';
+$lang['btn_reinstall'] = 'Ponowna instalacja';
+$lang['js']['reallydel'] = 'Naprawdę odinstalować te rozszerzenie?';
+$lang['search'] = 'Szukaj';
+$lang['bugs_features'] = 'Błędy';
+$lang['tags'] = 'Tagi:';
+$lang['installed'] = 'Zainstalowano:';
+$lang['repository'] = 'Repozytorium';
+$lang['installed_version'] = 'Zainstalowana wersja:';
+$lang['install_date'] = 'Twoja ostatnia aktualizacja:';
+$lang['available_version'] = 'Dostępna wersja:';
+$lang['depends'] = 'Zależy od:';
+$lang['conflicts'] = 'Konflikt z:';
+$lang['donate'] = 'Lubisz to?';
+$lang['donate_action'] = 'Kup autorowi kawę!';
+$lang['repo_retry'] = 'Ponów';
+$lang['status'] = 'Status:';
+$lang['status_installed'] = 'zainstalowano';
+$lang['status_not_installed'] = 'nie zainstalowano';
+$lang['status_enabled'] = 'uruchomione';
+$lang['status_disabled'] = 'wyłączone';
+$lang['status_plugin'] = 'dodatek';
+$lang['msg_delete_success'] = 'Rozszerzenie odinstalowane';
diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php
new file mode 100644
index 000000000..d524f072b
--- /dev/null
+++ b/lib/plugins/extension/lang/ru/lang.php
@@ -0,0 +1,60 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
+ */
+$lang['menu'] = 'Управление дополнениями';
+$lang['tab_plugins'] = 'Установленные плагины';
+$lang['tab_templates'] = 'Установленные шаблоны';
+$lang['tab_search'] = 'Поиск и установка';
+$lang['tab_install'] = 'Ручная установка';
+$lang['notinstalled'] = 'Это дополнение не установлено';
+$lang['unknownauthor'] = 'Автор неизвестен';
+$lang['unknownversion'] = 'Версия неизвестна';
+$lang['btn_info'] = 'Отобразить доп. информацию';
+$lang['btn_update'] = 'Обновить';
+$lang['btn_uninstall'] = 'Удалить';
+$lang['btn_enable'] = 'Включить';
+$lang['btn_disable'] = 'Отключить';
+$lang['btn_install'] = 'Установить';
+$lang['btn_reinstall'] = 'Переустановить';
+$lang['js']['reallydel'] = 'Действительно удалить это дополнение?';
+$lang['search_for'] = 'Поиск дополнения:';
+$lang['search'] = 'Найти';
+$lang['extensionby'] = '<strong>%s</strong> — %s';
+$lang['popularity'] = 'Попоулярность: %s%%';
+$lang['bugs_features'] = 'Ошибки';
+$lang['tags'] = 'Метки:';
+$lang['author_hint'] = 'Найти дополнения этого автора';
+$lang['installed'] = 'Установлено:';
+$lang['downloadurl'] = 'Ссылка для скачивания:';
+$lang['repository'] = 'Репозиторий:';
+$lang['unknown'] = '<em>неизвестно</em>';
+$lang['installed_version'] = 'Установленная версия:';
+$lang['install_date'] = 'Последнее обновление:';
+$lang['available_version'] = 'Доступная версия:';
+$lang['compatible'] = 'Совместим с:';
+$lang['depends'] = 'Зависит от:';
+$lang['similar'] = 'Похож на:';
+$lang['conflicts'] = 'Конфликтует с:';
+$lang['donate'] = 'Нравится?';
+$lang['donate_action'] = 'Купить автору кофе!';
+$lang['repo_retry'] = 'Повторить';
+$lang['status_installed'] = 'установлено';
+$lang['status_not_installed'] = 'не установлено';
+$lang['status_protected'] = 'защищено';
+$lang['status_enabled'] = 'включен';
+$lang['status_disabled'] = 'отключено';
+$lang['status_unmodifiable'] = 'неизменяемо';
+$lang['status_plugin'] = 'плагин';
+$lang['status_template'] = 'шаблон';
+$lang['status_bundled'] = 'в комплекте';
+$lang['msg_enabled'] = 'Плагин %s включен';
+$lang['msg_disabled'] = 'Плагин %s отключен';
+$lang['msg_delete_success'] = 'Дополнение удалено';
+$lang['msg_template_install_success'] = 'Шаблон %s успешно установлен';
+$lang['msg_template_update_success'] = 'Шаблон %s успешно обновлён';
+$lang['msg_plugin_install_success'] = 'Плагин %s успешно установлен';
+$lang['msg_plugin_update_success'] = 'Плагин %s успешно обновлён';
diff --git a/lib/plugins/extension/lang/sk/lang.php b/lib/plugins/extension/lang/sk/lang.php
new file mode 100644
index 000000000..d00c2e32b
--- /dev/null
+++ b/lib/plugins/extension/lang/sk/lang.php
@@ -0,0 +1,58 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Martin Michalek <michalek.dev@gmail.com>
+ */
+$lang['tab_plugins'] = 'Inštalované pluginy';
+$lang['tab_templates'] = 'Inštalované šablóny';
+$lang['tab_search'] = 'Hľadanie e inštalácia';
+$lang['tab_install'] = 'Manuálna inštalácia';
+$lang['notimplemented'] = 'Táto vlastnosť ešte nebola implementovaná';
+$lang['unknownauthor'] = 'Neznámy autor';
+$lang['unknownversion'] = 'Neznáma verzia';
+$lang['btn_info'] = 'Viac informácií';
+$lang['btn_update'] = 'Aktualizácia';
+$lang['btn_uninstall'] = 'Odinštalovanie';
+$lang['btn_enable'] = 'Povolenie';
+$lang['btn_disable'] = 'Zablokovanie';
+$lang['btn_install'] = 'Inštalácia';
+$lang['btn_reinstall'] = 'Re-Inštalácia';
+$lang['search'] = 'Vyhľadávanie';
+$lang['extensionby'] = '<strong>%s</strong> od %s';
+$lang['screenshot'] = 'Obrázok od %s';
+$lang['popularity'] = 'Popularita: %s%%';
+$lang['homepage_link'] = 'Dokumentácia';
+$lang['bugs_features'] = 'Chyby:';
+$lang['tags'] = 'Kľúčové slová:';
+$lang['unknown'] = '<em>neznámy</em>';
+$lang['installed_version'] = 'Inštalovaná verzia:';
+$lang['install_date'] = 'Posledná aktualizácia:';
+$lang['available_version'] = 'Dostupné verzie:';
+$lang['compatible'] = 'Kompaktibilita:';
+$lang['similar'] = 'Podobné:';
+$lang['conflicts'] = 'V konflikte:';
+$lang['status_installed'] = 'inštalovaný';
+$lang['status_not_installed'] = 'neinštalovaný';
+$lang['status_protected'] = 'chránený';
+$lang['status_enabled'] = 'povolený';
+$lang['status_disabled'] = 'nepovolený';
+$lang['status_plugin'] = 'plugin';
+$lang['status_template'] = 'šablóna';
+$lang['msg_enabled'] = 'Plugin %s povolený';
+$lang['msg_disabled'] = 'Plugin %s nepovolený';
+$lang['msg_template_install_success'] = 'Šablóna %s úspešne nainštalovaná';
+$lang['msg_template_update_success'] = 'Šablóna %s úspešne aktualizovaná';
+$lang['msg_plugin_install_success'] = 'Plugin %s úspešne nainštalovaný';
+$lang['msg_plugin_update_success'] = 'Plugin %s úspešne aktualizovaný';
+$lang['msg_upload_failed'] = 'Nahrávanie súboru zlyhalo';
+$lang['update_available'] = '<strong>Aktualizácia:</strong> Nová verzia %s.';
+$lang['wrong_folder'] = '<strong>Plugin nesprávne nainštalovaný:</strong> Premenujte adresár s pluginom "%s" na "%s".';
+$lang['error_badurl'] = 'URL by mali mať na začiatku http alebo https';
+$lang['error_dircreate'] = 'Nie je možné vytvoriť dočasný adresár pre uloženie sťahovaného súboru';
+$lang['error_download'] = 'Nie je možné stiahnuť súbor: %s';
+$lang['error_decompress'] = 'Nie je možné dekomprimovať stiahnutý súbor. Môže to byť dôvodom chyby sťahovania (v tom prípade to skúste znova) alebo neznámym kompresným formátom (v tom prípade musíte stiahnuť a inštalovať manuálne).';
+$lang['error_copy'] = 'Chyba kopírovania pri inštalácii do adresára <em>%s</em>: disk môže byť plný alebo nemáte potrebné prístupové oprávnenie. Dôsledkom može byť čiastočne inštalovaný plugin a nestabilná wiki inštalácia.';
+$lang['nopluginperms'] = 'Adresár s pluginom nie je zapisovateľný.';
+$lang['install_url'] = 'Inštalácia z URL:';
diff --git a/lib/plugins/extension/lang/tr/lang.php b/lib/plugins/extension/lang/tr/lang.php
new file mode 100644
index 000000000..dfabfa715
--- /dev/null
+++ b/lib/plugins/extension/lang/tr/lang.php
@@ -0,0 +1,60 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author İlker R. Kapaç <irifat@gmail.com>
+ */
+$lang['menu'] = 'Genişletme Yöneticisi';
+$lang['tab_plugins'] = 'Kurulmuş Eklentiler';
+$lang['tab_templates'] = 'Kurulmuş Şablonlar';
+$lang['tab_search'] = 'Ara ve Kur';
+$lang['tab_install'] = 'Elle Kurulum';
+$lang['notimplemented'] = 'Bu özellik henüz uygulamaya geçmemiştir';
+$lang['notinstalled'] = 'Bu genişletme yüklü değildir';
+$lang['alreadyenabled'] = 'Bu genişletme zaten etkinleştirilmiştir.';
+$lang['alreadydisabled'] = 'Bu genişletme zaten pasifleştirilmiştir';
+$lang['pluginlistsaveerror'] = 'Eklenti listesini kaydederken bir hata oluştu.';
+$lang['unknownauthor'] = 'Bilinmeyen yazar';
+$lang['unknownversion'] = 'Bilinmeyen sürüm';
+$lang['btn_info'] = 'Daha fazla bilgi göster';
+$lang['btn_update'] = 'Güncelle';
+$lang['btn_uninstall'] = 'Kaldır';
+$lang['btn_enable'] = 'Etkinleştir';
+$lang['btn_disable'] = 'Pasifleştir';
+$lang['btn_install'] = 'Kur';
+$lang['btn_reinstall'] = 'Yeniden kur';
+$lang['js']['reallydel'] = 'Genişletme gerçekten kaldırılsın mı?';
+$lang['search_for'] = 'Genişletme Ara:';
+$lang['search'] = 'Ara';
+$lang['extensionby'] = '<strong>%s</strong> tarafından %s';
+$lang['screenshot'] = '%s ekran görüntüsü';
+$lang['popularity'] = 'Rağbet: %s%%';
+$lang['homepage_link'] = 'Belgeler';
+$lang['bugs_features'] = 'Hatalar';
+$lang['tags'] = 'Etiketler:';
+$lang['author_hint'] = 'Bu yazarın genişletmelerini ara.';
+$lang['installed'] = 'Kurulu:';
+$lang['downloadurl'] = 'İndirme bağlantısı:';
+$lang['repository'] = 'Veri havuzu:';
+$lang['unknown'] = '<em>bilinmeyen</em>';
+$lang['installed_version'] = 'Kurulu sürüm:';
+$lang['install_date'] = 'Son güncellemeniz:';
+$lang['available_version'] = 'Müsait sürüm:';
+$lang['compatible'] = 'Şununla uyumlu:';
+$lang['depends'] = 'Şuna bağımlı';
+$lang['similar'] = 'Şununla benzer';
+$lang['conflicts'] = 'Şununla çelişir';
+$lang['donate'] = 'Beğendiniz mi?';
+$lang['donate_action'] = 'Yazara bir kahve ısmarlayın!';
+$lang['repo_retry'] = 'Yeniden dene';
+$lang['provides'] = 'Sağlar:';
+$lang['status'] = 'Durum:';
+$lang['status_installed'] = 'kurulu';
+$lang['status_not_installed'] = 'kurulu değil';
+$lang['status_protected'] = 'korunmuş';
+$lang['status_enabled'] = 'etkin';
+$lang['status_disabled'] = 'hizmet dışı';
+$lang['status_unmodifiable'] = 'değiştirilemez';
+$lang['status_plugin'] = 'eklenti';
+$lang['status_template'] = 'şablon';
diff --git a/lib/plugins/extension/lang/zh/intro_install.txt b/lib/plugins/extension/lang/zh/intro_install.txt
new file mode 100644
index 000000000..640839319
--- /dev/null
+++ b/lib/plugins/extension/lang/zh/intro_install.txt
@@ -0,0 +1 @@
+你可以通过上传或直接提供下载链接来安装插件和模板。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/zh/intro_plugins.txt b/lib/plugins/extension/lang/zh/intro_plugins.txt
new file mode 100644
index 000000000..69cb343b3
--- /dev/null
+++ b/lib/plugins/extension/lang/zh/intro_plugins.txt
@@ -0,0 +1 @@
+这些是你当前已经安装的插件。你可以在这里启用和禁用甚至卸载它们。插件的更新信息也显示在这,请一定在更新之前阅读插件的文档。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/zh/intro_search.txt b/lib/plugins/extension/lang/zh/intro_search.txt
new file mode 100644
index 000000000..0059075c0
--- /dev/null
+++ b/lib/plugins/extension/lang/zh/intro_search.txt
@@ -0,0 +1 @@
+这个标签会为你展示所有DokuWiki的第三方插件和模板。但你需要知道这些由第三方提供的代码可能会给你带来**安全方面的风险**,你最好先读一下[[doku>security#plugin_security|插件安全性]]。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/zh/intro_templates.txt b/lib/plugins/extension/lang/zh/intro_templates.txt
new file mode 100644
index 000000000..20575d381
--- /dev/null
+++ b/lib/plugins/extension/lang/zh/intro_templates.txt
@@ -0,0 +1 @@
+DokuWiki当前所使用的模板已经安装了,你可以在[[?do=admin&page=config|配置管理器]]里选择你要的模板。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/zh/lang.php b/lib/plugins/extension/lang/zh/lang.php
new file mode 100644
index 000000000..0264f3e9c
--- /dev/null
+++ b/lib/plugins/extension/lang/zh/lang.php
@@ -0,0 +1,91 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Cupen <Cupenoruler@foxmail.com>
+ * @author xiqingongzi <Xiqingongzi@Gmail.com>
+ * @author qinghao <qingxianhao@gmail.com>
+ * @author lainme <lainme993@gmail.com>
+ */
+$lang['menu'] = '扩展管理器';
+$lang['tab_plugins'] = '安装插件';
+$lang['tab_templates'] = '安装模板';
+$lang['tab_search'] = '搜索和安装';
+$lang['tab_install'] = '手动安装';
+$lang['notimplemented'] = '未实现的特性';
+$lang['notinstalled'] = '该扩展未安装';
+$lang['alreadyenabled'] = '该扩展已激活';
+$lang['alreadydisabled'] = '该扩展已关闭';
+$lang['pluginlistsaveerror'] = '保存插件列表时碰到个错误';
+$lang['unknownauthor'] = '未知作者';
+$lang['unknownversion'] = '未知版本';
+$lang['btn_info'] = '查看更多信息';
+$lang['btn_update'] = '更新';
+$lang['btn_uninstall'] = '卸载';
+$lang['btn_enable'] = '激活';
+$lang['btn_disable'] = '关闭';
+$lang['btn_install'] = '安装';
+$lang['btn_reinstall'] = '重新安装';
+$lang['js']['reallydel'] = '确定卸载这个扩展么?';
+$lang['search_for'] = '搜索扩展';
+$lang['search'] = '搜索';
+$lang['extensionby'] = '<strong>%s</strong> by %s';
+$lang['screenshot'] = '%s 的截图';
+$lang['popularity'] = '人气: %s%%';
+$lang['homepage_link'] = '文档';
+$lang['bugs_features'] = '错误';
+$lang['tags'] = '标签:';
+$lang['author_hint'] = '搜索这个作者的插件';
+$lang['installed'] = '已安装的:';
+$lang['downloadurl'] = '下载地址:';
+$lang['repository'] = '版本库:';
+$lang['unknown'] = '<em>未知的</em>';
+$lang['installed_version'] = '已安装版本:';
+$lang['install_date'] = '您的最后一次升级:';
+$lang['available_version'] = '可用版本:';
+$lang['compatible'] = '兼容于:';
+$lang['depends'] = '依赖于:';
+$lang['similar'] = '相似于:';
+$lang['conflicts'] = '冲突于:';
+$lang['donate'] = '喜欢?';
+$lang['donate_action'] = '捐给作者一杯咖啡钱!';
+$lang['repo_retry'] = '重试';
+$lang['provides'] = '提供:';
+$lang['status'] = '现状:';
+$lang['status_installed'] = '已安装的';
+$lang['status_not_installed'] = '未安装';
+$lang['status_protected'] = '受保护';
+$lang['status_enabled'] = '启用';
+$lang['status_disabled'] = '禁用';
+$lang['status_unmodifiable'] = '不可修改';
+$lang['status_plugin'] = '插件';
+$lang['status_template'] = '模板';
+$lang['status_bundled'] = '内建';
+$lang['msg_enabled'] = '插件 %s 已启用';
+$lang['msg_disabled'] = '插件 %s 已禁用';
+$lang['msg_delete_success'] = '插件已经卸载';
+$lang['msg_template_install_success'] = '模板 %s 安装成功';
+$lang['msg_template_update_success'] = '模板 %s 更新成功';
+$lang['msg_plugin_install_success'] = '插件 %s 安装成功';
+$lang['msg_plugin_update_success'] = '插件 %s 更新成功';
+$lang['msg_upload_failed'] = '上传文件失败';
+$lang['missing_dependency'] = '<strong>缺少或者被禁用依赖:</strong> %s';
+$lang['security_issue'] = '<strong>安全问题:</strong> %s';
+$lang['security_warning'] = '<strong>安全警告:</strong> %s';
+$lang['update_available'] = '<strong>更新:</strong>新版本 %s 已经可用。';
+$lang['wrong_folder'] = '<strong>插件安装不正确:</strong>重命名插件目录 "%s" 为 "%s"。';
+$lang['url_change'] = '<strong>URL已改变:</strong>自上次下载以来的下载 URL 已经改变。请在更新扩展前检查新 URL 是否有效。<br />新的:%s<br />旧的:%s';
+$lang['error_badurl'] = 'URL 应当以 http 或者 https 作为开头';
+$lang['error_dircreate'] = '无法创建用于保存下载的临时文件夹';
+$lang['error_download'] = '无法下载文件:%s';
+$lang['error_decompress'] = '无法解压下载的文件。这可能是由于文件损坏,在这种情况下您可以重试。这也可能是由于压缩格式是未知的,在这种情况下您需要手动下载并且安装。';
+$lang['error_findfolder'] = '无法识别扩展目录,您需要手动下载和安装';
+$lang['error_copy'] = '在尝试安装文件到目录 <em>%s</em> 时出现文件复制错误:磁盘可能已满或者文件访问权限不正确。这可能导致插件被部分安装并使您的维基处在不稳定状态';
+$lang['noperms'] = '扩展目录不可写';
+$lang['notplperms'] = '模板目录不可写';
+$lang['nopluginperms'] = '插件目录不可写';
+$lang['git'] = '这个扩展是通过 git 安装的,您可能不想在这里升级它';
+$lang['install_url'] = '从 URL 安装:';
+$lang['install_upload'] = '上传扩展:';
+$lang['repo_error'] = '无法连接到插件仓库。请确定您的服务器可以连接 www.dokuwiki.org 并检查您的代理设置。';
diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js
index bd3c97758..fab88162d 100644
--- a/lib/plugins/extension/script.js
+++ b/lib/plugins/extension/script.js
@@ -1,9 +1,11 @@
jQuery(function(){
+ var $extmgr = jQuery('#extension__manager');
+
/**
* Confirm uninstalling
*/
- jQuery('#extension__manager input.uninstall').click(function(e){
+ $extmgr.find('input.uninstall').click(function(e){
if(!window.confirm(LANG.plugins.extension.reallydel)){
e.preventDefault();
return false;
@@ -15,7 +17,7 @@ jQuery(function(){
* very simple lightbox
* @link http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/super-simple-lightbox-with-css-and-jquery/
*/
- jQuery('#extension__manager a.extension_screenshot').click(function(e) {
+ $extmgr.find('a.extension_screenshot').click(function(e) {
e.preventDefault();
//Get clicked link href
@@ -42,9 +44,48 @@ jQuery(function(){
});
/**
+ * Enable/Disable extension via AJAX
+ */
+ $extmgr.find('input.disable, input.enable').click(function (e) {
+ e.preventDefault();
+ var $btn = jQuery(this);
+
+ // get current state
+ var extension = $btn.attr('name').split('[')[2];
+ extension = extension.substr(0, extension.length - 1);
+ var act = ($btn.hasClass('disable')) ? 'disable' : 'enable';
+
+ // disable while we wait
+ $btn.attr('disabled', 'disabled');
+ $btn.css('cursor', 'wait');
+
+ // execute
+ jQuery.get(
+ DOKU_BASE + 'lib/exe/ajax.php',
+ {
+ call: 'plugin_extension',
+ ext: extension,
+ act: act
+ },
+ function (data) {
+ $btn.css('cursor', '')
+ .removeAttr('disabled')
+ .removeClass('disable')
+ .removeClass('enable')
+ .val(data.label)
+ .addClass(data.reverse)
+ .parents('li')
+ .removeClass('disabled')
+ .removeClass('enabled')
+ .addClass(data.state);
+ }
+ );
+ });
+
+ /**
* AJAX detail infos
*/
- jQuery('#extension__manager a.info').click(function(e){
+ $extmgr.find('a.info').click(function(e){
e.preventDefault();
var $link = jQuery(this);
@@ -60,7 +101,8 @@ jQuery(function(){
DOKU_BASE + 'lib/exe/ajax.php',
{
call: 'plugin_extension',
- ext: $link.data('extid')
+ ext: $link.data('extid'),
+ act: 'info'
},
function(data){
$link.parent().append(data);
diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php
index f8c6eb484..9265f44d5 100644
--- a/lib/plugins/info/syntax.php
+++ b/lib/plugins/info/syntax.php
@@ -48,7 +48,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
/**
* Handle the match
*/
- function handle($match, $state, $pos, Doku_Handler &$handler){
+ function handle($match, $state, $pos, Doku_Handler $handler){
$match = substr($match,7,-2); //strip ~~INFO: from start and ~~ from end
return array(strtolower($match));
}
@@ -56,7 +56,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
/**
* Create output
*/
- function render($format, Doku_Renderer &$renderer, $data) {
+ function render($format, Doku_Renderer $renderer, $data) {
if($format == 'xhtml'){
/** @var Doku_Renderer_xhtml $renderer */
//handle various info stuff
diff --git a/lib/plugins/plugin/lang/cs/admin_plugin.txt b/lib/plugins/plugin/lang/cs/admin_plugin.txt
deleted file mode 100644
index 6ebf1e78f..000000000
--- a/lib/plugins/plugin/lang/cs/admin_plugin.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-====== Správa pluginů ======
-
-Na této stránce lze spravovat pluginy DokuWiki [[doku>plugins|plugins]]. Aby bylo možné stahovat a instalovat pluginy, musí mít webový server přístup pro zápis do adresáře //plugin//.
diff --git a/lib/plugins/plugin/lang/cs/lang.php b/lib/plugins/plugin/lang/cs/lang.php
deleted file mode 100644
index 8917f8ef6..000000000
--- a/lib/plugins/plugin/lang/cs/lang.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Tomas Valenta <t.valenta@sh.cvut.cz>
- * @author Zbynek Krivka <zbynek.krivka@seznam.cz>
- * @author Bohumir Zamecnik <bohumir@zamecnik.org>
- * @author tomas@valenta.cz
- * @author Marek Sacha <sachamar@fel.cvut.cz>
- * @author Lefty <lefty@multihost.cz>
- * @author Vojta Beran <xmamut@email.cz>
- * @author zbynek.krivka@seznam.cz
- * @author Bohumir Zamecnik <bohumir.zamecnik@gmail.com>
- * @author Jakub A. Těšínský (j@kub.cz)
- * @author mkucera66@seznam.cz
- * @author Zbyněk Křivka <krivka@fit.vutbr.cz>
- * @author Gerrit Uitslag <klapinklapin@gmail.com>
- * @author Petr Klíma <qaxi@seznam.cz>
- */
-$lang['menu'] = 'Správa pluginů';
-$lang['download'] = 'Stáhnout a instalovat plugin';
-$lang['manage'] = 'Seznam instalovaných pluginů';
-$lang['btn_info'] = 'info';
-$lang['btn_update'] = 'aktualizovat';
-$lang['btn_delete'] = 'smazat';
-$lang['btn_settings'] = 'nastavení';
-$lang['btn_download'] = 'Stáhnout';
-$lang['btn_enable'] = 'Uložit';
-$lang['url'] = 'URL';
-$lang['installed'] = 'Instalován:';
-$lang['lastupdate'] = 'Poslední aktualizace:';
-$lang['source'] = 'Zdroj:';
-$lang['unknown'] = 'neznámý';
-$lang['updating'] = 'Aktualizuji ...';
-$lang['updated'] = 'Modul %s úspěšně aktualizován';
-$lang['updates'] = 'Následující pluginy byly úspěšně aktualizovány';
-$lang['update_none'] = 'Žádné aktualizace nenalezeny.';
-$lang['deleting'] = 'Probíhá mazání ...';
-$lang['deleted'] = 'Plugin %s smazán.';
-$lang['downloading'] = 'Stahuji ...';
-$lang['downloaded'] = 'Plugin %s nainstalován';
-$lang['downloads'] = 'Následující pluginy byly úspěšně instalovány:';
-$lang['download_none'] = 'Žádné pluginy nebyly nenalezeny, nebo se vyskytla nějaká chyba při
-stahování a instalaci.';
-$lang['plugin'] = 'Plugin:';
-$lang['components'] = 'Součásti';
-$lang['noinfo'] = 'Plugin nevrátil žádné informace. Může být poškozen nebo špatný.';
-$lang['name'] = 'Jméno:';
-$lang['date'] = 'Datum:';
-$lang['type'] = 'Typ:';
-$lang['desc'] = 'Popis:';
-$lang['author'] = 'Autor:';
-$lang['www'] = 'Web:';
-$lang['error'] = 'Nastala neznámá chyba.';
-$lang['error_download'] = 'Nelze stáhnout soubor s pluginem: %s';
-$lang['error_badurl'] = 'URL je zřejmě chybná - nelze z ní určit název souboru';
-$lang['error_dircreate'] = 'Nelze vytvořit dočasný adresář ke stažení dat';
-$lang['error_decompress'] = 'Správce pluginů nemůže rozbalit stažený soubor. Toto může být způsobeno chybou při stahování. Můžete se pokusit stahování opakovat. Chyba může být také v kompresním formátu souboru. V tom případě bude nutné stáhnout a nainstalovat plugin ručně.';
-$lang['error_copy'] = 'Došlo k chybě při instalaci pluginu <em>%s</em>. Je možné, že na disku není volné místo, nebo mohou být špatně nastavena přístupová práva. Pozor, mohlo dojít k částečné a tudíž chybné instalaci pluginu a tím může být ohrožena stabilita wiki.';
-$lang['error_delete'] = 'Došlo k chybě při pokusu o smazání pluginu <em>%s</em>. Nejspíše je chyba v nastavení přístupových práv k některým souborům či adresářům.';
-$lang['enabled'] = 'Plugin %s aktivován.';
-$lang['notenabled'] = 'Plugin %s nelze aktivovat, zkontrolujte práva k souborům.';
-$lang['disabled'] = 'Plugin %s deaktivován.';
-$lang['notdisabled'] = 'Plugin %s nelze deaktivovat, zkontrolujte práva k souborům.';
-$lang['packageinstalled'] = 'Balíček pluginů (%d plugin(ů): %s) úspěšně nainstalován.';
diff --git a/lib/plugins/plugin/lang/el/admin_plugin.txt b/lib/plugins/plugin/lang/el/admin_plugin.txt
deleted file mode 100644
index 8b292935d..000000000
--- a/lib/plugins/plugin/lang/el/admin_plugin.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-====== Διαχείριση Επεκτάσεων ======
-
-Σε αυτή την σελίδα μπορείτε να διαχειριστείτε τις [[doku>plugins|επεκτάσεις]] του Dokuwiki σας. Για να μπορέσετε να εγκαταστήσετε νέες επεκτάσεις, ο αντίστοιχος φάκελος συστήματος θα πρέπει να είναι εγγράψιμος από τον χρήστη κάτω από τον οποίο εκτελείται η εφαρμογή του εξυπηρετητή σας.
-
-
diff --git a/lib/plugins/plugin/lang/el/lang.php b/lib/plugins/plugin/lang/el/lang.php
deleted file mode 100644
index f50e26c46..000000000
--- a/lib/plugins/plugin/lang/el/lang.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Christopher Smith <chris@jalakai.co.uk>
- * @author Thanos Massias <tm@thriasio.gr>
- * @author Αθανάσιος Νταής <homunculus@wana.gr>
- * @author Konstantinos Koryllos <koryllos@gmail.com>
- * @author George Petsagourakis <petsagouris@gmail.com>
- * @author Petros Vidalis <pvidalis@gmail.com>
- * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com
- */
-$lang['menu'] = 'Διαχείριση Επεκτάσεων';
-$lang['download'] = 'Κατεβάστε και εγκαταστήστε μια νέα επέκταση (plugin)';
-$lang['manage'] = 'Εγκατεστημένες επεκτάσεις';
-$lang['btn_info'] = 'πληροφορίες';
-$lang['btn_update'] = 'ενημέρωση';
-$lang['btn_delete'] = 'διαγραφή';
-$lang['btn_settings'] = 'ρυθμίσεις';
-$lang['btn_download'] = 'Μεταφόρτωση';
-$lang['btn_enable'] = 'Αποθήκευση';
-$lang['url'] = 'URL';
-$lang['installed'] = 'Εγκατεστημένη:';
-$lang['lastupdate'] = 'Τελευταία ενημέρωση:';
-$lang['source'] = 'Προέλευση:';
-$lang['unknown'] = 'άγνωστο';
-$lang['updating'] = 'Σε διαδικασία ενημέρωσης ...';
-$lang['updated'] = 'Η επέκταση %s ενημερώθηκε με επιτυχία';
-$lang['updates'] = 'Οι παρακάτω επεκτάσεις ενημερώθηκαν με επιτυχία:';
-$lang['update_none'] = 'Δεν βρέθηκαν ενημερώσεις.';
-$lang['deleting'] = 'Σε διαδικασία διαγραφής ...';
-$lang['deleted'] = 'Η επέκταση %s διαγράφηκε.';
-$lang['downloading'] = 'Σε διαδικασία μεταφόρτωσης ...';
-$lang['downloaded'] = 'Η επέκταση %s εγκαταστάθηκε με επιτυχία';
-$lang['downloads'] = 'Οι παρακάτω επεκτάσεις εγκαταστάθηκαν με επιτυχία:';
-$lang['download_none'] = 'Δεν βρέθηκαν επεκτάσεις ή εμφανίστηκε κάποιο πρόβλημα κατά την σχετική διαδικασία.';
-$lang['plugin'] = 'Επέκταση:';
-$lang['components'] = 'Συστατικά';
-$lang['noinfo'] = 'Αυτή η επέκταση δεν επέστρεψε κάποια πληροφορία - η επέκταση μπορεί να μην λειτουργεί κανονικά.';
-$lang['name'] = 'Όνομα:';
-$lang['date'] = 'Ημερομηνία:';
-$lang['type'] = 'Τύπος:';
-$lang['desc'] = 'Περιγραφή:';
-$lang['author'] = 'Συγγραφέας:';
-$lang['www'] = 'Διεύθυνση στο διαδίκτυο:';
-$lang['error'] = 'Εμφανίστηκε άγνωστο σφάλμα.';
-$lang['error_download'] = 'Δεν είναι δυνατή η μεταφόρτωση του αρχείου: %s';
-$lang['error_badurl'] = 'Το URL είναι μάλλον λανθασμένο - είναι αδύνατον να εξαχθεί το όνομα αρχείου από αυτό το URL';
-$lang['error_dircreate'] = 'Δεν είναι δυνατή η δημιουργία ενός προσωρινού φακέλου αποθήκευσης των μεταφορτώσεων';
-$lang['error_decompress'] = 'Δεν είναι δυνατή η αποσυμπίεση των μεταφορτώσεων. Αυτό μπορεί να οφείλεται σε μερική λήψη των μεταφορτώσεων, οπότε θα πρέπει να επαναλάβετε την διαδικασία ή το σύστημά σας δεν μπορεί να διαχειριστεί το συγκεκριμένο είδος συμπίεσης, οπότε θα πρέπει να εγκαταστήσετε την επέκταση χειροκίνητα.';
-$lang['error_copy'] = 'Εμφανίστηκε ένα σφάλμα αντιγραφής αρχείων κατά την διάρκεια εγκατάστασης της επέκτασης <em>%s</em>: ο δίσκος μπορεί να είναι γεμάτος ή να μην είναι σωστά ρυθμισμένα τα δικαιώματα πρόσβασης. Αυτό το γεγονός μπορεί να οδήγησε σε μερική εγκατάσταση της επέκτασης και άρα η DokuWiki εγκατάστασή σας να εμφανίσει προβλήματα σταθερότητας.';
-$lang['error_delete'] = 'Εμφανίστηκε ένα σφάλμα κατά την διαδικασία διαγραφής της επέκτασης <em>%s</em>. Η πιθανότερη αιτία είναι να μην είναι σωστά ρυθμισμένα τα δικαιώματα πρόσβασης.';
-$lang['enabled'] = 'Η επέκταση %s ενεργοποιήθηκε.';
-$lang['notenabled'] = 'Η επέκταση %s δεν μπορεί να ενεργοποιηθεί. Ελέγξτε τα δικαιώματα πρόσβασης.';
-$lang['disabled'] = 'Η επέκταση %s απενεργοποιήθηκε.';
-$lang['notdisabled'] = 'Η επέκταση %s δεν μπορεί να απενεργοποιηθεί. Ελέγξτε τα δικαιώματα πρόσβασης.';
-$lang['packageinstalled'] = 'Το πακέτο της επέκτασης (%d επέκταση(εις): %s) εγκαστήθηκε επιτυχημένα.';
diff --git a/lib/plugins/plugin/lang/fr/admin_plugin.txt b/lib/plugins/plugin/lang/fr/admin_plugin.txt
deleted file mode 100644
index b7beba25a..000000000
--- a/lib/plugins/plugin/lang/fr/admin_plugin.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-====== Gestion des extensions ======
-
-Cette page vous permet de gérer tout ce qui a trait aux [[doku>fr:plugins|extensions]] de DokuWiki. Pour pouvoir télécharger et installer un module, le répertoire « ''plugin'' » doit être accessible en écriture pour le serveur web.
-
diff --git a/lib/plugins/plugin/lang/fr/lang.php b/lib/plugins/plugin/lang/fr/lang.php
deleted file mode 100644
index 0592f3c7d..000000000
--- a/lib/plugins/plugin/lang/fr/lang.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Guy Brand <gb@unistra.fr>
- * @author Delassaux Julien <julien@delassaux.fr>
- * @author Maurice A. LeBlanc <leblancma@cooptel.qc.ca>
- * @author stephane.gully@gmail.com
- * @author Guillaume Turri <guillaume.turri@gmail.com>
- * @author Erik Pedersen <erik.pedersen@shaw.ca>
- * @author olivier duperray <duperray.olivier@laposte.net>
- * @author Vincent Feltz <psycho@feltzv.fr>
- * @author Philippe Bajoit <philippe.bajoit@gmail.com>
- * @author Florian Gaub <floriang@floriang.net>
- * @author Samuel Dorsaz samuel.dorsaz@novelion.net
- * @author Johan Guilbaud <guilbaud.johan@gmail.com>
- * @author schplurtz@laposte.net
- * @author skimpax@gmail.com
- * @author Yannick Aure <yannick.aure@gmail.com>
- * @author Olivier DUVAL <zorky00@gmail.com>
- * @author Anael Mobilia <contrib@anael.eu>
- * @author Bruno Veilleux <bruno.vey@gmail.com>
- */
-$lang['menu'] = 'Gestion des extensions';
-$lang['download'] = 'Télécharger et installer une nouvelle extension';
-$lang['manage'] = 'Extensions installées';
-$lang['btn_info'] = 'Info';
-$lang['btn_update'] = 'Mettre à jour';
-$lang['btn_delete'] = 'Supprimer';
-$lang['btn_settings'] = 'Paramètres';
-$lang['btn_download'] = 'Télécharger';
-$lang['btn_enable'] = 'Enregistrer';
-$lang['url'] = 'URL';
-$lang['installed'] = 'Installé :';
-$lang['lastupdate'] = 'Dernière mise à jour :';
-$lang['source'] = 'Source :';
-$lang['unknown'] = 'inconnu';
-$lang['updating'] = 'Mise à jour…';
-$lang['updated'] = 'Extension %s mise à jour avec succès';
-$lang['updates'] = 'Les extensions suivantes ont été mises à jour avec succès';
-$lang['update_none'] = 'Aucune mise à jour n\'a été trouvée.';
-$lang['deleting'] = 'Suppression…';
-$lang['deleted'] = 'Extension %s supprimée.';
-$lang['downloading'] = 'Téléchargement…';
-$lang['downloaded'] = 'Extension %s installée avec succès';
-$lang['downloads'] = 'Les extensions suivantes ont été installées avec succès :';
-$lang['download_none'] = 'Aucune extension n\'a été trouvée, ou un problème inconnu est survenu durant le téléchargement et l\'installation.';
-$lang['plugin'] = 'Extension :';
-$lang['components'] = 'Composants';
-$lang['noinfo'] = 'Cette extension n\'a transmis aucune information, elle pourrait être invalide.';
-$lang['name'] = 'Nom :';
-$lang['date'] = 'Date :';
-$lang['type'] = 'Type :';
-$lang['desc'] = 'Description :';
-$lang['author'] = 'Auteur :';
-$lang['www'] = 'Site web :';
-$lang['error'] = 'Une erreur inconnue est survenue.';
-$lang['error_download'] = 'Impossible de télécharger le fichier de l\'extension : %s';
-$lang['error_badurl'] = 'URL suspecte : impossible de déterminer le nom du fichier à partir de l\'URL';
-$lang['error_dircreate'] = 'Impossible de créer le répertoire temporaire pour effectuer le téléchargement';
-$lang['error_decompress'] = 'Le gestionnaire d\'extensions a été incapable de décompresser le fichier téléchargé. Ceci peut être le résultat d\'un mauvais téléchargement, auquel cas vous devriez réessayer ; ou bien le format de compression est inconnu, auquel cas vous devez télécharger et installer l\'extension manuellement.';
-$lang['error_copy'] = 'Une erreur de copie est survenue lors de l\'installation des fichiers de l\'extension <em>%s</em> : le disque est peut-être plein ou les autorisations d\'accès sont incorrects. Il a pu en résulter une installation partielle de l\'extension et laisser votre installation du wiki instable.';
-$lang['error_delete'] = 'Une erreur est survenue lors de la suppression de l\'extension <em>%s</em>. La raison la plus probable est l\'insuffisance des autorisations sur les fichiers ou les répertoires.';
-$lang['enabled'] = 'Extension %s activée.';
-$lang['notenabled'] = 'L\'extension %s n\'a pas pu être activée, vérifiez les autorisations des fichiers.';
-$lang['disabled'] = 'Extension %s désactivée.';
-$lang['notdisabled'] = 'L\'extension %s n\'a pas pu être désactivée, vérifiez les autorisations des fichiers.';
-$lang['packageinstalled'] = 'Ensemble d\'extensions (%d extension(s): %s) installé avec succès.';
diff --git a/lib/plugins/plugin/lang/id/lang.php b/lib/plugins/plugin/lang/id/lang.php
deleted file mode 100644
index 2653b075e..000000000
--- a/lib/plugins/plugin/lang/id/lang.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Irwan Butar Butar <irwansah.putra@gmail.com>
- * @author Yustinus Waruwu <juswaruwu@gmail.com>
- */
-$lang['btn_info'] = 'Info';
-$lang['btn_update'] = 'Baharui';
-$lang['btn_delete'] = 'Hapus';
-$lang['btn_settings'] = 'Pengaturan';
-$lang['btn_download'] = 'Unduh';
-$lang['btn_enable'] = 'Simpan';
-$lang['url'] = 'URL';
-$lang['installed'] = 'Instal';
-$lang['lastupdate'] = 'Pembaharuan terakhir:';
-$lang['source'] = 'Sumber:';
-$lang['unknown'] = 'Tidak kenal';
-$lang['updating'] = 'Terbaharui ...';
-$lang['update_none'] = 'Tidak ditemukan pembaharuan';
-$lang['deleting'] = 'Terhapus ...';
-$lang['deleted'] = 'Hapus Plugin %s.';
-$lang['downloading'] = 'Unduh ...';
-$lang['plugin'] = 'Plugin:';
-$lang['components'] = 'Komponen';
-$lang['name'] = 'Nama:';
-$lang['date'] = 'Tanggal:';
-$lang['type'] = 'Tipe:';
-$lang['desc'] = 'Penjelasan:';
-$lang['author'] = 'Autor:';
-$lang['www'] = 'Web:';
diff --git a/lib/plugins/plugin/lang/pl/admin_plugin.txt b/lib/plugins/plugin/lang/pl/admin_plugin.txt
deleted file mode 100644
index f01048198..000000000
--- a/lib/plugins/plugin/lang/pl/admin_plugin.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-====== Menadżer wtyczek ======
-
-Na tej stronie możesz zarządzać wszystkim co jest związane z [[doku>plugins|wtyczkami]] Dokuwiki. Aby móc ściągnąć i zainstalować wtyczkę, serwer WWW musi mieć prawo do zapisu w katalogu ''plugins''.
-
-
diff --git a/lib/plugins/plugin/lang/pl/lang.php b/lib/plugins/plugin/lang/pl/lang.php
deleted file mode 100644
index eae91f33e..000000000
--- a/lib/plugins/plugin/lang/pl/lang.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Michał Tkacz <mehow@autocom.pl>
- * @author Grzegorz Żur <grzegorz.zur@gmail.com>
- * @author Mariusz Kujawski <marinespl@gmail.com>
- * @author Maciej Kurczewski <pipijajko@gmail.com>
- * @author Sławomir Boczek <slawkens@gmail.com>
- * @author sleshek@wp.pl
- * @author Leszek Stachowski <shazarre@gmail.com>
- * @author maros <dobrimaros@yahoo.pl>
- * @author Grzegorz Widła <dzesdzes@gmail.com>
- * @author Łukasz Chmaj <teachmeter@gmail.com>
- * @author Begina Felicysym <begina.felicysym@wp.eu>
- * @author Aoi Karasu <aoikarasu@gmail.com>
- */
-$lang['menu'] = 'Menadżer wtyczek';
-$lang['download'] = 'Ściągnij i zainstaluj nową wtyczkę';
-$lang['manage'] = 'Zainstalowane Wtyczki';
-$lang['btn_info'] = 'Informacje';
-$lang['btn_update'] = 'Aktualizuj';
-$lang['btn_delete'] = 'Usuń';
-$lang['btn_settings'] = 'Ustawienia';
-$lang['btn_download'] = 'Pobierz';
-$lang['btn_enable'] = 'Zapisz';
-$lang['url'] = 'Adres URL';
-$lang['installed'] = 'Instalacja:';
-$lang['lastupdate'] = 'Ostatnio zaktualizowana:';
-$lang['source'] = 'Źródło:';
-$lang['unknown'] = 'nieznane';
-$lang['updating'] = 'Aktualizuję...';
-$lang['updated'] = 'Aktualizacja wtyczki %s pomyślnie ściągnięta';
-$lang['updates'] = 'Aktualizacje następujących wtyczek zostały pomyślnie ściągnięte';
-$lang['update_none'] = 'Nie znaleziono aktualizacji.';
-$lang['deleting'] = 'Usuwam...';
-$lang['deleted'] = 'Wtyczka %s usunięta.';
-$lang['downloading'] = 'Pobieram...';
-$lang['downloaded'] = 'Wtyczka %s pomyślnie zainstalowana';
-$lang['downloads'] = 'Następujące wtyczki zostały pomyślnie zainstalowane:';
-$lang['download_none'] = 'Nie znaleziono wtyczek lub wystąpił nieznany problem podczas ściągania i instalacji.';
-$lang['plugin'] = 'Wtyczka:';
-$lang['components'] = 'Składniki';
-$lang['noinfo'] = 'Ta wtyczka nie zwróciła żadnych informacji, może być niepoprawna.';
-$lang['name'] = 'Nazwa:';
-$lang['date'] = 'Data:';
-$lang['type'] = 'Typ:';
-$lang['desc'] = 'Opis:';
-$lang['author'] = 'Autor:';
-$lang['www'] = 'WWW:';
-$lang['error'] = 'Wystąpił nieznany błąd.';
-$lang['error_download'] = 'Nie powiodło się ściągnięcie pliku wtyczki: %s';
-$lang['error_badurl'] = 'Prawdopodobnie zły url - nie da się ustalić nazwy pliku na podstawie urla';
-$lang['error_dircreate'] = 'Nie powiodło się stworzenie tymczasowego katalogu na pobrane pliki';
-$lang['error_decompress'] = 'Menadżer wtyczek nie był w stanie rozpakować ściągniętego pliku. Może to być spowodowane przez nieudany transfer (w takim przypadku powinieneś spróbować ponownie) lub nieznany format kompresji (w takim przypadku będziesz musiał ściągnąć i zainstalować wtyczkę ręcznie).';
-$lang['error_copy'] = 'Wystąpił błąd podczas kopiowania pliku w trakcie instalacji wtyczki %s: być może dysk jest pełny lub prawa dostępu są niepoprawne. Efektem może być częściowo zainstalowana wtyczka co może spowodować niestabilność Twojej instalacji wiki.';
-$lang['error_delete'] = 'Wystąpił błąd przy próbie usunięcia wtyczki <em>%s</em>. Prawdopodobną przyczyną są niewystarczające uprawnienia do katalogu.';
-$lang['enabled'] = 'Wtyczka %s włączona.';
-$lang['notenabled'] = 'Nie udało się uruchomić wtyczki %s, sprawdź uprawnienia dostępu do plików.';
-$lang['disabled'] = 'Wtyczka %s wyłączona.';
-$lang['notdisabled'] = 'Nie udało się wyłączyć wtyczki %s, sprawdź uprawnienia dostępu do plików.';
-$lang['packageinstalled'] = 'Pakiet wtyczek (%d wtyczki: %s) zainstalowany pomyślnie.';
diff --git a/lib/plugins/plugin/lang/sk/admin_plugin.txt b/lib/plugins/plugin/lang/sk/admin_plugin.txt
deleted file mode 100644
index ad3ae7f58..000000000
--- a/lib/plugins/plugin/lang/sk/admin_plugin.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-====== Správa pluginov ======
-
-Na tejto stránke je možné spravovať [[doku>plugins|pluginy]] Dokuwiki. Aby bolo možné sťahovať a inštalovať pluginy, musí mať webový server prístup pre zápis do adresára //plugin//.
-
diff --git a/lib/plugins/plugin/lang/sk/lang.php b/lib/plugins/plugin/lang/sk/lang.php
deleted file mode 100644
index 35c07cf80..000000000
--- a/lib/plugins/plugin/lang/sk/lang.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Ondrej Végh <ov@vsieti.sk>
- * @author Michal Mesko <michal.mesko@gmail.com>
- * @author exusik@gmail.com
- * @author Martin Michalek <michalek.dev@gmail.com>
- */
-$lang['menu'] = 'Správa pluginov';
-$lang['download'] = 'Stiahnuť a nainštalovať plugin';
-$lang['manage'] = 'Nainštalované pluginy';
-$lang['btn_info'] = 'info';
-$lang['btn_update'] = 'aktualizovať';
-$lang['btn_delete'] = 'zmazať';
-$lang['btn_settings'] = 'nastavenia';
-$lang['btn_download'] = 'Stiahnuť';
-$lang['btn_enable'] = 'Uložiť';
-$lang['url'] = 'URL';
-$lang['installed'] = 'Nainštalovaný:';
-$lang['lastupdate'] = 'Aktualizovaný:';
-$lang['source'] = 'Zdroj:';
-$lang['unknown'] = 'neznámy';
-$lang['updating'] = 'Aktualizuje sa ...';
-$lang['updated'] = 'Plugin %s bol úspešne aktualizovaný';
-$lang['updates'] = 'Nasledujúce pluginy bol úspešne aktualizované:';
-$lang['update_none'] = 'Neboli nájdené žiadne aktualizácie.';
-$lang['deleting'] = 'Vymazáva sa ...';
-$lang['deleted'] = 'Plugin %s bol zmazaný.';
-$lang['downloading'] = 'Sťahuje sa ...';
-$lang['downloaded'] = 'Plugin %s bol úspešne stiahnutý';
-$lang['downloads'] = 'Nasledujúce pluginy bol úspešne stiahnuté:';
-$lang['download_none'] = 'Neboli nájdené žiadne pluginy alebo nastal neznámy problém počas sťahovania a inštalácie pluginov.';
-$lang['plugin'] = 'Plugin:';
-$lang['components'] = 'Súčasti';
-$lang['noinfo'] = 'Tento plugin neobsahuje žiadne informácie, je možné, že je chybný.';
-$lang['name'] = 'názov:';
-$lang['date'] = 'Dátum:';
-$lang['type'] = 'Typ:';
-$lang['desc'] = 'Popis:';
-$lang['author'] = 'Autor:';
-$lang['www'] = 'Web:';
-$lang['error'] = 'Nastala neznáma chyba.';
-$lang['error_download'] = 'Nie je možné stiahnuť súbor pluginu: %s';
-$lang['error_badurl'] = 'Pravdepodobne zlá url adresa - nie je možné z nej určiť meno súboru';
-$lang['error_dircreate'] = 'Nie je možné vytvoriť dočasný adresár pre uloženie sťahovaného súboru';
-$lang['error_decompress'] = 'Správca pluginov nedokáže dekomprimovať stiahnutý súbor. Môže to byť dôsledok zlého stiahnutia, v tom prípade to skúste znovu, alebo môže ísť o neznámy formát súboru, v tom prípade musíte stiahnuť a nainštalovať plugin manuálne.';
-$lang['error_copy'] = 'Nastala chyba kopírovania súboru počas pokusu inštalovať súbory pluginu<em>%s</em>: disk môže byť plný alebo prístupové práva k súboru môžu byť nesprávne. Toto môže mať za následok čiastočne nainštalovanie pluginu a nestabilitu vašej DokuWiki.';
-$lang['error_delete'] = 'Nastala chyba počas pokusu o zmazanie pluginu <em>%s</em>. Najpravdepodobnejším dôvodom môžu byť nedostatočné prístupové práva pre súbor alebo adresár';
-$lang['enabled'] = 'Plugin %s aktivovaný.';
-$lang['notenabled'] = 'Plugin %s nemôže byť aktivovaný, skontrolujte prístupové práva.';
-$lang['disabled'] = 'Plugin %s deaktivovaný.';
-$lang['notdisabled'] = 'Plugin %s nemôže byť deaktivovaný, skontrolujte prístupové práva.';
-$lang['packageinstalled'] = 'Plugin package (%d plugin(s): %s) úspešne inštalovaný.';
diff --git a/lib/plugins/plugin/lang/sl/admin_plugin.txt b/lib/plugins/plugin/lang/sl/admin_plugin.txt
deleted file mode 100644
index 5fd02e1ba..000000000
--- a/lib/plugins/plugin/lang/sl/admin_plugin.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-====== Upravljanje vstavkov ======
-
-Na tej strani je mogoče spreminjati in prilagajati nastavitve DokuWiki [[doku>plugins|vstavkov]]. Za prejemanje in nameščanje vstavkov v ustrezne mape, morajo imeti te določena ustrezna dovoljenja za pisanje spletnega strežnika.
diff --git a/lib/plugins/plugin/lang/sl/lang.php b/lib/plugins/plugin/lang/sl/lang.php
deleted file mode 100644
index e205c57f5..000000000
--- a/lib/plugins/plugin/lang/sl/lang.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Dejan Levec <webphp@gmail.com>
- * @author Boštjan Seničar <senicar@gmail.com>
- * @author Gregor Skumavc (grega.skumavc@gmail.com)
- * @author Matej Urbančič (mateju@svn.gnome.org)
- */
-$lang['menu'] = 'Upravljanje vstavkov';
-$lang['download'] = 'Prejmi in namesti nov vstavek';
-$lang['manage'] = 'Nameščeni vstavki';
-$lang['btn_info'] = 'Podrobnosti';
-$lang['btn_update'] = 'Posodobi';
-$lang['btn_delete'] = 'Izbriši';
-$lang['btn_settings'] = 'Nastavitve';
-$lang['btn_download'] = 'Prejmi';
-$lang['btn_enable'] = 'Shrani';
-$lang['url'] = 'URL';
-$lang['installed'] = 'Nameščeno:';
-$lang['lastupdate'] = 'Nazadnje posodobljeno:';
-$lang['source'] = 'Vir:';
-$lang['unknown'] = 'neznano';
-$lang['updating'] = 'Posodabljanje ...';
-$lang['updated'] = 'Vstavek %s je uspešno posodobljen';
-$lang['updates'] = 'Navedeni vstavki so uspešno posodobljeni';
-$lang['update_none'] = 'Posodobitev ni mogoče najti.';
-$lang['deleting'] = 'Brisanje ...';
-$lang['deleted'] = 'Vstavek %s je izbrisan.';
-$lang['downloading'] = 'Prejemanje ...';
-$lang['downloaded'] = 'Vstavek %s je uspešno nameščen';
-$lang['downloads'] = 'Navedeni vstavki so uspešno nameščeni:';
-$lang['download_none'] = 'Vstavkov ni mogoče najti ali pa je prišlo do napake med prejemanjem in nameščanjem.';
-$lang['plugin'] = 'Vstavek:';
-$lang['components'] = 'Sestavni deli';
-$lang['noinfo'] = 'Vstavek nima vpisanih podrobnih podatkov, kar pomeni, da je morda neveljaven.';
-$lang['name'] = 'Ime:';
-$lang['date'] = 'Datum:';
-$lang['type'] = 'Vrsta:';
-$lang['desc'] = 'Opis:';
-$lang['author'] = 'Avtor:';
-$lang['www'] = 'Spletna stran:';
-$lang['error'] = 'Prišlo je do neznane napake.';
-$lang['error_download'] = 'Ni mogoče prejeti datoteke vstavka: %s';
-$lang['error_badurl'] = 'Napaka naslova URL - ni mogoče določiti imena datoteke iz naslova URL';
-$lang['error_dircreate'] = 'Ni mogoče ustvariti začasne mape za prejemanje';
-$lang['error_decompress'] = 'Z upravljalnikom vstavkov ni mogoče razširiti prejetega arhiva vstavka. Najverjetneje je prišlo do napake med prejemanjem datoteke ali pa zapis arhiva ni znan. Poskusite znova ali pa napako odpravite z ročnim nameščanjem vstavka.';
-$lang['error_copy'] = 'Prišlo je do napake med nameščanjem datotek vstavka <em>%s</em>: najverjetneje so težave s prostorom za namestitev ali pa ni ustreznih dovoljenj za nameščanje. Zaradi nepopolne namestitve lahko nastopijo težave v delovanju sistema Wiki.';
-$lang['error_delete'] = 'Prišlo je do napake med brisanjem vstavka <em>%s</em>: najverjetneje ni ustreznih dovoljenj za dostop do datoteke ali mape';
-$lang['enabled'] = 'Vstavek %s je omogočen.';
-$lang['notenabled'] = 'Vstavka %s ni mogoče omogočiti zaradi neustreznih dovoljen.';
-$lang['disabled'] = 'Vstavek %s je onemogočen.';
-$lang['notdisabled'] = 'Vstavka %s ni mogoče onemogočiti zaradi neustreznih dovoljen.';
-$lang['packageinstalled'] = 'Paket vstavka (%d vstavkov: %s) je uspešno nameščen.';
diff --git a/lib/plugins/plugin/lang/tr/admin_plugin.txt b/lib/plugins/plugin/lang/tr/admin_plugin.txt
deleted file mode 100644
index 956d701f6..000000000
--- a/lib/plugins/plugin/lang/tr/admin_plugin.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-====== Eklenti Yönetimi ======
-
-Bu sayfada DokuWiki [[doku>plugins|eklentileri]] ile ilgili herşeyi düzenleyebilirsiniz. Eklenti kurup indirmek için, eklenti dizininin yazılabilir olması gerekmektedir.
diff --git a/lib/plugins/plugin/lang/tr/lang.php b/lib/plugins/plugin/lang/tr/lang.php
deleted file mode 100644
index a4feea8cd..000000000
--- a/lib/plugins/plugin/lang/tr/lang.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Aydın Coşkuner <aydinweb@gmail.com>
- * @author Cihan Kahveci <kahvecicihan@gmail.com>
- * @author Yavuz Selim <yavuzselim@gmail.com>
- * @author Caleb Maclennan <caleb@alerque.com>
- * @author farukerdemoncel@gmail.com
- */
-$lang['menu'] = 'Eklenti Yönetimi';
-$lang['download'] = 'Yeni bir eklenti indirip kur';
-$lang['manage'] = 'Kurulmuş Eklentiler';
-$lang['btn_info'] = 'bilgi';
-$lang['btn_update'] = 'güncelle';
-$lang['btn_delete'] = 'sil';
-$lang['btn_settings'] = 'Ayarlar';
-$lang['btn_download'] = 'İndir';
-$lang['btn_enable'] = 'Kaydet';
-$lang['url'] = 'Web Adresi';
-$lang['installed'] = 'Kuruldu:';
-$lang['lastupdate'] = 'Son güncelleştirme:';
-$lang['source'] = 'Kaynak:';
-$lang['unknown'] = 'bilinmiyor';
-$lang['updating'] = 'Güncelleştiriyor ...';
-$lang['updated'] = '%s eklentisi başarıyla güncellendi';
-$lang['updates'] = 'Şu eklentiler başarıyla güncellendi';
-$lang['update_none'] = 'Yeni bir güncelleme bulunamadı.';
-$lang['deleting'] = 'Siliniyor ...';
-$lang['deleted'] = '%s eklentisi silindi.';
-$lang['downloading'] = 'İndiriyor ...';
-$lang['downloaded'] = '%s eklentisi başarıyla kuruldu';
-$lang['downloads'] = 'Şu eklentiler başarıyla kuruldu:';
-$lang['download_none'] = 'Eklenti bulunamadı veya indirirken/kurarken bilinmeyen bir hata oluştu.';
-$lang['plugin'] = 'Eklenti:';
-$lang['components'] = 'Parçalar';
-$lang['noinfo'] = 'Bu eklentinin bilgileri alınamadı, geçerli bir eklenti olmayabilir.';
-$lang['name'] = 'Ad:';
-$lang['date'] = 'Tarih:';
-$lang['type'] = 'Tür:';
-$lang['desc'] = 'Açıklama:';
-$lang['author'] = 'Yazar:';
-$lang['www'] = 'Web Adresi:';
-$lang['error'] = 'Bilinmeyen bir hata oluştu.';
-$lang['error_download'] = 'Şu eklenti indirilemedi: %s';
-$lang['error_badurl'] = 'Yanlış adres olabilir - verilen adresten dosya adı alınamadı';
-$lang['error_dircreate'] = 'İndirmek için geçici klasör oluşturulamadı';
-$lang['error_decompress'] = 'Eklenti yöneticisi indirilen sıkıştırılmış dosyayı açamadı. Bu yanlış indirmeden kaynaklanabilir (bu durumda tekrar denemelisiniz). Ya da indirilen dosyanın sıkıştırma biçimi bilinmemektedir (bu durumda eklentiyi indirerek kendiniz kurmalısınız).';
-$lang['error_copy'] = '<em>%s</em> eklentisi dosyalarını kurmaya çalışırken kopyalama hatası ortaya çıktı. Sürücü dolu olabilir veya yazma yetkisi bulunmuyor olabilir. Bunun sebebi tam kurulmamış bir eklentinin wiki kurulumunu bozması olabilir.';
-$lang['error_delete'] = '<em>%s</em> eklentisini silerken bir hata oluştu. Bu hata yetersiz dosya/klasör erişim yetkisinden kaynaklanabilir.';
-$lang['enabled'] = '%s eklentisi etkinleştirildi.';
-$lang['notenabled'] = '%s eklentisi etkinleştirilemedi, dosya yetkilerini kontrol edin.';
-$lang['disabled'] = '%s eklentisi devre dışı bırakıldı.';
-$lang['notdisabled'] = '%s eklentisi devre dışı bırakılamadı, dosya yetkilerini kontrol edin.';
diff --git a/lib/plugins/popularity/lang/lv/lang.php b/lib/plugins/popularity/lang/lv/lang.php
index f0c940b6f..a8ef37f7a 100644
--- a/lib/plugins/popularity/lang/lv/lang.php
+++ b/lib/plugins/popularity/lang/lv/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Latvian, Lettish language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Aivars Miška <allefm@gmail.com>
*/
$lang['name'] = 'Popularitātes atsauksmes (ielāde var aizņemt kādu laiku)';
diff --git a/lib/plugins/popularity/lang/ru/intro.txt b/lib/plugins/popularity/lang/ru/intro.txt
index 52f5a0ae2..dbf0cc688 100644
--- a/lib/plugins/popularity/lang/ru/intro.txt
+++ b/lib/plugins/popularity/lang/ru/intro.txt
@@ -1,10 +1,10 @@
====== Сбор информации о популярности ======
-Этот [[doku>popularity|инструмент]] собирает анонимные данные о вашей вики и позволяет вам отправить их разработчикам «ДокуВики». Эти данные помогут им понять, как именно используется «ДокуВики», и удостовериться, что принимаемые проектные решения соответствуют жизненным реалиям.
+Этот [[doku>popularity|инструмент]] собирает анонимные данные о вашей вики и позволяет вам отправить их разработчикам «Докувики». Эти данные помогут им понять, как именно используется «Докувики», и удостовериться, что принимаемые проектные решения соответствуют жизненным реалиям.
Отправляйте данные время от времени для того, чтобы сообщать разработчикам о том, что ваша вики «подросла». Отправленные вами данные будут идентифицированы по анонимному ID.
-Собранные данные содержат такую информацию, как: версия «ДокуВики», количество и размер ваших страниц и файлов, установленные плагины, информацию об установленном PHP.
+Собранные данные содержат такую информацию, как: версия «Докувики», количество и размер ваших страниц и файлов, установленные плагины, информацию об установленном PHP.
Данные, которые будут отосланы, представлены ниже. Пожалуйста, используйте кнопку «Отправить данные», чтобы передать информацию.
diff --git a/lib/plugins/popularity/lang/th/lang.php b/lib/plugins/popularity/lang/th/lang.php
index 3ae8a7890..f6a736a06 100644
--- a/lib/plugins/popularity/lang/th/lang.php
+++ b/lib/plugins/popularity/lang/th/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Thai language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Komgrit Niyomrath <n.komgrit@gmail.com>
* @author Kittithat Arnontavilas mrtomyum@gmail.com
* @author Kittithat Arnontavilas <mrtomyum@gmail.com>
diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php
index 423d67449..88d8cd93d 100644
--- a/lib/plugins/revert/admin.php
+++ b/lib/plugins/revert/admin.php
@@ -83,7 +83,8 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin {
// find the last non-spammy revision
$data = '';
- $old = getRevisions($id, 0, $this->max_revs);
+ $pagelog = new PageChangeLog($id);
+ $old = $pagelog->getRevisions(0, $this->max_revs);
if(count($old)){
foreach($old as $REV){
$data = rawWiki($id,$REV);
diff --git a/lib/plugins/revert/lang/cs/lang.php b/lib/plugins/revert/lang/cs/lang.php
index 69abaaade..e1b47bb8d 100644
--- a/lib/plugins/revert/lang/cs/lang.php
+++ b/lib/plugins/revert/lang/cs/lang.php
@@ -16,6 +16,7 @@
* @author Zbyněk Křivka <krivka@fit.vutbr.cz>
* @author Gerrit Uitslag <klapinklapin@gmail.com>
* @author Petr Klíma <qaxi@seznam.cz>
+ * @author Radovan Buroň <radovan@buron.cz>
*/
$lang['menu'] = 'Obnova zaspamovaných stránek';
$lang['filter'] = 'Hledat zaspamované stránky';
diff --git a/lib/plugins/revert/lang/et/lang.php b/lib/plugins/revert/lang/et/lang.php
new file mode 100644
index 000000000..be8fb26c1
--- /dev/null
+++ b/lib/plugins/revert/lang/et/lang.php
@@ -0,0 +1,9 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Janar Leas <janar.leas@eesti.ee>
+ */
+$lang['note1'] = 'Teadmiseks: See otsing arvestab suurtähti';
+$lang['note2'] = 'Teadmiseks: Lehekülg ennistatakse viimasele järgule, milles ei sisaldu antud rämpsu sõne <i>%s</i>.';
diff --git a/lib/plugins/revert/lang/lv/lang.php b/lib/plugins/revert/lang/lv/lang.php
index 012d6cc4c..b87369233 100644
--- a/lib/plugins/revert/lang/lv/lang.php
+++ b/lib/plugins/revert/lang/lv/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Latvian, Lettish language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Aivars Miška <allefm@gmail.com>
*/
$lang['menu'] = 'Piemēsloto lapu atjaunotājs';
diff --git a/lib/plugins/revert/lang/nl/intro.txt b/lib/plugins/revert/lang/nl/intro.txt
index db8f5a06c..efa325839 100644
--- a/lib/plugins/revert/lang/nl/intro.txt
+++ b/lib/plugins/revert/lang/nl/intro.txt
@@ -1,3 +1,3 @@
-===== Herstelmanager =====
+===== Herstel =====
Deze pagina helpt u bij het herstellen van pagina's na een spam-aanval. Vul een zoekterm in (bijvoorbeeld een spam url) om een lijst te krijgen van bekladde pagina's, bevestig dat de pagina's inderdaad spam bevatten en herstel de wijzigingen.
diff --git a/lib/plugins/revert/lang/nl/lang.php b/lib/plugins/revert/lang/nl/lang.php
index ee8678e63..d04b96869 100644
--- a/lib/plugins/revert/lang/nl/lang.php
+++ b/lib/plugins/revert/lang/nl/lang.php
@@ -16,8 +16,9 @@
* @author Ricardo Guijt <ricardoguijt@gmail.com>
* @author Gerrit <klapinklapin@gmail.com>
* @author Remon <no@email.local>
+ * @author Rene <wllywlnt@yahoo.com>
*/
-$lang['menu'] = 'Herstelmanager';
+$lang['menu'] = 'Herstel';
$lang['filter'] = 'Zoek naar bekladde pagina\'s';
$lang['revert'] = 'Herstel geselecteerde pagina\'s';
$lang['reverted'] = '%s hersteld naar revisie %s';
diff --git a/lib/plugins/revert/lang/no/lang.php b/lib/plugins/revert/lang/no/lang.php
index c58300dc0..6806dcd93 100644
--- a/lib/plugins/revert/lang/no/lang.php
+++ b/lib/plugins/revert/lang/no/lang.php
@@ -18,6 +18,7 @@
* @author Egil Hansen <egil@rosetta.no>
* @author Thomas Juberg <Thomas.Juberg@Gmail.com>
* @author Boris <boris@newton-media.no>
+ * @author Christopher Schive <chschive@frisurf.no>
*/
$lang['menu'] = 'Tilbakestillingsbehandler';
$lang['filter'] = 'Søk etter søppelmeldinger';
diff --git a/lib/plugins/revert/lang/sv/lang.php b/lib/plugins/revert/lang/sv/lang.php
index e605a17d4..504332bae 100644
--- a/lib/plugins/revert/lang/sv/lang.php
+++ b/lib/plugins/revert/lang/sv/lang.php
@@ -19,6 +19,7 @@
* @author Henrik <henrik@idealis.se>
* @author Tor Härnqvist <tor.harnqvist@gmail.com>
* @author Hans Iwan Bratt <hibratt@gmail.com>
+ * @author Mikael Bergström <krank23@gmail.com>
*/
$lang['menu'] = 'Hantera återställningar';
$lang['filter'] = 'Sök efter spamsidor';
diff --git a/lib/plugins/revert/lang/th/lang.php b/lib/plugins/revert/lang/th/lang.php
index 86e4f9ca4..7b6217b7c 100644
--- a/lib/plugins/revert/lang/th/lang.php
+++ b/lib/plugins/revert/lang/th/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Thai language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Komgrit Niyomrath <n.komgrit@gmail.com>
* @author Kittithat Arnontavilas mrtomyum@gmail.com
* @author Arthit Suriyawongkul <arthit@gmail.com>
diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php
index 7ab9c30e1..4a301f927 100644
--- a/lib/plugins/syntax.php
+++ b/lib/plugins/syntax.php
@@ -20,9 +20,12 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin {
* Syntax Type
*
* Needs to return one of the mode types defined in $PARSER_MODES in parser.php
+ *
+ * @return string
*/
function getType(){
trigger_error('getType() not implemented in '.get_class($this), E_USER_WARNING);
+ return '';
}
/**
@@ -31,6 +34,8 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin {
* Defines the mode types for other dokuwiki markup that maybe nested within the
* plugin's own markup. Needs to return an array of one or more of the mode types
* defined in $PARSER_MODES in parser.php
+ *
+ * @return array
*/
function getAllowedTypes() {
return array();
@@ -47,6 +52,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin {
* 'stack' - Special case. Plugin wraps other paragraphs.
*
* @see Doku_Handler_Block
+ * @return string
*/
function getPType(){
return 'normal';
@@ -63,10 +69,10 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin {
* @param string $match The text matched by the patterns
* @param int $state The lexer state for the match
* @param int $pos The character position of the matched text
- * @param Doku_Handler $handler Reference to the Doku_Handler object
+ * @param Doku_Handler $handler The Doku_Handler object
* @return array Return an array with all data you want to use in render
*/
- function handle($match, $state, $pos, Doku_Handler &$handler){
+ function handle($match, $state, $pos, Doku_Handler $handler){
trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING);
}
@@ -89,17 +95,20 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin {
* created
*
* @param $format string output format being rendered
- * @param $renderer Doku_Renderer reference to the current renderer object
+ * @param $renderer Doku_Renderer the current renderer object
* @param $data array data created by handler()
* @return boolean rendered correctly?
*/
- function render($format, Doku_Renderer &$renderer, $data) {
+ function render($format, Doku_Renderer $renderer, $data) {
trigger_error('render() not implemented in '.get_class($this), E_USER_WARNING);
}
/**
- * There should be no need to override these functions
+ * There should be no need to override this function
+ *
+ * @param string $mode
+ * @return bool
*/
function accepts($mode) {
diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php
index 156037f09..b67d91b36 100644
--- a/lib/plugins/usermanager/admin.php
+++ b/lib/plugins/usermanager/admin.php
@@ -53,7 +53,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
}
// attempt to retrieve any import failures from the session
- if ($_SESSION['import_failures']){
+ if (!empty($_SESSION['import_failures'])){
$this->_import_failures = $_SESSION['import_failures'];
}
}
@@ -277,6 +277,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
protected function _htmlUserForm($cmd,$user='',$userdata=array(),$indent=0) {
global $conf;
global $ID;
+ global $lang;
$name = $mail = $groups = '';
$notes = array();
@@ -299,6 +300,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$this->_htmlInputField($cmd."_userid", "userid", $this->lang["user_id"], $user, $this->_auth->canDo("modLogin"), $indent+6);
$this->_htmlInputField($cmd."_userpass", "userpass", $this->lang["user_pass"], "", $this->_auth->canDo("modPass"), $indent+6);
+ $this->_htmlInputField($cmd."_userpass2", "userpass2", $lang["passchk"], "", $this->_auth->canDo("modPass"), $indent+6);
$this->_htmlInputField($cmd."_username", "username", $this->lang["user_name"], $name, $this->_auth->canDo("modName"), $indent+6);
$this->_htmlInputField($cmd."_usermail", "usermail", $this->lang["user_mail"], $mail, $this->_auth->canDo("modMail"), $indent+6);
$this->_htmlInputField($cmd."_usergroups","usergroups",$this->lang["user_groups"],$groups,$this->_auth->canDo("modGroups"),$indent+6);
@@ -358,7 +360,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$class = $cando ? '' : ' class="disabled"';
echo str_pad('',$indent);
- if($name == 'userpass'){
+ if($name == 'userpass' || $name == 'userpass2'){
$fieldtype = 'password';
$autocomp = 'autocomplete="off"';
}elseif($name == 'usermail'){
@@ -475,7 +477,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
if (!checkSecurityToken()) return false;
if (!$this->_auth->canDo('addUser')) return false;
- list($user,$pass,$name,$mail,$grps) = $this->_retrieveUser();
+ list($user,$pass,$name,$mail,$grps,$passconfirm) = $this->_retrieveUser();
if (empty($user)) return false;
if ($this->_auth->canDo('modPass')){
@@ -486,6 +488,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
msg($this->lang['add_fail'], -1);
return false;
}
+ } else {
+ if (!$this->_verifyPassword($pass,$passconfirm)) {
+ return false;
+ }
}
} else {
if (!empty($pass)){
@@ -606,7 +612,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$oldinfo = $this->_auth->getUserData($olduser);
// get new user data subject to change
- list($newuser,$newpass,$newname,$newmail,$newgrps) = $this->_retrieveUser();
+ list($newuser,$newpass,$newname,$newmail,$newgrps,$passconfirm) = $this->_retrieveUser();
if (empty($newuser)) return false;
$changes = array();
@@ -625,27 +631,37 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$changes['user'] = $newuser;
}
}
-
- // generate password if left empty and notification is on
- if($INPUT->has('usernotify') && empty($newpass)){
- $newpass = auth_pwgen($olduser);
+ if ($this->_auth->canDo('modPass')) {
+ if ($newpass || $passconfirm) {
+ if ($this->_verifyPassword($newpass,$passconfirm)) {
+ $changes['pass'] = $newpass;
+ } else {
+ return false;
+ }
+ } else {
+ // no new password supplied, check if we need to generate one (or it stays unchanged)
+ if ($INPUT->has('usernotify')) {
+ $changes['pass'] = auth_pwgen($olduser);
+ }
+ }
}
- if (!empty($newpass) && $this->_auth->canDo('modPass'))
- $changes['pass'] = $newpass;
- if (!empty($newname) && $this->_auth->canDo('modName') && $newname != $oldinfo['name'])
- $changes['name'] = $newname;
- if (!empty($newmail) && $this->_auth->canDo('modMail') && $newmail != $oldinfo['mail'])
- $changes['mail'] = $newmail;
- if (!empty($newgrps) && $this->_auth->canDo('modGroups') && $newgrps != $oldinfo['grps'])
- $changes['grps'] = $newgrps;
+ if (!empty($newname) && $this->_auth->canDo('modName') && $newname != $oldinfo['name']) {
+ $changes['name'] = $newname;
+ }
+ if (!empty($newmail) && $this->_auth->canDo('modMail') && $newmail != $oldinfo['mail']) {
+ $changes['mail'] = $newmail;
+ }
+ if (!empty($newgrps) && $this->_auth->canDo('modGroups') && $newgrps != $oldinfo['grps']) {
+ $changes['grps'] = $newgrps;
+ }
if ($ok = $this->_auth->triggerUserMod('modify', array($olduser, $changes))) {
msg($this->lang['update_ok'],1);
- if ($INPUT->has('usernotify') && $newpass) {
+ if ($INPUT->has('usernotify') && !empty($changes['pass'])) {
$notify = empty($changes['user']) ? $olduser : $newuser;
- $this->_notifyUser($notify,$newpass);
+ $this->_notifyUser($notify,$changes['pass']);
}
// invalidate all sessions
@@ -686,6 +702,32 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
}
/**
+ * Verify password meets minimum requirements
+ * :TODO: extend to support password strength
+ *
+ * @param string $password candidate string for new password
+ * @param string $confirm repeated password for confirmation
+ * @return bool true if meets requirements, false otherwise
+ */
+ protected function _verifyPassword($password, $confirm) {
+ global $lang;
+
+ if (empty($password) && empty($confirm)) {
+ return false;
+ }
+
+ if ($password !== $confirm) {
+ msg($lang['regbadpass'], -1);
+ return false;
+ }
+
+ // :TODO: test password for required strength
+
+ // if we make it this far the password is good
+ return true;
+ }
+
+ /**
* Retrieve & clean user data from the form
*
* @param bool $clean whether the cleanUser method of the authentication backend is applied
@@ -701,6 +743,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$user[2] = $INPUT->str('username');
$user[3] = $INPUT->str('usermail');
$user[4] = explode(',',$INPUT->str('usergroups'));
+ $user[5] = $INPUT->str('userpass2'); // repeated password for confirmation
$user[4] = array_map('trim',$user[4]);
if($clean) $user[4] = array_map(array($auth,'cleanGroup'),$user[4]);
diff --git a/lib/plugins/usermanager/lang/bg/lang.php b/lib/plugins/usermanager/lang/bg/lang.php
index 9700385f8..aadf76512 100644
--- a/lib/plugins/usermanager/lang/bg/lang.php
+++ b/lib/plugins/usermanager/lang/bg/lang.php
@@ -41,10 +41,10 @@ $lang['next'] = 'напред';
$lang['last'] = 'край';
$lang['edit_usermissing'] = 'Избраният потребител не е намерен, въведеното потребителско име може да е изтрито или променено другаде.';
$lang['user_notify'] = 'Уведомяване на потребителя';
-$lang['note_notify'] = 'Ел. писмо се изпраща само ако бъде променена паролата на потребителя.';
+$lang['note_notify'] = 'Имейл се изпраща само ако бъде променена паролата на потребителя.';
$lang['note_group'] = 'Новите потребители биват добавяни към стандартната групата (%s) ако не е посочена друга.';
$lang['note_pass'] = 'Паролата ще бъде генерирана автоматично, ако оставите полето празно и функцията за уведомяване на потребителя е включена.';
$lang['add_ok'] = 'Добавянето на потребителя е успешно';
$lang['add_fail'] = 'Добавянето на потребителя се провали';
-$lang['notify_ok'] = 'Изпратено е осведомително ел. писмо';
-$lang['notify_fail'] = 'Изпращането на осведомително ел. писмо не е възможно';
+$lang['notify_ok'] = 'Изпратено е осведомителен имейл';
+$lang['notify_fail'] = 'Изпращането на осведомителен имейл не е възможно';
diff --git a/lib/plugins/usermanager/lang/cs/import.txt b/lib/plugins/usermanager/lang/cs/import.txt
index c264ae185..d665838f4 100644
--- a/lib/plugins/usermanager/lang/cs/import.txt
+++ b/lib/plugins/usermanager/lang/cs/import.txt
@@ -2,7 +2,7 @@
Vyžaduje CSV soubor s uživateli obsahující alespoň 4 sloupce.
Sloupce obsahují (v daném pořadí): user-id, celé jméno, emailovou adresu, seznam skupin.
-Položky CSV musí být odděleny čárkou (,) a řetězce umístěny v uvozovkách (""). Zpětné lomítko (\) lze použít pro escapování.
+Položky CSV musí být odděleny čárkou (,) a řetězce umístěny v uvozovkách (%%""%%). Zpětné lomítko (\) lze použít pro escapování.
Pro získání příkladu takového souboru využijte funkci "Exportovat uživatele" výše.
Záznamy s duplicitním user-id budou ignorovány.
diff --git a/lib/plugins/usermanager/lang/de-informal/import.txt b/lib/plugins/usermanager/lang/de-informal/import.txt
index 6fd6b8d8c..bc8887193 100644
--- a/lib/plugins/usermanager/lang/de-informal/import.txt
+++ b/lib/plugins/usermanager/lang/de-informal/import.txt
@@ -1,7 +1,7 @@
===== Massenimport von Benutzern =====
Dieser Import benötigt eine CSV-Datei mit mindestens vier Spalten. Diese Spalten müssen die folgenden Daten (in dieser Reihenfolge) enthalten: Benutzername, Name, E-Mailadresse und Gruppenzugehörigkeit.
-Die CSV-Felder müssen durch ein Komma (,) getrennt sein. Die Zeichenfolgen müssen von Anführungszeichen ("") umgeben sein. Ein Backslash (\) kann zum Maskieren benutzt werden.
+Die CSV-Felder müssen durch ein Komma (,) getrennt sein. Die Zeichenfolgen müssen von Anführungszeichen (%%""%%) umgeben sein. Ein Backslash (\) kann zum Maskieren benutzt werden.
Für eine Beispieldatei kannst Du die "Benutzer exportieren"-Funktion oben benutzen. Doppelte Benutzername werden ignoriert.
Ein Passwort wird generiert und den einzelnen, erfolgreich importierten Benutzern zugemailt. \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/de/import.txt b/lib/plugins/usermanager/lang/de/import.txt
index bf0d2922e..7faca3b9a 100644
--- a/lib/plugins/usermanager/lang/de/import.txt
+++ b/lib/plugins/usermanager/lang/de/import.txt
@@ -1,7 +1,7 @@
===== Benutzer-Massenimport =====
Um mehrere Benutzer gleichzeitig zu importieren, wird eine CSV-Datei mit den folgenden vier Spalten benötigt (In dieser Reihenfolge): Benutzer-ID, Voller Name, E-Mail-Adresse und Gruppen.
-Die CSV-Felder sind Kommata-separiert (,) und mit Anführungszeichen eingefasst ("). Mit Backslashes (\) können Sonderzeichen maskiert werden.
+Die CSV-Felder sind Kommata-separiert (,) und mit Anführungszeichen eingefasst (%%"%%). Mit Backslashes (\) können Sonderzeichen maskiert werden.
Ein Beispiel für eine gültige Datei kann mit der Benutzer-Export-Funktion oben generiert werden.
Doppelte Benutzer-IDs werden ignoriert.
diff --git a/lib/plugins/usermanager/lang/en/import.txt b/lib/plugins/usermanager/lang/en/import.txt
index 2087083e0..360a0689b 100644
--- a/lib/plugins/usermanager/lang/en/import.txt
+++ b/lib/plugins/usermanager/lang/en/import.txt
@@ -2,7 +2,7 @@
Requires a CSV file of users with at least four columns.
The columns must contain, in order: user-id, full name, email address and groups.
-The CSV fields should be separated by commas (,) and strings delimited by quotation marks (""). Backslash (\) can be used for escaping.
+The CSV fields should be separated by commas (,) and strings delimited by quotation marks (%%""%%). Backslash (\) can be used for escaping.
For an example of a suitable file, try the "Export Users" function above.
Duplicate user-ids will be ignored.
diff --git a/lib/plugins/usermanager/lang/en/lang.php b/lib/plugins/usermanager/lang/en/lang.php
index f87c77afb..b55ecc998 100644
--- a/lib/plugins/usermanager/lang/en/lang.php
+++ b/lib/plugins/usermanager/lang/en/lang.php
@@ -76,4 +76,3 @@ $lang['import_error_create'] = 'Unable to create the user';
$lang['import_notify_fail'] = 'Notification message could not be sent for imported user, %s with email %s.';
$lang['import_downloadfailures'] = 'Download Failures as CSV for correction';
-
diff --git a/lib/plugins/usermanager/lang/eo/import.txt b/lib/plugins/usermanager/lang/eo/import.txt
index 61c2c74de..09fbe6911 100644
--- a/lib/plugins/usermanager/lang/eo/import.txt
+++ b/lib/plugins/usermanager/lang/eo/import.txt
@@ -2,7 +2,7 @@
Tio ĉi postulas CSV-dosiero de uzantoj kun minimume kvar kolumnoj.
La kolumnoj devas enhavi, laŭorde: uzant-id, kompleta nomo, retadreso kaj grupoj.
-La CSV-kampoj devos esti apartitaj per komoj (,) kaj ĉenoj devas esti limigitaj per citiloj (""). Retroklino (\) povas esti uzata por eskapo.
+La CSV-kampoj devos esti apartitaj per komoj (,) kaj ĉenoj devas esti limigitaj per citiloj (%%""%%). Retroklino (\) povas esti uzata por eskapo.
Por ekzemplo de taŭga dosiero, provu la funkcion "Eksporti uzantojn" supre.
Duobligitaj uzant-id estos preteratentataj.
diff --git a/lib/plugins/usermanager/lang/es/lang.php b/lib/plugins/usermanager/lang/es/lang.php
index 26e4200e4..a557eacdd 100644
--- a/lib/plugins/usermanager/lang/es/lang.php
+++ b/lib/plugins/usermanager/lang/es/lang.php
@@ -24,6 +24,9 @@
* @author Ruben Figols <ruben.figols@gmail.com>
* @author Gerardo Zamudio <gerardo@gerardozamudio.net>
* @author Mercè López mercelz@gmail.com
+ * @author Antonio Bueno <atnbueno@gmail.com>
+ * @author Antonio Castilla <antoniocastilla@trazoide.com>
+ * @author Jonathan Hernández <me@jhalicea.com>
*/
$lang['menu'] = 'Administración de usuarios';
$lang['noauth'] = '(la autenticación de usuarios no está disponible)';
@@ -46,6 +49,11 @@ $lang['search'] = 'Buscar';
$lang['search_prompt'] = 'Realizar la búsqueda';
$lang['clear'] = 'Limpiar los filtros de la búsqueda';
$lang['filter'] = 'Filtrar';
+$lang['export_all'] = 'Exportar Todos los Usuarios (CSV)';
+$lang['export_filtered'] = 'Exportar Lista de Usuarios Filtrada (CSV)';
+$lang['import'] = 'Importar Nuevos Usuarios';
+$lang['line'] = 'Línea nº';
+$lang['error'] = 'Mensaje de error';
$lang['summary'] = 'Mostrando los usuarios %1$d-%2$d de %3$d encontrados. Cantidad total de usuarios %4$d.';
$lang['nonefound'] = 'No se encontraron usuarios que coincidan con los párametros de la búsqueda. Cantidad total de usuarios %d.';
$lang['delete_ok'] = '%d usuarios eliminados';
@@ -66,3 +74,10 @@ $lang['add_ok'] = 'El usuario fue creado exitosamente';
$lang['add_fail'] = 'Falló la creación del usuario';
$lang['notify_ok'] = 'Se envió la notificación por correo electrónico';
$lang['notify_fail'] = 'No se pudo enviar la notificación por correo electrónico';
+$lang['import_userlistcsv'] = 'Lista de usuarios (CSV): ';
+$lang['import_error_badmail'] = 'Dirección de correo electrónico incorrecta';
+$lang['import_error_upload'] = 'Error al importar. El archivo csv no se pudo cargar o está vacío.';
+$lang['import_error_readfail'] = 'Error al importar. No se puede leer el archivo subido.';
+$lang['import_error_create'] = 'No se puede crear el usuario';
+$lang['import_notify_fail'] = 'Mensaje de notificación no se ha podido enviar por el usuario importado,%s con el email %s.';
+$lang['import_downloadfailures'] = 'Descarga errores en archivo CSV para la corrección';
diff --git a/lib/plugins/usermanager/lang/et/lang.php b/lib/plugins/usermanager/lang/et/lang.php
index 2161df918..deb1e0be1 100644
--- a/lib/plugins/usermanager/lang/et/lang.php
+++ b/lib/plugins/usermanager/lang/et/lang.php
@@ -1,16 +1,18 @@
<?php
+
/**
- * Estonian language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author kristian.kankainen@kuu.la
* @author Rivo Zängov <eraser@eraser.ee>
+ * @author Janar Leas <janar.leas@eesti.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['user_groups'] = 'Rühmad';
$lang['field'] = 'Väli';
$lang['value'] = 'Väärtus';
$lang['add'] = 'Lisa';
@@ -28,3 +30,4 @@ $lang['prev'] = 'eelmine';
$lang['next'] = 'järgmine';
$lang['last'] = 'viimased';
$lang['user_notify'] = 'Teavita kasutajat';
+$lang['note_group'] = 'Kui rühma pole määratletud, siis lisatakse uued kasutajad vaikimisi rühma (%s).';
diff --git a/lib/plugins/usermanager/lang/fr/import.txt b/lib/plugins/usermanager/lang/fr/import.txt
index 191bb8370..a1eb8f858 100644
--- a/lib/plugins/usermanager/lang/fr/import.txt
+++ b/lib/plugins/usermanager/lang/fr/import.txt
@@ -3,7 +3,7 @@
Requière un fichier [[wpfr>CSV]] d'utilisateurs avec un minimum de quatre colonnes.
Les colonnes doivent comporter, dans l'ordre : identifiant, nom complet, adresse de courriel et groupes.
-Les champs doivent être séparés par une virgule (,), les chaînes sont délimitées par des guillemets (""). On peut utiliser la balance inverse (\) comme caractère d'échappement.
+Les champs doivent être séparés par une virgule (,), les chaînes sont délimitées par des guillemets (%%""%%). On peut utiliser la balance inverse (\) comme caractère d'échappement.
Pour obtenir un exemple de fichier acceptable, essayer la fonction "Exporter les utilisateurs" ci dessus.
Les identifiants dupliqués seront ignorés.
diff --git a/lib/plugins/usermanager/lang/hu/import.txt b/lib/plugins/usermanager/lang/hu/import.txt
index f204f6a1e..a2db03300 100644
--- a/lib/plugins/usermanager/lang/hu/import.txt
+++ b/lib/plugins/usermanager/lang/hu/import.txt
@@ -2,8 +2,8 @@
Szükséges egy legalább 4 oszlopot tartalmazó, felhasználókat tartalmazó fájl.
Az oszlopok kötelező tartalma, sorrendben: felhasználói azonosító, teljes név, e-mailcím és csoport.
-A CSV-mezőket vesszővel (,) kell elválasztani, a szövegeket idézőjelek ("") közé kell tenni. A fordított törtvonal (\) használható feloldójelnek.
-Megfelelő mintafájl megtekintéséhez próbáld ki a "Felhasználók exportálása" funkciót fentebb.
+A CSV-mezőket vesszővel (,) kell elválasztani, a szövegeket idézőjelek (%%""%%) közé kell tenni. A fordított törtvonal (\) használható feloldójelnek.
+Megfelelő mintafájl megtekintéséhez próbáld ki a "Felhasználók exportálása" funkciót fentebb.
A duplán szereplő felhasználói azonosítók kihagyásra kerülnek.
Minden sikeresen importált felhasználó számára jelszó készül, amelyet e-mailben kézhez kap. \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/it/lang.php b/lib/plugins/usermanager/lang/it/lang.php
index 6c6789442..af19e293e 100644
--- a/lib/plugins/usermanager/lang/it/lang.php
+++ b/lib/plugins/usermanager/lang/it/lang.php
@@ -16,6 +16,7 @@
* @author Matteo Pasotti <matteo@xquiet.eu>
* @author snarchio@gmail.com
* @author Claudio Lanconelli <lancos@libero.it>
+ * @author Francesco <francesco.cavalli@hotmail.com>
*/
$lang['menu'] = 'Gestione Utenti';
$lang['noauth'] = '(autenticazione non disponibile)';
@@ -40,6 +41,9 @@ $lang['clear'] = 'Azzera filtro di ricerca';
$lang['filter'] = 'Filtro';
$lang['export_all'] = 'Esporta tutti gli utenti (CSV)';
$lang['export_filtered'] = 'Esporta elenco utenti filtrati (CSV)';
+$lang['import'] = 'Importa nuovi utenti';
+$lang['line'] = 'Linea numero';
+$lang['error'] = 'Messaggio di errore';
$lang['summary'] = 'Visualizzazione utenti %1$d-%2$d di %3$d trovati. %4$d utenti totali.';
$lang['nonefound'] = 'Nessun utente trovato. %d utenti totali.';
$lang['delete_ok'] = '%d utenti eliminati';
@@ -60,3 +64,7 @@ $lang['add_ok'] = 'Utente aggiunto correttamente';
$lang['add_fail'] = 'Aggiunta utente fallita';
$lang['notify_ok'] = 'Email di notifica inviata';
$lang['notify_fail'] = 'L\'email di notifica non può essere inviata';
+$lang['import_error_badname'] = 'Nome errato';
+$lang['import_error_badmail'] = 'Indirizzo email errato';
+$lang['import_error_readfail'] = 'Importazione in errore. Impossibile leggere i file caricati.';
+$lang['import_error_create'] = 'Impossibile creare l\'utente';
diff --git a/lib/plugins/usermanager/lang/ja/import.txt b/lib/plugins/usermanager/lang/ja/import.txt
index 751e515ac..6af87c263 100644
--- a/lib/plugins/usermanager/lang/ja/import.txt
+++ b/lib/plugins/usermanager/lang/ja/import.txt
@@ -2,7 +2,7 @@
少なくとも4列のユーザーCSVファイルが必要です。
列の順序:ユーザーID、氏名、電子メールアドレス、グループ。
-CSVフィールドはカンマ(,)区切り、文字列は引用符("")区切りです。
+CSVフィールドはカンマ(,)区切り、文字列は引用符(%%""%%)区切りです。
エスケープにバックスラッシュ(\)を使用できます。
適切なファイル例は、上記の"エクスポートユーザー"機能で試して下さい。
重複するユーザーIDは無視されます。
diff --git a/lib/plugins/usermanager/lang/ko/edit.txt b/lib/plugins/usermanager/lang/ko/edit.txt
index a938c5b2e..0b35cd7d5 100644
--- a/lib/plugins/usermanager/lang/ko/edit.txt
+++ b/lib/plugins/usermanager/lang/ko/edit.txt
@@ -1 +1 @@
-===== 사용자 정보 편집 ===== \ No newline at end of file
+===== 사용자 편집 ===== \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/ko/import.txt b/lib/plugins/usermanager/lang/ko/import.txt
index 44fe392d0..6d077dfb8 100644
--- a/lib/plugins/usermanager/lang/ko/import.txt
+++ b/lib/plugins/usermanager/lang/ko/import.txt
@@ -2,7 +2,7 @@
적어도 열 네 개가 있는 사용자의 CSV 파일이 필요합니다.
열은 다음과 같이 포함해야 합니다: 사용자 id, 실명, 이메일 주소와 그룹.
-CSV 필드는 인용 부호("")로 쉼표(,)와 구분된 문자열로 구분해야 합니다. 백슬래시(\)는 탈출에 사용할 수 있습니다.
+CSV 필드는 인용 부호(%%""%%)로 쉼표(,)와 구분된 문자열로 구분해야 합니다. 백슬래시(\)는 탈출에 사용할 수 있습니다.
적절한 파일의 예를 들어, 위의 "사용자 목록 내보내기"를 시도하세요.
중복된 사용자 id는 무시됩니다.
diff --git a/lib/plugins/usermanager/lang/ko/intro.txt b/lib/plugins/usermanager/lang/ko/intro.txt
index d75680c71..2ce85f1a2 100644
--- a/lib/plugins/usermanager/lang/ko/intro.txt
+++ b/lib/plugins/usermanager/lang/ko/intro.txt
@@ -1 +1 @@
-====== 사용자 관리 ====== \ No newline at end of file
+====== 사용자 관리자 ====== \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php
index ac129c95e..70e3d94f0 100644
--- a/lib/plugins/usermanager/lang/ko/lang.php
+++ b/lib/plugins/usermanager/lang/ko/lang.php
@@ -44,7 +44,7 @@ $lang['delete_ok'] = '사용자 %d명이 삭제되었습니다';
$lang['delete_fail'] = '사용자 %d명을 삭제하는 데 실패했습니다.';
$lang['update_ok'] = '사용자 정보를 성공적으로 바꾸었습니다';
$lang['update_fail'] = '사용자 정보를 바꾸는 데 실패했습니다';
-$lang['update_exists'] = '사용자 이름을 바꾸는 데 실패했습니다. 사용자 이름(%s)이 이미 존재합니다. (다른 항목의 바뀜은 적용됩니다.)';
+$lang['update_exists'] = '사용자 이름을 바꾸는 데 실패했습니다. 사용자 이름(%s)이 이미 존재합니다. (다른 항목의 바뀜은 적용됩니다)';
$lang['start'] = '시작';
$lang['prev'] = '이전';
$lang['next'] = '다음';
diff --git a/lib/plugins/usermanager/lang/lv/import.txt b/lib/plugins/usermanager/lang/lv/import.txt
new file mode 100644
index 000000000..0006ae850
--- /dev/null
+++ b/lib/plugins/usermanager/lang/lv/import.txt
@@ -0,0 +1,9 @@
+===== Masveida lietotāju imports =====
+
+Vajag CSV failu ar vismaz četrām lietotāju datu kolonām šādā secībā: identifikators, pilns vārds, e-pasta adrese un grupas.
+
+CSV lauki jāatdala ar komatiem (,) un virknes — ar pēdiņām (%%""%%). Backslash (\) can be used for escaping.
+Derīga faila paraugam izmantojiem augtāk redzamo "Lietotāju eksportu".
+Dublētus identifikatorus ignorēs.
+
+Paroli katram veiksmīgi importētajam lietotājam izveidos un nosūtīs pa e-pastu. \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/lv/lang.php b/lib/plugins/usermanager/lang/lv/lang.php
index 620678ff5..4944da31e 100644
--- a/lib/plugins/usermanager/lang/lv/lang.php
+++ b/lib/plugins/usermanager/lang/lv/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Latvian language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Aivars Miška <allefm@gmail.lv>
* @author Aivars Miška <allefm@gmail.com>
*/
diff --git a/lib/plugins/usermanager/lang/nl/import.txt b/lib/plugins/usermanager/lang/nl/import.txt
index 267891098..3a9320ecf 100644
--- a/lib/plugins/usermanager/lang/nl/import.txt
+++ b/lib/plugins/usermanager/lang/nl/import.txt
@@ -1,7 +1,7 @@
===== Massa-import van gebruikers =====
Hiervoor is een CSV-bestand nodig van de gebruikers met minstens vier kolommen. De kolommen moeten bevatten, in deze volgorde: gebruikers-id, complete naam, e-mailadres en groepen.
-Het CSV-velden moeten worden gescheiden met komma's (,) en de teksten moeten worden omringd met dubbele aanhalingstekens (""). Backslash (\) kan worden gebruikt om te escapen.
+Het CSV-velden moeten worden gescheiden met komma's (,) en de teksten moeten worden omringd met dubbele aanhalingstekens (%%""%%). Backslash (\) kan worden gebruikt om te escapen.
Voor een voorbeeld van een werkend bestand, probeer de "Exporteer Gebruikers" functie hierboven.
Dubbele gebruikers-id's zullen worden genegeerd.
diff --git a/lib/plugins/usermanager/lang/nl/intro.txt b/lib/plugins/usermanager/lang/nl/intro.txt
index 7df09dbab..819e64d7d 100644
--- a/lib/plugins/usermanager/lang/nl/intro.txt
+++ b/lib/plugins/usermanager/lang/nl/intro.txt
@@ -1 +1 @@
-==== Gebruikersmanager ===== \ No newline at end of file
+====== Gebruikersbeheer ======
diff --git a/lib/plugins/usermanager/lang/nl/lang.php b/lib/plugins/usermanager/lang/nl/lang.php
index 5cebede89..3f9902e14 100644
--- a/lib/plugins/usermanager/lang/nl/lang.php
+++ b/lib/plugins/usermanager/lang/nl/lang.php
@@ -15,8 +15,9 @@
* @author Jeroen
* @author Ricardo Guijt <ricardoguijt@gmail.com>
* @author Gerrit Uitslag <klapinklapin@gmail.com>
+ * @author Rene <wllywlnt@yahoo.com>
*/
-$lang['menu'] = 'Gebruikersmanager';
+$lang['menu'] = 'Gebruikersbeheer';
$lang['noauth'] = '(gebruikersauthenticatie niet beschikbaar)';
$lang['nosupport'] = '(gebruikersbeheer niet ondersteund)';
$lang['badauth'] = 'ongeldige authenticatiemethode';
diff --git a/lib/plugins/usermanager/lang/ru/import.txt b/lib/plugins/usermanager/lang/ru/import.txt
index 3a25f34ce..f2049dd0c 100644
--- a/lib/plugins/usermanager/lang/ru/import.txt
+++ b/lib/plugins/usermanager/lang/ru/import.txt
@@ -1,9 +1,9 @@
===== Импорт нескольких пользователей =====
Потребуется список пользователей в файле формата CSV, состоящий из 4 столбцов.
-Столбцы должны быть заполнены следующим образом: user-id, полное имя, эл. почта, группы.
-Поля CSV должны быть отделены запятой (,), а строки должны быть заключены в кавычки (""). Обратный слэш используется как прерывание.
-В качестве примера можете взять список пользователей, экспортированный через «Экспорт пользователей».
+Столбцы должны быть заполнены следующим образом: user-id, полное имя, эл. почта, группы.
+Поля CSV должны быть отделены запятой (,), а строки должны быть заключены в кавычки (%%""%%). Обратный слэш используется как прерывание.
+В качестве примера можете взять список пользователей, экспортированный через «Экспорт пользователей».
Повторяющиеся идентификаторы user-id будут игнорироваться.
-Пароль доступа будет сгенерирован и отправлен по почте удачно импортированному пользователю. \ No newline at end of file
+Пароль доступа будет сгенерирован и отправлен по почте удачно импортированному пользователю. \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/ru/lang.php b/lib/plugins/usermanager/lang/ru/lang.php
index 3102ac32a..83158df31 100644
--- a/lib/plugins/usermanager/lang/ru/lang.php
+++ b/lib/plugins/usermanager/lang/ru/lang.php
@@ -19,6 +19,7 @@
* @author Johnny Utah <pcpa@cyberpunk.su>
* @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua)
* @author Pavel <ivanovtsk@mail.ru>
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
*/
$lang['menu'] = 'Управление пользователями';
$lang['noauth'] = '(авторизация пользователей недоступна)';
@@ -72,7 +73,7 @@ $lang['import_error_fields'] = 'Не все поля заполнены. На
$lang['import_error_baduserid'] = 'Отсутствует идентификатор пользователя';
$lang['import_error_badname'] = 'Имя не годится';
$lang['import_error_badmail'] = 'Адрес электронной почты не годится';
-$lang['import_error_upload'] = 'Импорт не удался. CSV файл не загружен или пуст.';
+$lang['import_error_upload'] = 'Импорт не удался. CSV-файл не загружен или пуст.';
$lang['import_error_readfail'] = 'Импорт не удался. Невозможно прочесть загруженный файл.';
$lang['import_error_create'] = 'Невозможно создать пользователя';
$lang['import_notify_fail'] = 'Оповещение не может быть отправлено импортированному пользователю %s по электронной почте %s.';
diff --git a/lib/plugins/usermanager/lang/sk/import.txt b/lib/plugins/usermanager/lang/sk/import.txt
index 91fa3e370..2207f6162 100644
--- a/lib/plugins/usermanager/lang/sk/import.txt
+++ b/lib/plugins/usermanager/lang/sk/import.txt
@@ -2,7 +2,7 @@
Vyžaduje CSV súbor používateľov s minimálne 4 stĺpcami.
Stĺpce musia obsahovať postupne: ID používateľa, meno a priezvisko, emailová adresa a skupiny.
-CVS záznamy by mali byť oddelené čiarkou (,) a reťazce uzavreté úvodzovkami (""). Znak (\) sa používa v spojení so špeciálnymi znakmi.
+CVS záznamy by mali byť oddelené čiarkou (,) a reťazce uzavreté úvodzovkami (%%""%%). Znak (\) sa používa v spojení so špeciálnymi znakmi.
Príklad vhodného súboru je možné získať funkciou "Export používateľov".
Duplicitné ID používateľov budú ignorované.
diff --git a/lib/plugins/usermanager/lang/th/lang.php b/lib/plugins/usermanager/lang/th/lang.php
index eb88d7b91..d6e14f65f 100644
--- a/lib/plugins/usermanager/lang/th/lang.php
+++ b/lib/plugins/usermanager/lang/th/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Thai language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Komgrit Niyomrath <n.komgrit@gmail.com>
* @author Kittithat Arnontavilas mrtomyum@gmail.com
* @author Kittithat Arnontavilas <mrtomyum@gmail.com>
diff --git a/lib/plugins/usermanager/lang/zh-tw/import.txt b/lib/plugins/usermanager/lang/zh-tw/import.txt
index a6bb5f6ef..925cdc9d0 100644
--- a/lib/plugins/usermanager/lang/zh-tw/import.txt
+++ b/lib/plugins/usermanager/lang/zh-tw/import.txt
@@ -2,7 +2,7 @@
需提供 CSV 格式的使用者列表檔案(UTF-8 編碼)。
每列至少 4 欄,依序為:帳號、姓名、電郵、群組。
-各欄以半形逗號 (,) 分隔,有半形逗號的字串可用半形雙引號 ("") 分開,引號可用反斜線 (\) 跳脫。
+各欄以半形逗號 (,) 分隔,有半形逗號的字串可用半形雙引號 (%%""%%) 分開,引號可用反斜線 (\) 跳脫。
重複的使用者帳號會自動忽略。
如需要範例檔案,可用上面的「匯出使用者」取得。
diff --git a/lib/plugins/usermanager/lang/zh/import.txt b/lib/plugins/usermanager/lang/zh/import.txt
index eacce5a77..243a53e84 100644
--- a/lib/plugins/usermanager/lang/zh/import.txt
+++ b/lib/plugins/usermanager/lang/zh/import.txt
@@ -1,7 +1,7 @@
===== 批量导入用户 =====
需要至少有 4 列的 CSV 格式用户列表文件。列必须按顺序包括:用户ID、全名、电子邮件地址和组。
-CSV 域需要用逗号 (,) 分隔,字符串用英文双引号 ("") 分开。反斜杠可以用来转义。
+CSV 域需要用逗号 (,) 分隔,字符串用英文双引号 (%%""%%) 分开。反斜杠可以用来转义。
可以尝试上面的“导入用户”功能来查看示例文件。重复的用户ID将被忽略。
密码生成后会通过电子邮件发送给每个成功导入的用户。 \ No newline at end of file
diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js
index 85ddf503e..6b46add07 100644
--- a/lib/scripts/behaviour.js
+++ b/lib/scripts/behaviour.js
@@ -109,7 +109,7 @@ var dw_behaviour = {
* @author Michael Klier <chi@chimeric.de>
*/
checkWindowsShares: function() {
- if(!LANG.nosmblinks || typeof(document.all) !== 'undefined') {
+ if(!LANG.nosmblinks || navigator.userAgent.match(/(Trident|MSIE)/)) {
// No warning requested or none necessary
return;
}
diff --git a/lib/scripts/compatibility.js b/lib/scripts/compatibility.js
index 76b135b23..fc020cce8 100644
--- a/lib/scripts/compatibility.js
+++ b/lib/scripts/compatibility.js
@@ -77,9 +77,32 @@ var 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)
+ init: function() {
+ DEPRECATED('Use jQuery().dw_qsearch() instead');
+ jQuery('#qsearch__in').dw_qsearch({
+ output: '#qsearch__out'
+ });
+ },
+ clear_results: function() {
+ DEPRECATED('ajax_quicksearch.clear_results is removed');
+ },
+ onCompletion: function() {
+ DEPRECATED('ajax_quicksearch.onCompletion is removed');
+ }
+};
+var dw_qsearch = {
+ init: function(input, output) {
+ DEPRECATED('Use jQuery().dw_qsearch() instead');
+ jQuery(input).dw_qsearch({
+ output: output
+ });
+ },
+ clear_results: function() {
+ DEPRECATED('dw_qsearch.clear_results is removed');
+ },
+ onCompletion: function() {
+ DEPRECATED('dw_qsearch.onCompletion is removed');
+ }
};
var linkwiz = {
diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js
index 56c185db7..c07b8f975 100644
--- a/lib/scripts/edit.js
+++ b/lib/scripts/edit.js
@@ -134,7 +134,10 @@ function pickerInsert(text,edid){
*/
function addBtnActionSignature($btn, props, edid) {
if(typeof SIG != 'undefined' && SIG != ''){
- $btn.bind('click', bind(insertAtCarret,edid,SIG));
+ $btn.bind('click', function (e) {
+ insertAtCarret(edid,SIG);
+ e.preventDefault();
+ });
return edid;
}
return '';
diff --git a/lib/scripts/fileuploader.js b/lib/scripts/fileuploader.js
index e75b8d3a5..d6278950b 100644
--- a/lib/scripts/fileuploader.js
+++ b/lib/scripts/fileuploader.js
@@ -226,7 +226,9 @@ qq.obj2url = function(obj, temp, prefixDone){
} 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);
+ if(obj.hasOwnProperty(i) && typeof obj[i] != 'function') {
+ add(obj[i], i);
+ }
}
} else {
uristrings.push(encodeURIComponent(temp) + '=' + encodeURIComponent(obj));
diff --git a/lib/scripts/jquery/jquery-migrate.js b/lib/scripts/jquery/jquery-migrate.js
index 942cb8b4d..25b6c8131 100644
--- a/lib/scripts/jquery/jquery-migrate.js
+++ b/lib/scripts/jquery/jquery-migrate.js
@@ -1,5 +1,5 @@
/*!
- * jQuery Migrate - v1.1.1 - 2013-02-16
+ * jQuery Migrate - v1.2.1 - 2013-05-08
* https://github.com/jquery/jquery-migrate
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
*/
@@ -17,8 +17,8 @@ jQuery.migrateWarnings = [];
// jQuery.migrateMute = false;
// Show a message on the console so devs know we're active
-if ( !jQuery.migrateMute && window.console && console.log ) {
- console.log("JQMIGRATE: Logging is active");
+if ( !jQuery.migrateMute && window.console && window.console.log ) {
+ window.console.log("JQMIGRATE: Logging is active");
}
// Set to false to disable traces that appear with warnings
@@ -33,10 +33,11 @@ jQuery.migrateReset = function() {
};
function migrateWarn( msg) {
+ var console = window.console;
if ( !warnedAbout[ msg ] ) {
warnedAbout[ msg ] = true;
jQuery.migrateWarnings.push( msg );
- if ( window.console && console.warn && !jQuery.migrateMute ) {
+ if ( console && console.warn && !jQuery.migrateMute ) {
console.warn( "JQMIGRATE: " + msg );
if ( jQuery.migrateTrace && console.trace ) {
console.trace();
@@ -189,26 +190,35 @@ jQuery.attrHooks.value = {
var matched, browser,
oldInit = jQuery.fn.init,
oldParseJSON = jQuery.parseJSON,
- // Note this does NOT include the #9521 XSS fix from 1.7!
- rquickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*|#([\w\-]*))$/;
+ // Note: XSS check is done below after string is trimmed
+ rquickExpr = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
// $(html) "looks like html" rule change
jQuery.fn.init = function( selector, context, rootjQuery ) {
var match;
if ( selector && typeof selector === "string" && !jQuery.isPlainObject( context ) &&
- (match = rquickExpr.exec( selector )) && match[1] ) {
+ (match = rquickExpr.exec( jQuery.trim( selector ) )) && match[ 0 ] ) {
// This is an HTML string according to the "old" rules; is it still?
if ( selector.charAt( 0 ) !== "<" ) {
migrateWarn("$(html) HTML strings must start with '<' character");
}
+ if ( match[ 3 ] ) {
+ migrateWarn("$(html) HTML text after last tag is ignored");
+ }
+ // Consistently reject any HTML-like string starting with a hash (#9521)
+ // Note that this may break jQuery 1.6.x code that otherwise would work.
+ if ( match[ 0 ].charAt( 0 ) === "#" ) {
+ migrateWarn("HTML string cannot start with a '#' character");
+ jQuery.error("JQMIGRATE: Invalid selector string (XSS)");
+ }
// Now process using loose rules; let pre-1.8 play too
if ( context && context.context ) {
// jQuery object as context; parseHTML expects a DOM object
context = context.context;
}
if ( jQuery.parseHTML ) {
- return oldInit.call( this, jQuery.parseHTML( jQuery.trim(selector), context, true ),
+ return oldInit.call( this, jQuery.parseHTML( match[ 2 ], context, true ),
context, rootjQuery );
}
}
diff --git a/lib/scripts/jquery/jquery-migrate.min.js b/lib/scripts/jquery/jquery-migrate.min.js
index ff9113df3..62149c28b 100644
--- a/lib/scripts/jquery/jquery-migrate.min.js
+++ b/lib/scripts/jquery/jquery-migrate.min.js
@@ -1,2 +1,2 @@
-/*! jQuery Migrate v1.1.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
-jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){o[n]||(o[n]=!0,e.migrateWarnings.push(n),t.console&&console.warn&&!e.migrateMute&&(console.warn("JQMIGRATE: "+n),e.migrateTrace&&console.trace&&console.trace()))}function a(t,a,o,i){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(i),o},set:function(e){r(i),o=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=o}var o={};e.migrateWarnings=[],!e.migrateMute&&t.console&&console.log&&console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){o={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var i=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",i||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,o,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(i?a in i:e.isFunction(e.fn[a])))?e(t)[a](o):("type"===a&&o!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,o=e.prop(t,r);return o===!0||"boolean"!=typeof o&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,o))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^(?:[^<]*(<[\w\W]+>)[^>]*|#([\w\-]*))$/;e.fn.init=function(t,n,a){var o;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(o=y.exec(t))&&o[1]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(e.trim(t),n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,o,i=this[0];return!i||"events"!==t||1!==arguments.length||(a=e.data(i,t),o=e._data(i,t),a!==n&&a!==o||o===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),o)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,o,i){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),o)for(c=function(e){return!e.type||j.test(e.type)?i?i.push(e.parentNode?e.parentNode.removeChild(e):e):o.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(o.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,C=e.fn.live,S=e.fn.die,T="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",M=RegExp("\\b(?:"+T+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,o){e!==document&&M.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,o)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,o=t.guid||e.guid++,i=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%i;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=o;a.length>i;)a[i++].guid=o;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),C?C.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),S?S.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||M.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(T.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window);
+/*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
+jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window); \ No newline at end of file
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
index 87f812d7d..8c47bb636 100644
--- 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
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
index 4cb0d6d10..a2fe0297b 100644
--- 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
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
index bfe897458..78eb29e1e 100644
--- 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
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
index 168a18215..26d2fa2b4 100644
--- 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
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
index 25bf099b9..16b6247a1 100644
--- 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
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
index c5dc70aea..72303d6aa 100644
--- 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
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
index bf1f16451..95d5ce6d1 100644
--- 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
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
index 11c184168..331976d8d 100644
--- 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
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
index 294330201..e672c7f61 100644
--- 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
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
index 25dfde1f4..4fea42e83 100644
--- 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
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
index 0063819c4..3e2b5c031 100644
--- 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
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
index 53aaf6f30..95c9d21d1 100644
--- 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
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
index 145e3d3c6..98487c249 100644
--- 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
Binary files differ
diff --git a/lib/scripts/jquery/jquery-ui-theme/smoothness.css b/lib/scripts/jquery/jquery-ui-theme/smoothness.css
index bd2adbde8..34f3ada3e 100644
--- a/lib/scripts/jquery/jquery-ui-theme/smoothness.css
+++ b/lib/scripts/jquery/jquery-ui-theme/smoothness.css
@@ -1,8 +1,8 @@
-/*! jQuery UI - v1.10.2 - 2013-03-14
+/*! jQuery UI - v1.10.4 - 2014-01-17
* http://jqueryui.com
-* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css
+* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
-* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
+* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
/* Layout helpers
----------------------------------*/
@@ -274,9 +274,6 @@ button.ui-button::-moz-focus-inner {
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%;
@@ -393,6 +390,7 @@ button.ui-button::-moz-focus-inner {
border-left-width: 1px;
}
.ui-dialog {
+ overflow: hidden;
position: absolute;
top: 0;
left: 0;
@@ -415,7 +413,7 @@ button.ui-button::-moz-focus-inner {
position: absolute;
right: .3em;
top: 50%;
- width: 21px;
+ width: 20px;
margin: -10px 0 0 0;
padding: 1px;
height: 20px;
@@ -466,6 +464,8 @@ button.ui-button::-moz-focus-inner {
margin: 0;
padding: 0;
width: 100%;
+ /* support: IE10, see #8844 */
+ list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
}
.ui-menu .ui-menu-divider {
margin: 5px -2px 5px -2px;
@@ -702,13 +702,13 @@ button.ui-button::-moz-focus-inner {
overflow: hidden;
right: 0;
}
-/* more specificity required here to overide default borders */
+/* more specificity required here to override default borders */
.ui-spinner a.ui-spinner-button {
border-top: none;
border-bottom: none;
border-right: none;
}
-/* vertical centre icon */
+/* vertically center icon */
.ui-spinner .ui-icon {
position: absolute;
margin-top: -8px;
@@ -745,7 +745,7 @@ button.ui-button::-moz-focus-inner {
padding: 0;
white-space: nowrap;
}
-.ui-tabs .ui-tabs-nav li a {
+.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
float: left;
padding: .5em 1em;
text-decoration: none;
@@ -754,13 +754,12 @@ button.ui-button::-moz-focus-inner {
margin-bottom: -1px;
padding-bottom: 1px;
}
-.ui-tabs .ui-tabs-nav li.ui-tabs-active a,
-.ui-tabs .ui-tabs-nav li.ui-state-disabled a,
-.ui-tabs .ui-tabs-nav li.ui-tabs-loading a {
+.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
+.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
+.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
cursor: text;
}
-.ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
-.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a {
+.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
cursor: pointer;
}
.ui-tabs .ui-tabs-panel {
@@ -845,7 +844,11 @@ body .ui-tooltip {
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
-.ui-state-hover a:visited {
+.ui-state-hover a:visited,
+.ui-state-focus a,
+.ui-state-focus a:hover,
+.ui-state-focus a:link,
+.ui-state-focus a:visited {
color: #212121;
text-decoration: none;
}
diff --git a/lib/scripts/jquery/jquery-ui.js b/lib/scripts/jquery/jquery-ui.js
index 6eccbfec3..eb4ec7236 100644
--- a/lib/scripts/jquery/jquery-ui.js
+++ b/lib/scripts/jquery/jquery-ui.js
@@ -1,7 +1,8 @@
-/*! jQuery UI - v1.10.2 - 2013-03-14
+/*! jQuery UI - v1.10.4 - 2014-01-17
* http://jqueryui.com
-* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
+* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
+* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
+
(function( $, undefined ) {
var uuid = 0,
@@ -11,7 +12,7 @@ var uuid = 0,
$.ui = $.ui || {};
$.extend( $.ui, {
- version: "1.10.2",
+ version: "1.10.4",
keyCode: {
BACKSPACE: 8,
@@ -261,7 +262,7 @@ $.fn.extend({
});
$.extend( $.ui, {
- // $.ui.plugin is deprecated. Use the proxy pattern instead.
+ // $.ui.plugin is deprecated. Use $.widget() extensions instead.
plugin: {
add: function( module, option, set ) {
var i,
@@ -312,7 +313,6 @@ $.extend( $.ui, {
});
})( jQuery );
-
(function( $, undefined ) {
var uuid = 0,
@@ -411,7 +411,7 @@ $.widget = function( name, base, prototype ) {
// TODO: remove support for widgetEventPrefix
// always use the name + a colon as the prefix, e.g., draggable:start
// don't prefix for widgets that aren't DOM-based
- widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
+ widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
}, proxiedPrototype, {
constructor: constructor,
namespace: namespace,
@@ -620,12 +620,12 @@ $.Widget.prototype = {
curOption = curOption[ parts[ i ] ];
}
key = parts.pop();
- if ( value === undefined ) {
+ if ( arguments.length === 1 ) {
return curOption[ key ] === undefined ? null : curOption[ key ];
}
curOption[ key ] = value;
} else {
- if ( value === undefined ) {
+ if ( arguments.length === 1 ) {
return this.options[ key ] === undefined ? null : this.options[ key ];
}
options[ key ] = value;
@@ -824,7 +824,6 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
});
})( jQuery );
-
(function( $, undefined ) {
var mouseHandled = false;
@@ -833,7 +832,7 @@ $( document ).mouseup( function() {
});
$.widget("ui.mouse", {
- version: "1.10.2",
+ version: "1.10.4",
options: {
cancel: "input,textarea,button,select,option",
distance: 1,
@@ -981,5048 +980,497 @@ $.widget("ui.mouse", {
});
})(jQuery);
-
(function( $, undefined ) {
-$.widget("ui.draggable", $.ui.mouse, {
- version: "1.10.2",
- widgetEventPrefix: "drag",
- options: {
- addClasses: true,
- appendTo: "parent",
- axis: false,
- connectToSortable: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- grid: false,
- handle: false,
- helper: "original",
- iframeFix: false,
- opacity: false,
- refreshPositions: false,
- revert: false,
- revertDuration: 500,
- scope: "default",
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- snap: false,
- snapMode: "both",
- snapTolerance: 20,
- stack: false,
- zIndex: false,
-
- // callbacks
- drag: null,
- start: null,
- stop: null
- },
- _create: function() {
-
- if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) {
- this.element[0].style.position = "relative";
- }
- if (this.options.addClasses){
- this.element.addClass("ui-draggable");
- }
- if (this.options.disabled){
- this.element.addClass("ui-draggable-disabled");
- }
-
- this._mouseInit();
-
- },
-
- _destroy: function() {
- this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
- this._mouseDestroy();
- },
-
- _mouseCapture: function(event) {
-
- var o = this.options;
-
- // among others, prevent a drag on a resizable-handle
- if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
- return false;
- }
-
- //Quit if we're not on a valid handle
- this.handle = this._getHandle(event);
- if (!this.handle) {
- return false;
- }
-
- $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
- $("<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);
-
- this.helper.addClass("ui-draggable-dragging");
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- //If ddmanager is used for droppables, set the global draggable
- if($.ui.ddmanager) {
- $.ui.ddmanager.current = this;
- }
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Store the helper's css position
- this.cssPosition = this.helper.css("position");
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.positionAbs = this.element.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- //Generate the original position
- this.originalPosition = this.position = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Set a containment if given in the options
- if(o.containment) {
- this._setContainment();
- }
-
- //Trigger event + callbacks
- if(this._trigger("start", event) === false) {
- this._clear();
- return false;
- }
-
- //Recache the helper size
- this._cacheHelperProportions();
-
- //Prepare the droppable offsets
- if ($.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
-
- this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
-
- //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
- if ( $.ui.ddmanager ) {
- $.ui.ddmanager.dragStart(this, event);
- }
-
- return true;
- },
-
- _mouseDrag: function(event, noPropagation) {
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Call plugins and callbacks and use the resulting position if something is returned
- if (!noPropagation) {
- var ui = this._uiHash();
- if(this._trigger("drag", event, ui) === false) {
- this._mouseUp({});
- return false;
- }
- this.position = ui.position;
- }
-
- if(!this.options.axis || this.options.axis !== "y") {
- this.helper[0].style.left = this.position.left+"px";
- }
- if(!this.options.axis || this.options.axis !== "x") {
- this.helper[0].style.top = this.position.top+"px";
- }
- if($.ui.ddmanager) {
- $.ui.ddmanager.drag(this, event);
- }
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- //If we are using droppables, inform the manager about the drop
- var element,
- that = this,
- elementInDom = false,
- dropped = false;
- if ($.ui.ddmanager && !this.options.dropBehaviour) {
- dropped = $.ui.ddmanager.drop(this, event);
- }
-
- //if a drop comes from outside (a sortable)
- if(this.dropped) {
- dropped = this.dropped;
- this.dropped = false;
- }
-
- //if the original element is no longer in the DOM don't bother to continue (see #8269)
- element = this.element[0];
- while ( element && (element = element.parentNode) ) {
- if (element === document ) {
- elementInDom = true;
- }
- }
- if ( !elementInDom && this.options.helper === "original" ) {
- return false;
- }
-
- if((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
- $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
- if(that._trigger("stop", event) !== false) {
- that._clear();
- }
- });
- } else {
- if(this._trigger("stop", event) !== false) {
- this._clear();
- }
- }
-
- return false;
- },
-
- _mouseUp: function(event) {
- //Remove frame helpers
- $("div.ui-draggable-iframeFix").each(function() {
- this.parentNode.removeChild(this);
- });
-
- //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
- if( $.ui.ddmanager ) {
- $.ui.ddmanager.dragStop(this, event);
- }
-
- return $.ui.mouse.prototype._mouseUp.call(this, event);
- },
-
- cancel: function() {
-
- if(this.helper.is(".ui-draggable-dragging")) {
- this._mouseUp({});
- } else {
- this._clear();
- }
-
- return this;
-
- },
-
- _getHandle: function(event) {
- return this.options.handle ?
- !!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
- true;
- },
-
- _createHelper: function(event) {
-
- var o = this.options,
- helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element);
-
- if(!helper.parents("body").length) {
- helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
- }
-
- if(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) {
- helper.css("position", "absolute");
- }
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj === "string") {
- obj = obj.split(" ");
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ("left" in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ("right" in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ("top" in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ("bottom" in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- //This needs to be actually done for all browsers, since pageX/pageY includes this information
- //Ugly IE fix
- if((this.offsetParent[0] === document.body) ||
- (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
- 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 over, c, ce,
- 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) {
- c = $(o.containment);
- ce = c[0];
-
- if(!ce) {
- return;
- }
-
- 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("borderRightWidth"),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("borderBottomWidth"),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,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top + // The absolute mouse position
- this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left + // The absolute mouse position
- this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var containment, co, top, left,
- o = this.options,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
- scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName),
- pageX = event.pageX,
- 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 (this.relative_container){
- 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;
- }
- }
+$.ui = $.ui || {};
- 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)
- 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 cachedScrollbarWidth,
+ max = Math.max,
+ abs = Math.abs,
+ round = Math.round,
+ rhorizontal = /left|center|right/,
+ rvertical = /top|center|bottom/,
+ roffset = /[\+\-]\d+(\.[\d]+)?%?/,
+ rposition = /^\w+/,
+ rpercent = /%$/,
+ _position = $.fn.position;
- 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;
- }
+function getOffsets( offsets, width, height ) {
+ return [
+ parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
+ parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
+ ];
+}
- }
+function parseCss( element, property ) {
+ return parseInt( $.css( element, property ), 10 ) || 0;
+}
+function getDimensions( elem ) {
+ var raw = elem[0];
+ if ( raw.nodeType === 9 ) {
return {
- top: (
- pageY - // The absolute mouse position
- this.offset.click.top - // Click offset (relative to the element)
- this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX - // The absolute mouse position
- this.offset.click.left - // Click offset (relative to the element)
- this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
+ width: elem.width(),
+ height: elem.height(),
+ offset: { top: 0, left: 0 }
};
-
- },
-
- _clear: function() {
- this.helper.removeClass("ui-draggable-dragging");
- if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
- this.helper.remove();
- }
- 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]);
- //The absolute position has to be recalculated after plugins
- if(type === "drag") {
- this.positionAbs = this._convertPositionTo("absolute");
- }
- return $.Widget.prototype._trigger.call(this, type, event, ui);
- },
-
- plugins: {},
-
- _uiHash: function() {
+ }
+ if ( $.isWindow( raw ) ) {
return {
- helper: this.helper,
- position: this.position,
- originalPosition: this.originalPosition,
- offset: this.positionAbs
+ width: elem.width(),
+ height: elem.height(),
+ offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
};
}
-
-});
-
-$.ui.plugin.add("draggable", "connectToSortable", {
- start: function(event, ui) {
-
- var inst = $(this).data("ui-draggable"), o = inst.options,
- uiSortable = $.extend({}, ui, { item: inst.element });
- inst.sortables = [];
- $(o.connectToSortable).each(function() {
- var sortable = $.data(this, "ui-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("ui-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 = this.shouldRevert;
- }
-
- //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("ui-draggable"), that = this;
-
- $.each(inst.sortables, function() {
-
- var innermostIntersecting = false,
- thisSortable = this;
-
- //Copy over some variables to allow calling the sortable's native _intersectsWith
- this.instance.positionAbs = inst.positionAbs;
- this.instance.helperProportions = inst.helperProportions;
- this.instance.offset.click = inst.offset.click;
-
- if(this.instance._intersectsWith(this.instance.containerCache)) {
- innermostIntersecting = true;
- $.each(inst.sortables, function () {
- this.instance.positionAbs = inst.positionAbs;
- this.instance.helperProportions = inst.helperProportions;
- this.instance.offset.click = inst.offset.click;
- if (this !== thisSortable &&
- this.instance._intersectsWith(this.instance.containerCache) &&
- $.contains(thisSortable.instance.element[0], this.instance.element[0])
- ) {
- innermostIntersecting = false;
- }
- return innermostIntersecting;
- });
- }
-
-
- if(innermostIntersecting) {
- //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
- if(!this.instance.isOver) {
-
- this.instance.isOver = 1;
- //Now we fake the start of dragging for the sortable instance,
- //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
- //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
- this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-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() {
- var t = $("body"), o = $(this).data("ui-draggable").options;
- if (t.css("cursor")) {
- o._cursor = t.css("cursor");
- }
- t.css("cursor", o.cursor);
- },
- stop: function() {
- var o = $(this).data("ui-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("ui-draggable").options;
- if(t.css("opacity")) {
- o._opacity = t.css("opacity");
- }
- t.css("opacity", o.opacity);
- },
- stop: function(event, ui) {
- var o = $(this).data("ui-draggable").options;
- if(o._opacity) {
- $(ui.helper).css("opacity", o._opacity);
- }
- }
-});
-
-$.ui.plugin.add("draggable", "scroll", {
- start: function() {
- var i = $(this).data("ui-draggable");
- if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
- i.overflowOffset = i.scrollParent.offset();
- }
- },
- drag: function( event ) {
-
- var i = $(this).data("ui-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() {
-
- var i = $(this).data("ui-draggable"),
- o = i.options;
-
- i.snapElements = [];
-
- $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
- var $t = $(this),
- $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 ts, bs, ls, rs, l, r, t, b, i, first,
- inst = $(this).data("ui-draggable"),
- o = inst.options,
- d = o.snapTolerance,
- x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
- y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
-
- for (i = inst.snapElements.length - 1; i >= 0; i--){
-
- 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") {
- ts = Math.abs(t - y2) <= d;
- bs = Math.abs(b - y1) <= d;
- ls = Math.abs(l - x2) <= d;
- 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;
- }
- }
-
- first = (ts || bs || ls || rs);
-
- if(o.snapMode !== "outer") {
- ts = Math.abs(t - y1) <= d;
- bs = Math.abs(b - y2) <= d;
- ls = Math.abs(l - x1) <= d;
- 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() {
- var min,
- o = this.data("ui-draggable").options,
- 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; }
-
- min = parseInt($(group[0]).css("zIndex"), 10) || 0;
- $(group).each(function(i) {
- $(this).css("zIndex", min + i);
- });
- this.css("zIndex", (min + group.length));
- }
-});
-
-$.ui.plugin.add("draggable", "zIndex", {
- start: function(event, ui) {
- var t = $(ui.helper), o = $(this).data("ui-draggable").options;
- if(t.css("zIndex")) {
- o._zIndex = t.css("zIndex");
- }
- t.css("zIndex", o.zIndex);
- },
- stop: function(event, ui) {
- var o = $(this).data("ui-draggable").options;
- if(o._zIndex) {
- $(ui.helper).css("zIndex", o._zIndex);
- }
- }
-});
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-function isOverAxis( x, reference, size ) {
- return ( x > reference ) && ( x < ( reference + size ) );
-}
-
-$.widget("ui.droppable", {
- version: "1.10.2",
- widgetEventPrefix: "drop",
- options: {
- accept: "*",
- activeClass: false,
- addClasses: true,
- greedy: false,
- hoverClass: false,
- scope: "default",
- tolerance: "intersect",
-
- // callbacks
- activate: null,
- deactivate: null,
- drop: null,
- out: null,
- over: null
- },
- _create: function() {
-
- var o = this.options,
- accept = o.accept;
-
- this.isover = false;
- this.isout = true;
-
- 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 i = 0,
- drop = $.ui.ddmanager.droppables[this.options.scope];
-
- for ( ; i < drop.length; i++ ) {
- if ( drop[i] === this ) {
- drop.splice(i, 1);
- }
- }
-
- this.element.removeClass("ui-droppable ui-droppable-disabled");
- },
-
- _setOption: function(key, value) {
-
- if(key === "accept") {
- this.accept = $.isFunction(value) ? value : function(d) {
- return d.is(value);
- };
- }
- $.Widget.prototype._setOption.apply(this, arguments);
- },
-
- _activate: function(event) {
- var draggable = $.ui.ddmanager.current;
- if(this.options.activeClass) {
- this.element.addClass(this.options.activeClass);
- }
- if(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);
- }
- if(draggable){
- this._trigger("deactivate", event, this.ui(draggable));
- }
- },
-
- _over: function(event) {
-
- var draggable = $.ui.ddmanager.current;
-
- // Bail if draggable and droppable are same element
- if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
- return;
- }
-
- 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;
-
- // Bail if draggable and droppable are same element
- if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
- return;
- }
-
- 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,
- childrenIntersection = false;
-
- // Bail if draggable and droppable are same element
- if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
- return false;
- }
-
- this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
- var inst = $.data(this, "ui-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) {
+ if ( raw.preventDefault ) {
return {
- draggable: (c.currentItem || c.element),
- helper: c.helper,
- position: c.position,
- offset: c.positionAbs
+ width: 0,
+ height: 0,
+ offset: { top: raw.pageY, left: raw.pageX }
};
}
-
-});
-
-$.ui.intersect = function(draggable, droppable, toleranceMode) {
-
- if (!droppable.offset) {
- return false;
- }
-
- var draggableLeft, draggableTop,
- x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
- y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,
- 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);
- 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
- case "pointer":
- 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);
- return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
- 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
- );
- default:
- return false;
- }
-
-};
-
-/*
- This manager tracks offsets of draggables and droppables
-*/
-$.ui.ddmanager = {
- current: null,
- droppables: { "default": [] },
- prepareOffsets: function(t, event) {
-
- var i, j,
- m = $.ui.ddmanager.droppables[t.options.scope] || [],
- type = event ? event.type : null, // workaround for #2317
- list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
-
- droppablesLoop: for (i = 0; i < m.length; i++) {
-
- //No disabled and non-accepted
- if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {
- continue;
- }
-
- // Filter out elements in the current dragged item
- for (j=0; j < list.length; j++) {
- if(list[j] === m[i].element[0]) {
- m[i].proportions.height = 0;
- continue droppablesLoop;
- }
- }
-
- m[i].visible = m[i].element.css("display") !== "none";
- if(!m[i].visible) {
- continue;
- }
-
- //Activate the droppable if used directly from draggables
- if(type === "mousedown") {
- m[i]._activate.call(m[i], event);
- }
-
- 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;
- // Create a copy of the droppables in case the list changes during the drop (#9116)
- $.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() {
-
- if(!this.options) {
- return;
- }
- if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {
- dropped = this._drop.call(this, event) || dropped;
- }
-
- if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- this.isout = true;
- this.isover = false;
- this._deactivate.call(this, event);
- }
-
- });
- return dropped;
-
- },
- dragStart: function( draggable, event ) {
- //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
- draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
- if( !draggable.options.refreshPositions ) {
- $.ui.ddmanager.prepareOffsets( draggable, event );
- }
- });
- },
- drag: function(draggable, event) {
-
- //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
- if(draggable.options.refreshPositions) {
- $.ui.ddmanager.prepareOffsets(draggable, event);
- }
-
- //Run through all droppables and check their positions based on specific tolerance options
- $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
-
- if(this.options.disabled || this.greedyChild || !this.visible) {
- return;
- }
-
- var parentInstance, scope, parent,
- intersects = $.ui.intersect(draggable, this, this.options.tolerance),
- c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null);
- if(!c) {
- return;
- }
-
- if (this.options.greedy) {
- // find droppable parents with same scope
- scope = this.options.scope;
- parent = this.element.parents(":data(ui-droppable)").filter(function () {
- return $.data(this, "ui-droppable").options.scope === scope;
- });
-
- if (parent.length) {
- parentInstance = $.data(parent[0], "ui-droppable");
- parentInstance.greedyChild = (c === "isover");
- }
- }
-
- // we just moved into a greedy child
- if (parentInstance && c === "isover") {
- parentInstance.isover = false;
- parentInstance.isout = true;
- parentInstance._out.call(parentInstance, event);
- }
-
- this[c] = true;
- this[c === "isout" ? "isover" : "isout"] = false;
- this[c === "isover" ? "_over" : "_out"].call(this, event);
-
- // we just moved out of a greedy child
- if (parentInstance && c === "isout") {
- parentInstance.isout = false;
- parentInstance.isover = true;
- parentInstance._over.call(parentInstance, event);
- }
- });
-
- },
- dragStop: function( draggable, event ) {
- draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
- //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
- if( !draggable.options.refreshPositions ) {
- $.ui.ddmanager.prepareOffsets( draggable, event );
- }
- }
-};
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-function num(v) {
- return parseInt(v, 10) || 0;
-}
-
-function isNumber(value) {
- return !isNaN(parseInt(value, 10));
+ return {
+ width: elem.outerWidth(),
+ height: elem.outerHeight(),
+ offset: elem.offset()
+ };
}
-$.widget("ui.resizable", $.ui.mouse, {
- version: "1.10.2",
- widgetEventPrefix: "resize",
- options: {
- alsoResize: false,
- animate: false,
- animateDuration: "slow",
- animateEasing: "swing",
- aspectRatio: false,
- autoHide: false,
- containment: false,
- ghost: false,
- grid: false,
- handles: "e,s,se",
- helper: false,
- maxHeight: null,
- maxWidth: null,
- minHeight: 10,
- minWidth: 10,
- // See #7960
- zIndex: 90,
-
- // callbacks
- resize: null,
- start: null,
- stop: null
- },
- _create: function() {
-
- var n, i, handle, axis, hname,
- that = this,
- o = this.options;
- this.element.addClass("ui-resizable");
-
- $.extend(this, {
- _aspectRatio: !!(o.aspectRatio),
- aspectRatio: o.aspectRatio,
- originalElement: this.element,
- _proportionallyResizeElements: [],
- _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
- });
-
- //Wrap the element if it cannot hold child nodes
- if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
-
- //Create a wrapper element and set the wrapper to the new current internal element
- this.element.wrap(
- $("<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(
- "ui-resizable", this.element.data("ui-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";
- }
-
- n = this.handles.split(",");
- this.handles = {};
-
- for(i = 0; i < n.length; i++) {
-
- handle = $.trim(n[i]);
- hname = "ui-resizable-"+handle;
- axis = $("<div class='ui-resizable-handle " + hname + "'></div>");
-
- // Apply zIndex to all handles - see #7960
- axis.css({ zIndex: o.zIndex });
-
- //TODO : What's going on here?
- if ("se" === handle) {
- axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");
- }
-
- //Insert into internal handles object and append to element
- this.handles[handle] = ".ui-resizable-"+handle;
- this.element.append(axis);
- }
-
- }
-
- this._renderAxis = function(target) {
-
- var i, axis, padPos, padWrapper;
-
- target = target || this.element;
-
- for(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)) {
-
- axis = $(this.handles[i], this.element);
-
- //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...
- padPos = [ "padding",
- /ne|nw|n/.test(i) ? "Top" :
- /se|sw|s/.test(i) ? "Bottom" :
- /^e$/.test(i) ? "Right" : "Left" ].join("");
-
- target.css(padPos, padWrapper);
-
- this._proportionallyResize();
-
- }
-
- //TODO: What's that good for? There's not anything to be executed left
- if(!$(this.handles[i]).length) {
- continue;
- }
- }
- };
-
- //TODO: make renderAxis a prototype function
- this._renderAxis(this.element);
-
- this._handles = $(".ui-resizable-handle", this.element)
- .disableSelection();
-
- //Matching axis name
- this._handles.mouseover(function() {
- if (!that.resizing) {
- if (this.className) {
- axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
- }
- //Axis, default = se
- that.axis = axis && axis[1] ? axis[1] : "se";
- }
- });
-
- //If we want to auto hide the elements
- if (o.autoHide) {
- this._handles.hide();
- $(this.element)
- .addClass("ui-resizable-autohide")
- .mouseenter(function() {
- if (o.disabled) {
- return;
- }
- $(this).removeClass("ui-resizable-autohide");
- that._handles.show();
- })
- .mouseleave(function(){
- if (o.disabled) {
- return;
- }
- if (!that.resizing) {
- $(this).addClass("ui-resizable-autohide");
- that._handles.hide();
- }
- });
- }
-
- //Initialize the mouse interaction
- this._mouseInit();
-
- },
-
- _destroy: function() {
-
- this._mouseDestroy();
-
- var wrapper,
- _destroy = function(exp) {
- $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
- .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove();
- };
-
- //TODO: Unwrap at same DOM position
- if (this.elementIsWrapper) {
- _destroy(this.element);
- wrapper = this.element;
- this.originalElement.css({
- position: wrapper.css("position"),
- width: wrapper.outerWidth(),
- height: wrapper.outerHeight(),
- top: wrapper.css("top"),
- left: wrapper.css("left")
- }).insertAfter( wrapper );
- wrapper.remove();
- }
-
- this.originalElement.css("resize", this.originalResizeStyle);
- _destroy(this.originalElement);
-
- return this;
- },
-
- _mouseCapture: function(event) {
- var i, handle,
- capture = false;
-
- for (i in this.handles) {
- handle = $(this.handles[i])[0];
- if (handle === event.target || $.contains(handle, event.target)) {
- capture = true;
- }
- }
-
- return !this.options.disabled && capture;
- },
-
- _mouseStart: function(event) {
-
- var curleft, curtop, cursor,
- o = this.options,
- iniPos = this.element.position(),
- el = this.element;
-
- this.resizing = true;
-
- // bugfix for http://dev.jquery.com/ticket/1749
- if ( (/absolute/).test( el.css("position") ) ) {
- el.css({ position: "absolute", top: el.css("top"), left: el.css("left") });
- } else if (el.is(".ui-draggable")) {
- el.css({ position: "absolute", top: iniPos.top, left: iniPos.left });
- }
-
- this._renderProxy();
-
- 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);
-
- 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 data,
- el = this.helper, props = {},
- smp = this.originalMousePosition,
- a = this.axis,
- prevTop = this.position.top,
- prevLeft = this.position.left,
- prevWidth = this.size.width,
- prevHeight = this.size.height,
- dx = (event.pageX-smp.left)||0,
- dy = (event.pageY-smp.top)||0,
- trigger = this._change[a];
-
- if (!trigger) {
- return false;
- }
-
- // Calculate the attrs that will be change
- data = trigger.apply(this, [event, dx, dy]);
-
- // Put this in the mouseDrag handler since the user can start pressing shift while resizing
- this._updateVirtualBoundaries(event.shiftKey);
- if (this._aspectRatio || event.shiftKey) {
- data = this._updateRatio(data, event);
- }
-
- data = this._respectSize(data, event);
-
- this._updateCache(data);
-
- // plugins callbacks need to be called first
- this._propagate("resize", event);
-
- if (this.position.top !== prevTop) {
- props.top = this.position.top + "px";
- }
- if (this.position.left !== prevLeft) {
- props.left = this.position.left + "px";
- }
- if (this.size.width !== prevWidth) {
- props.width = this.size.width + "px";
- }
- if (this.size.height !== prevHeight) {
- props.height = this.size.height + "px";
- }
- el.css(props);
-
- if (!this._helper && this._proportionallyResizeElements.length) {
- this._proportionallyResize();
- }
-
- // Call the user callback if the element was resized
- if ( ! $.isEmptyObject(props) ) {
- this._trigger("resize", event, this.ui());
- }
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- this.resizing = false;
- var pr, ista, soffseth, soffsetw, s, left, top,
- o = this.options, that = this;
-
- if(this._helper) {
-
- pr = this._proportionallyResizeElements;
- ista = pr.length && (/textarea/i).test(pr[0].nodeName);
- soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height;
- soffsetw = ista ? 0 : that.sizeDiff.width;
-
- s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) };
- left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null;
- top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null;
-
- if (!o.animate) {
- this.element.css($.extend(s, { top: top, left: left }));
- }
-
- that.helper.height(that.size.height);
- that.helper.width(that.size.width);
-
- if (this._helper && !o.animate) {
- this._proportionallyResize();
- }
+$.position = {
+ scrollbarWidth: function() {
+ if ( cachedScrollbarWidth !== undefined ) {
+ return cachedScrollbarWidth;
}
+ var w1, w2,
+ div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
+ innerDiv = div.children()[0];
- $("body").css("cursor", "auto");
-
- this.element.removeClass("ui-resizable-resizing");
+ $( "body" ).append( div );
+ w1 = innerDiv.offsetWidth;
+ div.css( "overflow", "scroll" );
- this._propagate("stop", event);
+ w2 = innerDiv.offsetWidth;
- if (this._helper) {
- this.helper.remove();
+ if ( w1 === w2 ) {
+ w2 = div[0].clientWidth;
}
- return false;
+ div.remove();
+ return (cachedScrollbarWidth = w1 - w2);
},
-
- _updateVirtualBoundaries: function(forceAspectRatio) {
- var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
- o = this.options;
-
- 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
+ getScrollInfo: function( within ) {
+ var overflowX = within.isWindow || within.isDocument ? "" :
+ within.element.css( "overflow-x" ),
+ overflowY = within.isWindow || within.isDocument ? "" :
+ within.element.css( "overflow-y" ),
+ hasOverflowX = overflowX === "scroll" ||
+ ( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
+ hasOverflowY = overflowY === "scroll" ||
+ ( overflowY === "auto" && within.height < within.element[0].scrollHeight );
+ return {
+ width: hasOverflowY ? $.position.scrollbarWidth() : 0,
+ height: hasOverflowX ? $.position.scrollbarWidth() : 0
};
-
- 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) {
- 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 ) {
-
- var 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 ) {
-
- var o = this._vBoundaries,
- 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),
- dw = this.originalPosition.left + this.originalSize.width,
- dh = this.position.top + this.size.height,
- cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
- if (isminw) {
- data.width = o.minWidth;
- }
- if (isminh) {
- data.height = o.minHeight;
- }
- if (ismaxw) {
- data.width = o.maxWidth;
- }
- if (ismaxh) {
- data.height = o.maxHeight;
- }
-
- 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
- if (!data.width && !data.height && !data.left && data.top) {
- data.top = null;
- } else if (!data.width && !data.height && !data.top && data.left) {
- data.left = null;
- }
-
- return data;
- },
-
- _proportionallyResize: function() {
-
- if (!this._proportionallyResizeElements.length) {
- return;
- }
-
- var i, j, borders, paddings, prel,
- element = this.helper || this.element;
-
- for ( i=0; i < this._proportionallyResizeElements.length; i++) {
-
- prel = this._proportionallyResizeElements[i];
-
- if (!this.borderDif) {
- this.borderDif = [];
- borders = [prel.css("borderTopWidth"), prel.css("borderRightWidth"), prel.css("borderBottomWidth"), prel.css("borderLeftWidth")];
- paddings = [prel.css("paddingTop"), prel.css("paddingRight"), prel.css("paddingBottom"), prel.css("paddingLeft")];
-
- for ( j = 0; j < borders.length; j++ ) {
- this.borderDif[ j ] = ( parseInt( borders[ j ], 10 ) || 0 ) + ( parseInt( paddings[ j ], 10 ) || 0 );
- }
- }
-
- 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>");
-
- this.helper.addClass(this._helper).css({
- width: this.element.outerWidth() - 1,
- height: this.element.outerHeight() - 1,
- position: "absolute",
- left: this.elementOffset.left +"px",
- top: this.elementOffset.top +"px",
- zIndex: ++o.zIndex //TODO: Don't modify option
- });
-
- this.helper
- .appendTo("body")
- .disableSelection();
-
- } else {
- this.helper = this.element;
- }
-
- },
-
- _change: {
- e: function(event, dx) {
- return { width: this.originalSize.width + dx };
- },
- w: function(event, dx) {
- var cs = this.originalSize, sp = this.originalPosition;
- return { left: sp.left + dx, width: cs.width - dx };
- },
- n: function(event, dx, dy) {
- var 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() {
+ getWithinInfo: function( element ) {
+ var withinElement = $( element || window ),
+ isWindow = $.isWindow( withinElement[0] ),
+ isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9;
return {
- originalElement: this.originalElement,
- element: this.element,
- helper: this.helper,
- position: this.position,
- size: this.size,
- originalSize: this.originalSize,
- originalPosition: this.originalPosition
+ element: withinElement,
+ isWindow: isWindow,
+ isDocument: isDocument,
+ offset: withinElement.offset() || { left: 0, top: 0 },
+ scrollLeft: withinElement.scrollLeft(),
+ scrollTop: withinElement.scrollTop(),
+ width: isWindow ? withinElement.width() : withinElement.outerWidth(),
+ height: isWindow ? withinElement.height() : withinElement.outerHeight()
};
}
+};
-});
-
-/*
- * Resizable Extensions
- */
-
-$.ui.plugin.add("resizable", "animate", {
-
- stop: function( event ) {
- var that = $(this).data("ui-resizable"),
- o = that.options,
- pr = that._proportionallyResizeElements,
- ista = pr.length && (/textarea/i).test(pr[0].nodeName),
- soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height,
- soffsetw = ista ? 0 : that.sizeDiff.width,
- style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
- left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null,
- top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null;
-
- that.element.animate(
- $.extend(style, top && left ? { top: top, left: left } : {}), {
- duration: o.animateDuration,
- easing: o.animateEasing,
- step: function() {
-
- var data = {
- width: parseInt(that.element.css("width"), 10),
- height: parseInt(that.element.css("height"), 10),
- top: parseInt(that.element.css("top"), 10),
- left: parseInt(that.element.css("left"), 10)
- };
-
- if (pr && pr.length) {
- $(pr[0]).css({ width: data.width, height: data.height });
- }
-
- // propagating resize, and updating values for each animation step
- that._updateCache(data);
- that._propagate("resize", event);
-
- }
- }
- );
+$.fn.position = function( options ) {
+ if ( !options || !options.of ) {
+ return _position.apply( this, arguments );
}
-});
-
-$.ui.plugin.add("resizable", "containment", {
-
- start: function() {
- var element, p, co, ch, cw, width, height,
- that = $(this).data("ui-resizable"),
- o = that.options,
- el = that.element,
- oc = o.containment,
- ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
-
- if (!ce) {
- return;
- }
-
- that.containerElement = $(ce);
-
- if (/document/.test(oc) || oc === document) {
- that.containerOffset = { left: 0, top: 0 };
- that.containerPosition = { left: 0, top: 0 };
-
- that.parentData = {
- element: $(document), left: 0, top: 0,
- width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
- };
- }
-
- // i'm a node, so compute top, left, right, bottom
- else {
- element = $(ce);
- p = [];
- $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
-
- that.containerOffset = element.offset();
- that.containerPosition = element.position();
- that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
-
- co = that.containerOffset;
- ch = that.containerSize.height;
- cw = that.containerSize.width;
- width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw );
- height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
-
- that.parentData = {
- element: ce, left: co.left, top: co.top, width: width, height: height
- };
- }
- },
-
- resize: function( event ) {
- var woset, hoset, isParent, isOffsetRelative,
- that = $(this).data("ui-resizable"),
- o = that.options,
- co = that.containerOffset, cp = that.position,
- pRatio = that._aspectRatio || event.shiftKey,
- cop = { top:0, left:0 }, ce = that.containerElement;
-
- if (ce[0] !== document && (/static/).test(ce.css("position"))) {
- cop = co;
- }
-
- if (cp.left < (that._helper ? co.left : 0)) {
- that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));
- if (pRatio) {
- that.size.height = that.size.width / that.aspectRatio;
- }
- that.position.left = o.helper ? co.left : 0;
- }
-
- if (cp.top < (that._helper ? co.top : 0)) {
- that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);
- if (pRatio) {
- that.size.width = that.size.height * that.aspectRatio;
- }
- that.position.top = that._helper ? co.top : 0;
- }
-
- that.offset.left = that.parentData.left+that.position.left;
- that.offset.top = that.parentData.top+that.position.top;
-
- woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width );
- hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );
-
- isParent = that.containerElement.get(0) === that.element.parent().get(0);
- isOffsetRelative = /relative|absolute/.test(that.containerElement.css("position"));
-
- if(isParent && isOffsetRelative) {
- woset -= that.parentData.left;
- }
-
- if (woset + that.size.width >= that.parentData.width) {
- that.size.width = that.parentData.width - woset;
- if (pRatio) {
- that.size.height = that.size.width / that.aspectRatio;
- }
- }
-
- if (hoset + that.size.height >= that.parentData.height) {
- that.size.height = that.parentData.height - hoset;
- if (pRatio) {
- that.size.width = that.size.height * that.aspectRatio;
- }
- }
- },
-
- stop: function(){
- var that = $(this).data("ui-resizable"),
- o = that.options,
- co = that.containerOffset,
- cop = that.containerPosition,
- ce = that.containerElement,
- helper = $(that.helper),
- ho = helper.offset(),
- w = helper.outerWidth() - that.sizeDiff.width,
- h = helper.outerHeight() - that.sizeDiff.height;
-
- if (that._helper && !o.animate && (/relative/).test(ce.css("position"))) {
- $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
- }
+ // make a copy, we don't want to modify arguments
+ options = $.extend( {}, options );
- if (that._helper && !o.animate && (/static/).test(ce.css("position"))) {
- $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
- }
+ var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
+ target = $( options.of ),
+ within = $.position.getWithinInfo( options.within ),
+ scrollInfo = $.position.getScrollInfo( within ),
+ collision = ( options.collision || "flip" ).split( " " ),
+ offsets = {};
+ dimensions = getDimensions( target );
+ if ( target[0].preventDefault ) {
+ // force left top to allow flipping
+ options.at = "left top";
}
-});
-
-$.ui.plugin.add("resizable", "alsoResize", {
+ targetWidth = dimensions.width;
+ targetHeight = dimensions.height;
+ targetOffset = dimensions.offset;
+ // clone to reuse original targetOffset later
+ basePosition = $.extend( {}, targetOffset );
- start: function () {
- var that = $(this).data("ui-resizable"),
- o = that.options,
- _store = function (exp) {
- $(exp).each(function() {
- var el = $(this);
- el.data("ui-resizable-alsoresize", {
- width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
- left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10)
- });
- });
- };
+ // force my and at to have valid horizontal and vertical positions
+ // if a value is missing or invalid, it will be converted to center
+ $.each( [ "my", "at" ], function() {
+ var pos = ( options[ this ] || "" ).split( " " ),
+ horizontalOffset,
+ verticalOffset;
- if (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);
+ if ( pos.length === 1) {
+ pos = rhorizontal.test( pos[ 0 ] ) ?
+ pos.concat( [ "center" ] ) :
+ rvertical.test( pos[ 0 ] ) ?
+ [ "center" ].concat( pos ) :
+ [ "center", "center" ];
}
- },
-
- resize: function (event, ui) {
- var that = $(this).data("ui-resizable"),
- o = that.options,
- os = that.originalSize,
- op = that.originalPosition,
- delta = {
- height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,
- top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0
- },
-
- _alsoResize = function (exp, c) {
- $(exp).each(function() {
- var el = $(this), start = $(this).data("ui-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;
- }
- });
+ pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
+ pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
- el.css(style);
- });
- };
+ // calculate offsets
+ horizontalOffset = roffset.exec( pos[ 0 ] );
+ verticalOffset = roffset.exec( pos[ 1 ] );
+ offsets[ this ] = [
+ horizontalOffset ? horizontalOffset[ 0 ] : 0,
+ verticalOffset ? verticalOffset[ 0 ] : 0
+ ];
- if (typeof(o.alsoResize) === "object" && !o.alsoResize.nodeType) {
- $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });
- }else{
- _alsoResize(o.alsoResize);
- }
- },
+ // reduce to just the positions without the offsets
+ options[ this ] = [
+ rposition.exec( pos[ 0 ] )[ 0 ],
+ rposition.exec( pos[ 1 ] )[ 0 ]
+ ];
+ });
- stop: function () {
- $(this).removeData("resizable-alsoresize");
+ // normalize collision option
+ if ( collision.length === 1 ) {
+ collision[ 1 ] = collision[ 0 ];
}
-});
-
-$.ui.plugin.add("resizable", "ghost", {
- start: function() {
-
- var that = $(this).data("ui-resizable"), o = that.options, cs = that.size;
-
- that.ghost = that.originalElement.clone();
- that.ghost
- .css({ opacity: 0.25, display: "block", position: "relative", height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
- .addClass("ui-resizable-ghost")
- .addClass(typeof o.ghost === "string" ? o.ghost : "");
-
- that.ghost.appendTo(that.helper);
-
- },
-
- resize: function(){
- var that = $(this).data("ui-resizable");
- if (that.ghost) {
- that.ghost.css({ position: "relative", height: that.size.height, width: that.size.width });
- }
- },
-
- stop: function() {
- var that = $(this).data("ui-resizable");
- if (that.ghost && that.helper) {
- that.helper.get(0).removeChild(that.ghost.get(0));
- }
+ if ( options.at[ 0 ] === "right" ) {
+ basePosition.left += targetWidth;
+ } else if ( options.at[ 0 ] === "center" ) {
+ basePosition.left += targetWidth / 2;
}
-});
-
-$.ui.plugin.add("resizable", "grid", {
+ if ( options.at[ 1 ] === "bottom" ) {
+ basePosition.top += targetHeight;
+ } else if ( options.at[ 1 ] === "center" ) {
+ basePosition.top += targetHeight / 2;
+ }
- resize: function() {
- var that = $(this).data("ui-resizable"),
- o = that.options,
- cs = that.size,
- os = that.originalSize,
- op = that.originalPosition,
- a = that.axis,
- grid = typeof o.grid === "number" ? [o.grid, o.grid] : o.grid,
- gridX = (grid[0]||1),
- gridY = (grid[1]||1),
- ox = Math.round((cs.width - os.width) / gridX) * gridX,
- oy = Math.round((cs.height - os.height) / gridY) * gridY,
- newWidth = os.width + ox,
- newHeight = os.height + oy,
- isMaxWidth = o.maxWidth && (o.maxWidth < newWidth),
- isMaxHeight = o.maxHeight && (o.maxHeight < newHeight),
- isMinWidth = o.minWidth && (o.minWidth > newWidth),
- isMinHeight = o.minHeight && (o.minHeight > newHeight);
+ atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
+ basePosition.left += atOffset[ 0 ];
+ basePosition.top += atOffset[ 1 ];
- o.grid = grid;
+ return this.each(function() {
+ var collisionPosition, using,
+ elem = $( this ),
+ elemWidth = elem.outerWidth(),
+ elemHeight = elem.outerHeight(),
+ marginLeft = parseCss( this, "marginLeft" ),
+ marginTop = parseCss( this, "marginTop" ),
+ collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
+ collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
+ position = $.extend( {}, basePosition ),
+ myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
- if (isMinWidth) {
- newWidth = newWidth + gridX;
- }
- if (isMinHeight) {
- newHeight = newHeight + gridY;
- }
- if (isMaxWidth) {
- newWidth = newWidth - gridX;
- }
- if (isMaxHeight) {
- newHeight = newHeight - gridY;
+ if ( options.my[ 0 ] === "right" ) {
+ position.left -= elemWidth;
+ } else if ( options.my[ 0 ] === "center" ) {
+ position.left -= elemWidth / 2;
}
- if (/^(se|s|e)$/.test(a)) {
- that.size.width = newWidth;
- that.size.height = newHeight;
- } else if (/^(ne)$/.test(a)) {
- that.size.width = newWidth;
- that.size.height = newHeight;
- that.position.top = op.top - oy;
- } else if (/^(sw)$/.test(a)) {
- that.size.width = newWidth;
- that.size.height = newHeight;
- that.position.left = op.left - ox;
- } else {
- that.size.width = newWidth;
- that.size.height = newHeight;
- that.position.top = op.top - oy;
- that.position.left = op.left - ox;
+ if ( options.my[ 1 ] === "bottom" ) {
+ position.top -= elemHeight;
+ } else if ( options.my[ 1 ] === "center" ) {
+ position.top -= elemHeight / 2;
}
- }
-
-});
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-$.widget("ui.selectable", $.ui.mouse, {
- version: "1.10.2",
- options: {
- appendTo: "body",
- autoRefresh: true,
- distance: 0,
- filter: "*",
- tolerance: "touch",
-
- // callbacks
- selected: null,
- selecting: null,
- start: null,
- stop: null,
- unselected: null,
- unselecting: null
- },
- _create: function() {
- var selectees,
- that = this;
-
- this.element.addClass("ui-selectable");
-
- this.dragged = false;
-
- // cache selectee children based on filter
- this.refresh = function() {
- selectees = $(that.options.filter, that.element[0]);
- selectees.addClass("ui-selectee");
- selectees.each(function() {
- var $this = $(this),
- 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");
- this._mouseDestroy();
- },
- _mouseStart: function(event) {
- var that = this,
- options = this.options;
-
- this.opos = [event.pageX, event.pageY];
+ position.left += myOffset[ 0 ];
+ position.top += myOffset[ 1 ];
- if (this.options.disabled) {
- return;
+ // if the browser doesn't support fractions, then round for consistent results
+ if ( !$.support.offsetFractions ) {
+ position.left = round( position.left );
+ position.top = round( position.top );
}
- this.selectees = $(options.filter, this.element[0]);
-
- this._trigger("start", event);
-
- $(options.appendTo).append(this.helper);
- // position helper (lasso)
- this.helper.css({
- "left": event.pageX,
- "top": event.pageY,
- "width": 0,
- "height": 0
- });
-
- if (options.autoRefresh) {
- this.refresh();
- }
+ collisionPosition = {
+ marginLeft: marginLeft,
+ marginTop: marginTop
+ };
- this.selectees.filter(".ui-selected").each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.startselected = true;
- if (!event.metaKey && !event.ctrlKey) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
+ $.each( [ "left", "top" ], function( i, dir ) {
+ if ( $.ui.position[ collision[ i ] ] ) {
+ $.ui.position[ collision[ i ] ][ dir ]( position, {
+ targetWidth: targetWidth,
+ targetHeight: targetHeight,
+ elemWidth: elemWidth,
+ elemHeight: elemHeight,
+ collisionPosition: collisionPosition,
+ collisionWidth: collisionWidth,
+ collisionHeight: collisionHeight,
+ offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
+ my: options.my,
+ at: options.at,
+ within: within,
+ elem : elem
});
}
});
- $(event.target).parents().addBack().each(function() {
- var doSelect,
- selectee = $.data(this, "selectable-item");
- if (selectee) {
- doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected");
- selectee.$element
- .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
- .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
- selectee.unselecting = !doSelect;
- selectee.selecting = doSelect;
- selectee.selected = doSelect;
- // selectable (UN)SELECTING callback
- if (doSelect) {
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
+ if ( options.using ) {
+ // adds feedback as second argument to using callback, if present
+ using = function( props ) {
+ var left = targetOffset.left - position.left,
+ right = left + targetWidth - elemWidth,
+ top = targetOffset.top - position.top,
+ bottom = top + targetHeight - elemHeight,
+ feedback = {
+ target: {
+ element: target,
+ left: targetOffset.left,
+ top: targetOffset.top,
+ width: targetWidth,
+ height: targetHeight
+ },
+ element: {
+ element: elem,
+ left: position.left,
+ top: position.top,
+ width: elemWidth,
+ height: elemHeight
+ },
+ horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
+ vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
+ };
+ if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
+ feedback.horizontal = "center";
+ }
+ if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
+ feedback.vertical = "middle";
+ }
+ if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
+ feedback.important = "horizontal";
} else {
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
+ feedback.important = "vertical";
}
- return false;
- }
- });
-
- },
-
- _mouseDrag: function(event) {
-
- this.dragged = true;
-
- if (this.options.disabled) {
- return;
+ options.using.call( this, props, feedback );
+ };
}
- var tmp,
- that = this,
- options = this.options,
- x1 = this.opos[0],
- y1 = this.opos[1],
- x2 = event.pageX,
- y2 = event.pageY;
-
- if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }
- if (y1 > y2) { 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"),
- hit = false;
-
- //prevent helper from being selected if appendTo: selectable
- if (!selectee || selectee.element === that.element[0]) {
- return;
- }
+ elem.offset( $.extend( position, { using: using } ) );
+ });
+};
- 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);
- }
+$.ui.position = {
+ fit: {
+ left: function( position, data ) {
+ var within = data.within,
+ withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
+ outerWidth = within.width,
+ collisionPosLeft = position.left - data.collisionPosition.marginLeft,
+ overLeft = withinOffset - collisionPosLeft,
+ overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
+ newOverRight;
- if (hit) {
- // SELECT
- if (selectee.selected) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
- }
- if (selectee.unselecting) {
- selectee.$element.removeClass("ui-unselecting");
- selectee.unselecting = false;
- }
- if (!selectee.selecting) {
- selectee.$element.addClass("ui-selecting");
- selectee.selecting = true;
- // selectable SELECTING callback
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- }
- } else {
- // UNSELECT
- if (selectee.selecting) {
- if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
- selectee.$element.removeClass("ui-selecting");
- selectee.selecting = false;
- selectee.$element.addClass("ui-selected");
- selectee.selected = true;
+ // element is wider than within
+ if ( data.collisionWidth > outerWidth ) {
+ // element is initially over the left side of within
+ if ( overLeft > 0 && overRight <= 0 ) {
+ newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
+ position.left += overLeft - newOverRight;
+ // element is initially over right side of within
+ } else if ( overRight > 0 && overLeft <= 0 ) {
+ position.left = withinOffset;
+ // element is initially over both left and right sides of within
+ } else {
+ if ( overLeft > overRight ) {
+ position.left = withinOffset + outerWidth - data.collisionWidth;
} else {
- selectee.$element.removeClass("ui-selecting");
- selectee.selecting = false;
- if (selectee.startselected) {
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- }
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- if (selectee.selected) {
- if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
-
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
+ position.left = withinOffset;
}
}
- }
- });
-
- return false;
- },
-
- _mouseStop: function(event) {
- var that = this;
-
- this.dragged = false;
-
- $(".ui-unselecting", this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass("ui-unselecting");
- selectee.unselecting = false;
- selectee.startselected = false;
- that._trigger("unselected", event, {
- unselected: selectee.element
- });
- });
- $(".ui-selecting", this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass("ui-selecting").addClass("ui-selected");
- selectee.selecting = false;
- selectee.selected = true;
- selectee.startselected = true;
- that._trigger("selected", event, {
- selected: selectee.element
- });
- });
- this._trigger("stop", event);
-
- this.helper.remove();
-
- return false;
- }
-
-});
-
-})(jQuery);
-
-(function( $, undefined ) {
-
-/*jshint loopfunc: true */
-
-function isOverAxis( x, reference, size ) {
- return ( x > reference ) && ( x < ( reference + size ) );
-}
-
-function isFloating(item) {
- return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display"));
-}
-
-$.widget("ui.sortable", $.ui.mouse, {
- version: "1.10.2",
- widgetEventPrefix: "sort",
- ready: false,
- options: {
- appendTo: "parent",
- axis: false,
- connectWith: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- dropOnEmpty: true,
- forcePlaceholderSize: false,
- forceHelperSize: false,
- grid: false,
- handle: false,
- helper: "original",
- items: "> *",
- opacity: false,
- placeholder: false,
- revert: false,
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- scope: "default",
- tolerance: "intersect",
- zIndex: 1000,
-
- // callbacks
- activate: null,
- beforeStop: null,
- change: null,
- deactivate: null,
- out: null,
- over: null,
- receive: null,
- remove: null,
- sort: null,
- start: null,
- stop: null,
- update: null
- },
- _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" || isFloating(this.items[0].item) : false;
-
- //Let's determine the parent's offset
- this.offset = this.element.offset();
-
- //Initialize mouse events for interaction
- this._mouseInit();
-
- //We're ready to go
- this.ready = true;
-
- },
-
- _destroy: function() {
- this.element
- .removeClass("ui-sortable ui-sortable-disabled");
- this._mouseDestroy();
-
- for ( var i = this.items.length - 1; i >= 0; i-- ) {
- this.items[i].item.removeData(this.widgetName + "-item");
- }
-
- return this;
- },
-
- _setOption: function(key, value){
- if ( key === "disabled" ) {
- this.options[ key ] = value;
-
- this.widget().toggleClass( "ui-sortable-disabled", !!value );
- } else {
- // Don't call widget base _setOption for disable as it adds ui-state-disabled class
- $.Widget.prototype._setOption.apply(this, arguments);
- }
- },
-
- _mouseCapture: function(event, overrideHandle) {
- var currentItem = null,
- validHandle = false,
- that = this;
-
- if (this.reverting) {
- return false;
- }
-
- if(this.options.disabled || this.options.type === "static") {
- return false;
- }
-
- //We have to refresh the items data once first
- this._refreshItems(event);
-
- //Find out if the clicked node (or one of its parents) is a actual item in this.items
- $(event.target).parents().each(function() {
- if($.data(this, that.widgetName + "-item") === that) {
- currentItem = $(this);
- return false;
- }
- });
- if($.data(event.target, that.widgetName + "-item") === that) {
- currentItem = $(event.target);
- }
-
- if(!currentItem) {
- return false;
- }
- if(this.options.handle && !overrideHandle) {
- $(this.options.handle, currentItem).find("*").addBack().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 i, body,
- o = this.options;
-
- this.currentContainer = this;
-
- //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
- this.refreshPositions();
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Get the next scrolling parent
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.currentItem.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- // Only after we got the offset, we can change the helper's position to absolute
- // TODO: Still need to figure out a way to make relative sorting possible
- this.helper.css("position", "absolute");
- this.cssPosition = this.helper.css("position");
-
- //Generate the original position
- this.originalPosition = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Cache the former DOM position
- this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
-
- //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
- if(this.helper[0] !== this.currentItem[0]) {
- this.currentItem.hide();
- }
-
- //Create the placeholder
- this._createPlaceholder();
-
- //Set a containment if given in the options
- if(o.containment) {
- this._setContainment();
- }
-
- if( o.cursor && o.cursor !== "auto" ) { // cursor option
- body = this.document.find( "body" );
-
- // support: IE
- this.storedCursor = body.css( "cursor" );
- body.css( "cursor", o.cursor );
-
- this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body );
- }
-
- 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 ( i = this.containers.length - 1; i >= 0; i-- ) {
- this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
- }
- }
-
- //Prepare possible droppables
- if($.ui.ddmanager) {
- $.ui.ddmanager.current = this;
- }
-
- if ($.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
- this.dragging = true;
-
- this.helper.addClass("ui-sortable-helper");
- this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
- return true;
-
- },
-
- _mouseDrag: function(event) {
- var i, item, itemElement, intersection,
- o = this.options,
- scrolled = false;
-
- //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) {
- 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;
- }
-
+ // too far left -> align with left edge
+ } else if ( overLeft > 0 ) {
+ position.left += overLeft;
+ // too far right -> align with right edge
+ } else if ( overRight > 0 ) {
+ position.left -= overRight;
+ // adjust based on position and margin
} else {
-
- 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 (i = this.items.length - 1; i >= 0; i--) {
-
- //Cache variables and intersection, continue if no intersection
- item = this.items[i];
- itemElement = item.item[0];
- intersection = this._intersectsWithPointer(item);
- if (!intersection) {
- continue;
- }
-
- // Only put the placeholder inside the current Container, skip all
- // items form other containers. This works because when moving
- // an item from one container to another the
- // currentContainer is switched before the placeholder is moved.
- //
- // Without this moving items in "sub-sortables" can cause the placeholder to jitter
- // beetween the outer and inner container.
- if (item.instance !== this.currentContainer) {
- continue;
+ position.left = max( position.left - collisionPosLeft, position.left );
}
+ },
+ top: function( position, data ) {
+ var within = data.within,
+ withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
+ outerHeight = data.within.height,
+ collisionPosTop = position.top - data.collisionPosition.marginTop,
+ overTop = withinOffset - collisionPosTop,
+ overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
+ newOverBottom;
- // cannot intersect with itself
- // no useless actions that have been done before
- // no action if the item moved is the parent of the item checked
- if (itemElement !== this.currentItem[0] &&
- this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement &&
- !$.contains(this.placeholder[0], itemElement) &&
- (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true)
- ) {
-
- this.direction = intersection === 1 ? "down" : "up";
-
- if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {
- this._rearrange(event, item);
+ // element is taller than within
+ if ( data.collisionHeight > outerHeight ) {
+ // element is initially over the top of within
+ if ( overTop > 0 && overBottom <= 0 ) {
+ newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
+ position.top += overTop - newOverBottom;
+ // element is initially over bottom of within
+ } else if ( overBottom > 0 && overTop <= 0 ) {
+ position.top = withinOffset;
+ // element is initially over both top and bottom of within
} else {
- break;
- }
-
- this._trigger("change", event, this._uiHash());
- break;
- }
- }
-
- //Post events to containers
- this._contactContainers(event);
-
- //Interconnect with droppables
- if($.ui.ddmanager) {
- $.ui.ddmanager.drag(this, event);
- }
-
- //Call callbacks
- this._trigger("sort", event, this._uiHash());
-
- this.lastPositionAbs = this.positionAbs;
- return false;
-
- },
-
- _mouseStop: function(event, noPropagation) {
-
- if(!event) {
- return;
- }
-
- //If we are using droppables, inform the manager about the drop
- if ($.ui.ddmanager && !this.options.dropBehaviour) {
- $.ui.ddmanager.drop(this, event);
- }
-
- if(this.options.revert) {
- var that = this,
- cur = this.placeholder.offset(),
- axis = this.options.axis,
- animation = {};
-
- if ( !axis || axis === "x" ) {
- animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);
- }
- if ( !axis || axis === "y" ) {
- animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);
- }
- this.reverting = true;
- $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
- that._clear(event);
- });
- } else {
- this._clear(event, noPropagation);
- }
-
- return false;
-
- },
-
- cancel: function() {
-
- if(this.dragging) {
-
- this._mouseUp({ target: null });
-
- if(this.options.helper === "original") {
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- //Post deactivating events to containers
- for (var i = this.containers.length - 1; i >= 0; i--){
- this.containers[i]._trigger("deactivate", null, this._uiHash(this));
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", null, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- if (this.placeholder) {
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- if(this.placeholder[0].parentNode) {
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
- }
- if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {
- this.helper.remove();
- }
-
- $.extend(this, {
- helper: null,
- dragging: false,
- reverting: false,
- _noFinalSort: null
- });
-
- if(this.domPosition.prev) {
- $(this.domPosition.prev).after(this.currentItem);
- } else {
- $(this.domPosition.parent).prepend(this.currentItem);
- }
- }
-
- return this;
-
- },
-
- serialize: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected),
- 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),
- 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,
- l = item.left,
- r = l + item.width,
- t = item.top,
- b = t + item.height,
- dyClick = this.offset.click.top,
- dxClick = this.offset.click.left,
- isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
-
- if ( this.options.tolerance === "pointer" ||
- this.options.forcePointerForContainers ||
- (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
- ) {
- return isOverElement;
- } else {
-
- return (l < x1 + (this.helperProportions.width / 2) && // Right Half
- x2 - (this.helperProportions.width / 2) < r && // Left Half
- t < y1 + (this.helperProportions.height / 2) && // Bottom Half
- y2 - (this.helperProportions.height / 2) < b ); // Top Half
-
- }
- },
-
- _intersectsWithPointer: function(item) {
-
- var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
- isOverElementWidth = (this.options.axis === "y") || 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 = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
- isOverRightHalf = 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 i, j, cur, inst,
- items = [],
- queries = [],
- connectWith = this._connectWith();
-
- if(connectWith && connected) {
- for (i = connectWith.length - 1; i >= 0; i--){
- cur = $(connectWith[i]);
- for ( j = cur.length - 1; j >= 0; j--){
- inst = $.data(cur[j], this.widgetFullName);
- 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 (i = queries.length - 1; i >= 0; i--){
- queries[i][0].each(function() {
- items.push(this);
- });
- }
-
- return $(items);
-
- },
-
- _removeCurrentsFromItems: function() {
-
- var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
-
- this.items = $.grep(this.items, function (item) {
- for (var j=0; j < list.length; j++) {
- if(list[j] === item.item[0]) {
- return false;
- }
- }
- return true;
- });
-
- },
-
- _refreshItems: function(event) {
-
- this.items = [];
- this.containers = [this];
-
- var i, j, cur, inst, targetData, _queries, item, queriesLength,
- items = this.items,
- queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],
- connectWith = this._connectWith();
-
- if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
- for (i = connectWith.length - 1; i >= 0; i--){
- cur = $(connectWith[i]);
- for (j = cur.length - 1; j >= 0; j--){
- inst = $.data(cur[j], this.widgetFullName);
- 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 (i = queries.length - 1; i >= 0; i--) {
- targetData = queries[i][1];
- _queries = queries[i][0];
-
- for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {
- item = $(_queries[j]);
-
- item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)
-
- items.push({
- item: item,
- instance: targetData,
- width: 0, height: 0,
- left: 0, top: 0
- });
- }
- }
-
- },
-
- refreshPositions: function(fast) {
-
- //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
- if(this.offsetParent && this.helper) {
- this.offset.parent = this._getParentOffset();
- }
-
- var i, item, t, p;
-
- for (i = this.items.length - 1; i >= 0; i--){
- 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;
- }
-
- t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
-
- if (!fast) {
- item.width = t.outerWidth();
- item.height = t.outerHeight();
- }
-
- 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 (i = this.containers.length - 1; i >= 0; i--){
- p = this.containers[i].element.offset();
- this.containers[i].containerCache.left = p.left;
- this.containers[i].containerCache.top = p.top;
- this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
- this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
- }
- }
-
- return this;
- },
-
- _createPlaceholder: function(that) {
- that = that || this;
- var className,
- o = that.options;
-
- if(!o.placeholder || o.placeholder.constructor === String) {
- className = o.placeholder;
- o.placeholder = {
- element: function() {
-
- var nodeName = that.currentItem[0].nodeName.toLowerCase(),
- element = $( that.document[0].createElement( nodeName ) )
- .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
- .removeClass("ui-sortable-helper");
-
- if ( nodeName === "tr" ) {
- // Use a high colspan to force the td to expand the full
- // width of the table (browsers are smart enough to
- // handle this properly)
- element.append( "<td colspan='99'>&#160;</td>" );
- } else if ( nodeName === "img" ) {
- element.attr( "src", that.currentItem.attr( "src" ) );
- }
-
- if ( !className ) {
- element.css( "visibility", "hidden" );
- }
-
- return element;
- },
- 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 ( overTop > overBottom ) {
+ position.top = withinOffset + outerHeight - data.collisionHeight;
+ } else {
+ position.top = withinOffset;
}
-
- //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
- if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
- if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
}
- };
- }
-
- //Create the placeholder
- that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
-
- //Append it after the actual current item
- that.currentItem.after(that.placeholder);
-
- //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
- o.placeholder.update(that, that.placeholder);
-
- },
-
- _contactContainers: function(event) {
- var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,
- innermostContainer = null,
- innermostIndex = null;
-
- // get innermost container that intersects with item
- for (i = this.containers.length - 1; i >= 0; i--) {
-
- // never consider a container that's located within the item itself
- if($.contains(this.currentItem[0], this.containers[i].element[0])) {
- continue;
- }
-
- if(this._intersectsWith(this.containers[i].containerCache)) {
-
- // if we've already found a container and it's more "inner" than this, then continue
- if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {
- continue;
- }
-
- innermostContainer = this.containers[i];
- innermostIndex = i;
-
+ // too far up -> align with top
+ } else if ( overTop > 0 ) {
+ position.top += overTop;
+ // too far down -> align with bottom edge
+ } else if ( overBottom > 0 ) {
+ position.top -= overBottom;
+ // adjust based on position and margin
} else {
- // 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) {
- if (!this.containers[innermostIndex].containerCache.over) {
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- }
- } else {
-
- //When entering a new container, we will find the item with the least distance and append our item near it
- dist = 10000;
- itemWithLeastDistance = null;
- floating = innermostContainer.floating || isFloating(this.currentItem);
- posProperty = floating ? "left" : "top";
- sizeProperty = floating ? "width" : "height";
- base = this.positionAbs[posProperty] + this.offset.click[posProperty];
- for (j = this.items.length - 1; j >= 0; j--) {
- if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
- continue;
- }
- if(this.items[j].item[0] === this.currentItem[0]) {
- continue;
- }
- if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {
- continue;
- }
- cur = this.items[j].item.offset()[posProperty];
- nearBottom = false;
- if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
- nearBottom = true;
- cur += this.items[j][sizeProperty];
- }
-
- if(Math.abs(cur - base) < dist) {
- dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
- this.direction = nearBottom ? "up": "down";
- }
- }
-
- //Check if dropOnEmpty is enabled
- if(!itemWithLeastDistance && !this.options.dropOnEmpty) {
- return;
- }
-
- if(this.currentContainer === this.containers[innermostIndex]) {
- return;
- }
-
- 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));
- this.currentContainer = this.containers[innermostIndex];
-
- //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,
- helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem);
-
- //Add the helper to the DOM if that didn't happen already
- if(!helper.parents("body").length) {
- $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
- }
-
- if(helper[0] === this.currentItem[0]) {
- this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
- }
-
- if(!helper[0].style.width || o.forceHelperSize) {
- helper.width(this.currentItem.width());
- }
- if(!helper[0].style.height || o.forceHelperSize) {
- helper.height(this.currentItem.height());
- }
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj === "string") {
- obj = obj.split(" ");
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ("left" in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ("right" in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ("top" in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ("bottom" in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- // This needs to be actually done for all browsers, since pageX/pageY includes this information
- // with an ugly IE fix
- if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
- 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 ce, co, over,
- 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)) {
- ce = $(o.containment)[0];
- co = $(o.containment).offset();
- 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,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
- scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top + // The absolute mouse position
- this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left + // The absolute mouse position
- this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var top, left,
- o = this.options,
- pageX = event.pageX,
- pageY = event.pageY,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- // This is another very weird special case that only happens for relative elements:
- // 1. If the css position is relative
- // 2. and the scroll parent is the document or similar to the offset parent
- // we have to refresh the relative offset during the scroll so there are no jumps
- if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {
- this.offset.relative = this._getRelativeOffset();
- }
-
- /*
- * - 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) {
- 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;
-
- 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;
+ position.top = max( position.top - collisionPosTop, position.top );
}
-
}
-
- return {
- top: (
- pageY - // The absolute mouse position
- this.offset.click.top - // Click offset (relative to the element)
- this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX - // The absolute mouse position
- this.offset.click.left - // Click offset (relative to the element)
- this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
- };
-
- },
-
- _rearrange: function(event, i, a, hardRefresh) {
-
- a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling));
-
- //Various things done here to improve the performance:
- // 1. we create a setTimeout, that calls refreshPositions
- // 2. on the instance, we have a counter variable, that get's higher after every append
- // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
- // 4. this lets only the last addition to the timeout stack through
- this.counter = this.counter ? ++this.counter : 1;
- var counter = this.counter;
-
- this._delay(function() {
- if(counter === this.counter) {
- this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
- }
- });
-
},
+ flip: {
+ left: function( position, data ) {
+ var within = data.within,
+ withinOffset = within.offset.left + within.scrollLeft,
+ outerWidth = within.width,
+ offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
+ collisionPosLeft = position.left - data.collisionPosition.marginLeft,
+ overLeft = collisionPosLeft - offsetLeft,
+ overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
+ myOffset = data.my[ 0 ] === "left" ?
+ -data.elemWidth :
+ data.my[ 0 ] === "right" ?
+ data.elemWidth :
+ 0,
+ atOffset = data.at[ 0 ] === "left" ?
+ data.targetWidth :
+ data.at[ 0 ] === "right" ?
+ -data.targetWidth :
+ 0,
+ offset = -2 * data.offset[ 0 ],
+ newOverRight,
+ newOverLeft;
- _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 i,
- delayedTriggers = [];
-
- // We first have to update the dom position of the actual currentItem
- // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
- if(!this._noFinalSort && this.currentItem.parent().length) {
- this.placeholder.before(this.currentItem);
- }
- this._noFinalSort = null;
-
- if(this.helper[0] === this.currentItem[0]) {
- for(i in this._storedCSS) {
- if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") {
- this._storedCSS[i] = "";
+ if ( overLeft < 0 ) {
+ newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
+ if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
+ position.left += myOffset + atOffset + offset;
}
}
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- if(this.fromOutside && !noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
- }
- if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
- }
-
- // Check if the items Container has Changed and trigger appropriate
- // events.
- if (this !== this.currentContainer) {
- if(!noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
- delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- }
- }
-
-
- //Post events to containers
- for (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 ) {
- this.document.find( "body" ).css( "cursor", this.storedCursor );
- this.storedStylesheet.remove();
- }
- if(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(!noPropagation) {
- this._trigger("beforeStop", event, this._uiHash());
- for (i=0; i < delayedTriggers.length; i++) {
- delayedTriggers[i].call(this, event);
- } //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return false;
- }
-
- if(!noPropagation) {
- this._trigger("beforeStop", event, this._uiHash());
- }
-
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
-
- if(this.helper[0] !== this.currentItem[0]) {
- this.helper.remove();
- }
- this.helper = null;
-
- if(!noPropagation) {
- for (i=0; i < delayedTriggers.length; i++) {
- delayedTriggers[i].call(this, event);
- } //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return true;
-
- },
-
- _trigger: function() {
- if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
- this.cancel();
- }
- },
-
- _uiHash: function(_inst) {
- var inst = _inst || this;
- return {
- helper: inst.helper,
- placeholder: inst.placeholder || $([]),
- position: inst.position,
- originalPosition: inst.originalPosition,
- offset: inst.positionAbs,
- item: inst.currentItem,
- sender: _inst ? _inst.element : null
- };
- }
-
-});
-
-})(jQuery);
-
-(function($, undefined) {
-
-var dataSpace = "ui-effects-";
-
-$.effects = {
- effect: {}
-};
-
-/*!
- * jQuery Color Animations v2.1.2
- * https://github.com/jquery/jquery-color
- *
- * Copyright 2013 jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * Date: Wed Jan 16 08:47:09 2013 -0600
- */
-(function( jQuery, undefined ) {
-
- var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
-
- // plusequals test for += 100 -= 100
- rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
- // a set of RE's that can match strings and generate color tuples.
- stringParsers = [{
- re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ],
- execResult[ 3 ],
- execResult[ 4 ]
- ];
- }
- }, {
- re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ] * 2.55,
- execResult[ 2 ] * 2.55,
- execResult[ 3 ] * 2.55,
- execResult[ 4 ]
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ], 16 )
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
- ];
- }
- }, {
- re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- space: "hsla",
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ] / 100,
- execResult[ 3 ] / 100,
- execResult[ 4 ]
- ];
- }
- }],
-
- // jQuery.Color( )
- color = jQuery.Color = function( color, green, blue, alpha ) {
- return new jQuery.Color.fn.parse( color, green, blue, alpha );
- },
- spaces = {
- rgba: {
- props: {
- red: {
- idx: 0,
- type: "byte"
- },
- green: {
- idx: 1,
- type: "byte"
- },
- blue: {
- idx: 2,
- type: "byte"
+ else if ( overRight > 0 ) {
+ newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
+ if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
+ position.left += myOffset + atOffset + offset;
}
}
},
-
- hsla: {
- props: {
- hue: {
- idx: 0,
- type: "degrees"
- },
- saturation: {
- idx: 1,
- type: "percent"
- },
- lightness: {
- idx: 2,
- type: "percent"
+ top: function( position, data ) {
+ var within = data.within,
+ withinOffset = within.offset.top + within.scrollTop,
+ outerHeight = within.height,
+ offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
+ collisionPosTop = position.top - data.collisionPosition.marginTop,
+ overTop = collisionPosTop - offsetTop,
+ overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
+ top = data.my[ 1 ] === "top",
+ myOffset = top ?
+ -data.elemHeight :
+ data.my[ 1 ] === "bottom" ?
+ data.elemHeight :
+ 0,
+ atOffset = data.at[ 1 ] === "top" ?
+ data.targetHeight :
+ data.at[ 1 ] === "bottom" ?
+ -data.targetHeight :
+ 0,
+ offset = -2 * data.offset[ 1 ],
+ newOverTop,
+ newOverBottom;
+ if ( overTop < 0 ) {
+ newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
+ if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
+ position.top += myOffset + atOffset + offset;
}
}
- }
- },
- propTypes = {
- "byte": {
- floor: true,
- max: 255
- },
- "percent": {
- max: 1
- },
- "degrees": {
- mod: 360,
- floor: true
- }
- },
- support = color.support = {},
-
- // element for support tests
- supportElem = jQuery( "<p>" )[ 0 ],
-
- // colors = jQuery.Color.names
- colors,
-
- // local aliases of functions called often
- each = jQuery.each;
-
-// determine rgba support immediately
-supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
-support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
-
-// define cache name and alpha properties
-// for rgba and hsla spaces
-each( spaces, function( spaceName, space ) {
- space.cache = "_" + spaceName;
- space.props.alpha = {
- idx: 3,
- type: "percent",
- def: 1
- };
-});
-
-function clamp( value, prop, allowEmpty ) {
- var type = propTypes[ prop.type ] || {};
-
- if ( value == null ) {
- return (allowEmpty || !prop.def) ? null : prop.def;
- }
-
- // ~~ is an short way of doing floor for positive numbers
- value = type.floor ? ~~value : parseFloat( value );
-
- // IE will pass in empty strings as value for alpha,
- // which will hit this case
- if ( isNaN( value ) ) {
- return prop.def;
- }
-
- if ( type.mod ) {
- // we add mod before modding to make sure that negatives values
- // get converted properly: -10 -> 350
- return (value + type.mod) % type.mod;
- }
-
- // for now all property types without mod have min and max
- return 0 > value ? 0 : type.max < value ? type.max : value;
-}
-
-function stringParse( string ) {
- var inst = color(),
- rgba = inst._rgba = [];
-
- string = string.toLowerCase();
-
- each( stringParsers, function( i, parser ) {
- var parsed,
- match = parser.re.exec( string ),
- values = match && parser.parse( match ),
- spaceName = parser.space || "rgba";
-
- if ( values ) {
- parsed = inst[ spaceName ]( values );
-
- // if this was an rgba parse the assignment might happen twice
- // oh well....
- inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
- rgba = inst._rgba = parsed._rgba;
-
- // exit each( stringParsers ) here because we matched
- return false;
- }
- });
-
- // Found a stringParser that handled it
- if ( rgba.length ) {
-
- // if this came from a parsed string, force "transparent" when alpha is 0
- // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
- if ( rgba.join() === "0,0,0,0" ) {
- jQuery.extend( rgba, colors.transparent );
- }
- return inst;
- }
-
- // named colors
- return colors[ string ];
-}
-
-color.fn = jQuery.extend( color.prototype, {
- parse: function( red, green, blue, alpha ) {
- if ( red === undefined ) {
- this._rgba = [ null, null, null, null ];
- return this;
- }
- if ( red.jquery || red.nodeType ) {
- red = jQuery( red ).css( green );
- green = undefined;
- }
-
- var inst = this,
- type = jQuery.type( red ),
- rgba = this._rgba = [];
-
- // more than 1 argument specified - assume ( red, green, blue, alpha )
- if ( green !== undefined ) {
- red = [ red, green, blue, alpha ];
- type = "array";
- }
-
- if ( type === "string" ) {
- return this.parse( stringParse( red ) || colors._default );
- }
-
- if ( type === "array" ) {
- each( spaces.rgba.props, function( key, prop ) {
- rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
- });
- return this;
- }
-
- if ( type === "object" ) {
- if ( red instanceof color ) {
- each( spaces, function( spaceName, space ) {
- if ( red[ space.cache ] ) {
- inst[ space.cache ] = red[ space.cache ].slice();
- }
- });
- } else {
- each( spaces, function( spaceName, space ) {
- var cache = space.cache;
- each( space.props, function( key, prop ) {
-
- // if the cache doesn't exist, and we know how to convert
- if ( !inst[ cache ] && space.to ) {
-
- // if the value was null, we don't need to copy it
- // if the key was alpha, we don't need to copy it either
- if ( key === "alpha" || red[ key ] == null ) {
- return;
- }
- inst[ cache ] = space.to( inst._rgba );
- }
-
- // this is the only case where we allow nulls for ALL properties.
- // call clamp with alwaysAllowEmpty
- inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
- });
-
- // everything defined but alpha?
- if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
- // use the default of 1
- inst[ cache ][ 3 ] = 1;
- if ( space.from ) {
- inst._rgba = space.from( inst[ cache ] );
- }
- }
- });
- }
- return this;
- }
- },
- is: function( compare ) {
- var is = color( compare ),
- same = true,
- inst = this;
-
- each( spaces, function( _, space ) {
- var localCache,
- isCache = is[ space.cache ];
- if (isCache) {
- localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
- each( space.props, function( _, prop ) {
- if ( isCache[ prop.idx ] != null ) {
- same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
- return same;
- }
- });
- }
- return same;
- });
- return same;
- },
- _space: function() {
- var used = [],
- inst = this;
- each( spaces, function( spaceName, space ) {
- if ( inst[ space.cache ] ) {
- used.push( spaceName );
- }
- });
- return used.pop();
- },
- transition: function( other, distance ) {
- var end = color( other ),
- spaceName = end._space(),
- space = spaces[ spaceName ],
- startColor = this.alpha() === 0 ? color( "transparent" ) : this,
- start = startColor[ space.cache ] || space.to( startColor._rgba ),
- result = start.slice();
-
- end = end[ space.cache ];
- each( space.props, function( key, prop ) {
- var index = prop.idx,
- startValue = start[ index ],
- endValue = end[ index ],
- type = propTypes[ prop.type ] || {};
-
- // if null, don't override start value
- if ( endValue === null ) {
- return;
- }
- // if null - use end
- if ( startValue === null ) {
- result[ index ] = endValue;
- } else {
- if ( type.mod ) {
- if ( endValue - startValue > type.mod / 2 ) {
- startValue += type.mod;
- } else if ( startValue - endValue > type.mod / 2 ) {
- startValue -= type.mod;
- }
+ else if ( overBottom > 0 ) {
+ newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
+ if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
+ position.top += myOffset + atOffset + offset;
}
- result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
}
- });
- return this[ spaceName ]( result );
- },
- blend: function( opaque ) {
- // if we are already opaque - return ourself
- if ( this._rgba[ 3 ] === 1 ) {
- return this;
- }
-
- var rgb = this._rgba.slice(),
- a = rgb.pop(),
- blend = color( opaque )._rgba;
-
- return color( jQuery.map( rgb, function( v, i ) {
- return ( 1 - a ) * blend[ i ] + a * v;
- }));
- },
- toRgbaString: function() {
- var prefix = "rgba(",
- rgba = jQuery.map( this._rgba, function( v, i ) {
- return v == null ? ( i > 2 ? 1 : 0 ) : v;
- });
-
- if ( rgba[ 3 ] === 1 ) {
- rgba.pop();
- prefix = "rgb(";
- }
-
- return prefix + rgba.join() + ")";
- },
- toHslaString: function() {
- var prefix = "hsla(",
- hsla = jQuery.map( this.hsla(), function( v, i ) {
- if ( v == null ) {
- v = i > 2 ? 1 : 0;
- }
-
- // catch 1 and 2
- if ( i && i < 3 ) {
- v = Math.round( v * 100 ) + "%";
- }
- return v;
- });
-
- if ( hsla[ 3 ] === 1 ) {
- hsla.pop();
- prefix = "hsl(";
- }
- return prefix + hsla.join() + ")";
- },
- toHexString: function( includeAlpha ) {
- var rgba = this._rgba.slice(),
- alpha = rgba.pop();
-
- if ( includeAlpha ) {
- rgba.push( ~~( alpha * 255 ) );
}
-
- return "#" + jQuery.map( rgba, function( v ) {
-
- // default to 0 when nulls exist
- v = ( v || 0 ).toString( 16 );
- return v.length === 1 ? "0" + v : v;
- }).join("");
},
- toString: function() {
- return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
- }
-});
-color.fn.parse.prototype = color.fn;
-
-// hsla conversions adapted from:
-// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
-
-function hue2rgb( p, q, h ) {
- h = ( h + 1 ) % 1;
- if ( h * 6 < 1 ) {
- return p + (q - p) * h * 6;
- }
- if ( h * 2 < 1) {
- return q;
- }
- if ( h * 3 < 2 ) {
- return p + (q - p) * ((2/3) - h) * 6;
- }
- return p;
-}
-
-spaces.hsla.to = function ( rgba ) {
- if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
- return [ null, null, null, rgba[ 3 ] ];
- }
- var r = rgba[ 0 ] / 255,
- g = rgba[ 1 ] / 255,
- b = rgba[ 2 ] / 255,
- a = rgba[ 3 ],
- max = Math.max( r, g, b ),
- min = Math.min( r, g, b ),
- diff = max - min,
- add = max + min,
- l = add * 0.5,
- h, s;
-
- if ( min === max ) {
- h = 0;
- } else if ( r === max ) {
- h = ( 60 * ( g - b ) / diff ) + 360;
- } else if ( g === max ) {
- h = ( 60 * ( b - r ) / diff ) + 120;
- } else {
- h = ( 60 * ( r - g ) / diff ) + 240;
- }
-
- // chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
- // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
- if ( diff === 0 ) {
- s = 0;
- } else if ( l <= 0.5 ) {
- s = diff / add;
- } else {
- s = diff / ( 2 - add );
- }
- return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
-};
-
-spaces.hsla.from = function ( hsla ) {
- if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
- return [ null, null, null, hsla[ 3 ] ];
- }
- var h = hsla[ 0 ] / 360,
- s = hsla[ 1 ],
- l = hsla[ 2 ],
- a = hsla[ 3 ],
- q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
- p = 2 * l - q;
-
- return [
- Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
- Math.round( hue2rgb( p, q, h ) * 255 ),
- Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
- a
- ];
-};
-
-
-each( spaces, function( spaceName, space ) {
- var props = space.props,
- cache = space.cache,
- to = space.to,
- from = space.from;
-
- // makes rgba() and hsla()
- color.fn[ spaceName ] = function( value ) {
-
- // generate a cache for this space if it doesn't exist
- if ( to && !this[ cache ] ) {
- this[ cache ] = to( this._rgba );
- }
- if ( value === undefined ) {
- return this[ cache ].slice();
- }
-
- var ret,
- type = jQuery.type( value ),
- arr = ( type === "array" || type === "object" ) ? value : arguments,
- local = this[ cache ].slice();
-
- each( props, function( key, prop ) {
- var val = arr[ type === "object" ? key : prop.idx ];
- if ( val == null ) {
- val = local[ prop.idx ];
- }
- local[ prop.idx ] = clamp( val, prop );
- });
-
- if ( from ) {
- ret = color( from( local ) );
- ret[ cache ] = local;
- return ret;
- } else {
- return color( local );
- }
- };
-
- // makes red() green() blue() alpha() hue() saturation() lightness()
- each( props, function( key, prop ) {
- // alpha is included in more than one space
- if ( color.fn[ key ] ) {
- return;
+ flipfit: {
+ left: function() {
+ $.ui.position.flip.left.apply( this, arguments );
+ $.ui.position.fit.left.apply( this, arguments );
+ },
+ top: function() {
+ $.ui.position.flip.top.apply( this, arguments );
+ $.ui.position.fit.top.apply( this, arguments );
}
- color.fn[ key ] = function( value ) {
- var vtype = jQuery.type( value ),
- fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
- local = this[ fn ](),
- cur = local[ prop.idx ],
- match;
-
- if ( vtype === "undefined" ) {
- return cur;
- }
-
- if ( vtype === "function" ) {
- value = value.call( this, cur );
- vtype = jQuery.type( value );
- }
- if ( value == null && prop.empty ) {
- return this;
- }
- if ( vtype === "string" ) {
- match = rplusequals.exec( value );
- if ( match ) {
- value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
- }
- }
- local[ prop.idx ] = value;
- return this[ fn ]( local );
- };
- });
-});
-
-// add cssHook and .fx.step function for each named hook.
-// accept a space separated string of properties
-color.hook = function( hook ) {
- var hooks = hook.split( " " );
- each( hooks, function( i, hook ) {
- jQuery.cssHooks[ hook ] = {
- set: function( elem, value ) {
- var parsed, curElem,
- backgroundColor = "";
-
- if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
- value = color( parsed || value );
- if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
- curElem = hook === "backgroundColor" ? elem.parentNode : elem;
- while (
- (backgroundColor === "" || backgroundColor === "transparent") &&
- curElem && curElem.style
- ) {
- try {
- backgroundColor = jQuery.css( curElem, "backgroundColor" );
- curElem = curElem.parentNode;
- } catch ( e ) {
- }
- }
-
- value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
- backgroundColor :
- "_default" );
- }
-
- value = value.toRgbaString();
- }
- try {
- elem.style[ hook ] = value;
- } catch( e ) {
- // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
- }
- }
- };
- jQuery.fx.step[ hook ] = function( fx ) {
- if ( !fx.colorInit ) {
- fx.start = color( fx.elem, hook );
- fx.end = color( fx.end );
- fx.colorInit = true;
- }
- jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
- };
- });
-
-};
-
-color.hook( stepHooks );
-
-jQuery.cssHooks.borderColor = {
- expand: function( value ) {
- var expanded = {};
-
- each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
- expanded[ "border" + part + "Color" ] = value;
- });
- return expanded;
}
};
-// Basic color names only.
-// Usage of any of the other color names requires adding yourself or including
-// jquery.color.svg-names.js.
-colors = jQuery.Color.names = {
- // 4.1. Basic color keywords
- aqua: "#00ffff",
- black: "#000000",
- blue: "#0000ff",
- fuchsia: "#ff00ff",
- gray: "#808080",
- green: "#008000",
- lime: "#00ff00",
- maroon: "#800000",
- navy: "#000080",
- olive: "#808000",
- purple: "#800080",
- red: "#ff0000",
- silver: "#c0c0c0",
- teal: "#008080",
- white: "#ffffff",
- yellow: "#ffff00",
-
- // 4.2.3. "transparent" color keyword
- transparent: [ null, null, null, 0 ],
-
- _default: "#ffffff"
-};
-
-})( jQuery );
-
-
-/******************************************************************************/
-/****************************** CLASS ANIMATIONS ******************************/
-/******************************************************************************/
-(function() {
-
-var classAnimationActions = [ "add", "remove", "toggle" ],
- shorthandStyles = {
- border: 1,
- borderBottom: 1,
- borderColor: 1,
- borderLeft: 1,
- borderRight: 1,
- borderTop: 1,
- borderWidth: 1,
- margin: 1,
- padding: 1
- };
-
-$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
- $.fx.step[ prop ] = function( fx ) {
- if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
- jQuery.style( fx.elem, prop, fx.end );
- fx.setAttr = true;
- }
- };
-});
-
-function getElementStyles( elem ) {
- var key, len,
- style = elem.ownerDocument.defaultView ?
- elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
- elem.currentStyle,
- styles = {};
-
- if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
- len = style.length;
- while ( len-- ) {
- key = style[ len ];
- if ( typeof style[ key ] === "string" ) {
- styles[ $.camelCase( key ) ] = style[ key ];
- }
- }
- // support: Opera, IE <9
- } else {
- for ( key in style ) {
- if ( typeof style[ key ] === "string" ) {
- styles[ key ] = style[ key ];
- }
- }
- }
-
- return styles;
-}
-
-
-function styleDifference( oldStyle, newStyle ) {
- var diff = {},
- name, value;
-
- for ( name in newStyle ) {
- value = newStyle[ name ];
- if ( oldStyle[ name ] !== value ) {
- if ( !shorthandStyles[ name ] ) {
- if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
- diff[ name ] = value;
- }
- }
- }
- }
-
- return diff;
-}
+// fraction support test
+(function () {
+ var testElement, testElementParent, testElementStyle, offsetLeft, i,
+ body = document.getElementsByTagName( "body" )[ 0 ],
+ div = document.createElement( "div" );
-// support: jQuery <1.8
-if ( !$.fn.addBack ) {
- $.fn.addBack = function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
+ //Create a "fake body" for testing based on method used in jQuery.support
+ testElement = document.createElement( body ? "div" : "body" );
+ testElementStyle = {
+ visibility: "hidden",
+ width: 0,
+ height: 0,
+ border: 0,
+ margin: 0,
+ background: "none"
};
-}
-
-$.effects.animateClass = function( value, duration, easing, callback ) {
- var o = $.speed( duration, easing, callback );
-
- return this.queue( function() {
- var animated = $( this ),
- baseClass = animated.attr( "class" ) || "",
- applyClassChange,
- allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
-
- // map the animated objects to store the original styles.
- allAnimations = allAnimations.map(function() {
- var el = $( this );
- return {
- el: el,
- start: getElementStyles( this )
- };
- });
-
- // apply class change
- applyClassChange = function() {
- $.each( classAnimationActions, function(i, action) {
- if ( value[ action ] ) {
- animated[ action + "Class" ]( value[ action ] );
- }
- });
- };
- applyClassChange();
-
- // map all animated objects again - calculate new styles and diff
- allAnimations = allAnimations.map(function() {
- this.end = getElementStyles( this.el[ 0 ] );
- this.diff = styleDifference( this.start, this.end );
- return this;
- });
-
- // apply original class
- animated.attr( "class", baseClass );
-
- // map all animated objects again - this time collecting a promise
- allAnimations = allAnimations.map(function() {
- var styleInfo = this,
- dfd = $.Deferred(),
- opts = $.extend({}, o, {
- queue: false,
- complete: function() {
- dfd.resolve( styleInfo );
- }
- });
-
- this.el.animate( this.diff, opts );
- return dfd.promise();
- });
-
- // once all animations have completed:
- $.when.apply( $, allAnimations.get() ).done(function() {
-
- // set the final class
- applyClassChange();
-
- // for each animated element,
- // clear all css properties that were animated
- $.each( arguments, function() {
- var el = this.el;
- $.each( this.diff, function(key) {
- el.css( key, "" );
- });
- });
-
- // this is guarnteed to be there if you use jQuery.speed()
- // it also handles dequeuing the next anim...
- o.complete.call( animated[ 0 ] );
- });
- });
-};
-
-$.fn.extend({
- addClass: (function( orig ) {
- return function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { add: classNames }, speed, easing, callback ) :
- orig.apply( this, arguments );
- };
- })( $.fn.addClass ),
-
- removeClass: (function( orig ) {
- return function( classNames, speed, easing, callback ) {
- return arguments.length > 1 ?
- $.effects.animateClass.call( this,
- { remove: classNames }, speed, easing, callback ) :
- orig.apply( this, arguments );
- };
- })( $.fn.removeClass ),
-
- toggleClass: (function( orig ) {
- return function( classNames, force, speed, easing, callback ) {
- if ( typeof force === "boolean" || force === undefined ) {
- if ( !speed ) {
- // without speed parameter
- return orig.apply( this, arguments );
- } else {
- return $.effects.animateClass.call( this,
- (force ? { add: classNames } : { remove: classNames }),
- speed, easing, callback );
- }
- } else {
- // without force parameter
- return $.effects.animateClass.call( this,
- { toggle: classNames }, force, speed, easing );
- }
- };
- })( $.fn.toggleClass ),
-
- switchClass: function( remove, add, speed, easing, callback) {
- return $.effects.animateClass.call( this, {
- add: add,
- remove: remove
- }, speed, easing, callback );
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EFFECTS **********************************/
-/******************************************************************************/
-
-(function() {
-
-$.extend( $.effects, {
- version: "1.10.2",
-
- // Saves a set of properties in a data storage
- save: function( element, set ) {
- for( var i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
- }
- }
- },
-
- // Restores a set of previously saved properties from a data storage
- restore: function( element, set ) {
- var val, i;
- for( i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- val = element.data( dataSpace + set[ i ] );
- // support: jQuery 1.6.2
- // http://bugs.jquery.com/ticket/9917
- // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
- // We can't differentiate between "" and 0 here, so we just assume
- // empty string since it's likely to be a more common value...
- if ( val === undefined ) {
- val = "";
- }
- element.css( set[ i ], val );
- }
- }
- },
-
- setMode: function( el, mode ) {
- if (mode === "toggle") {
- mode = el.is( ":hidden" ) ? "show" : "hide";
- }
- return mode;
- },
-
- // Translates a [top,left] array into a baseline value
- // this should be a little more flexible in the future to handle a string & hash
- getBaseline: function( origin, original ) {
- var y, x;
- switch ( origin[ 0 ] ) {
- case "top": y = 0; break;
- case "middle": y = 0.5; break;
- case "bottom": y = 1; break;
- default: y = origin[ 0 ] / original.height;
- }
- switch ( origin[ 1 ] ) {
- case "left": x = 0; break;
- case "center": x = 0.5; break;
- case "right": x = 1; break;
- default: x = origin[ 1 ] / original.width;
- }
- return {
- x: x,
- y: y
- };
- },
-
- // Wraps the element around a wrapper that copies position properties
- createWrapper: function( element ) {
-
- // if the element is already wrapped, return it
- if ( element.parent().is( ".ui-effects-wrapper" )) {
- return element.parent();
- }
-
- // wrap the element
- var props = {
- width: element.outerWidth(true),
- height: element.outerHeight(true),
- "float": element.css( "float" )
- },
- wrapper = $( "<div></div>" )
- .addClass( "ui-effects-wrapper" )
- .css({
- fontSize: "100%",
- background: "transparent",
- border: "none",
- margin: 0,
- padding: 0
- }),
- // Store the size in case width/height are defined in % - Fixes #5245
- size = {
- width: element.width(),
- height: element.height()
- },
- active = document.activeElement;
-
- // support: Firefox
- // Firefox incorrectly exposes anonymous content
- // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
- try {
- active.id;
- } catch( e ) {
- active = document.body;
- }
-
- element.wrap( wrapper );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
-
- wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
-
- // transfer positioning properties to the wrapper
- if ( element.css( "position" ) === "static" ) {
- wrapper.css({ position: "relative" });
- element.css({ position: "relative" });
- } else {
- $.extend( props, {
- position: element.css( "position" ),
- zIndex: element.css( "z-index" )
- });
- $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
- props[ pos ] = element.css( pos );
- if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
- props[ pos ] = "auto";
- }
- });
- element.css({
- position: "relative",
- top: 0,
- left: 0,
- right: "auto",
- bottom: "auto"
- });
- }
- element.css(size);
-
- return wrapper.css( props ).show();
- },
-
- removeWrapper: function( element ) {
- var active = document.activeElement;
-
- if ( element.parent().is( ".ui-effects-wrapper" ) ) {
- element.parent().replaceWith( element );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
- }
-
-
- return element;
- },
-
- setTransition: function( element, list, factor, value ) {
- value = value || {};
- $.each( list, function( i, x ) {
- var unit = element.cssUnit( x );
- if ( unit[ 0 ] > 0 ) {
- value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
- }
+ if ( body ) {
+ $.extend( testElementStyle, {
+ position: "absolute",
+ left: "-1000px",
+ top: "-1000px"
});
- return value;
- }
-});
-
-// return an effect options object for the given parameters:
-function _normalizeArguments( effect, options, speed, callback ) {
-
- // allow passing all options as the first parameter
- if ( $.isPlainObject( effect ) ) {
- options = effect;
- effect = effect.effect;
- }
-
- // convert to an object
- effect = { effect: effect };
-
- // catch (effect, null, ...)
- if ( options == null ) {
- options = {};
- }
-
- // catch (effect, callback)
- if ( $.isFunction( options ) ) {
- callback = options;
- speed = null;
- options = {};
- }
-
- // catch (effect, speed, ?)
- if ( typeof options === "number" || $.fx.speeds[ options ] ) {
- callback = speed;
- speed = options;
- options = {};
- }
-
- // catch (effect, options, callback)
- if ( $.isFunction( speed ) ) {
- callback = speed;
- speed = null;
- }
-
- // add options to effect
- if ( options ) {
- $.extend( effect, options );
- }
-
- speed = speed || options.duration;
- effect.duration = $.fx.off ? 0 :
- typeof speed === "number" ? speed :
- speed in $.fx.speeds ? $.fx.speeds[ speed ] :
- $.fx.speeds._default;
-
- effect.complete = callback || options.complete;
-
- return effect;
-}
-
-function standardAnimationOption( option ) {
- // Valid standard speeds (nothing, number, named speed)
- if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
- return true;
}
-
- // Invalid strings - treat as "normal" speed
- if ( typeof option === "string" && !$.effects.effect[ option ] ) {
- return true;
- }
-
- // Complete callback
- if ( $.isFunction( option ) ) {
- return true;
- }
-
- // Options hash (but not naming an effect)
- if ( typeof option === "object" && !option.effect ) {
- return true;
- }
-
- // Didn't match any standard API
- return false;
-}
-
-$.fn.extend({
- effect: function( /* effect, options, speed, callback */ ) {
- var args = _normalizeArguments.apply( this, arguments ),
- mode = args.mode,
- queue = args.queue,
- effectMethod = $.effects.effect[ args.effect ];
-
- if ( $.fx.off || !effectMethod ) {
- // delegate to the original method (e.g., .show()) if possible
- if ( mode ) {
- return this[ mode ]( args.duration, args.complete );
- } else {
- return this.each( function() {
- if ( args.complete ) {
- args.complete.call( this );
- }
- });
- }
- }
-
- function run( next ) {
- var elem = $( this ),
- complete = args.complete,
- mode = args.mode;
-
- function done() {
- if ( $.isFunction( complete ) ) {
- complete.call( elem[0] );
- }
- if ( $.isFunction( next ) ) {
- next();
- }
- }
-
- // If the element already has the correct final state, delegate to
- // the core methods so the internal tracking of "olddisplay" works.
- if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
- elem[ mode ]();
- done();
- } else {
- effectMethod.call( elem[0], args, done );
- }
- }
-
- return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
- },
-
- show: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "show";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.show ),
-
- hide: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "hide";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.hide ),
-
- toggle: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "toggle";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.toggle ),
-
- // 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;
+ for ( i in testElementStyle ) {
+ testElement.style[ i ] = testElementStyle[ i ];
}
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EASING ***********************************/
-/******************************************************************************/
-
-(function() {
-
-// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
-
-var baseEasings = {};
-
-$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
- baseEasings[ name ] = function( p ) {
- return Math.pow( p, i + 2 );
- };
-});
-
-$.extend( baseEasings, {
- Sine: function ( p ) {
- return 1 - Math.cos( p * Math.PI / 2 );
- },
- Circ: function ( p ) {
- return 1 - Math.sqrt( 1 - p * p );
- },
- Elastic: function( p ) {
- return p === 0 || p === 1 ? p :
- -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
- },
- Back: function( p ) {
- return p * p * ( 3 * p - 2 );
- },
- Bounce: function ( p ) {
- var pow2,
- bounce = 4;
+ testElement.appendChild( div );
+ testElementParent = body || document.documentElement;
+ testElementParent.insertBefore( testElement, testElementParent.firstChild );
- while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
- return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
- }
-});
+ div.style.cssText = "position: absolute; left: 10.7432222px;";
-$.each( baseEasings, function( name, easeIn ) {
- $.easing[ "easeIn" + name ] = easeIn;
- $.easing[ "easeOut" + name ] = function( p ) {
- return 1 - easeIn( 1 - p );
- };
- $.easing[ "easeInOut" + name ] = function( p ) {
- return p < 0.5 ?
- easeIn( p * 2 ) / 2 :
- 1 - easeIn( p * -2 + 2 ) / 2;
- };
-});
+ offsetLeft = $( div ).offset().left;
+ $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
+ testElement.innerHTML = "";
+ testElementParent.removeChild( testElement );
})();
-})(jQuery);
-
+}( jQuery ) );
(function( $, undefined ) {
var uid = 0,
@@ -6035,7 +1483,7 @@ showProps.height = showProps.paddingTop = showProps.paddingBottom =
showProps.borderTopWidth = showProps.borderBottomWidth = "show";
$.widget( "ui.accordion", {
- version: "1.10.2",
+ version: "1.10.4",
options: {
active: 0,
animate: {},
@@ -6113,6 +1561,7 @@ $.widget( "ui.accordion", {
this.headers
.removeClass( "ui-accordion-header ui-accordion-header-active 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( "aria-controls" )
.removeAttr( "tabIndex" )
@@ -6127,7 +1576,6 @@ $.widget( "ui.accordion", {
contents = this.headers.next()
.css( "display", "" )
.removeAttr( "role" )
- .removeAttr( "aria-expanded" )
.removeAttr( "aria-hidden" )
.removeAttr( "aria-labelledby" )
.removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" )
@@ -6178,7 +1626,6 @@ $.widget( "ui.accordion", {
},
_keydown: function( event ) {
- /*jshint maxcomplexity:15*/
if ( event.altKey || event.ctrlKey ) {
return;
}
@@ -6232,7 +1679,7 @@ $.widget( "ui.accordion", {
options.active = false;
this.active = $();
// active false only when collapsible is true
- } if ( options.active === false ) {
+ } else if ( options.active === false ) {
this._activate( 0 );
// was active, but active panel is gone
} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
@@ -6305,11 +1752,11 @@ $.widget( "ui.accordion", {
.not( this.active )
.attr({
"aria-selected": "false",
+ "aria-expanded": "false",
tabIndex: -1
})
.next()
.attr({
- "aria-expanded": "false",
"aria-hidden": "true"
})
.hide();
@@ -6320,11 +1767,11 @@ $.widget( "ui.accordion", {
} else {
this.active.attr({
"aria-selected": "true",
+ "aria-expanded": "true",
tabIndex: 0
})
.next()
.attr({
- "aria-expanded": "true",
"aria-hidden": "false"
});
}
@@ -6479,7 +1926,6 @@ $.widget( "ui.accordion", {
}
toHide.attr({
- "aria-expanded": "false",
"aria-hidden": "true"
});
toHide.prev().attr( "aria-selected", "false" );
@@ -6487,7 +1933,10 @@ $.widget( "ui.accordion", {
// if we're opening from collapsed state, remove the previous header from the tab order
// if we're collapsing, then keep the collapsing header in the tab order
if ( toShow.length && toHide.length ) {
- toHide.prev().attr( "tabIndex", -1 );
+ toHide.prev().attr({
+ "tabIndex": -1,
+ "aria-expanded": "false"
+ });
} else if ( toShow.length ) {
this.headers.filter(function() {
return $( this ).attr( "tabIndex" ) === 0;
@@ -6496,14 +1945,12 @@ $.widget( "ui.accordion", {
}
toShow
- .attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- })
+ .attr( "aria-hidden", "false" )
.prev()
.attr({
"aria-selected": "true",
- tabIndex: 0
+ tabIndex: 0,
+ "aria-expanded": "true"
});
},
@@ -6575,20 +2022,15 @@ $.widget( "ui.accordion", {
if ( toHide.length ) {
toHide.parent()[0].className = toHide.parent()[0].className;
}
-
this._trigger( "activate", null, data );
}
});
})( jQuery );
-
(function( $, undefined ) {
-// used to prevent race conditions with remote data sources
-var requestIndex = 0;
-
$.widget( "ui.autocomplete", {
- version: "1.10.2",
+ version: "1.10.4",
defaultElement: "<input>",
options: {
appendTo: null,
@@ -6612,6 +2054,7 @@ $.widget( "ui.autocomplete", {
select: null
},
+ requestIndex: 0,
pending: 0,
_create: function() {
@@ -6645,7 +2088,6 @@ $.widget( "ui.autocomplete", {
this._on( this.element, {
keydown: function( event ) {
- /*jshint maxcomplexity:15*/
if ( this.element.prop( "readOnly" ) ) {
suppressKeyPress = true;
suppressInput = true;
@@ -6710,7 +2152,9 @@ $.widget( "ui.autocomplete", {
keypress: function( event ) {
if ( suppressKeyPress ) {
suppressKeyPress = false;
- event.preventDefault();
+ if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
+ event.preventDefault();
+ }
return;
}
if ( suppressKeyPressRepeat ) {
@@ -6763,8 +2207,6 @@ $.widget( "ui.autocomplete", {
.addClass( "ui-autocomplete ui-front" )
.appendTo( this._appendTo() )
.menu({
- // custom key handling for now
- input: $(),
// disable ARIA support, the live region takes care of that
role: null
})
@@ -6866,7 +2308,7 @@ $.widget( "ui.autocomplete", {
"aria-live": "polite"
})
.addClass( "ui-helper-hidden-accessible" )
- .insertAfter( this.element );
+ .insertBefore( this.element );
// turning off autocomplete prevents the browser from remembering the
// value when navigating through history, so we re-enable autocomplete
@@ -6988,19 +2430,18 @@ $.widget( "ui.autocomplete", {
},
_response: function() {
- var that = this,
- index = ++requestIndex;
+ var index = ++this.requestIndex;
- return function( content ) {
- if ( index === requestIndex ) {
- that.__response( content );
+ return $.proxy(function( content ) {
+ if ( index === this.requestIndex ) {
+ this.__response( content );
}
- that.pending--;
- if ( !that.pending ) {
- that.element.removeClass( "ui-autocomplete-loading" );
+ this.pending--;
+ if ( !this.pending ) {
+ this.element.removeClass( "ui-autocomplete-loading" );
}
- };
+ }, this );
},
__response: function( content ) {
@@ -7176,17 +2617,15 @@ $.widget( "ui.autocomplete", $.ui.autocomplete, {
});
}( jQuery ));
-
(function( $, undefined ) {
-var lastActive, startXPos, startYPos, clickDragged,
+var lastActive,
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" );
+ var form = $( this );
setTimeout(function() {
- buttons.button( "refresh" );
+ form.find( ":ui-button" ).button( "refresh" );
}, 1 );
},
radioGroup = function( radio ) {
@@ -7208,7 +2647,7 @@ var lastActive, startXPos, startYPos, clickDragged,
};
$.widget( "ui.button", {
- version: "1.10.2",
+ version: "1.10.4",
defaultElement: "<button>",
options: {
disabled: null,
@@ -7236,8 +2675,7 @@ $.widget( "ui.button", {
var that = this,
options = this.options,
toggleButton = this.type === "checkbox" || this.type === "radio",
- activeClass = !toggleButton ? "ui-state-active" : "",
- focusClass = "ui-state-focus";
+ activeClass = !toggleButton ? "ui-state-active" : "";
if ( options.label === null ) {
options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
@@ -7269,53 +2707,32 @@ $.widget( "ui.button", {
}
});
- this.element
- .bind( "focus" + this.eventNamespace, function() {
- // no need to check disabled, focus won't be triggered anyway
- that.buttonElement.addClass( focusClass );
- })
- .bind( "blur" + this.eventNamespace, function() {
- that.buttonElement.removeClass( focusClass );
- });
+ // Can't use _focusable() because the element that receives focus
+ // and the element that gets the ui-state-focus class are different
+ this._on({
+ focus: function() {
+ this.buttonElement.addClass( "ui-state-focus" );
+ },
+ blur: function() {
+ this.buttonElement.removeClass( "ui-state-focus" );
+ }
+ });
if ( toggleButton ) {
this.element.bind( "change" + this.eventNamespace, function() {
- if ( clickDragged ) {
- return;
- }
that.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" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- return;
- }
- clickDragged = false;
- startXPos = event.pageX;
- startYPos = event.pageY;
- })
- .bind( "mouseup" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- return;
- }
- if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
- clickDragged = true;
- }
- });
}
if ( this.type === "checkbox" ) {
this.buttonElement.bind( "click" + this.eventNamespace, function() {
- if ( options.disabled || clickDragged ) {
+ if ( options.disabled ) {
return false;
}
});
} else if ( this.type === "radio" ) {
this.buttonElement.bind( "click" + this.eventNamespace, function() {
- if ( options.disabled || clickDragged ) {
+ if ( options.disabled ) {
return false;
}
$( this ).addClass( "ui-state-active" );
@@ -7425,7 +2842,7 @@ $.widget( "ui.button", {
this.element
.removeClass( "ui-helper-hidden-accessible" );
this.buttonElement
- .removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
+ .removeClass( baseClasses + " ui-state-active " + typeClasses )
.removeAttr( "role" )
.removeAttr( "aria-pressed" )
.html( this.buttonElement.find(".ui-button-text").html() );
@@ -7438,10 +2855,9 @@ $.widget( "ui.button", {
_setOption: function( key, value ) {
this._super( key, value );
if ( key === "disabled" ) {
+ this.element.prop( "disabled", !!value );
if ( value ) {
- this.element.prop( "disabled", true );
- } else {
- this.element.prop( "disabled", false );
+ this.buttonElement.removeClass( "ui-state-focus" );
}
return;
}
@@ -7525,7 +2941,7 @@ $.widget( "ui.button", {
});
$.widget( "ui.buttonset", {
- version: "1.10.2",
+ version: "1.10.4",
options: {
items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
},
@@ -7582,13 +2998,11 @@ $.widget( "ui.buttonset", {
});
}( jQuery ) );
-
(function( $, undefined ) {
-$.extend($.ui, { datepicker: { version: "1.10.2" } });
+$.extend($.ui, { datepicker: { version: "1.10.4" } });
var PROP_NAME = "datepicker",
- dpuuid = new Date().getTime(),
instActive;
/* Date picker manager.
@@ -8325,9 +3739,10 @@ $.extend(Datepicker.prototype, {
inst.dpDiv[showAnim || "show"](showAnim ? duration : null);
}
- if (inst.input.is(":visible") && !inst.input.is(":disabled")) {
+ if ( $.datepicker._shouldFocusInput( inst ) ) {
inst.input.focus();
}
+
$.datepicker._curInst = inst;
}
},
@@ -8354,10 +3769,7 @@ $.extend(Datepicker.prototype, {
inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") +
"Class"]("ui-datepicker-rtl");
- // #6694 - don't focus the input if it's already focused
- // this breaks the change event in IE
- if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
- inst.input.is(":visible") && !inst.input.is(":disabled") && inst.input[0] !== document.activeElement) {
+ if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
inst.input.focus();
}
@@ -8374,16 +3786,11 @@ $.extend(Datepicker.prototype, {
}
},
- /* 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")))];
+ // #6694 - don't focus the input if it's already focused
+ // this breaks the change event in IE
+ // Support: IE and jQuery <1.9
+ _shouldFocusInput: function( inst ) {
+ return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
},
/* Check positioning to remain on screen. */
@@ -9130,27 +4537,27 @@ $.extend(Datepicker.prototype, {
inst.dpDiv.find("[data-handler]").map(function () {
var handler = {
prev: function () {
- window["DP_jQuery_" + dpuuid].datepicker._adjustDate(id, -stepMonths, "M");
+ $.datepicker._adjustDate(id, -stepMonths, "M");
},
next: function () {
- window["DP_jQuery_" + dpuuid].datepicker._adjustDate(id, +stepMonths, "M");
+ $.datepicker._adjustDate(id, +stepMonths, "M");
},
hide: function () {
- window["DP_jQuery_" + dpuuid].datepicker._hideDatepicker();
+ $.datepicker._hideDatepicker();
},
today: function () {
- window["DP_jQuery_" + dpuuid].datepicker._gotoToday(id);
+ $.datepicker._gotoToday(id);
},
selectDay: function () {
- window["DP_jQuery_" + dpuuid].datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this);
+ $.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this);
return false;
},
selectMonth: function () {
- window["DP_jQuery_" + dpuuid].datepicker._selectMonthYear(id, this, "M");
+ $.datepicker._selectMonthYear(id, this, "M");
return false;
},
selectYear: function () {
- window["DP_jQuery_" + dpuuid].datepicker._selectMonthYear(id, this, "Y");
+ $.datepicker._selectMonthYear(id, this, "Y");
return false;
}
};
@@ -9613,14 +5020,9 @@ $.fn.datepicker = function(options){
$.datepicker = new Datepicker(); // singleton instance
$.datepicker.initialized = false;
$.datepicker.uuid = new Date().getTime();
-$.datepicker.version = "1.10.2";
-
-// Workaround for #4055
-// Add another global to avoid noConflict issues with inline event handlers
-window["DP_jQuery_" + dpuuid] = $;
+$.datepicker.version = "1.10.4";
})(jQuery);
-
(function( $, undefined ) {
var sizeRelatedOptions = {
@@ -9640,7 +5042,7 @@ var sizeRelatedOptions = {
};
$.widget( "ui.dialog", {
- version: "1.10.2",
+ version: "1.10.4",
options: {
appendTo: "body",
autoOpen: true,
@@ -9773,7 +5175,8 @@ $.widget( "ui.dialog", {
enable: $.noop,
close: function( event ) {
- var that = this;
+ var activeElement,
+ that = this;
if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
return;
@@ -9783,10 +5186,22 @@ $.widget( "ui.dialog", {
this._destroyOverlay();
if ( !this.opener.filter(":focusable").focus().length ) {
- // Hiding a focused element doesn't trigger blur in WebKit
- // so in case we have nothing to focus on, explicitly blur the active element
- // https://bugs.webkit.org/show_bug.cgi?id=47182
- $( this.document[0].activeElement ).blur();
+
+ // support: IE9
+ // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
+ try {
+ activeElement = this.document[ 0 ].activeElement;
+
+ // Support: IE9, IE10
+ // If the <body> is blurred, IE will switch windows, see #4520
+ if ( activeElement && activeElement.nodeName.toLowerCase() !== "body" ) {
+
+ // Hiding a focused element doesn't trigger blur in WebKit
+ // so in case we have nothing to focus on, explicitly blur the active element
+ // https://bugs.webkit.org/show_bug.cgi?id=47182
+ $( activeElement ).blur();
+ }
+ } catch ( error ) {}
}
this._hide( this.uiDialog, this.options.hide, function() {
@@ -9946,7 +5361,10 @@ $.widget( "ui.dialog", {
}
});
- this.uiDialogTitlebarClose = $("<button></button>")
+ // support: IE
+ // Use type="button" to prevent enter keypresses in textboxes from closing the
+ // dialog in IE (#9312)
+ this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
.button({
label: this.options.closeText,
icons: {
@@ -10160,7 +5578,6 @@ $.widget( "ui.dialog", {
},
_setOption: function( key, value ) {
- /*jshint maxcomplexity:15*/
var isDraggable, isResizable,
uiDialog = this.uiDialog;
@@ -10410,7 +5827,2601 @@ if ( $.uiBackCompat !== false ) {
}
}( jQuery ) );
+(function( $, undefined ) {
+
+$.widget("ui.draggable", $.ui.mouse, {
+ version: "1.10.4",
+ 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,
+
+ // callbacks
+ drag: null,
+ start: null,
+ stop: null
+ },
+ _create: function() {
+
+ if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) {
+ this.element[0].style.position = "relative";
+ }
+ if (this.options.addClasses){
+ this.element.addClass("ui-draggable");
+ }
+ if (this.options.disabled){
+ this.element.addClass("ui-draggable-disabled");
+ }
+
+ this._mouseInit();
+
+ },
+
+ _destroy: function() {
+ this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
+ this._mouseDestroy();
+ },
+
+ _mouseCapture: function(event) {
+
+ var o = this.options;
+
+ // among others, prevent a drag on a resizable-handle
+ if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
+ return false;
+ }
+
+ //Quit if we're not on a valid handle
+ this.handle = this._getHandle(event);
+ if (!this.handle) {
+ return false;
+ }
+
+ $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
+ $("<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);
+
+ this.helper.addClass("ui-draggable-dragging");
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ //If ddmanager is used for droppables, set the global draggable
+ if($.ui.ddmanager) {
+ $.ui.ddmanager.current = this;
+ }
+
+ /*
+ * - Position generation -
+ * This block generates everything position related - it's the core of draggables.
+ */
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Store the helper's css position
+ this.cssPosition = this.helper.css( "position" );
+ this.scrollParent = this.helper.scrollParent();
+ this.offsetParent = this.helper.offsetParent();
+ this.offsetParentCssPosition = this.offsetParent.css( "position" );
+
+ //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
+ };
+
+ //Reset scroll cache
+ this.offset.scroll = false;
+
+ $.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
+ this._setContainment();
+
+ //Trigger event + callbacks
+ if(this._trigger("start", event) === false) {
+ this._clear();
+ return false;
+ }
+
+ //Recache the helper size
+ this._cacheHelperProportions();
+
+ //Prepare the droppable offsets
+ if ($.ui.ddmanager && !o.dropBehaviour) {
+ $.ui.ddmanager.prepareOffsets(this, event);
+ }
+
+
+ this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+
+ //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
+ if ( $.ui.ddmanager ) {
+ $.ui.ddmanager.dragStart(this, event);
+ }
+
+ return true;
+ },
+
+ _mouseDrag: function(event, noPropagation) {
+ // reset any necessary cached properties (see #5009)
+ if ( this.offsetParentCssPosition === "fixed" ) {
+ this.offset.parent = this._getParentOffset();
+ }
+
+ //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 that = this,
+ dropped = false;
+ if ($.ui.ddmanager && !this.options.dropBehaviour) {
+ dropped = $.ui.ddmanager.drop(this, event);
+ }
+
+ //if a drop comes from outside (a sortable)
+ if(this.dropped) {
+ dropped = this.dropped;
+ this.dropped = false;
+ }
+
+ //if the original element is no longer in the DOM don't bother to continue (see #8269)
+ if ( this.options.helper === "original" && !$.contains( this.element[ 0 ].ownerDocument, this.element[ 0 ] ) ) {
+ 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))) {
+ $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
+ if(that._trigger("stop", event) !== false) {
+ that._clear();
+ }
+ });
+ } else {
+ if(this._trigger("stop", event) !== false) {
+ this._clear();
+ }
+ }
+
+ return false;
+ },
+
+ _mouseUp: function(event) {
+ //Remove frame helpers
+ $("div.ui-draggable-iframeFix").each(function() {
+ this.parentNode.removeChild(this);
+ });
+
+ //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
+ if( $.ui.ddmanager ) {
+ $.ui.ddmanager.dragStop(this, event);
+ }
+
+ return $.ui.mouse.prototype._mouseUp.call(this, event);
+ },
+
+ cancel: function() {
+
+ if(this.helper.is(".ui-draggable-dragging")) {
+ this._mouseUp({});
+ } else {
+ this._clear();
+ }
+
+ return this;
+
+ },
+
+ _getHandle: function(event) {
+ return this.options.handle ?
+ !!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
+ true;
+ },
+
+ _createHelper: function(event) {
+
+ var o = this.options,
+ 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
+ var po = this.offsetParent.offset();
+
+ // This is a special case where we need to modify a offset calculated on start, since the following happened:
+ // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+ // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+ if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
+ po.left += this.scrollParent.scrollLeft();
+ po.top += this.scrollParent.scrollTop();
+ }
+
+ //This needs to be actually done for all browsers, since pageX/pageY includes this information
+ //Ugly IE fix
+ if((this.offsetParent[0] === document.body) ||
+ (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
+ 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 over, c, ce,
+ o = this.options;
+
+ if ( !o.containment ) {
+ this.containment = null;
+ return;
+ }
+
+ if ( o.containment === "window" ) {
+ this.containment = [
+ $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
+ $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
+ $( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,
+ $( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
+ ];
+ return;
+ }
+
+ if ( o.containment === "document") {
+ this.containment = [
+ 0,
+ 0,
+ $( document ).width() - this.helperProportions.width - this.margins.left,
+ ( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
+ ];
+ return;
+ }
+
+ if ( o.containment.constructor === Array ) {
+ this.containment = o.containment;
+ return;
+ }
+
+ if ( o.containment === "parent" ) {
+ o.containment = this.helper[ 0 ].parentNode;
+ }
+
+ c = $( o.containment );
+ ce = c[ 0 ];
+
+ if( !ce ) {
+ return;
+ }
+
+ over = c.css( "overflow" ) !== "hidden";
+
+ this.containment = [
+ ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
+ ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ) ,
+ ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - this.helperProportions.width - this.margins.left - this.margins.right,
+ ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - this.helperProportions.height - this.margins.top - this.margins.bottom
+ ];
+ this.relative_container = c;
+ },
+
+ _convertPositionTo: function(d, pos) {
+
+ if(!pos) {
+ pos = this.position;
+ }
+
+ var mod = d === "absolute" ? 1 : -1,
+ scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent;
+
+ //Cache the scroll
+ if (!this.offset.scroll) {
+ this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};
+ }
+
+ return {
+ top: (
+ pos.top + // The absolute mouse position
+ this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
+ ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) * mod )
+ ),
+ left: (
+ pos.left + // The absolute mouse position
+ this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
+ ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod )
+ )
+ };
+
+ },
+
+ _generatePosition: function(event) {
+
+ var containment, co, top, left,
+ o = this.options,
+ scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent,
+ pageX = event.pageX,
+ pageY = event.pageY;
+
+ //Cache the scroll
+ if (!this.offset.scroll) {
+ this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};
+ }
+
+ /*
+ * - Position constraining -
+ * Constrain the position to a mix of grid, containment.
+ */
+
+ // If we are not dragging yet, we won't check for options
+ if ( this.originalPosition ) {
+ if ( this.containment ) {
+ if ( this.relative_container ){
+ 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)
+ 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;
+
+ left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
+ pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+ }
+
+ }
+
+ return {
+ top: (
+ pageY - // The absolute mouse position
+ this.offset.click.top - // Click offset (relative to the element)
+ this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
+ ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top )
+ ),
+ left: (
+ pageX - // The absolute mouse position
+ this.offset.click.left - // Click offset (relative to the element)
+ this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
+ ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left )
+ )
+ };
+
+ },
+
+ _clear: function() {
+ this.helper.removeClass("ui-draggable-dragging");
+ if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
+ this.helper.remove();
+ }
+ 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]);
+ //The absolute position has to be recalculated after plugins
+ if(type === "drag") {
+ this.positionAbs = this._convertPositionTo("absolute");
+ }
+ return $.Widget.prototype._trigger.call(this, type, event, ui);
+ },
+
+ plugins: {},
+
+ _uiHash: function() {
+ return {
+ helper: this.helper,
+ position: this.position,
+ originalPosition: this.originalPosition,
+ offset: this.positionAbs
+ };
+ }
+
+});
+
+$.ui.plugin.add("draggable", "connectToSortable", {
+ start: function(event, ui) {
+
+ var inst = $(this).data("ui-draggable"), o = inst.options,
+ uiSortable = $.extend({}, ui, { item: inst.element });
+ inst.sortables = [];
+ $(o.connectToSortable).each(function() {
+ var sortable = $.data(this, "ui-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("ui-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 = this.shouldRevert;
+ }
+
+ //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("ui-draggable"), that = this;
+
+ $.each(inst.sortables, function() {
+
+ var innermostIntersecting = false,
+ thisSortable = this;
+
+ //Copy over some variables to allow calling the sortable's native _intersectsWith
+ this.instance.positionAbs = inst.positionAbs;
+ this.instance.helperProportions = inst.helperProportions;
+ this.instance.offset.click = inst.offset.click;
+
+ if(this.instance._intersectsWith(this.instance.containerCache)) {
+ innermostIntersecting = true;
+ $.each(inst.sortables, function () {
+ this.instance.positionAbs = inst.positionAbs;
+ this.instance.helperProportions = inst.helperProportions;
+ this.instance.offset.click = inst.offset.click;
+ if (this !== thisSortable &&
+ this.instance._intersectsWith(this.instance.containerCache) &&
+ $.contains(thisSortable.instance.element[0], this.instance.element[0])
+ ) {
+ innermostIntersecting = false;
+ }
+ return innermostIntersecting;
+ });
+ }
+
+
+ if(innermostIntersecting) {
+ //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
+ if(!this.instance.isOver) {
+
+ this.instance.isOver = 1;
+ //Now we fake the start of dragging for the sortable instance,
+ //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
+ //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
+ this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-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() {
+ var t = $("body"), o = $(this).data("ui-draggable").options;
+ if (t.css("cursor")) {
+ o._cursor = t.css("cursor");
+ }
+ t.css("cursor", o.cursor);
+ },
+ stop: function() {
+ var o = $(this).data("ui-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("ui-draggable").options;
+ if(t.css("opacity")) {
+ o._opacity = t.css("opacity");
+ }
+ t.css("opacity", o.opacity);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data("ui-draggable").options;
+ if(o._opacity) {
+ $(ui.helper).css("opacity", o._opacity);
+ }
+ }
+});
+
+$.ui.plugin.add("draggable", "scroll", {
+ start: function() {
+ var i = $(this).data("ui-draggable");
+ if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
+ i.overflowOffset = i.scrollParent.offset();
+ }
+ },
+ drag: function( event ) {
+
+ var i = $(this).data("ui-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() {
+
+ var i = $(this).data("ui-draggable"),
+ o = i.options;
+
+ i.snapElements = [];
+
+ $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
+ var $t = $(this),
+ $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 ts, bs, ls, rs, l, r, t, b, i, first,
+ inst = $(this).data("ui-draggable"),
+ o = inst.options,
+ d = o.snapTolerance,
+ x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
+ y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
+
+ for (i = inst.snapElements.length - 1; i >= 0; i--){
+
+ l = inst.snapElements[i].left;
+ r = l + inst.snapElements[i].width;
+ t = inst.snapElements[i].top;
+ b = t + inst.snapElements[i].height;
+
+ if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {
+ 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") {
+ ts = Math.abs(t - y2) <= d;
+ bs = Math.abs(b - y1) <= d;
+ ls = Math.abs(l - x2) <= d;
+ 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;
+ }
+ }
+
+ first = (ts || bs || ls || rs);
+
+ if(o.snapMode !== "outer") {
+ ts = Math.abs(t - y1) <= d;
+ bs = Math.abs(b - y2) <= d;
+ ls = Math.abs(l - x1) <= d;
+ 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() {
+ var min,
+ o = this.data("ui-draggable").options,
+ 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; }
+
+ min = parseInt($(group[0]).css("zIndex"), 10) || 0;
+ $(group).each(function(i) {
+ $(this).css("zIndex", min + i);
+ });
+ this.css("zIndex", (min + group.length));
+ }
+});
+
+$.ui.plugin.add("draggable", "zIndex", {
+ start: function(event, ui) {
+ var t = $(ui.helper), o = $(this).data("ui-draggable").options;
+ if(t.css("zIndex")) {
+ o._zIndex = t.css("zIndex");
+ }
+ t.css("zIndex", o.zIndex);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data("ui-draggable").options;
+ if(o._zIndex) {
+ $(ui.helper).css("zIndex", o._zIndex);
+ }
+ }
+});
+
+})(jQuery);
+(function( $, undefined ) {
+
+function isOverAxis( x, reference, size ) {
+ return ( x > reference ) && ( x < ( reference + size ) );
+}
+
+$.widget("ui.droppable", {
+ version: "1.10.4",
+ widgetEventPrefix: "drop",
+ options: {
+ accept: "*",
+ activeClass: false,
+ addClasses: true,
+ greedy: false,
+ hoverClass: false,
+ scope: "default",
+ tolerance: "intersect",
+
+ // callbacks
+ activate: null,
+ deactivate: null,
+ drop: null,
+ out: null,
+ over: null
+ },
+ _create: function() {
+
+ var proportions,
+ o = this.options,
+ accept = o.accept;
+
+ this.isover = false;
+ this.isout = true;
+
+ this.accept = $.isFunction(accept) ? accept : function(d) {
+ return d.is(accept);
+ };
+
+ this.proportions = function( /* valueToWrite */ ) {
+ if ( arguments.length ) {
+ // Store the droppable's proportions
+ proportions = arguments[ 0 ];
+ } else {
+ // Retrieve or derive the droppable's proportions
+ return proportions ?
+ proportions :
+ 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 i = 0,
+ drop = $.ui.ddmanager.droppables[this.options.scope];
+
+ for ( ; i < drop.length; i++ ) {
+ if ( drop[i] === this ) {
+ drop.splice(i, 1);
+ }
+ }
+
+ this.element.removeClass("ui-droppable ui-droppable-disabled");
+ },
+
+ _setOption: function(key, value) {
+
+ if(key === "accept") {
+ this.accept = $.isFunction(value) ? value : function(d) {
+ return d.is(value);
+ };
+ }
+ $.Widget.prototype._setOption.apply(this, arguments);
+ },
+
+ _activate: function(event) {
+ var draggable = $.ui.ddmanager.current;
+ if(this.options.activeClass) {
+ this.element.addClass(this.options.activeClass);
+ }
+ if(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);
+ }
+ if(draggable){
+ this._trigger("deactivate", event, this.ui(draggable));
+ }
+ },
+
+ _over: function(event) {
+
+ var draggable = $.ui.ddmanager.current;
+
+ // Bail if draggable and droppable are same element
+ if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
+ return;
+ }
+
+ 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;
+
+ // Bail if draggable and droppable are same element
+ if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
+ return;
+ }
+
+ 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,
+ childrenIntersection = false;
+
+ // Bail if draggable and droppable are same element
+ if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
+ return false;
+ }
+
+ this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
+ var inst = $.data(this, "ui-droppable");
+ if(
+ inst.options.greedy &&
+ !inst.options.disabled &&
+ inst.options.scope === draggable.options.scope &&
+ inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&
+ $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
+ ) { childrenIntersection = true; return false; }
+ });
+ if(childrenIntersection) {
+ return false;
+ }
+
+ if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.activeClass) {
+ this.element.removeClass(this.options.activeClass);
+ }
+ if(this.options.hoverClass) {
+ this.element.removeClass(this.options.hoverClass);
+ }
+ this._trigger("drop", event, this.ui(draggable));
+ return this.element;
+ }
+
+ return false;
+
+ },
+
+ ui: function(c) {
+ return {
+ draggable: (c.currentItem || c.element),
+ helper: c.helper,
+ position: c.position,
+ offset: c.positionAbs
+ };
+ }
+
+});
+
+$.ui.intersect = function(draggable, droppable, toleranceMode) {
+
+ if (!droppable.offset) {
+ return false;
+ }
+
+ var draggableLeft, draggableTop,
+ x1 = (draggable.positionAbs || draggable.position.absolute).left,
+ y1 = (draggable.positionAbs || draggable.position.absolute).top,
+ x2 = x1 + draggable.helperProportions.width,
+ y2 = y1 + draggable.helperProportions.height,
+ l = droppable.offset.left,
+ t = droppable.offset.top,
+ r = l + droppable.proportions().width,
+ b = t + droppable.proportions().height;
+
+ switch (toleranceMode) {
+ case "fit":
+ return (l <= x1 && x2 <= r && t <= y1 && y2 <= b);
+ 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
+ case "pointer":
+ 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);
+ return isOverAxis( draggableTop, t, droppable.proportions().height ) && isOverAxis( draggableLeft, l, droppable.proportions().width );
+ 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
+ );
+ default:
+ return false;
+ }
+
+};
+
+/*
+ This manager tracks offsets of draggables and droppables
+*/
+$.ui.ddmanager = {
+ current: null,
+ droppables: { "default": [] },
+ prepareOffsets: function(t, event) {
+
+ var i, j,
+ m = $.ui.ddmanager.droppables[t.options.scope] || [],
+ type = event ? event.type : null, // workaround for #2317
+ list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
+
+ droppablesLoop: for (i = 0; i < m.length; i++) {
+
+ //No disabled and non-accepted
+ if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {
+ continue;
+ }
+
+ // Filter out elements in the current dragged item
+ for (j=0; j < list.length; j++) {
+ if(list[j] === m[i].element[0]) {
+ m[i].proportions().height = 0;
+ continue droppablesLoop;
+ }
+ }
+
+ m[i].visible = m[i].element.css("display") !== "none";
+ if(!m[i].visible) {
+ continue;
+ }
+
+ //Activate the droppable if used directly from draggables
+ if(type === "mousedown") {
+ m[i]._activate.call(m[i], event);
+ }
+
+ 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;
+ // Create a copy of the droppables in case the list changes during the drop (#9116)
+ $.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() {
+
+ if(!this.options) {
+ return;
+ }
+ if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {
+ dropped = this._drop.call(this, event) || dropped;
+ }
+
+ if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ this.isout = true;
+ this.isover = false;
+ this._deactivate.call(this, event);
+ }
+
+ });
+ return dropped;
+
+ },
+ dragStart: function( draggable, event ) {
+ //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
+ draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
+ if( !draggable.options.refreshPositions ) {
+ $.ui.ddmanager.prepareOffsets( draggable, event );
+ }
+ });
+ },
+ drag: function(draggable, event) {
+
+ //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
+ if(draggable.options.refreshPositions) {
+ $.ui.ddmanager.prepareOffsets(draggable, event);
+ }
+
+ //Run through all droppables and check their positions based on specific tolerance options
+ $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
+
+ if(this.options.disabled || this.greedyChild || !this.visible) {
+ return;
+ }
+
+ var parentInstance, scope, parent,
+ intersects = $.ui.intersect(draggable, this, this.options.tolerance),
+ c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null);
+ if(!c) {
+ return;
+ }
+
+ if (this.options.greedy) {
+ // find droppable parents with same scope
+ scope = this.options.scope;
+ parent = this.element.parents(":data(ui-droppable)").filter(function () {
+ return $.data(this, "ui-droppable").options.scope === scope;
+ });
+
+ if (parent.length) {
+ parentInstance = $.data(parent[0], "ui-droppable");
+ parentInstance.greedyChild = (c === "isover");
+ }
+ }
+
+ // we just moved into a greedy child
+ if (parentInstance && c === "isover") {
+ parentInstance.isover = false;
+ parentInstance.isout = true;
+ parentInstance._out.call(parentInstance, event);
+ }
+
+ this[c] = true;
+ this[c === "isout" ? "isover" : "isout"] = false;
+ this[c === "isover" ? "_over" : "_out"].call(this, event);
+
+ // we just moved out of a greedy child
+ if (parentInstance && c === "isout") {
+ parentInstance.isout = false;
+ parentInstance.isover = true;
+ parentInstance._over.call(parentInstance, event);
+ }
+ });
+
+ },
+ dragStop: function( draggable, event ) {
+ draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
+ //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
+ if( !draggable.options.refreshPositions ) {
+ $.ui.ddmanager.prepareOffsets( draggable, event );
+ }
+ }
+};
+
+})(jQuery);
+(function($, undefined) {
+
+var dataSpace = "ui-effects-";
+
+$.effects = {
+ effect: {}
+};
+
+/*!
+ * jQuery Color Animations v2.1.2
+ * https://github.com/jquery/jquery-color
+ *
+ * Copyright 2013 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * Date: Wed Jan 16 08:47:09 2013 -0600
+ */
+(function( jQuery, undefined ) {
+
+ var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
+
+ // plusequals test for += 100 -= 100
+ rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
+ // a set of RE's that can match strings and generate color tuples.
+ stringParsers = [{
+ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+ parse: function( execResult ) {
+ return [
+ execResult[ 1 ],
+ execResult[ 2 ],
+ execResult[ 3 ],
+ execResult[ 4 ]
+ ];
+ }
+ }, {
+ re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+ parse: function( execResult ) {
+ return [
+ execResult[ 1 ] * 2.55,
+ execResult[ 2 ] * 2.55,
+ execResult[ 3 ] * 2.55,
+ execResult[ 4 ]
+ ];
+ }
+ }, {
+ // this regex ignores A-F because it's compared against an already lowercased string
+ re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
+ parse: function( execResult ) {
+ return [
+ parseInt( execResult[ 1 ], 16 ),
+ parseInt( execResult[ 2 ], 16 ),
+ parseInt( execResult[ 3 ], 16 )
+ ];
+ }
+ }, {
+ // this regex ignores A-F because it's compared against an already lowercased string
+ re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
+ parse: function( execResult ) {
+ return [
+ parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
+ parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
+ parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
+ ];
+ }
+ }, {
+ re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+ space: "hsla",
+ parse: function( execResult ) {
+ return [
+ execResult[ 1 ],
+ execResult[ 2 ] / 100,
+ execResult[ 3 ] / 100,
+ execResult[ 4 ]
+ ];
+ }
+ }],
+
+ // jQuery.Color( )
+ color = jQuery.Color = function( color, green, blue, alpha ) {
+ return new jQuery.Color.fn.parse( color, green, blue, alpha );
+ },
+ spaces = {
+ rgba: {
+ props: {
+ red: {
+ idx: 0,
+ type: "byte"
+ },
+ green: {
+ idx: 1,
+ type: "byte"
+ },
+ blue: {
+ idx: 2,
+ type: "byte"
+ }
+ }
+ },
+
+ hsla: {
+ props: {
+ hue: {
+ idx: 0,
+ type: "degrees"
+ },
+ saturation: {
+ idx: 1,
+ type: "percent"
+ },
+ lightness: {
+ idx: 2,
+ type: "percent"
+ }
+ }
+ }
+ },
+ propTypes = {
+ "byte": {
+ floor: true,
+ max: 255
+ },
+ "percent": {
+ max: 1
+ },
+ "degrees": {
+ mod: 360,
+ floor: true
+ }
+ },
+ support = color.support = {},
+
+ // element for support tests
+ supportElem = jQuery( "<p>" )[ 0 ],
+
+ // colors = jQuery.Color.names
+ colors,
+
+ // local aliases of functions called often
+ each = jQuery.each;
+
+// determine rgba support immediately
+supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
+support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
+
+// define cache name and alpha properties
+// for rgba and hsla spaces
+each( spaces, function( spaceName, space ) {
+ space.cache = "_" + spaceName;
+ space.props.alpha = {
+ idx: 3,
+ type: "percent",
+ def: 1
+ };
+});
+
+function clamp( value, prop, allowEmpty ) {
+ var type = propTypes[ prop.type ] || {};
+
+ if ( value == null ) {
+ return (allowEmpty || !prop.def) ? null : prop.def;
+ }
+
+ // ~~ is an short way of doing floor for positive numbers
+ value = type.floor ? ~~value : parseFloat( value );
+
+ // IE will pass in empty strings as value for alpha,
+ // which will hit this case
+ if ( isNaN( value ) ) {
+ return prop.def;
+ }
+
+ if ( type.mod ) {
+ // we add mod before modding to make sure that negatives values
+ // get converted properly: -10 -> 350
+ return (value + type.mod) % type.mod;
+ }
+
+ // for now all property types without mod have min and max
+ return 0 > value ? 0 : type.max < value ? type.max : value;
+}
+
+function stringParse( string ) {
+ var inst = color(),
+ rgba = inst._rgba = [];
+
+ string = string.toLowerCase();
+
+ each( stringParsers, function( i, parser ) {
+ var parsed,
+ match = parser.re.exec( string ),
+ values = match && parser.parse( match ),
+ spaceName = parser.space || "rgba";
+
+ if ( values ) {
+ parsed = inst[ spaceName ]( values );
+
+ // if this was an rgba parse the assignment might happen twice
+ // oh well....
+ inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
+ rgba = inst._rgba = parsed._rgba;
+
+ // exit each( stringParsers ) here because we matched
+ return false;
+ }
+ });
+
+ // Found a stringParser that handled it
+ if ( rgba.length ) {
+
+ // if this came from a parsed string, force "transparent" when alpha is 0
+ // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
+ if ( rgba.join() === "0,0,0,0" ) {
+ jQuery.extend( rgba, colors.transparent );
+ }
+ return inst;
+ }
+
+ // named colors
+ return colors[ string ];
+}
+
+color.fn = jQuery.extend( color.prototype, {
+ parse: function( red, green, blue, alpha ) {
+ if ( red === undefined ) {
+ this._rgba = [ null, null, null, null ];
+ return this;
+ }
+ if ( red.jquery || red.nodeType ) {
+ red = jQuery( red ).css( green );
+ green = undefined;
+ }
+
+ var inst = this,
+ type = jQuery.type( red ),
+ rgba = this._rgba = [];
+
+ // more than 1 argument specified - assume ( red, green, blue, alpha )
+ if ( green !== undefined ) {
+ red = [ red, green, blue, alpha ];
+ type = "array";
+ }
+
+ if ( type === "string" ) {
+ return this.parse( stringParse( red ) || colors._default );
+ }
+
+ if ( type === "array" ) {
+ each( spaces.rgba.props, function( key, prop ) {
+ rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
+ });
+ return this;
+ }
+
+ if ( type === "object" ) {
+ if ( red instanceof color ) {
+ each( spaces, function( spaceName, space ) {
+ if ( red[ space.cache ] ) {
+ inst[ space.cache ] = red[ space.cache ].slice();
+ }
+ });
+ } else {
+ each( spaces, function( spaceName, space ) {
+ var cache = space.cache;
+ each( space.props, function( key, prop ) {
+
+ // if the cache doesn't exist, and we know how to convert
+ if ( !inst[ cache ] && space.to ) {
+
+ // if the value was null, we don't need to copy it
+ // if the key was alpha, we don't need to copy it either
+ if ( key === "alpha" || red[ key ] == null ) {
+ return;
+ }
+ inst[ cache ] = space.to( inst._rgba );
+ }
+
+ // this is the only case where we allow nulls for ALL properties.
+ // call clamp with alwaysAllowEmpty
+ inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
+ });
+
+ // everything defined but alpha?
+ if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
+ // use the default of 1
+ inst[ cache ][ 3 ] = 1;
+ if ( space.from ) {
+ inst._rgba = space.from( inst[ cache ] );
+ }
+ }
+ });
+ }
+ return this;
+ }
+ },
+ is: function( compare ) {
+ var is = color( compare ),
+ same = true,
+ inst = this;
+
+ each( spaces, function( _, space ) {
+ var localCache,
+ isCache = is[ space.cache ];
+ if (isCache) {
+ localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
+ each( space.props, function( _, prop ) {
+ if ( isCache[ prop.idx ] != null ) {
+ same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
+ return same;
+ }
+ });
+ }
+ return same;
+ });
+ return same;
+ },
+ _space: function() {
+ var used = [],
+ inst = this;
+ each( spaces, function( spaceName, space ) {
+ if ( inst[ space.cache ] ) {
+ used.push( spaceName );
+ }
+ });
+ return used.pop();
+ },
+ transition: function( other, distance ) {
+ var end = color( other ),
+ spaceName = end._space(),
+ space = spaces[ spaceName ],
+ startColor = this.alpha() === 0 ? color( "transparent" ) : this,
+ start = startColor[ space.cache ] || space.to( startColor._rgba ),
+ result = start.slice();
+
+ end = end[ space.cache ];
+ each( space.props, function( key, prop ) {
+ var index = prop.idx,
+ startValue = start[ index ],
+ endValue = end[ index ],
+ type = propTypes[ prop.type ] || {};
+
+ // if null, don't override start value
+ if ( endValue === null ) {
+ return;
+ }
+ // if null - use end
+ if ( startValue === null ) {
+ result[ index ] = endValue;
+ } else {
+ if ( type.mod ) {
+ if ( endValue - startValue > type.mod / 2 ) {
+ startValue += type.mod;
+ } else if ( startValue - endValue > type.mod / 2 ) {
+ startValue -= type.mod;
+ }
+ }
+ result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
+ }
+ });
+ return this[ spaceName ]( result );
+ },
+ blend: function( opaque ) {
+ // if we are already opaque - return ourself
+ if ( this._rgba[ 3 ] === 1 ) {
+ return this;
+ }
+
+ var rgb = this._rgba.slice(),
+ a = rgb.pop(),
+ blend = color( opaque )._rgba;
+
+ return color( jQuery.map( rgb, function( v, i ) {
+ return ( 1 - a ) * blend[ i ] + a * v;
+ }));
+ },
+ toRgbaString: function() {
+ var prefix = "rgba(",
+ rgba = jQuery.map( this._rgba, function( v, i ) {
+ return v == null ? ( i > 2 ? 1 : 0 ) : v;
+ });
+
+ if ( rgba[ 3 ] === 1 ) {
+ rgba.pop();
+ prefix = "rgb(";
+ }
+
+ return prefix + rgba.join() + ")";
+ },
+ toHslaString: function() {
+ var prefix = "hsla(",
+ hsla = jQuery.map( this.hsla(), function( v, i ) {
+ if ( v == null ) {
+ v = i > 2 ? 1 : 0;
+ }
+
+ // catch 1 and 2
+ if ( i && i < 3 ) {
+ v = Math.round( v * 100 ) + "%";
+ }
+ return v;
+ });
+
+ if ( hsla[ 3 ] === 1 ) {
+ hsla.pop();
+ prefix = "hsl(";
+ }
+ return prefix + hsla.join() + ")";
+ },
+ toHexString: function( includeAlpha ) {
+ var rgba = this._rgba.slice(),
+ alpha = rgba.pop();
+
+ if ( includeAlpha ) {
+ rgba.push( ~~( alpha * 255 ) );
+ }
+
+ return "#" + jQuery.map( rgba, function( v ) {
+
+ // default to 0 when nulls exist
+ v = ( v || 0 ).toString( 16 );
+ return v.length === 1 ? "0" + v : v;
+ }).join("");
+ },
+ toString: function() {
+ return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
+ }
+});
+color.fn.parse.prototype = color.fn;
+
+// hsla conversions adapted from:
+// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
+
+function hue2rgb( p, q, h ) {
+ h = ( h + 1 ) % 1;
+ if ( h * 6 < 1 ) {
+ return p + (q - p) * h * 6;
+ }
+ if ( h * 2 < 1) {
+ return q;
+ }
+ if ( h * 3 < 2 ) {
+ return p + (q - p) * ((2/3) - h) * 6;
+ }
+ return p;
+}
+
+spaces.hsla.to = function ( rgba ) {
+ if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
+ return [ null, null, null, rgba[ 3 ] ];
+ }
+ var r = rgba[ 0 ] / 255,
+ g = rgba[ 1 ] / 255,
+ b = rgba[ 2 ] / 255,
+ a = rgba[ 3 ],
+ max = Math.max( r, g, b ),
+ min = Math.min( r, g, b ),
+ diff = max - min,
+ add = max + min,
+ l = add * 0.5,
+ h, s;
+
+ if ( min === max ) {
+ h = 0;
+ } else if ( r === max ) {
+ h = ( 60 * ( g - b ) / diff ) + 360;
+ } else if ( g === max ) {
+ h = ( 60 * ( b - r ) / diff ) + 120;
+ } else {
+ h = ( 60 * ( r - g ) / diff ) + 240;
+ }
+
+ // chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
+ // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
+ if ( diff === 0 ) {
+ s = 0;
+ } else if ( l <= 0.5 ) {
+ s = diff / add;
+ } else {
+ s = diff / ( 2 - add );
+ }
+ return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
+};
+
+spaces.hsla.from = function ( hsla ) {
+ if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
+ return [ null, null, null, hsla[ 3 ] ];
+ }
+ var h = hsla[ 0 ] / 360,
+ s = hsla[ 1 ],
+ l = hsla[ 2 ],
+ a = hsla[ 3 ],
+ q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
+ p = 2 * l - q;
+
+ return [
+ Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
+ Math.round( hue2rgb( p, q, h ) * 255 ),
+ Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
+ a
+ ];
+};
+
+
+each( spaces, function( spaceName, space ) {
+ var props = space.props,
+ cache = space.cache,
+ to = space.to,
+ from = space.from;
+
+ // makes rgba() and hsla()
+ color.fn[ spaceName ] = function( value ) {
+
+ // generate a cache for this space if it doesn't exist
+ if ( to && !this[ cache ] ) {
+ this[ cache ] = to( this._rgba );
+ }
+ if ( value === undefined ) {
+ return this[ cache ].slice();
+ }
+
+ var ret,
+ type = jQuery.type( value ),
+ arr = ( type === "array" || type === "object" ) ? value : arguments,
+ local = this[ cache ].slice();
+
+ each( props, function( key, prop ) {
+ var val = arr[ type === "object" ? key : prop.idx ];
+ if ( val == null ) {
+ val = local[ prop.idx ];
+ }
+ local[ prop.idx ] = clamp( val, prop );
+ });
+
+ if ( from ) {
+ ret = color( from( local ) );
+ ret[ cache ] = local;
+ return ret;
+ } else {
+ return color( local );
+ }
+ };
+
+ // makes red() green() blue() alpha() hue() saturation() lightness()
+ each( props, function( key, prop ) {
+ // alpha is included in more than one space
+ if ( color.fn[ key ] ) {
+ return;
+ }
+ color.fn[ key ] = function( value ) {
+ var vtype = jQuery.type( value ),
+ fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
+ local = this[ fn ](),
+ cur = local[ prop.idx ],
+ match;
+
+ if ( vtype === "undefined" ) {
+ return cur;
+ }
+
+ if ( vtype === "function" ) {
+ value = value.call( this, cur );
+ vtype = jQuery.type( value );
+ }
+ if ( value == null && prop.empty ) {
+ return this;
+ }
+ if ( vtype === "string" ) {
+ match = rplusequals.exec( value );
+ if ( match ) {
+ value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
+ }
+ }
+ local[ prop.idx ] = value;
+ return this[ fn ]( local );
+ };
+ });
+});
+
+// add cssHook and .fx.step function for each named hook.
+// accept a space separated string of properties
+color.hook = function( hook ) {
+ var hooks = hook.split( " " );
+ each( hooks, function( i, hook ) {
+ jQuery.cssHooks[ hook ] = {
+ set: function( elem, value ) {
+ var parsed, curElem,
+ backgroundColor = "";
+
+ if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
+ value = color( parsed || value );
+ if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
+ curElem = hook === "backgroundColor" ? elem.parentNode : elem;
+ while (
+ (backgroundColor === "" || backgroundColor === "transparent") &&
+ curElem && curElem.style
+ ) {
+ try {
+ backgroundColor = jQuery.css( curElem, "backgroundColor" );
+ curElem = curElem.parentNode;
+ } catch ( e ) {
+ }
+ }
+
+ value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
+ backgroundColor :
+ "_default" );
+ }
+
+ value = value.toRgbaString();
+ }
+ try {
+ elem.style[ hook ] = value;
+ } catch( e ) {
+ // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
+ }
+ }
+ };
+ jQuery.fx.step[ hook ] = function( fx ) {
+ if ( !fx.colorInit ) {
+ fx.start = color( fx.elem, hook );
+ fx.end = color( fx.end );
+ fx.colorInit = true;
+ }
+ jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
+ };
+ });
+
+};
+
+color.hook( stepHooks );
+
+jQuery.cssHooks.borderColor = {
+ expand: function( value ) {
+ var expanded = {};
+
+ each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
+ expanded[ "border" + part + "Color" ] = value;
+ });
+ return expanded;
+ }
+};
+
+// Basic color names only.
+// Usage of any of the other color names requires adding yourself or including
+// jquery.color.svg-names.js.
+colors = jQuery.Color.names = {
+ // 4.1. Basic color keywords
+ aqua: "#00ffff",
+ black: "#000000",
+ blue: "#0000ff",
+ fuchsia: "#ff00ff",
+ gray: "#808080",
+ green: "#008000",
+ lime: "#00ff00",
+ maroon: "#800000",
+ navy: "#000080",
+ olive: "#808000",
+ purple: "#800080",
+ red: "#ff0000",
+ silver: "#c0c0c0",
+ teal: "#008080",
+ white: "#ffffff",
+ yellow: "#ffff00",
+
+ // 4.2.3. "transparent" color keyword
+ transparent: [ null, null, null, 0 ],
+
+ _default: "#ffffff"
+};
+
+})( jQuery );
+
+
+/******************************************************************************/
+/****************************** CLASS ANIMATIONS ******************************/
+/******************************************************************************/
+(function() {
+
+var classAnimationActions = [ "add", "remove", "toggle" ],
+ shorthandStyles = {
+ border: 1,
+ borderBottom: 1,
+ borderColor: 1,
+ borderLeft: 1,
+ borderRight: 1,
+ borderTop: 1,
+ borderWidth: 1,
+ margin: 1,
+ padding: 1
+ };
+
+$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
+ $.fx.step[ prop ] = function( fx ) {
+ if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
+ jQuery.style( fx.elem, prop, fx.end );
+ fx.setAttr = true;
+ }
+ };
+});
+
+function getElementStyles( elem ) {
+ var key, len,
+ style = elem.ownerDocument.defaultView ?
+ elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
+ elem.currentStyle,
+ styles = {};
+
+ if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
+ len = style.length;
+ while ( len-- ) {
+ key = style[ len ];
+ if ( typeof style[ key ] === "string" ) {
+ styles[ $.camelCase( key ) ] = style[ key ];
+ }
+ }
+ // support: Opera, IE <9
+ } else {
+ for ( key in style ) {
+ if ( typeof style[ key ] === "string" ) {
+ styles[ key ] = style[ key ];
+ }
+ }
+ }
+
+ return styles;
+}
+
+
+function styleDifference( oldStyle, newStyle ) {
+ var diff = {},
+ name, value;
+
+ for ( name in newStyle ) {
+ value = newStyle[ name ];
+ if ( oldStyle[ name ] !== value ) {
+ if ( !shorthandStyles[ name ] ) {
+ if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
+ diff[ name ] = value;
+ }
+ }
+ }
+ }
+
+ return diff;
+}
+
+// support: jQuery <1.8
+if ( !$.fn.addBack ) {
+ $.fn.addBack = function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter( selector )
+ );
+ };
+}
+
+$.effects.animateClass = function( value, duration, easing, callback ) {
+ var o = $.speed( duration, easing, callback );
+
+ return this.queue( function() {
+ var animated = $( this ),
+ baseClass = animated.attr( "class" ) || "",
+ applyClassChange,
+ allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
+
+ // map the animated objects to store the original styles.
+ allAnimations = allAnimations.map(function() {
+ var el = $( this );
+ return {
+ el: el,
+ start: getElementStyles( this )
+ };
+ });
+
+ // apply class change
+ applyClassChange = function() {
+ $.each( classAnimationActions, function(i, action) {
+ if ( value[ action ] ) {
+ animated[ action + "Class" ]( value[ action ] );
+ }
+ });
+ };
+ applyClassChange();
+
+ // map all animated objects again - calculate new styles and diff
+ allAnimations = allAnimations.map(function() {
+ this.end = getElementStyles( this.el[ 0 ] );
+ this.diff = styleDifference( this.start, this.end );
+ return this;
+ });
+
+ // apply original class
+ animated.attr( "class", baseClass );
+
+ // map all animated objects again - this time collecting a promise
+ allAnimations = allAnimations.map(function() {
+ var styleInfo = this,
+ dfd = $.Deferred(),
+ opts = $.extend({}, o, {
+ queue: false,
+ complete: function() {
+ dfd.resolve( styleInfo );
+ }
+ });
+
+ this.el.animate( this.diff, opts );
+ return dfd.promise();
+ });
+
+ // once all animations have completed:
+ $.when.apply( $, allAnimations.get() ).done(function() {
+
+ // set the final class
+ applyClassChange();
+
+ // for each animated element,
+ // clear all css properties that were animated
+ $.each( arguments, function() {
+ var el = this.el;
+ $.each( this.diff, function(key) {
+ el.css( key, "" );
+ });
+ });
+
+ // this is guarnteed to be there if you use jQuery.speed()
+ // it also handles dequeuing the next anim...
+ o.complete.call( animated[ 0 ] );
+ });
+ });
+};
+
+$.fn.extend({
+ addClass: (function( orig ) {
+ return function( classNames, speed, easing, callback ) {
+ return speed ?
+ $.effects.animateClass.call( this,
+ { add: classNames }, speed, easing, callback ) :
+ orig.apply( this, arguments );
+ };
+ })( $.fn.addClass ),
+
+ removeClass: (function( orig ) {
+ return function( classNames, speed, easing, callback ) {
+ return arguments.length > 1 ?
+ $.effects.animateClass.call( this,
+ { remove: classNames }, speed, easing, callback ) :
+ orig.apply( this, arguments );
+ };
+ })( $.fn.removeClass ),
+
+ toggleClass: (function( orig ) {
+ return function( classNames, force, speed, easing, callback ) {
+ if ( typeof force === "boolean" || force === undefined ) {
+ if ( !speed ) {
+ // without speed parameter
+ return orig.apply( this, arguments );
+ } else {
+ return $.effects.animateClass.call( this,
+ (force ? { add: classNames } : { remove: classNames }),
+ speed, easing, callback );
+ }
+ } else {
+ // without force parameter
+ return $.effects.animateClass.call( this,
+ { toggle: classNames }, force, speed, easing );
+ }
+ };
+ })( $.fn.toggleClass ),
+
+ switchClass: function( remove, add, speed, easing, callback) {
+ return $.effects.animateClass.call( this, {
+ add: add,
+ remove: remove
+ }, speed, easing, callback );
+ }
+});
+
+})();
+
+/******************************************************************************/
+/*********************************** EFFECTS **********************************/
+/******************************************************************************/
+
+(function() {
+
+$.extend( $.effects, {
+ version: "1.10.4",
+
+ // Saves a set of properties in a data storage
+ save: function( element, set ) {
+ for( var i=0; i < set.length; i++ ) {
+ if ( set[ i ] !== null ) {
+ element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
+ }
+ }
+ },
+
+ // Restores a set of previously saved properties from a data storage
+ restore: function( element, set ) {
+ var val, i;
+ for( i=0; i < set.length; i++ ) {
+ if ( set[ i ] !== null ) {
+ val = element.data( dataSpace + set[ i ] );
+ // support: jQuery 1.6.2
+ // http://bugs.jquery.com/ticket/9917
+ // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
+ // We can't differentiate between "" and 0 here, so we just assume
+ // empty string since it's likely to be a more common value...
+ if ( val === undefined ) {
+ val = "";
+ }
+ element.css( set[ i ], val );
+ }
+ }
+ },
+
+ setMode: function( el, mode ) {
+ if (mode === "toggle") {
+ mode = el.is( ":hidden" ) ? "show" : "hide";
+ }
+ return mode;
+ },
+
+ // Translates a [top,left] array into a baseline value
+ // this should be a little more flexible in the future to handle a string & hash
+ getBaseline: function( origin, original ) {
+ var y, x;
+ switch ( origin[ 0 ] ) {
+ case "top": y = 0; break;
+ case "middle": y = 0.5; break;
+ case "bottom": y = 1; break;
+ default: y = origin[ 0 ] / original.height;
+ }
+ switch ( origin[ 1 ] ) {
+ case "left": x = 0; break;
+ case "center": x = 0.5; break;
+ case "right": x = 1; break;
+ default: x = origin[ 1 ] / original.width;
+ }
+ return {
+ x: x,
+ y: y
+ };
+ },
+
+ // Wraps the element around a wrapper that copies position properties
+ createWrapper: function( element ) {
+
+ // if the element is already wrapped, return it
+ if ( element.parent().is( ".ui-effects-wrapper" )) {
+ return element.parent();
+ }
+
+ // wrap the element
+ var props = {
+ width: element.outerWidth(true),
+ height: element.outerHeight(true),
+ "float": element.css( "float" )
+ },
+ wrapper = $( "<div></div>" )
+ .addClass( "ui-effects-wrapper" )
+ .css({
+ fontSize: "100%",
+ background: "transparent",
+ border: "none",
+ margin: 0,
+ padding: 0
+ }),
+ // Store the size in case width/height are defined in % - Fixes #5245
+ size = {
+ width: element.width(),
+ height: element.height()
+ },
+ active = document.activeElement;
+
+ // support: Firefox
+ // Firefox incorrectly exposes anonymous content
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
+ try {
+ active.id;
+ } catch( e ) {
+ active = document.body;
+ }
+
+ element.wrap( wrapper );
+
+ // Fixes #7595 - Elements lose focus when wrapped.
+ if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
+ $( active ).focus();
+ }
+
+ wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
+
+ // transfer positioning properties to the wrapper
+ if ( element.css( "position" ) === "static" ) {
+ wrapper.css({ position: "relative" });
+ element.css({ position: "relative" });
+ } else {
+ $.extend( props, {
+ position: element.css( "position" ),
+ zIndex: element.css( "z-index" )
+ });
+ $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
+ props[ pos ] = element.css( pos );
+ if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
+ props[ pos ] = "auto";
+ }
+ });
+ element.css({
+ position: "relative",
+ top: 0,
+ left: 0,
+ right: "auto",
+ bottom: "auto"
+ });
+ }
+ element.css(size);
+
+ return wrapper.css( props ).show();
+ },
+
+ removeWrapper: function( element ) {
+ var active = document.activeElement;
+
+ if ( element.parent().is( ".ui-effects-wrapper" ) ) {
+ element.parent().replaceWith( element );
+
+ // Fixes #7595 - Elements lose focus when wrapped.
+ if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
+ $( active ).focus();
+ }
+ }
+
+
+ return element;
+ },
+
+ setTransition: function( element, list, factor, value ) {
+ value = value || {};
+ $.each( list, function( i, x ) {
+ var unit = element.cssUnit( x );
+ if ( unit[ 0 ] > 0 ) {
+ value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
+ }
+ });
+ return value;
+ }
+});
+
+// return an effect options object for the given parameters:
+function _normalizeArguments( effect, options, speed, callback ) {
+
+ // allow passing all options as the first parameter
+ if ( $.isPlainObject( effect ) ) {
+ options = effect;
+ effect = effect.effect;
+ }
+
+ // convert to an object
+ effect = { effect: effect };
+
+ // catch (effect, null, ...)
+ if ( options == null ) {
+ options = {};
+ }
+
+ // catch (effect, callback)
+ if ( $.isFunction( options ) ) {
+ callback = options;
+ speed = null;
+ options = {};
+ }
+
+ // catch (effect, speed, ?)
+ if ( typeof options === "number" || $.fx.speeds[ options ] ) {
+ callback = speed;
+ speed = options;
+ options = {};
+ }
+
+ // catch (effect, options, callback)
+ if ( $.isFunction( speed ) ) {
+ callback = speed;
+ speed = null;
+ }
+
+ // add options to effect
+ if ( options ) {
+ $.extend( effect, options );
+ }
+
+ speed = speed || options.duration;
+ effect.duration = $.fx.off ? 0 :
+ typeof speed === "number" ? speed :
+ speed in $.fx.speeds ? $.fx.speeds[ speed ] :
+ $.fx.speeds._default;
+
+ effect.complete = callback || options.complete;
+
+ return effect;
+}
+
+function standardAnimationOption( option ) {
+ // Valid standard speeds (nothing, number, named speed)
+ if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
+ return true;
+ }
+
+ // Invalid strings - treat as "normal" speed
+ if ( typeof option === "string" && !$.effects.effect[ option ] ) {
+ return true;
+ }
+
+ // Complete callback
+ if ( $.isFunction( option ) ) {
+ return true;
+ }
+
+ // Options hash (but not naming an effect)
+ if ( typeof option === "object" && !option.effect ) {
+ return true;
+ }
+
+ // Didn't match any standard API
+ return false;
+}
+
+$.fn.extend({
+ effect: function( /* effect, options, speed, callback */ ) {
+ var args = _normalizeArguments.apply( this, arguments ),
+ mode = args.mode,
+ queue = args.queue,
+ effectMethod = $.effects.effect[ args.effect ];
+
+ if ( $.fx.off || !effectMethod ) {
+ // delegate to the original method (e.g., .show()) if possible
+ if ( mode ) {
+ return this[ mode ]( args.duration, args.complete );
+ } else {
+ return this.each( function() {
+ if ( args.complete ) {
+ args.complete.call( this );
+ }
+ });
+ }
+ }
+
+ function run( next ) {
+ var elem = $( this ),
+ complete = args.complete,
+ mode = args.mode;
+
+ function done() {
+ if ( $.isFunction( complete ) ) {
+ complete.call( elem[0] );
+ }
+ if ( $.isFunction( next ) ) {
+ next();
+ }
+ }
+
+ // If the element already has the correct final state, delegate to
+ // the core methods so the internal tracking of "olddisplay" works.
+ if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
+ elem[ mode ]();
+ done();
+ } else {
+ effectMethod.call( elem[0], args, done );
+ }
+ }
+
+ return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
+ },
+
+ show: (function( orig ) {
+ return function( option ) {
+ if ( standardAnimationOption( option ) ) {
+ return orig.apply( this, arguments );
+ } else {
+ var args = _normalizeArguments.apply( this, arguments );
+ args.mode = "show";
+ return this.effect.call( this, args );
+ }
+ };
+ })( $.fn.show ),
+
+ hide: (function( orig ) {
+ return function( option ) {
+ if ( standardAnimationOption( option ) ) {
+ return orig.apply( this, arguments );
+ } else {
+ var args = _normalizeArguments.apply( this, arguments );
+ args.mode = "hide";
+ return this.effect.call( this, args );
+ }
+ };
+ })( $.fn.hide ),
+
+ toggle: (function( orig ) {
+ return function( option ) {
+ if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
+ return orig.apply( this, arguments );
+ } else {
+ var args = _normalizeArguments.apply( this, arguments );
+ args.mode = "toggle";
+ return this.effect.call( this, args );
+ }
+ };
+ })( $.fn.toggle ),
+
+ // helper functions
+ cssUnit: function(key) {
+ var style = this.css( key ),
+ val = [];
+
+ $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
+ if ( style.indexOf( unit ) > 0 ) {
+ val = [ parseFloat( style ), unit ];
+ }
+ });
+ return val;
+ }
+});
+
+})();
+
+/******************************************************************************/
+/*********************************** EASING ***********************************/
+/******************************************************************************/
+
+(function() {
+
+// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
+
+var baseEasings = {};
+
+$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
+ baseEasings[ name ] = function( p ) {
+ return Math.pow( p, i + 2 );
+ };
+});
+
+$.extend( baseEasings, {
+ Sine: function ( p ) {
+ return 1 - Math.cos( p * Math.PI / 2 );
+ },
+ Circ: function ( p ) {
+ return 1 - Math.sqrt( 1 - p * p );
+ },
+ Elastic: function( p ) {
+ return p === 0 || p === 1 ? p :
+ -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
+ },
+ Back: function( p ) {
+ return p * p * ( 3 * p - 2 );
+ },
+ Bounce: function ( p ) {
+ var pow2,
+ bounce = 4;
+
+ while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
+ return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
+ }
+});
+
+$.each( baseEasings, function( name, easeIn ) {
+ $.easing[ "easeIn" + name ] = easeIn;
+ $.easing[ "easeOut" + name ] = function( p ) {
+ return 1 - easeIn( 1 - p );
+ };
+ $.easing[ "easeInOut" + name ] = function( p ) {
+ return p < 0.5 ?
+ easeIn( p * 2 ) / 2 :
+ 1 - easeIn( p * -2 + 2 ) / 2;
+ };
+});
+
+})();
+
+})(jQuery);
(function( $, undefined ) {
var rvertical = /up|down|vertical/,
@@ -10480,7 +8491,6 @@ $.effects.effect.blind = function( o, done ) {
};
})(jQuery);
-
(function( $, undefined ) {
$.effects.effect.bounce = function( o, done ) {
@@ -10581,7 +8591,6 @@ $.effects.effect.bounce = function( o, done ) {
};
})(jQuery);
-
(function( $, undefined ) {
$.effects.effect.clip = function( o, done ) {
@@ -10636,7 +8645,6 @@ $.effects.effect.clip = function( o, done ) {
};
})(jQuery);
-
(function( $, undefined ) {
$.effects.effect.drop = function( o, done ) {
@@ -10689,7 +8697,6 @@ $.effects.effect.drop = function( o, done ) {
};
})(jQuery);
-
(function( $, undefined ) {
$.effects.effect.explode = function( o, done ) {
@@ -10774,7 +8781,6 @@ $.effects.effect.explode = function( o, done ) {
};
})(jQuery);
-
(function( $, undefined ) {
$.effects.effect.fade = function( o, done ) {
@@ -10792,7 +8798,6 @@ $.effects.effect.fade = function( o, done ) {
};
})( jQuery );
-
(function( $, undefined ) {
$.effects.effect.fold = function( o, done ) {
@@ -10856,7 +8861,6 @@ $.effects.effect.fold = function( o, done ) {
};
})(jQuery);
-
(function( $, undefined ) {
$.effects.effect.highlight = function( o, done ) {
@@ -10894,7 +8898,6 @@ $.effects.effect.highlight = function( o, done ) {
};
})(jQuery);
-
(function( $, undefined ) {
$.effects.effect.pulsate = function( o, done ) {
@@ -10945,7 +8948,6 @@ $.effects.effect.pulsate = function( o, done ) {
};
})(jQuery);
-
(function( $, undefined ) {
$.effects.effect.puff = function( o, done ) {
@@ -11251,7 +9253,6 @@ $.effects.effect.size = function( o, done ) {
};
})(jQuery);
-
(function( $, undefined ) {
$.effects.effect.shake = function( o, done ) {
@@ -11313,7 +9314,6 @@ $.effects.effect.shake = function( o, done ) {
};
})(jQuery);
-
(function( $, undefined ) {
$.effects.effect.slide = function( o, done ) {
@@ -11365,7 +9365,6 @@ $.effects.effect.slide = function( o, done ) {
};
})(jQuery);
-
(function( $, undefined ) {
$.effects.effect.transfer = function( o, done ) {
@@ -11400,11 +9399,10 @@ $.effects.effect.transfer = function( o, done ) {
};
})(jQuery);
-
(function( $, undefined ) {
$.widget( "ui.menu", {
- version: "1.10.2",
+ version: "1.10.4",
defaultElement: "<ul>",
delay: 300,
options: {
@@ -11463,13 +9461,18 @@ $.widget( "ui.menu", {
"click .ui-menu-item:has(a)": function( event ) {
var target = $( event.target ).closest( ".ui-menu-item" );
if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
- this.mouseHandled = true;
-
this.select( event );
+
+ // Only set the mouseHandled flag if the event will bubble, see #9469.
+ if ( !event.isPropagationStopped() ) {
+ this.mouseHandled = true;
+ }
+
// Open submenu on click
if ( target.has( ".ui-menu" ).length ) {
this.expand( event );
- } else if ( !this.element.is( ":focus" ) ) {
+ } else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
+
// Redirect focus to the menu
this.element.trigger( "focus", [ true ] );
@@ -11562,7 +9565,6 @@ $.widget( "ui.menu", {
},
_keydown: function( event ) {
- /*jshint maxcomplexity:20*/
var match, prev, character, skip, regex,
preventDefault = true;
@@ -11671,6 +9673,8 @@ $.widget( "ui.menu", {
icon = this.options.icons.submenu,
submenus = this.element.find( this.options.menus );
+ this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length );
+
// Initialize nested menus
submenus.filter( ":not(.ui-menu)" )
.addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
@@ -11771,7 +9775,7 @@ $.widget( "ui.menu", {
}
nested = item.children( ".ui-menu" );
- if ( nested.length && ( /^mouse/.test( event.type ) ) ) {
+ if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
this._startOpening(nested);
}
this.activeMenu = item.parent();
@@ -12007,499 +10011,10 @@ $.widget( "ui.menu", {
});
}( jQuery ));
-
-(function( $, undefined ) {
-
-$.ui = $.ui || {};
-
-var cachedScrollbarWidth,
- max = Math.max,
- abs = Math.abs,
- round = Math.round,
- rhorizontal = /left|center|right/,
- rvertical = /top|center|bottom/,
- roffset = /[\+\-]\d+(\.[\d]+)?%?/,
- rposition = /^\w+/,
- rpercent = /%$/,
- _position = $.fn.position;
-
-function getOffsets( offsets, width, height ) {
- return [
- parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
- parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
- ];
-}
-
-function parseCss( element, property ) {
- return parseInt( $.css( element, property ), 10 ) || 0;
-}
-
-function getDimensions( elem ) {
- var raw = elem[0];
- if ( raw.nodeType === 9 ) {
- return {
- width: elem.width(),
- height: elem.height(),
- offset: { top: 0, left: 0 }
- };
- }
- if ( $.isWindow( raw ) ) {
- return {
- width: elem.width(),
- height: elem.height(),
- offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
- };
- }
- if ( raw.preventDefault ) {
- return {
- width: 0,
- height: 0,
- offset: { top: raw.pageY, left: raw.pageX }
- };
- }
- return {
- width: elem.outerWidth(),
- height: elem.outerHeight(),
- offset: elem.offset()
- };
-}
-
-$.position = {
- scrollbarWidth: function() {
- if ( cachedScrollbarWidth !== undefined ) {
- return cachedScrollbarWidth;
- }
- var w1, w2,
- div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
- innerDiv = div.children()[0];
-
- $( "body" ).append( div );
- w1 = innerDiv.offsetWidth;
- div.css( "overflow", "scroll" );
-
- w2 = innerDiv.offsetWidth;
-
- if ( w1 === w2 ) {
- w2 = div[0].clientWidth;
- }
-
- div.remove();
-
- return (cachedScrollbarWidth = w1 - w2);
- },
- getScrollInfo: function( within ) {
- var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ),
- overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ),
- hasOverflowX = overflowX === "scroll" ||
- ( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
- hasOverflowY = overflowY === "scroll" ||
- ( overflowY === "auto" && within.height < within.element[0].scrollHeight );
- return {
- width: hasOverflowY ? $.position.scrollbarWidth() : 0,
- height: hasOverflowX ? $.position.scrollbarWidth() : 0
- };
- },
- getWithinInfo: function( element ) {
- var withinElement = $( element || window ),
- isWindow = $.isWindow( withinElement[0] );
- return {
- element: withinElement,
- isWindow: isWindow,
- offset: withinElement.offset() || { left: 0, top: 0 },
- scrollLeft: withinElement.scrollLeft(),
- scrollTop: withinElement.scrollTop(),
- width: isWindow ? withinElement.width() : withinElement.outerWidth(),
- height: isWindow ? withinElement.height() : withinElement.outerHeight()
- };
- }
-};
-
-$.fn.position = function( options ) {
- if ( !options || !options.of ) {
- return _position.apply( this, arguments );
- }
-
- // make a copy, we don't want to modify arguments
- options = $.extend( {}, options );
-
- var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
- target = $( options.of ),
- within = $.position.getWithinInfo( options.within ),
- scrollInfo = $.position.getScrollInfo( within ),
- collision = ( options.collision || "flip" ).split( " " ),
- offsets = {};
-
- dimensions = getDimensions( target );
- if ( target[0].preventDefault ) {
- // force left top to allow flipping
- options.at = "left top";
- }
- targetWidth = dimensions.width;
- targetHeight = dimensions.height;
- targetOffset = dimensions.offset;
- // clone to reuse original targetOffset later
- basePosition = $.extend( {}, targetOffset );
-
- // force my and at to have valid horizontal and vertical positions
- // if a value is missing or invalid, it will be converted to center
- $.each( [ "my", "at" ], function() {
- var pos = ( options[ this ] || "" ).split( " " ),
- horizontalOffset,
- verticalOffset;
-
- if ( pos.length === 1) {
- pos = rhorizontal.test( pos[ 0 ] ) ?
- pos.concat( [ "center" ] ) :
- rvertical.test( pos[ 0 ] ) ?
- [ "center" ].concat( pos ) :
- [ "center", "center" ];
- }
- pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
- pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
-
- // calculate offsets
- horizontalOffset = roffset.exec( pos[ 0 ] );
- verticalOffset = roffset.exec( pos[ 1 ] );
- offsets[ this ] = [
- horizontalOffset ? horizontalOffset[ 0 ] : 0,
- verticalOffset ? verticalOffset[ 0 ] : 0
- ];
-
- // reduce to just the positions without the offsets
- options[ this ] = [
- rposition.exec( pos[ 0 ] )[ 0 ],
- rposition.exec( pos[ 1 ] )[ 0 ]
- ];
- });
-
- // normalize collision option
- if ( collision.length === 1 ) {
- collision[ 1 ] = collision[ 0 ];
- }
-
- if ( options.at[ 0 ] === "right" ) {
- basePosition.left += targetWidth;
- } else if ( options.at[ 0 ] === "center" ) {
- basePosition.left += targetWidth / 2;
- }
-
- if ( options.at[ 1 ] === "bottom" ) {
- basePosition.top += targetHeight;
- } else if ( options.at[ 1 ] === "center" ) {
- basePosition.top += targetHeight / 2;
- }
-
- atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
- basePosition.left += atOffset[ 0 ];
- basePosition.top += atOffset[ 1 ];
-
- return this.each(function() {
- var collisionPosition, using,
- elem = $( this ),
- elemWidth = elem.outerWidth(),
- elemHeight = elem.outerHeight(),
- marginLeft = parseCss( this, "marginLeft" ),
- marginTop = parseCss( this, "marginTop" ),
- collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
- collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
- position = $.extend( {}, basePosition ),
- myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
-
- if ( options.my[ 0 ] === "right" ) {
- position.left -= elemWidth;
- } else if ( options.my[ 0 ] === "center" ) {
- position.left -= elemWidth / 2;
- }
-
- if ( options.my[ 1 ] === "bottom" ) {
- position.top -= elemHeight;
- } else if ( options.my[ 1 ] === "center" ) {
- position.top -= elemHeight / 2;
- }
-
- position.left += myOffset[ 0 ];
- position.top += myOffset[ 1 ];
-
- // if the browser doesn't support fractions, then round for consistent results
- if ( !$.support.offsetFractions ) {
- position.left = round( position.left );
- position.top = round( position.top );
- }
-
- collisionPosition = {
- marginLeft: marginLeft,
- marginTop: marginTop
- };
-
- $.each( [ "left", "top" ], function( i, dir ) {
- if ( $.ui.position[ collision[ i ] ] ) {
- $.ui.position[ collision[ i ] ][ dir ]( position, {
- targetWidth: targetWidth,
- targetHeight: targetHeight,
- elemWidth: elemWidth,
- elemHeight: elemHeight,
- collisionPosition: collisionPosition,
- collisionWidth: collisionWidth,
- collisionHeight: collisionHeight,
- offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
- my: options.my,
- at: options.at,
- within: within,
- elem : elem
- });
- }
- });
-
- if ( options.using ) {
- // adds feedback as second argument to using callback, if present
- using = function( props ) {
- var left = targetOffset.left - position.left,
- right = left + targetWidth - elemWidth,
- top = targetOffset.top - position.top,
- bottom = top + targetHeight - elemHeight,
- feedback = {
- target: {
- element: target,
- left: targetOffset.left,
- top: targetOffset.top,
- width: targetWidth,
- height: targetHeight
- },
- element: {
- element: elem,
- left: position.left,
- top: position.top,
- width: elemWidth,
- height: elemHeight
- },
- horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
- vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
- };
- if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
- feedback.horizontal = "center";
- }
- if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
- feedback.vertical = "middle";
- }
- if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
- feedback.important = "horizontal";
- } else {
- feedback.important = "vertical";
- }
- options.using.call( this, props, feedback );
- };
- }
-
- elem.offset( $.extend( position, { using: using } ) );
- });
-};
-
-$.ui.position = {
- fit: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
- outerWidth = within.width,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = withinOffset - collisionPosLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
- newOverRight;
-
- // element is wider than within
- if ( data.collisionWidth > outerWidth ) {
- // element is initially over the left side of within
- if ( overLeft > 0 && overRight <= 0 ) {
- newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
- position.left += overLeft - newOverRight;
- // element is initially over right side of within
- } else if ( overRight > 0 && overLeft <= 0 ) {
- position.left = withinOffset;
- // element is initially over both left and right sides of within
- } else {
- if ( overLeft > overRight ) {
- position.left = withinOffset + outerWidth - data.collisionWidth;
- } else {
- position.left = withinOffset;
- }
- }
- // too far left -> align with left edge
- } else if ( overLeft > 0 ) {
- position.left += overLeft;
- // too far right -> align with right edge
- } else if ( overRight > 0 ) {
- position.left -= overRight;
- // adjust based on position and margin
- } else {
- position.left = max( position.left - collisionPosLeft, position.left );
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
- outerHeight = data.within.height,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = withinOffset - collisionPosTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
- newOverBottom;
-
- // element is taller than within
- if ( data.collisionHeight > outerHeight ) {
- // element is initially over the top of within
- if ( overTop > 0 && overBottom <= 0 ) {
- newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
- position.top += overTop - newOverBottom;
- // element is initially over bottom of within
- } else if ( overBottom > 0 && overTop <= 0 ) {
- position.top = withinOffset;
- // element is initially over both top and bottom of within
- } else {
- if ( overTop > overBottom ) {
- position.top = withinOffset + outerHeight - data.collisionHeight;
- } else {
- position.top = withinOffset;
- }
- }
- // too far up -> align with top
- } else if ( overTop > 0 ) {
- position.top += overTop;
- // too far down -> align with bottom edge
- } else if ( overBottom > 0 ) {
- position.top -= overBottom;
- // adjust based on position and margin
- } else {
- position.top = max( position.top - collisionPosTop, position.top );
- }
- }
- },
- flip: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.left + within.scrollLeft,
- outerWidth = within.width,
- offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = collisionPosLeft - offsetLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
- myOffset = data.my[ 0 ] === "left" ?
- -data.elemWidth :
- data.my[ 0 ] === "right" ?
- data.elemWidth :
- 0,
- atOffset = data.at[ 0 ] === "left" ?
- data.targetWidth :
- data.at[ 0 ] === "right" ?
- -data.targetWidth :
- 0,
- offset = -2 * data.offset[ 0 ],
- newOverRight,
- newOverLeft;
-
- if ( overLeft < 0 ) {
- newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
- if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
- position.left += myOffset + atOffset + offset;
- }
- }
- else if ( overRight > 0 ) {
- newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
- if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
- position.left += myOffset + atOffset + offset;
- }
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.top + within.scrollTop,
- outerHeight = within.height,
- offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = collisionPosTop - offsetTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
- top = data.my[ 1 ] === "top",
- myOffset = top ?
- -data.elemHeight :
- data.my[ 1 ] === "bottom" ?
- data.elemHeight :
- 0,
- atOffset = data.at[ 1 ] === "top" ?
- data.targetHeight :
- data.at[ 1 ] === "bottom" ?
- -data.targetHeight :
- 0,
- offset = -2 * data.offset[ 1 ],
- newOverTop,
- newOverBottom;
- if ( overTop < 0 ) {
- newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
- if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
- position.top += myOffset + atOffset + offset;
- }
- }
- else if ( overBottom > 0 ) {
- newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
- if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
- position.top += myOffset + atOffset + offset;
- }
- }
- }
- },
- flipfit: {
- left: function() {
- $.ui.position.flip.left.apply( this, arguments );
- $.ui.position.fit.left.apply( this, arguments );
- },
- top: function() {
- $.ui.position.flip.top.apply( this, arguments );
- $.ui.position.fit.top.apply( this, arguments );
- }
- }
-};
-
-// fraction support test
-(function () {
- var testElement, testElementParent, testElementStyle, offsetLeft, i,
- body = document.getElementsByTagName( "body" )[ 0 ],
- div = document.createElement( "div" );
-
- //Create a "fake body" for testing based on method used in jQuery.support
- testElement = document.createElement( body ? "div" : "body" );
- testElementStyle = {
- visibility: "hidden",
- width: 0,
- height: 0,
- border: 0,
- margin: 0,
- background: "none"
- };
- if ( body ) {
- $.extend( testElementStyle, {
- position: "absolute",
- left: "-1000px",
- top: "-1000px"
- });
- }
- for ( i in testElementStyle ) {
- testElement.style[ i ] = testElementStyle[ i ];
- }
- testElement.appendChild( div );
- testElementParent = body || document.documentElement;
- testElementParent.insertBefore( testElement, testElementParent.firstChild );
-
- div.style.cssText = "position: absolute; left: 10.7432222px;";
-
- offsetLeft = $( div ).offset().left;
- $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
-
- testElement.innerHTML = "";
- testElementParent.removeChild( testElement );
-})();
-
-}( jQuery ) );
-
(function( $, undefined ) {
$.widget( "ui.progressbar", {
- version: "1.10.2",
+ version: "1.10.4",
options: {
max: 100,
value: 0,
@@ -12627,7 +10142,1231 @@ $.widget( "ui.progressbar", {
});
})( jQuery );
+(function( $, undefined ) {
+
+function num(v) {
+ return parseInt(v, 10) || 0;
+}
+
+function isNumber(value) {
+ return !isNaN(parseInt(value, 10));
+}
+
+$.widget("ui.resizable", $.ui.mouse, {
+ version: "1.10.4",
+ 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,
+ // See #7960
+ zIndex: 90,
+
+ // callbacks
+ resize: null,
+ start: null,
+ stop: null
+ },
+ _create: function() {
+
+ var n, i, handle, axis, hname,
+ that = this,
+ o = this.options;
+ this.element.addClass("ui-resizable");
+
+ $.extend(this, {
+ _aspectRatio: !!(o.aspectRatio),
+ aspectRatio: o.aspectRatio,
+ originalElement: this.element,
+ _proportionallyResizeElements: [],
+ _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
+ });
+
+ //Wrap the element if it cannot hold child nodes
+ if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
+
+ //Create a wrapper element and set the wrapper to the new current internal element
+ this.element.wrap(
+ $("<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(
+ "ui-resizable", this.element.data("ui-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";
+ }
+
+ n = this.handles.split(",");
+ this.handles = {};
+
+ for(i = 0; i < n.length; i++) {
+
+ handle = $.trim(n[i]);
+ hname = "ui-resizable-"+handle;
+ axis = $("<div class='ui-resizable-handle " + hname + "'></div>");
+
+ // Apply zIndex to all handles - see #7960
+ axis.css({ zIndex: o.zIndex });
+
+ //TODO : What's going on here?
+ if ("se" === handle) {
+ axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");
+ }
+
+ //Insert into internal handles object and append to element
+ this.handles[handle] = ".ui-resizable-"+handle;
+ this.element.append(axis);
+ }
+
+ }
+
+ this._renderAxis = function(target) {
+
+ var i, axis, padPos, padWrapper;
+
+ target = target || this.element;
+
+ for(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)) {
+
+ axis = $(this.handles[i], this.element);
+
+ //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...
+ padPos = [ "padding",
+ /ne|nw|n/.test(i) ? "Top" :
+ /se|sw|s/.test(i) ? "Bottom" :
+ /^e$/.test(i) ? "Right" : "Left" ].join("");
+
+ target.css(padPos, padWrapper);
+
+ this._proportionallyResize();
+
+ }
+
+ //TODO: What's that good for? There's not anything to be executed left
+ if(!$(this.handles[i]).length) {
+ continue;
+ }
+ }
+ };
+
+ //TODO: make renderAxis a prototype function
+ this._renderAxis(this.element);
+
+ this._handles = $(".ui-resizable-handle", this.element)
+ .disableSelection();
+
+ //Matching axis name
+ this._handles.mouseover(function() {
+ if (!that.resizing) {
+ if (this.className) {
+ axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
+ }
+ //Axis, default = se
+ that.axis = axis && axis[1] ? axis[1] : "se";
+ }
+ });
+
+ //If we want to auto hide the elements
+ if (o.autoHide) {
+ this._handles.hide();
+ $(this.element)
+ .addClass("ui-resizable-autohide")
+ .mouseenter(function() {
+ if (o.disabled) {
+ return;
+ }
+ $(this).removeClass("ui-resizable-autohide");
+ that._handles.show();
+ })
+ .mouseleave(function(){
+ if (o.disabled) {
+ return;
+ }
+ if (!that.resizing) {
+ $(this).addClass("ui-resizable-autohide");
+ that._handles.hide();
+ }
+ });
+ }
+
+ //Initialize the mouse interaction
+ this._mouseInit();
+
+ },
+
+ _destroy: function() {
+
+ this._mouseDestroy();
+
+ var wrapper,
+ _destroy = function(exp) {
+ $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
+ .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove();
+ };
+
+ //TODO: Unwrap at same DOM position
+ if (this.elementIsWrapper) {
+ _destroy(this.element);
+ wrapper = this.element;
+ this.originalElement.css({
+ position: wrapper.css("position"),
+ width: wrapper.outerWidth(),
+ height: wrapper.outerHeight(),
+ top: wrapper.css("top"),
+ left: wrapper.css("left")
+ }).insertAfter( wrapper );
+ wrapper.remove();
+ }
+
+ this.originalElement.css("resize", this.originalResizeStyle);
+ _destroy(this.originalElement);
+
+ return this;
+ },
+
+ _mouseCapture: function(event) {
+ var i, handle,
+ capture = false;
+
+ for (i in this.handles) {
+ handle = $(this.handles[i])[0];
+ if (handle === event.target || $.contains(handle, event.target)) {
+ capture = true;
+ }
+ }
+
+ return !this.options.disabled && capture;
+ },
+
+ _mouseStart: function(event) {
+
+ var curleft, curtop, cursor,
+ o = this.options,
+ iniPos = this.element.position(),
+ el = this.element;
+
+ this.resizing = true;
+
+ // bugfix for http://dev.jquery.com/ticket/1749
+ if ( (/absolute/).test( el.css("position") ) ) {
+ el.css({ position: "absolute", top: el.css("top"), left: el.css("left") });
+ } else if (el.is(".ui-draggable")) {
+ el.css({ position: "absolute", top: iniPos.top, left: iniPos.left });
+ }
+
+ this._renderProxy();
+
+ 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: this.helper.width(), height: this.helper.height() } : { 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);
+
+ 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 data,
+ el = this.helper, props = {},
+ smp = this.originalMousePosition,
+ a = this.axis,
+ prevTop = this.position.top,
+ prevLeft = this.position.left,
+ prevWidth = this.size.width,
+ prevHeight = this.size.height,
+ dx = (event.pageX-smp.left)||0,
+ dy = (event.pageY-smp.top)||0,
+ trigger = this._change[a];
+
+ if (!trigger) {
+ return false;
+ }
+
+ // Calculate the attrs that will be change
+ data = trigger.apply(this, [event, dx, dy]);
+
+ // Put this in the mouseDrag handler since the user can start pressing shift while resizing
+ this._updateVirtualBoundaries(event.shiftKey);
+ if (this._aspectRatio || event.shiftKey) {
+ data = this._updateRatio(data, event);
+ }
+
+ data = this._respectSize(data, event);
+
+ this._updateCache(data);
+
+ // plugins callbacks need to be called first
+ this._propagate("resize", event);
+
+ if (this.position.top !== prevTop) {
+ props.top = this.position.top + "px";
+ }
+ if (this.position.left !== prevLeft) {
+ props.left = this.position.left + "px";
+ }
+ if (this.size.width !== prevWidth) {
+ props.width = this.size.width + "px";
+ }
+ if (this.size.height !== prevHeight) {
+ props.height = this.size.height + "px";
+ }
+ el.css(props);
+
+ if (!this._helper && this._proportionallyResizeElements.length) {
+ this._proportionallyResize();
+ }
+
+ // Call the user callback if the element was resized
+ if ( ! $.isEmptyObject(props) ) {
+ this._trigger("resize", event, this.ui());
+ }
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+
+ this.resizing = false;
+ var pr, ista, soffseth, soffsetw, s, left, top,
+ o = this.options, that = this;
+
+ if(this._helper) {
+
+ pr = this._proportionallyResizeElements;
+ ista = pr.length && (/textarea/i).test(pr[0].nodeName);
+ soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height;
+ soffsetw = ista ? 0 : that.sizeDiff.width;
+
+ s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) };
+ left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null;
+ top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null;
+
+ if (!o.animate) {
+ this.element.css($.extend(s, { top: top, left: left }));
+ }
+
+ that.helper.height(that.size.height);
+ that.helper.width(that.size.width);
+
+ if (this._helper && !o.animate) {
+ this._proportionallyResize();
+ }
+ }
+
+ $("body").css("cursor", "auto");
+
+ this.element.removeClass("ui-resizable-resizing");
+
+ this._propagate("stop", event);
+
+ if (this._helper) {
+ this.helper.remove();
+ }
+
+ return false;
+
+ },
+
+ _updateVirtualBoundaries: function(forceAspectRatio) {
+ var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
+ o = this.options;
+
+ 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) {
+ 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 ) {
+
+ var 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 ) {
+
+ var o = this._vBoundaries,
+ 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),
+ dw = this.originalPosition.left + this.originalSize.width,
+ dh = this.position.top + this.size.height,
+ cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
+ if (isminw) {
+ data.width = o.minWidth;
+ }
+ if (isminh) {
+ data.height = o.minHeight;
+ }
+ if (ismaxw) {
+ data.width = o.maxWidth;
+ }
+ if (ismaxh) {
+ data.height = o.maxHeight;
+ }
+
+ 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
+ if (!data.width && !data.height && !data.left && data.top) {
+ data.top = null;
+ } else if (!data.width && !data.height && !data.top && data.left) {
+ data.left = null;
+ }
+
+ return data;
+ },
+
+ _proportionallyResize: function() {
+
+ if (!this._proportionallyResizeElements.length) {
+ return;
+ }
+
+ var i, j, borders, paddings, prel,
+ element = this.helper || this.element;
+
+ for ( i=0; i < this._proportionallyResizeElements.length; i++) {
+
+ prel = this._proportionallyResizeElements[i];
+
+ if (!this.borderDif) {
+ this.borderDif = [];
+ borders = [prel.css("borderTopWidth"), prel.css("borderRightWidth"), prel.css("borderBottomWidth"), prel.css("borderLeftWidth")];
+ paddings = [prel.css("paddingTop"), prel.css("paddingRight"), prel.css("paddingBottom"), prel.css("paddingLeft")];
+
+ for ( j = 0; j < borders.length; j++ ) {
+ this.borderDif[ j ] = ( parseInt( borders[ j ], 10 ) || 0 ) + ( parseInt( paddings[ j ], 10 ) || 0 );
+ }
+ }
+
+ 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>");
+
+ this.helper.addClass(this._helper).css({
+ width: this.element.outerWidth() - 1,
+ height: this.element.outerHeight() - 1,
+ position: "absolute",
+ left: this.elementOffset.left +"px",
+ top: this.elementOffset.top +"px",
+ zIndex: ++o.zIndex //TODO: Don't modify option
+ });
+
+ this.helper
+ .appendTo("body")
+ .disableSelection();
+
+ } else {
+ this.helper = this.element;
+ }
+
+ },
+
+ _change: {
+ e: function(event, dx) {
+ return { width: this.originalSize.width + dx };
+ },
+ w: function(event, dx) {
+ var cs = this.originalSize, sp = this.originalPosition;
+ return { left: sp.left + dx, width: cs.width - dx };
+ },
+ n: function(event, dx, dy) {
+ var cs = this.originalSize, sp = this.originalPosition;
+ return { top: sp.top + dy, height: cs.height - dy };
+ },
+ s: function(event, dx, dy) {
+ return { height: this.originalSize.height + dy };
+ },
+ se: function(event, dx, dy) {
+ return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+ },
+ sw: function(event, dx, dy) {
+ return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+ },
+ ne: function(event, dx, dy) {
+ return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+ },
+ nw: function(event, dx, dy) {
+ return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+ }
+ },
+
+ _propagate: function(n, event) {
+ $.ui.plugin.call(this, n, [event, this.ui()]);
+ (n !== "resize" && this._trigger(n, event, this.ui()));
+ },
+
+ plugins: {},
+
+ ui: function() {
+ return {
+ originalElement: this.originalElement,
+ element: this.element,
+ helper: this.helper,
+ position: this.position,
+ size: this.size,
+ originalSize: this.originalSize,
+ originalPosition: this.originalPosition
+ };
+ }
+
+});
+
+/*
+ * Resizable Extensions
+ */
+
+$.ui.plugin.add("resizable", "animate", {
+
+ stop: function( event ) {
+ var that = $(this).data("ui-resizable"),
+ o = that.options,
+ pr = that._proportionallyResizeElements,
+ ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+ soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height,
+ soffsetw = ista ? 0 : that.sizeDiff.width,
+ style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
+ left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null,
+ top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null;
+
+ that.element.animate(
+ $.extend(style, top && left ? { top: top, left: left } : {}), {
+ duration: o.animateDuration,
+ easing: o.animateEasing,
+ step: function() {
+
+ var data = {
+ width: parseInt(that.element.css("width"), 10),
+ height: parseInt(that.element.css("height"), 10),
+ top: parseInt(that.element.css("top"), 10),
+ left: parseInt(that.element.css("left"), 10)
+ };
+
+ if (pr && pr.length) {
+ $(pr[0]).css({ width: data.width, height: data.height });
+ }
+
+ // propagating resize, and updating values for each animation step
+ that._updateCache(data);
+ that._propagate("resize", event);
+
+ }
+ }
+ );
+ }
+
+});
+
+$.ui.plugin.add("resizable", "containment", {
+
+ start: function() {
+ var element, p, co, ch, cw, width, height,
+ that = $(this).data("ui-resizable"),
+ o = that.options,
+ el = that.element,
+ oc = o.containment,
+ ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
+
+ if (!ce) {
+ return;
+ }
+
+ that.containerElement = $(ce);
+
+ if (/document/.test(oc) || oc === document) {
+ that.containerOffset = { left: 0, top: 0 };
+ that.containerPosition = { left: 0, top: 0 };
+
+ that.parentData = {
+ element: $(document), left: 0, top: 0,
+ width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
+ };
+ }
+
+ // i'm a node, so compute top, left, right, bottom
+ else {
+ element = $(ce);
+ p = [];
+ $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
+
+ that.containerOffset = element.offset();
+ that.containerPosition = element.position();
+ that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
+
+ co = that.containerOffset;
+ ch = that.containerSize.height;
+ cw = that.containerSize.width;
+ width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw );
+ height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
+
+ that.parentData = {
+ element: ce, left: co.left, top: co.top, width: width, height: height
+ };
+ }
+ },
+
+ resize: function( event ) {
+ var woset, hoset, isParent, isOffsetRelative,
+ that = $(this).data("ui-resizable"),
+ o = that.options,
+ co = that.containerOffset, cp = that.position,
+ pRatio = that._aspectRatio || event.shiftKey,
+ cop = { top:0, left:0 }, ce = that.containerElement;
+
+ if (ce[0] !== document && (/static/).test(ce.css("position"))) {
+ cop = co;
+ }
+
+ if (cp.left < (that._helper ? co.left : 0)) {
+ that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));
+ if (pRatio) {
+ that.size.height = that.size.width / that.aspectRatio;
+ }
+ that.position.left = o.helper ? co.left : 0;
+ }
+
+ if (cp.top < (that._helper ? co.top : 0)) {
+ that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);
+ if (pRatio) {
+ that.size.width = that.size.height * that.aspectRatio;
+ }
+ that.position.top = that._helper ? co.top : 0;
+ }
+
+ that.offset.left = that.parentData.left+that.position.left;
+ that.offset.top = that.parentData.top+that.position.top;
+
+ woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width );
+ hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );
+
+ isParent = that.containerElement.get(0) === that.element.parent().get(0);
+ isOffsetRelative = /relative|absolute/.test(that.containerElement.css("position"));
+
+ if ( isParent && isOffsetRelative ) {
+ woset -= Math.abs( that.parentData.left );
+ }
+
+ if (woset + that.size.width >= that.parentData.width) {
+ that.size.width = that.parentData.width - woset;
+ if (pRatio) {
+ that.size.height = that.size.width / that.aspectRatio;
+ }
+ }
+
+ if (hoset + that.size.height >= that.parentData.height) {
+ that.size.height = that.parentData.height - hoset;
+ if (pRatio) {
+ that.size.width = that.size.height * that.aspectRatio;
+ }
+ }
+ },
+
+ stop: function(){
+ var that = $(this).data("ui-resizable"),
+ o = that.options,
+ co = that.containerOffset,
+ cop = that.containerPosition,
+ ce = that.containerElement,
+ helper = $(that.helper),
+ ho = helper.offset(),
+ w = helper.outerWidth() - that.sizeDiff.width,
+ h = helper.outerHeight() - that.sizeDiff.height;
+
+ if (that._helper && !o.animate && (/relative/).test(ce.css("position"))) {
+ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+ }
+
+ if (that._helper && !o.animate && (/static/).test(ce.css("position"))) {
+ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+ }
+
+ }
+});
+
+$.ui.plugin.add("resizable", "alsoResize", {
+
+ start: function () {
+ var that = $(this).data("ui-resizable"),
+ o = that.options,
+ _store = function (exp) {
+ $(exp).each(function() {
+ var el = $(this);
+ el.data("ui-resizable-alsoresize", {
+ width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
+ left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10)
+ });
+ });
+ };
+
+ if (typeof(o.alsoResize) === "object" && !o.alsoResize.parentNode) {
+ if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
+ else { $.each(o.alsoResize, function (exp) { _store(exp); }); }
+ }else{
+ _store(o.alsoResize);
+ }
+ },
+
+ resize: function (event, ui) {
+ var that = $(this).data("ui-resizable"),
+ o = that.options,
+ os = that.originalSize,
+ op = that.originalPosition,
+ delta = {
+ height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,
+ top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0
+ },
+
+ _alsoResize = function (exp, c) {
+ $(exp).each(function() {
+ var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {},
+ css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
+
+ $.each(css, function (i, prop) {
+ var sum = (start[prop]||0) + (delta[prop]||0);
+ if (sum && sum >= 0) {
+ style[prop] = sum || null;
+ }
+ });
+
+ el.css(style);
+ });
+ };
+
+ if (typeof(o.alsoResize) === "object" && !o.alsoResize.nodeType) {
+ $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });
+ }else{
+ _alsoResize(o.alsoResize);
+ }
+ },
+
+ stop: function () {
+ $(this).removeData("resizable-alsoresize");
+ }
+});
+
+$.ui.plugin.add("resizable", "ghost", {
+
+ start: function() {
+
+ var that = $(this).data("ui-resizable"), o = that.options, cs = that.size;
+
+ that.ghost = that.originalElement.clone();
+ that.ghost
+ .css({ opacity: 0.25, display: "block", position: "relative", height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
+ .addClass("ui-resizable-ghost")
+ .addClass(typeof o.ghost === "string" ? o.ghost : "");
+
+ that.ghost.appendTo(that.helper);
+
+ },
+
+ resize: function(){
+ var that = $(this).data("ui-resizable");
+ if (that.ghost) {
+ that.ghost.css({ position: "relative", height: that.size.height, width: that.size.width });
+ }
+ },
+
+ stop: function() {
+ var that = $(this).data("ui-resizable");
+ if (that.ghost && that.helper) {
+ that.helper.get(0).removeChild(that.ghost.get(0));
+ }
+ }
+
+});
+
+$.ui.plugin.add("resizable", "grid", {
+
+ resize: function() {
+ var that = $(this).data("ui-resizable"),
+ o = that.options,
+ cs = that.size,
+ os = that.originalSize,
+ op = that.originalPosition,
+ a = that.axis,
+ grid = typeof o.grid === "number" ? [o.grid, o.grid] : o.grid,
+ gridX = (grid[0]||1),
+ gridY = (grid[1]||1),
+ ox = Math.round((cs.width - os.width) / gridX) * gridX,
+ oy = Math.round((cs.height - os.height) / gridY) * gridY,
+ newWidth = os.width + ox,
+ newHeight = os.height + oy,
+ isMaxWidth = o.maxWidth && (o.maxWidth < newWidth),
+ isMaxHeight = o.maxHeight && (o.maxHeight < newHeight),
+ isMinWidth = o.minWidth && (o.minWidth > newWidth),
+ isMinHeight = o.minHeight && (o.minHeight > newHeight);
+
+ o.grid = grid;
+
+ if (isMinWidth) {
+ newWidth = newWidth + gridX;
+ }
+ if (isMinHeight) {
+ newHeight = newHeight + gridY;
+ }
+ if (isMaxWidth) {
+ newWidth = newWidth - gridX;
+ }
+ if (isMaxHeight) {
+ newHeight = newHeight - gridY;
+ }
+
+ if (/^(se|s|e)$/.test(a)) {
+ that.size.width = newWidth;
+ that.size.height = newHeight;
+ } else if (/^(ne)$/.test(a)) {
+ that.size.width = newWidth;
+ that.size.height = newHeight;
+ that.position.top = op.top - oy;
+ } else if (/^(sw)$/.test(a)) {
+ that.size.width = newWidth;
+ that.size.height = newHeight;
+ that.position.left = op.left - ox;
+ } else {
+ if ( newHeight - gridY > 0 ) {
+ that.size.height = newHeight;
+ that.position.top = op.top - oy;
+ } else {
+ that.size.height = gridY;
+ that.position.top = op.top + os.height - gridY;
+ }
+ if ( newWidth - gridX > 0 ) {
+ that.size.width = newWidth;
+ that.position.left = op.left - ox;
+ } else {
+ that.size.width = gridX;
+ that.position.left = op.left + os.width - gridX;
+ }
+ }
+ }
+
+});
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.widget("ui.selectable", $.ui.mouse, {
+ version: "1.10.4",
+ options: {
+ appendTo: "body",
+ autoRefresh: true,
+ distance: 0,
+ filter: "*",
+ tolerance: "touch",
+
+ // callbacks
+ selected: null,
+ selecting: null,
+ start: null,
+ stop: null,
+ unselected: null,
+ unselecting: null
+ },
+ _create: function() {
+ var selectees,
+ that = this;
+
+ this.element.addClass("ui-selectable");
+
+ this.dragged = false;
+
+ // cache selectee children based on filter
+ this.refresh = function() {
+ selectees = $(that.options.filter, that.element[0]);
+ selectees.addClass("ui-selectee");
+ selectees.each(function() {
+ var $this = $(this),
+ 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");
+ this._mouseDestroy();
+ },
+
+ _mouseStart: function(event) {
+ var that = this,
+ options = this.options;
+
+ this.opos = [event.pageX, event.pageY];
+
+ if (this.options.disabled) {
+ return;
+ }
+
+ this.selectees = $(options.filter, this.element[0]);
+
+ this._trigger("start", event);
+
+ $(options.appendTo).append(this.helper);
+ // position helper (lasso)
+ this.helper.css({
+ "left": event.pageX,
+ "top": event.pageY,
+ "width": 0,
+ "height": 0
+ });
+
+ if (options.autoRefresh) {
+ this.refresh();
+ }
+
+ this.selectees.filter(".ui-selected").each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.startselected = true;
+ if (!event.metaKey && !event.ctrlKey) {
+ selectee.$element.removeClass("ui-selected");
+ selectee.selected = false;
+ selectee.$element.addClass("ui-unselecting");
+ selectee.unselecting = true;
+ // selectable UNSELECTING callback
+ that._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ });
+
+ $(event.target).parents().addBack().each(function() {
+ var doSelect,
+ selectee = $.data(this, "selectable-item");
+ if (selectee) {
+ doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected");
+ selectee.$element
+ .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
+ .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
+ selectee.unselecting = !doSelect;
+ selectee.selecting = doSelect;
+ selectee.selected = doSelect;
+ // selectable (UN)SELECTING callback
+ if (doSelect) {
+ that._trigger("selecting", event, {
+ selecting: selectee.element
+ });
+ } else {
+ that._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ return false;
+ }
+ });
+
+ },
+
+ _mouseDrag: function(event) {
+
+ this.dragged = true;
+
+ if (this.options.disabled) {
+ return;
+ }
+
+ var tmp,
+ that = this,
+ options = this.options,
+ x1 = this.opos[0],
+ y1 = this.opos[1],
+ x2 = event.pageX,
+ y2 = event.pageY;
+
+ if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }
+ if (y1 > y2) { 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"),
+ hit = false;
+
+ //prevent helper from being selected if appendTo: selectable
+ if (!selectee || selectee.element === that.element[0]) {
+ return;
+ }
+
+ if (options.tolerance === "touch") {
+ hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
+ } else if (options.tolerance === "fit") {
+ hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
+ }
+
+ if (hit) {
+ // SELECT
+ if (selectee.selected) {
+ selectee.$element.removeClass("ui-selected");
+ selectee.selected = false;
+ }
+ if (selectee.unselecting) {
+ selectee.$element.removeClass("ui-unselecting");
+ selectee.unselecting = false;
+ }
+ if (!selectee.selecting) {
+ selectee.$element.addClass("ui-selecting");
+ selectee.selecting = true;
+ // selectable SELECTING callback
+ that._trigger("selecting", event, {
+ selecting: selectee.element
+ });
+ }
+ } else {
+ // UNSELECT
+ if (selectee.selecting) {
+ if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
+ selectee.$element.removeClass("ui-selecting");
+ selectee.selecting = false;
+ selectee.$element.addClass("ui-selected");
+ selectee.selected = true;
+ } else {
+ selectee.$element.removeClass("ui-selecting");
+ selectee.selecting = false;
+ if (selectee.startselected) {
+ selectee.$element.addClass("ui-unselecting");
+ selectee.unselecting = true;
+ }
+ // selectable UNSELECTING callback
+ that._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ }
+ if (selectee.selected) {
+ if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
+ selectee.$element.removeClass("ui-selected");
+ selectee.selected = false;
+
+ selectee.$element.addClass("ui-unselecting");
+ selectee.unselecting = true;
+ // selectable UNSELECTING callback
+ that._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ }
+ }
+ });
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+ var that = this;
+
+ this.dragged = false;
+
+ $(".ui-unselecting", this.element[0]).each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.$element.removeClass("ui-unselecting");
+ selectee.unselecting = false;
+ selectee.startselected = false;
+ that._trigger("unselected", event, {
+ unselected: selectee.element
+ });
+ });
+ $(".ui-selecting", this.element[0]).each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.$element.removeClass("ui-selecting").addClass("ui-selected");
+ selectee.selecting = false;
+ selectee.selected = true;
+ selectee.startselected = true;
+ that._trigger("selected", event, {
+ selected: selectee.element
+ });
+ });
+ this._trigger("stop", event);
+
+ this.helper.remove();
+ return false;
+ }
+
+});
+
+})(jQuery);
(function( $, undefined ) {
// number of pages in a slider
@@ -12635,7 +11374,7 @@ $.widget( "ui.progressbar", {
var numPages = 5;
$.widget( "ui.slider", $.ui.mouse, {
- version: "1.10.2",
+ version: "1.10.4",
widgetEventPrefix: "slide",
options: {
@@ -12746,7 +11485,10 @@ $.widget( "ui.slider", $.ui.mouse, {
this.range.addClass( classes +
( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) );
} else {
- this.range = $([]);
+ if ( this.range ) {
+ this.range.remove();
+ }
+ this.range = null;
}
},
@@ -12760,7 +11502,9 @@ $.widget( "ui.slider", $.ui.mouse, {
_destroy: function() {
this.handles.remove();
- this.range.remove();
+ if ( this.range ) {
+ this.range.remove();
+ }
this.element
.removeClass( "ui-slider" +
@@ -12932,7 +11676,7 @@ $.widget( "ui.slider", $.ui.mouse, {
} );
otherVal = this.values( index ? 0 : 1 );
if ( allowed !== false ) {
- this.values( index, newVal, true );
+ this.values( index, newVal );
}
}
} else {
@@ -13204,7 +11948,6 @@ $.widget( "ui.slider", $.ui.mouse, {
_handleEvents: {
keydown: function( event ) {
- /*jshint maxcomplexity:25*/
var allowed, curVal, newVal, step,
index = $( event.target ).data( "ui-slider-handle-index" );
@@ -13285,7 +12028,1280 @@ $.widget( "ui.slider", $.ui.mouse, {
});
}(jQuery));
+(function( $, undefined ) {
+
+function isOverAxis( x, reference, size ) {
+ return ( x > reference ) && ( x < ( reference + size ) );
+}
+
+function isFloating(item) {
+ return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display"));
+}
+
+$.widget("ui.sortable", $.ui.mouse, {
+ version: "1.10.4",
+ widgetEventPrefix: "sort",
+ ready: false,
+ options: {
+ appendTo: "parent",
+ axis: false,
+ connectWith: false,
+ containment: false,
+ cursor: "auto",
+ cursorAt: false,
+ dropOnEmpty: true,
+ forcePlaceholderSize: false,
+ forceHelperSize: false,
+ grid: false,
+ handle: false,
+ helper: "original",
+ items: "> *",
+ opacity: false,
+ placeholder: false,
+ revert: false,
+ scroll: true,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ scope: "default",
+ tolerance: "intersect",
+ zIndex: 1000,
+
+ // callbacks
+ activate: null,
+ beforeStop: null,
+ change: null,
+ deactivate: null,
+ out: null,
+ over: null,
+ receive: null,
+ remove: null,
+ sort: null,
+ start: null,
+ stop: null,
+ update: null
+ },
+ _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" || isFloating(this.items[0].item) : false;
+
+ //Let's determine the parent's offset
+ this.offset = this.element.offset();
+
+ //Initialize mouse events for interaction
+ this._mouseInit();
+
+ //We're ready to go
+ this.ready = true;
+
+ },
+
+ _destroy: function() {
+ this.element
+ .removeClass("ui-sortable ui-sortable-disabled");
+ this._mouseDestroy();
+
+ for ( var i = this.items.length - 1; i >= 0; i-- ) {
+ this.items[i].item.removeData(this.widgetName + "-item");
+ }
+
+ return this;
+ },
+
+ _setOption: function(key, value){
+ if ( key === "disabled" ) {
+ this.options[ key ] = value;
+ this.widget().toggleClass( "ui-sortable-disabled", !!value );
+ } else {
+ // Don't call widget base _setOption for disable as it adds ui-state-disabled class
+ $.Widget.prototype._setOption.apply(this, arguments);
+ }
+ },
+
+ _mouseCapture: function(event, overrideHandle) {
+ var currentItem = null,
+ validHandle = false,
+ that = this;
+
+ if (this.reverting) {
+ return false;
+ }
+
+ if(this.options.disabled || this.options.type === "static") {
+ return false;
+ }
+
+ //We have to refresh the items data once first
+ this._refreshItems(event);
+
+ //Find out if the clicked node (or one of its parents) is a actual item in this.items
+ $(event.target).parents().each(function() {
+ if($.data(this, that.widgetName + "-item") === that) {
+ currentItem = $(this);
+ return false;
+ }
+ });
+ if($.data(event.target, that.widgetName + "-item") === that) {
+ currentItem = $(event.target);
+ }
+
+ if(!currentItem) {
+ return false;
+ }
+ if(this.options.handle && !overrideHandle) {
+ $(this.options.handle, currentItem).find("*").addBack().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 i, body,
+ o = this.options;
+
+ this.currentContainer = this;
+
+ //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
+ this.refreshPositions();
+
+ //Create and append the visible helper
+ this.helper = this._createHelper(event);
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ /*
+ * - Position generation -
+ * This block generates everything position related - it's the core of draggables.
+ */
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Get the next scrolling parent
+ this.scrollParent = this.helper.scrollParent();
+
+ //The element's absolute position on the page minus margins
+ this.offset = this.currentItem.offset();
+ this.offset = {
+ top: this.offset.top - this.margins.top,
+ left: this.offset.left - this.margins.left
+ };
+
+ $.extend(this.offset, {
+ click: { //Where the click happened, relative to the element
+ left: event.pageX - this.offset.left,
+ top: event.pageY - this.offset.top
+ },
+ parent: this._getParentOffset(),
+ relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+ });
+
+ // Only after we got the offset, we can change the helper's position to absolute
+ // TODO: Still need to figure out a way to make relative sorting possible
+ this.helper.css("position", "absolute");
+ this.cssPosition = this.helper.css("position");
+
+ //Generate the original position
+ this.originalPosition = this._generatePosition(event);
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
+ (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
+
+ //Cache the former DOM position
+ this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
+
+ //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
+ if(this.helper[0] !== this.currentItem[0]) {
+ this.currentItem.hide();
+ }
+
+ //Create the placeholder
+ this._createPlaceholder();
+
+ //Set a containment if given in the options
+ if(o.containment) {
+ this._setContainment();
+ }
+
+ if( o.cursor && o.cursor !== "auto" ) { // cursor option
+ body = this.document.find( "body" );
+
+ // support: IE
+ this.storedCursor = body.css( "cursor" );
+ body.css( "cursor", o.cursor );
+
+ this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body );
+ }
+
+ 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 ( i = this.containers.length - 1; i >= 0; i-- ) {
+ this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
+ }
+ }
+
+ //Prepare possible droppables
+ if($.ui.ddmanager) {
+ $.ui.ddmanager.current = this;
+ }
+
+ if ($.ui.ddmanager && !o.dropBehaviour) {
+ $.ui.ddmanager.prepareOffsets(this, event);
+ }
+
+ this.dragging = true;
+
+ this.helper.addClass("ui-sortable-helper");
+ this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+ return true;
+
+ },
+
+ _mouseDrag: function(event) {
+ var i, item, itemElement, intersection,
+ o = this.options,
+ scrolled = false;
+
+ //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) {
+ 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 (i = this.items.length - 1; i >= 0; i--) {
+
+ //Cache variables and intersection, continue if no intersection
+ item = this.items[i];
+ itemElement = item.item[0];
+ intersection = this._intersectsWithPointer(item);
+ if (!intersection) {
+ continue;
+ }
+
+ // Only put the placeholder inside the current Container, skip all
+ // items from other containers. This works because when moving
+ // an item from one container to another the
+ // currentContainer is switched before the placeholder is moved.
+ //
+ // Without this, moving items in "sub-sortables" can cause
+ // the placeholder to jitter beetween the outer and inner container.
+ if (item.instance !== this.currentContainer) {
+ continue;
+ }
+
+ // cannot intersect with itself
+ // no useless actions that have been done before
+ // no action if the item moved is the parent of the item checked
+ if (itemElement !== this.currentItem[0] &&
+ this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement &&
+ !$.contains(this.placeholder[0], itemElement) &&
+ (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true)
+ ) {
+
+ this.direction = intersection === 1 ? "down" : "up";
+
+ if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {
+ this._rearrange(event, item);
+ } else {
+ break;
+ }
+
+ this._trigger("change", event, this._uiHash());
+ break;
+ }
+ }
+
+ //Post events to containers
+ this._contactContainers(event);
+
+ //Interconnect with droppables
+ if($.ui.ddmanager) {
+ $.ui.ddmanager.drag(this, event);
+ }
+
+ //Call callbacks
+ this._trigger("sort", event, this._uiHash());
+
+ this.lastPositionAbs = this.positionAbs;
+ return false;
+
+ },
+
+ _mouseStop: function(event, noPropagation) {
+
+ if(!event) {
+ return;
+ }
+
+ //If we are using droppables, inform the manager about the drop
+ if ($.ui.ddmanager && !this.options.dropBehaviour) {
+ $.ui.ddmanager.drop(this, event);
+ }
+
+ if(this.options.revert) {
+ var that = this,
+ cur = this.placeholder.offset(),
+ axis = this.options.axis,
+ animation = {};
+
+ if ( !axis || axis === "x" ) {
+ animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);
+ }
+ if ( !axis || axis === "y" ) {
+ animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);
+ }
+ this.reverting = true;
+ $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
+ that._clear(event);
+ });
+ } else {
+ this._clear(event, noPropagation);
+ }
+
+ return false;
+
+ },
+
+ cancel: function() {
+
+ if(this.dragging) {
+
+ this._mouseUp({ target: null });
+
+ if(this.options.helper === "original") {
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+ } else {
+ this.currentItem.show();
+ }
+
+ //Post deactivating events to containers
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ this.containers[i]._trigger("deactivate", null, this._uiHash(this));
+ if(this.containers[i].containerCache.over) {
+ this.containers[i]._trigger("out", null, this._uiHash(this));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ }
+
+ if (this.placeholder) {
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ if(this.placeholder[0].parentNode) {
+ this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+ }
+ if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {
+ this.helper.remove();
+ }
+
+ $.extend(this, {
+ helper: null,
+ dragging: false,
+ reverting: false,
+ _noFinalSort: null
+ });
+
+ if(this.domPosition.prev) {
+ $(this.domPosition.prev).after(this.currentItem);
+ } else {
+ $(this.domPosition.parent).prepend(this.currentItem);
+ }
+ }
+
+ return this;
+
+ },
+
+ serialize: function(o) {
+
+ var items = this._getItemsAsjQuery(o && o.connected),
+ 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),
+ 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,
+ l = item.left,
+ r = l + item.width,
+ t = item.top,
+ b = t + item.height,
+ dyClick = this.offset.click.top,
+ dxClick = this.offset.click.left,
+ isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),
+ isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),
+ isOverElement = isOverElementHeight && isOverElementWidth;
+
+ if ( this.options.tolerance === "pointer" ||
+ this.options.forcePointerForContainers ||
+ (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
+ ) {
+ return isOverElement;
+ } else {
+
+ return (l < x1 + (this.helperProportions.width / 2) && // Right Half
+ x2 - (this.helperProportions.width / 2) < r && // Left Half
+ t < y1 + (this.helperProportions.height / 2) && // Bottom Half
+ y2 - (this.helperProportions.height / 2) < b ); // Top Half
+
+ }
+ },
+
+ _intersectsWithPointer: function(item) {
+
+ var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
+ isOverElementWidth = (this.options.axis === "y") || 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 = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
+ isOverRightHalf = 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 i, j, cur, inst,
+ items = [],
+ queries = [],
+ connectWith = this._connectWith();
+
+ if(connectWith && connected) {
+ for (i = connectWith.length - 1; i >= 0; i--){
+ cur = $(connectWith[i]);
+ for ( j = cur.length - 1; j >= 0; j--){
+ inst = $.data(cur[j], this.widgetFullName);
+ 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]);
+
+ function addItems() {
+ items.push( this );
+ }
+ for (i = queries.length - 1; i >= 0; i--){
+ queries[i][0].each( addItems );
+ }
+
+ return $(items);
+
+ },
+
+ _removeCurrentsFromItems: function() {
+
+ var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
+
+ this.items = $.grep(this.items, function (item) {
+ for (var j=0; j < list.length; j++) {
+ if(list[j] === item.item[0]) {
+ return false;
+ }
+ }
+ return true;
+ });
+
+ },
+
+ _refreshItems: function(event) {
+
+ this.items = [];
+ this.containers = [this];
+
+ var i, j, cur, inst, targetData, _queries, item, queriesLength,
+ items = this.items,
+ queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],
+ connectWith = this._connectWith();
+
+ if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
+ for (i = connectWith.length - 1; i >= 0; i--){
+ cur = $(connectWith[i]);
+ for (j = cur.length - 1; j >= 0; j--){
+ inst = $.data(cur[j], this.widgetFullName);
+ 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 (i = queries.length - 1; i >= 0; i--) {
+ targetData = queries[i][1];
+ _queries = queries[i][0];
+
+ for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {
+ item = $(_queries[j]);
+
+ item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)
+
+ items.push({
+ item: item,
+ instance: targetData,
+ width: 0, height: 0,
+ left: 0, top: 0
+ });
+ }
+ }
+
+ },
+
+ refreshPositions: function(fast) {
+
+ //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
+ if(this.offsetParent && this.helper) {
+ this.offset.parent = this._getParentOffset();
+ }
+
+ var i, item, t, p;
+
+ for (i = this.items.length - 1; i >= 0; i--){
+ 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;
+ }
+
+ t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
+
+ if (!fast) {
+ item.width = t.outerWidth();
+ item.height = t.outerHeight();
+ }
+
+ 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 (i = this.containers.length - 1; i >= 0; i--){
+ p = this.containers[i].element.offset();
+ this.containers[i].containerCache.left = p.left;
+ this.containers[i].containerCache.top = p.top;
+ this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
+ this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
+ }
+ }
+
+ return this;
+ },
+
+ _createPlaceholder: function(that) {
+ that = that || this;
+ var className,
+ o = that.options;
+
+ if(!o.placeholder || o.placeholder.constructor === String) {
+ className = o.placeholder;
+ o.placeholder = {
+ element: function() {
+
+ var nodeName = that.currentItem[0].nodeName.toLowerCase(),
+ element = $( "<" + nodeName + ">", that.document[0] )
+ .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
+ .removeClass("ui-sortable-helper");
+
+ if ( nodeName === "tr" ) {
+ that.currentItem.children().each(function() {
+ $( "<td>&#160;</td>", that.document[0] )
+ .attr( "colspan", $( this ).attr( "colspan" ) || 1 )
+ .appendTo( element );
+ });
+ } else if ( nodeName === "img" ) {
+ element.attr( "src", that.currentItem.attr( "src" ) );
+ }
+
+ if ( !className ) {
+ element.css( "visibility", "hidden" );
+ }
+
+ return element;
+ },
+ update: function(container, p) {
+
+ // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
+ // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
+ if(className && !o.forcePlaceholderSize) {
+ return;
+ }
+
+ //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
+ if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
+ if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
+ }
+ };
+ }
+
+ //Create the placeholder
+ that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
+
+ //Append it after the actual current item
+ that.currentItem.after(that.placeholder);
+
+ //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
+ o.placeholder.update(that, that.placeholder);
+
+ },
+
+ _contactContainers: function(event) {
+ var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,
+ innermostContainer = null,
+ innermostIndex = null;
+
+ // get innermost container that intersects with item
+ for (i = this.containers.length - 1; i >= 0; i--) {
+
+ // never consider a container that's located within the item itself
+ if($.contains(this.currentItem[0], this.containers[i].element[0])) {
+ continue;
+ }
+
+ if(this._intersectsWith(this.containers[i].containerCache)) {
+
+ // if we've already found a container and it's more "inner" than this, then continue
+ if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {
+ continue;
+ }
+
+ innermostContainer = this.containers[i];
+ innermostIndex = i;
+
+ } else {
+ // container doesn't intersect. trigger "out" event if necessary
+ if(this.containers[i].containerCache.over) {
+ this.containers[i]._trigger("out", event, this._uiHash(this));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ }
+
+ // if no intersecting containers found, return
+ if(!innermostContainer) {
+ return;
+ }
+
+ // move the item into the container if it's not there already
+ if(this.containers.length === 1) {
+ if (!this.containers[innermostIndex].containerCache.over) {
+ this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
+ this.containers[innermostIndex].containerCache.over = 1;
+ }
+ } else {
+
+ //When entering a new container, we will find the item with the least distance and append our item near it
+ dist = 10000;
+ itemWithLeastDistance = null;
+ floating = innermostContainer.floating || isFloating(this.currentItem);
+ posProperty = floating ? "left" : "top";
+ sizeProperty = floating ? "width" : "height";
+ base = this.positionAbs[posProperty] + this.offset.click[posProperty];
+ for (j = this.items.length - 1; j >= 0; j--) {
+ if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
+ continue;
+ }
+ if(this.items[j].item[0] === this.currentItem[0]) {
+ continue;
+ }
+ if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {
+ continue;
+ }
+ cur = this.items[j].item.offset()[posProperty];
+ nearBottom = false;
+ if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
+ nearBottom = true;
+ cur += this.items[j][sizeProperty];
+ }
+
+ if(Math.abs(cur - base) < dist) {
+ dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
+ this.direction = nearBottom ? "up": "down";
+ }
+ }
+
+ //Check if dropOnEmpty is enabled
+ if(!itemWithLeastDistance && !this.options.dropOnEmpty) {
+ return;
+ }
+
+ if(this.currentContainer === this.containers[innermostIndex]) {
+ return;
+ }
+
+ 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));
+ this.currentContainer = this.containers[innermostIndex];
+
+ //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,
+ helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem);
+
+ //Add the helper to the DOM if that didn't happen already
+ if(!helper.parents("body").length) {
+ $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
+ }
+
+ if(helper[0] === this.currentItem[0]) {
+ this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
+ }
+
+ if(!helper[0].style.width || o.forceHelperSize) {
+ helper.width(this.currentItem.width());
+ }
+ if(!helper[0].style.height || o.forceHelperSize) {
+ helper.height(this.currentItem.height());
+ }
+
+ return helper;
+
+ },
+
+ _adjustOffsetFromHelper: function(obj) {
+ if (typeof obj === "string") {
+ obj = obj.split(" ");
+ }
+ if ($.isArray(obj)) {
+ obj = {left: +obj[0], top: +obj[1] || 0};
+ }
+ if ("left" in obj) {
+ this.offset.click.left = obj.left + this.margins.left;
+ }
+ if ("right" in obj) {
+ this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ }
+ if ("top" in obj) {
+ this.offset.click.top = obj.top + this.margins.top;
+ }
+ if ("bottom" in obj) {
+ this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+ }
+ },
+
+ _getParentOffset: function() {
+
+
+ //Get the offsetParent and cache its position
+ this.offsetParent = this.helper.offsetParent();
+ var po = this.offsetParent.offset();
+
+ // This is a special case where we need to modify a offset calculated on start, since the following happened:
+ // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+ // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+ if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
+ po.left += this.scrollParent.scrollLeft();
+ po.top += this.scrollParent.scrollTop();
+ }
+
+ // This needs to be actually done for all browsers, since pageX/pageY includes this information
+ // with an ugly IE fix
+ if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
+ 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 ce, co, over,
+ 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)) {
+ ce = $(o.containment)[0];
+ co = $(o.containment).offset();
+ 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,
+ scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
+ scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ return {
+ top: (
+ pos.top + // The absolute mouse position
+ this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
+ ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+ ),
+ left: (
+ pos.left + // The absolute mouse position
+ this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
+ ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+ )
+ };
+
+ },
+
+ _generatePosition: function(event) {
+
+ var top, left,
+ o = this.options,
+ pageX = event.pageX,
+ pageY = event.pageY,
+ scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ // This is another very weird special case that only happens for relative elements:
+ // 1. If the css position is relative
+ // 2. and the scroll parent is the document or similar to the offset parent
+ // we have to refresh the relative offset during the scroll so there are no jumps
+ if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {
+ this.offset.relative = this._getRelativeOffset();
+ }
+
+ /*
+ * - 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) {
+ 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;
+
+ left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
+ pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+ }
+
+ }
+
+ return {
+ top: (
+ pageY - // The absolute mouse position
+ this.offset.click.top - // Click offset (relative to the element)
+ this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
+ ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+ ),
+ left: (
+ pageX - // The absolute mouse position
+ this.offset.click.left - // Click offset (relative to the element)
+ this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
+ ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+ )
+ };
+
+ },
+
+ _rearrange: function(event, i, a, hardRefresh) {
+
+ a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling));
+
+ //Various things done here to improve the performance:
+ // 1. we create a setTimeout, that calls refreshPositions
+ // 2. on the instance, we have a counter variable, that get's higher after every append
+ // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
+ // 4. this lets only the last addition to the timeout stack through
+ this.counter = this.counter ? ++this.counter : 1;
+ var counter = this.counter;
+
+ this._delay(function() {
+ if(counter === this.counter) {
+ this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
+ }
+ });
+
+ },
+
+ _clear: function(event, noPropagation) {
+
+ this.reverting = false;
+ // We delay all events that have to be triggered to after the point where the placeholder has been removed and
+ // everything else normalized again
+ var i,
+ delayedTriggers = [];
+
+ // We first have to update the dom position of the actual currentItem
+ // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
+ if(!this._noFinalSort && this.currentItem.parent().length) {
+ this.placeholder.before(this.currentItem);
+ }
+ this._noFinalSort = null;
+
+ if(this.helper[0] === this.currentItem[0]) {
+ for(i in this._storedCSS) {
+ if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") {
+ this._storedCSS[i] = "";
+ }
+ }
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+ } else {
+ this.currentItem.show();
+ }
+
+ if(this.fromOutside && !noPropagation) {
+ delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
+ }
+ if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {
+ delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
+ }
+
+ // Check if the items Container has Changed and trigger appropriate
+ // events.
+ if (this !== this.currentContainer) {
+ if(!noPropagation) {
+ delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
+ }
+ }
+
+
+ //Post events to containers
+ function delayEvent( type, instance, container ) {
+ return function( event ) {
+ container._trigger( type, event, instance._uiHash( instance ) );
+ };
+ }
+ for (i = this.containers.length - 1; i >= 0; i--){
+ if (!noPropagation) {
+ delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
+ }
+ if(this.containers[i].containerCache.over) {
+ delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ //Do what was originally in plugins
+ if ( this.storedCursor ) {
+ this.document.find( "body" ).css( "cursor", this.storedCursor );
+ this.storedStylesheet.remove();
+ }
+ if(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(!noPropagation) {
+ this._trigger("beforeStop", event, this._uiHash());
+ for (i=0; i < delayedTriggers.length; i++) {
+ delayedTriggers[i].call(this, event);
+ } //Trigger all delayed events
+ this._trigger("stop", event, this._uiHash());
+ }
+
+ this.fromOutside = false;
+ return false;
+ }
+
+ if(!noPropagation) {
+ this._trigger("beforeStop", event, this._uiHash());
+ }
+
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+
+ if(this.helper[0] !== this.currentItem[0]) {
+ this.helper.remove();
+ }
+ this.helper = null;
+
+ if(!noPropagation) {
+ for (i=0; i < delayedTriggers.length; i++) {
+ delayedTriggers[i].call(this, event);
+ } //Trigger all delayed events
+ this._trigger("stop", event, this._uiHash());
+ }
+
+ this.fromOutside = false;
+ return true;
+
+ },
+
+ _trigger: function() {
+ if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
+ this.cancel();
+ }
+ },
+
+ _uiHash: function(_inst) {
+ var inst = _inst || this;
+ return {
+ helper: inst.helper,
+ placeholder: inst.placeholder || $([]),
+ position: inst.position,
+ originalPosition: inst.originalPosition,
+ offset: inst.positionAbs,
+ item: inst.currentItem,
+ sender: _inst ? _inst.element : null
+ };
+ }
+
+});
+
+})(jQuery);
(function( $ ) {
function modifier( fn ) {
@@ -13300,7 +13316,7 @@ function modifier( fn ) {
}
$.widget( "ui.spinner", {
- version: "1.10.2",
+ version: "1.10.4",
defaultElement: "<input>",
widgetEventPrefix: "spin",
options: {
@@ -13328,8 +13344,12 @@ $.widget( "ui.spinner", {
this._setOption( "min", this.options.min );
this._setOption( "step", this.options.step );
- // format the value, but don't constrain
- this._value( this.element.val(), true );
+ // Only format if there is a value, prevents the field from being marked
+ // as invalid in Firefox, see #9573.
+ if ( this.value() !== "" ) {
+ // Format the value, but don't constrain.
+ this._value( this.element.val(), true );
+ }
this._draw();
this._on( this._events );
@@ -13764,7 +13784,6 @@ $.widget( "ui.spinner", {
});
}( jQuery ) );
-
(function( $, undefined ) {
var tabId = 0,
@@ -13775,13 +13794,17 @@ function getNextTabId() {
}
function isLocal( anchor ) {
+ // support: IE7
+ // IE7 doesn't normalize the href property when set via script (#9317)
+ anchor = anchor.cloneNode( false );
+
return anchor.hash.length > 1 &&
decodeURIComponent( anchor.href.replace( rhash, "" ) ) ===
decodeURIComponent( location.href.replace( rhash, "" ) );
}
$.widget( "ui.tabs", {
- version: "1.10.2",
+ version: "1.10.4",
delay: 300,
options: {
active: null,
@@ -13903,7 +13926,6 @@ $.widget( "ui.tabs", {
},
_tabKeydown: function( event ) {
- /*jshint maxcomplexity:15*/
var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
selectedIndex = this.tabs.index( focusedTab ),
goingForward = true;
@@ -14191,7 +14213,7 @@ $.widget( "ui.tabs", {
// allow overriding how to find the list for rare usage scenarios (#7715)
_getList: function() {
- return this.element.find( "ol,ul" ).eq( 0 );
+ return this.tablist || this.element.find( "ol,ul" ).eq( 0 );
},
_createPanel: function( id ) {
@@ -14597,7 +14619,6 @@ $.widget( "ui.tabs", {
});
})( jQuery );
-
(function( $ ) {
var increments = 0;
@@ -14628,7 +14649,7 @@ function removeDescribedBy( elem ) {
}
$.widget( "ui.tooltip", {
- version: "1.10.2",
+ version: "1.10.4",
options: {
content: function() {
// support: IE<9, Opera in jQuery <1.7
diff --git a/lib/scripts/jquery/jquery-ui.min.js b/lib/scripts/jquery/jquery-ui.min.js
index 629f140cd..862d0911b 100644
--- a/lib/scripts/jquery/jquery-ui.min.js
+++ b/lib/scripts/jquery/jquery-ui.min.js
@@ -1,12 +1,7 @@
-/*! jQuery UI - v1.10.2 - 2013-03-14
+/*! jQuery UI - v1.10.4 - 2014-01-17
* http://jqueryui.com
-* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
-* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-(function(t,e){function i(e,i){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,o=n.name,e.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap=#"+o+"]")[0],!!a&&s(a)):!1):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&s(e)}function s(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var n=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var s,n,o=t(this[0]);o.length&&o[0]!==document;){if(s=o.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(n=parseInt(o.css("zIndex"),10),!isNaN(n)&&0!==n))return n;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var s=t.attr(e,"tabindex"),n=isNaN(s);return(n||s>=0)&&i(e,!n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,s){function n(e,i,s,n){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),n&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===s?["Left","Right"]:["Top","Bottom"],a=s.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+s]=function(i){return i===e?r["inner"+s].call(this):this.each(function(){t(this).css(a,n(this,i)+"px")})},t.fn["outer"+s]=function(e,i){return"number"!=typeof e?r["outer"+s].call(this,e):this.each(function(){t(this).css(a,n(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(s=0;n.length>s;s++)t.options[n[s][0]]&&n[s][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)}})})(jQuery),function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),s===e)return o[i]===e?null:o[i];o[i]=s}else{if(s===e)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})}(jQuery),function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<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(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.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},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),i.containment&&this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i,s=this,n=!1,o=!1;for(t.ui.ddmanager&&!this.options.dropBehaviour&&(o=t.ui.ddmanager.drop(this,e)),this.dropped&&(o=this.dropped,this.dropped=!1),i=this.element[0];i&&(i=i.parentNode);)i===document&&(n=!0);return n||"original"!==this.options.helper?("invalid"===this.options.revert&&!o||"valid"===this.options.revert&&o||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,o)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",e)!==!1&&s._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}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 e,i,s,n=this.options;if("parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=["document"===n.containment?0:t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"===n.containment?0:t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"===n.containment?0:t(window).scrollLeft())+t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"===n.containment?0:t(window).scrollTop())+(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||n.containment.constructor===Array)n.containment.constructor===Array&&(this.containment=n.containment);else{if(i=t(n.containment),s=i[0],!s)return;e="hidden"!==t(s).css("overflow"),this.containment=[(parseInt(t(s).css("borderLeftWidth"),10)||0)+(parseInt(t(s).css("paddingLeft"),10)||0),(parseInt(t(s).css("borderTopWidth"),10)||0)+(parseInt(t(s).css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(t(s).css("borderRightWidth"),10)||0)-(parseInt(t(s).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(t(s).css("borderBottomWidth"),10)||0)-(parseInt(t(s).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i}},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n,o,a=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName),l=e.pageX,c=e.pageY;return this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(c=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(c=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,c=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.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=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,o=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var o=!1,a=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==a&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(a.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,o,a,r,h,l,c,u,d,p=t(this).data("ui-draggable"),f=p.options,g=f.snapTolerance,m=i.offset.left,v=m+p.helperProportions.width,_=i.offset.top,b=_+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,h=r+p.snapElements[u].width,l=p.snapElements[u].top,c=l+p.snapElements[u].height,m>r-g&&h+g>m&&_>l-g&&c+g>_||m>r-g&&h+g>m&&b>l-g&&c+g>b||v>r-g&&h+g>v&&_>l-g&&c+g>_||v>r-g&&h+g>v&&b>l-g&&c+g>b?("inner"!==f.snapMode&&(s=g>=Math.abs(l-b),n=g>=Math.abs(c-_),o=g>=Math.abs(r-v),a=g>=Math.abs(h-m),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||o||a,"outer"!==f.snapMode&&(s=g>=Math.abs(l-_),n=g>=Math.abs(c-b),o=g>=Math.abs(r-m),a=g>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||o||a||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||o||a||d):(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(i)?i:function(t){return t.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClass("ui-droppable")
-},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,o,a=(t.positionAbs||t.position.absolute).left,r=a+t.helperProportions.width,h=(t.positionAbs||t.position.absolute).top,l=h+t.helperProportions.height,c=i.offset.left,u=c+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return a>=c&&u>=r&&h>=d&&p>=l;case"intersect":return a+t.helperProportions.width/2>c&&u>r-t.helperProportions.width/2&&h+t.helperProportions.height/2>d&&p>l-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,o=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(o,d,i.proportions.height)&&e(n,c,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(a>=c&&u>=a||r>=c&&u>=r||c>a&&r>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions.height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions={width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight})}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=t.ui.intersect(e,this,this.options.tolerance),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),o.length&&(s=t.data(o[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(jQuery),function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,o,a=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<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("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,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=r.handles||(t(".ui-resizable-handle",this.element).length?{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"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),o="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+o+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){r.disabled||a.resizing||(t(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,o,a=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),a.containment&&(s+=t(a.containment).scrollLeft()||0,n+=t(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},o=this.originalMousePosition,a=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-o.left||0,d=e.pageY-o.top||0,p=this._change[a];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,o,a,r=this.options;a={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=a.minHeight*this.aspectRatio,n=a.minWidth/this.aspectRatio,s=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,e>a.minWidth&&(a.minWidth=e),n>a.minHeight&&(a.minHeight=n),a.maxWidth>s&&(a.maxWidth=s),a.maxHeight>o&&(a.maxHeight=o)),this._vBoundaries=a},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,a=i(t.width)&&e.minWidth&&e.minWidth>t.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return a&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),a&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),o&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,o=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,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}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,o,a,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,o=l.containerSize.height,a=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:a,h=t.ui.hasScroll(p)?p.scrollHeight:o,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,o,a=t(this).data("ui-resizable"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio),a.position.top=a._helper?h.top:0),a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top,i=Math.abs((a._helper?a.offset.left-u.left:a.offset.left-u.left)+a.sizeDiff.width),s=Math.abs((a._helper?a.offset.top-u.top:a.offset.top-h.top)+a.sizeDiff.height),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o&&(i-=a.parentData.left),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},a=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(a,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):(e.size.width=d,e.size.height=p,e.position.top=o.top-u,e.position.left=o.left-c)}})}(jQuery),function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||o>i.right||i.top>h||a>i.bottom):"fit"===n.tolerance&&(l=i.left>o&&r>i.right&&i.top>a&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),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},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-t(document).scrollTop()<a.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;
-this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u=s+l>r&&h>s+l&&e+c>o&&a>e+c;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?u:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,o,a=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&r.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){a.push(this)});return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.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(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t(e.document[0].createElement(s)).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?n.append("<td colspan='99'>&#160;</td>"):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[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")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}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 e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=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-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(jQuery),function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function s(e,i){var s,n,a={};for(s in i)n=i[s],e[s]!==n&&(o[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(a[s]=n));return a}var n=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),o=function(){t.each(n,function(t,i){e[i]&&a[i+"Class"](e[i])})},o(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,o,a,r){return"boolean"==typeof n||n===e?o?t.effects.animateClass.call(this,n?{add:s}:{remove:s},o,a,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,o,a)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.2",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,o;for(o=0;s.length>o;o++)null!==s[o]&&(n=t.data(i+s[o]),n===e&&(n=""),t.css(s[o],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(o)&&o.call(n[0]),t.isFunction(e)&&e()}var n=t(this),o=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):a.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,o=i.queue,a=t.effects.effect[i.effect];return t.fx.off||!a?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):o===!1?this.each(e):this.queue(o||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()}(jQuery),function(t){var e=0,i={},s={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.2",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()
-},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),undefined):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e),undefined)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),(e.active===!1&&e.collapsible===!0||!this.headers.length)&&(e.active=!1,this.active=t()),e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,s=this.options,n=s.heightStyle,o=this.element.parent(),a=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),o=n.attr("id");s||(s=a+"-header-"+e,i.attr("id",s)),o||(o=a+"-panel-"+e,n.attr("id",o)),i.attr("aria-controls",o),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(s.event),"fill"===n?(i=o.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().each(function(){i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n[0]===s[0],a=o&&i.collapsible,r=a?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:a?t():n,newPanel:r};e.preventDefault(),o&&!i.collapsible||this._trigger("beforeActivate",e,l)===!1||(i.active=a?!1:this.headers.index(n),this.active=o?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,n){var o,a,r,h=this,l=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){h._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof d&&(a=d),a=a||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(o=t.show().outerHeight(),e.animate(i,{duration:r,easing:a,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(s,{duration:r,easing:a,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(o-e.outerHeight()-l),l=0)}}),undefined):e.animate(i,r,a,p):t.animate(s,r,a,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})}(jQuery),function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.2",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o?!0:a?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,s.preventDefault(),undefined;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),undefined):(this._searchTimeout(t),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({input:t(),role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):undefined},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):(this.search(null,e),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})}(jQuery),function(t){var e,i,s,n,o="ui-button ui-widget ui-state-default ui-corner-all",a="ui-state-hover ui-state-active ",r="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",h=function(){var e=t(this).find(":ui-button");setTimeout(function(){e.button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var a=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){a.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){a.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){n||a.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(n=!1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||n?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||n)return!1;t(this).addClass("ui-state-active"),a.buttonElement.attr("aria-pressed","true");var e=a.element[0];l(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,a.document.one("mouseup",function(){e=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(t(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+a+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?l(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(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("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.2",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,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:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,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:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.2"}});var o,a="datepicker",r=(new Date).getTime();t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,a,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,a,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,o,r){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],a,p)),n(p.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],a,p),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,a);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,a),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,a)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,o){var a,r,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(a=s||{},"string"==typeof s&&(a={},a[s]=o),c&&(this._curInst===c&&this._hideDatepicker(),r=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,a),null!==h&&a.dateFormat!==e&&a.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&a.dateFormat!==e&&a.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in a&&(a.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,r),this._updateAlternate(c),this._updateDatepicker(c)),e)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");
-break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(i){var s,n,o=t.datepicker._getInst(i.target);return t.datepicker._get(o,"constrainInput")?(s=t.datepicker._possibleChars(t.datepicker._get(o,"dateFormat")),n=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||s.indexOf(n)>-1):e},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,s,o,a,r,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(i,"beforeShow"),o=s?s.apply(e,[e,i]):{},o!==!1&&(n(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a=!1,t(e).parents().each(function(){return a|="fixed"===t(this).css("position"),!a}),r={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),r=t.datepicker._checkOffset(i,r,a),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:r.left+"px",top:r.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),i.input.is(":visible")&&!i.input.is(":disabled")&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,o=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],a=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&e.input[0]!==document.activeElement&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_getBorders:function(t){var e=function(t){return{thin:1,medium:2,thick:3}[t]||t};return[parseFloat(e(t.css("border-left-width"))),parseFloat(e(t.css("border-top-width")))]},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,r=this._curInst;!r||e&&r!==t.data(e,a)||this._datepickerShowing&&(i=this._get(r,"showAnim"),s=this._get(r,"duration"),n=function(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||t.effects[i])?r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),s,n):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,s,n){if(null==i||null==s)throw"Invalid arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var o,a,r,h,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,g=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,v=-1,_=-1,b=-1,y=!1,w=function(t){var e=i.length>o+1&&i.charAt(o+1)===t;return e&&o++,e},k=function(t){var e=w(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{1,"+i+"}"),o=s.substring(l).match(n);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},x=function(i,n,o){var a=-1,r=t.map(w(i)?o:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(r,function(t,i){var n=i[1];return s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(a=i[0],l+=n.length,!1):e}),-1!==a)return a+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!==i.charAt(o))throw"Unexpected literal at position "+l;l++};for(o=0;i.length>o;o++)if(y)"'"!==i.charAt(o)||w("'")?D():y=!1;else switch(i.charAt(o)){case"d":_=k("d");break;case"D":x("D",d,p);break;case"o":b=k("o");break;case"m":v=k("m");break;case"M":v=x("M",f,g);break;case"y":m=k("y");break;case"@":h=new Date(k("@")),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new Date((k("!")-this._ticksTo1970)/1e4),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"'":w("'")?D():y=!0;break;default:D()}if(s.length>l&&(r=s.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),b>-1)for(v=1,_=b;;){if(a=this._getDaysInMonth(m,v-1),a>=_)break;v++,_-=a}if(h=this._daylightSavingAdjust(new Date(m,v-1,_)),h.getFullYear()!==m||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid date";return h},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:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){window["DP_jQuery_"+r].datepicker._adjustDate(s,-i,"M")},next:function(){window["DP_jQuery_"+r].datepicker._adjustDate(s,+i,"M")},hide:function(){window["DP_jQuery_"+r].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+r].datepicker._gotoToday(s)},selectDay:function(){return window["DP_jQuery_"+r].datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+r].datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+r].datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,v,_,b,y,w,k,x,D,C,I,P,T,M,S,z,A,H,N,E,W,O,F,R,j=new Date,L=this._daylightSavingAdjust(new Date(j.getFullYear(),j.getMonth(),j.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),V=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),q=this._get(t,"showCurrentAtPos"),Q=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],$=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-q,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-Q,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":V?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+Q,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":V?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?$:L,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,D=0;U[1]>D;D++){if(C=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",P="",X){if(P+="<div class='ui-datepicker-group",U[1]>1)switch(D){case 0:P+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:P+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:P+=" ui-datepicker-group-middle",I=""}P+="'>"}for(P+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,G,J,k>0||D>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",T=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,T+="<th"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(P+=T+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),z=(this._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((z+S)/7),H=X?this.maxRows>A?this.maxRows:A:A,this.maxRows=H,N=this._daylightSavingAdjust(new Date(te,Z,1-z)),E=0;H>E;E++){for(P+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(N)+"</td>":"",w=0;7>w;w++)O=m?m.apply(t.input?t.input[0]:null,[N]):[!0,""],F=N.getMonth()!==Z,R=F&&!_||!O[0]||G&&G>N||J&&N>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(N.getTime()===C.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===N.getTime()&&b.getTime()===C.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+O[1]+(N.getTime()===$.getTime()?" "+this._currentClass:"")+(N.getTime()===L.getTime()?" ui-datepicker-today":""))+"'"+(F&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+N.getMonth()+"' data-year='"+N.getFullYear()+"'")+">"+(F&&!v?"&#xa0;":R?"<span class='ui-state-default'>"+N.getDate()+"</span>":"<a class='ui-state-default"+(N.getTime()===L.getTime()?" ui-state-highlight":"")+(N.getTime()===$.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+N.getDate()+"</a>")+"</td>",N.setDate(N.getDate()+1),N=this._daylightSavingAdjust(N);P+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),P+="</tbody></table>"+(X?"</div>"+(U[0]>0&&D===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=P}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(_||(b+=y+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!o&&m&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.2",window["DP_jQuery_"+r]=t}(jQuery),function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.2",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),undefined;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},o={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){s.position=[o.position.left-i.document.scrollLeft(),o.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))
-}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(s){var n=this,o=!1,a={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(o=!0),t in i&&(a[t]=s)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",a)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+" "+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})}(jQuery),function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var o,a,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),o=t.effects.createWrapper(h).css({overflow:"hidden"}),a=o[p](),r=parseFloat(o.css(f))||0,m[p]=v?a:0,g||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:a+r),v&&(o.css(p,0),g||o.css(f,r+a)),o.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}}(jQuery),function(t){t.effects.effect.bounce=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||l?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=a.queue(),y=b.length;for((c||l)&&r.push("opacity"),t.effects.save(a,r),a.show(),t.effects.createWrapper(a),d||(d=a["top"===v?"outerHeight":"outerWidth"]()/3),c&&(o={opacity:1},o[v]=0,a.css("opacity",0).css(v,_?2*-d:2*d).animate(o,g,m)),l&&(d/=Math.pow(2,p-1)),o={},o[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m).animate(o,g,m),d=l?2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m)),a.queue(function(){l&&a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),a.dequeue()}}(jQuery),function(t){t.effects.effect.clip=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(a,r),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n="IMG"===a[0].tagName?s:a,o=n[d](),l&&(n.css(d,0),n.css(p,o/2)),f[d]=l?o:0,f[p]=l?0:o/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","opacity","height","width"],a=t.effects.setMode(n,e.mode||"hide"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,o),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*_,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*v,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*v,top:-o*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?l*v:0),top:h+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:l*v),top:h+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}}(jQuery),function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}}(jQuery),function(t){t.effects.effect.fold=function(e,i){var s,n,o=t(this),a=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(o,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(o,a),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=h?n[0]:c,v[f[1]]=h?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){l&&o.hide(),t.effects.restore(o,a),t.effects.removeWrapper(o),i()})}}(jQuery),function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(s,e.mode||"show"),a={backgroundColor:s.css("backgroundColor")};"hide"===o&&(a.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&s.hide(),t.effects.restore(s,n),i()}})}}(jQuery),function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),o=t.effects.setMode(n,e.mode||"show"),a="show"===o,r="hide"===o,h=a||"hide"===o,l=2*(e.times||5)+(h?1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for((a||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;l>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,l+1))),n.dequeue()}}(jQuery),function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),o="hide"===n,a=parseInt(e.percent,10)||150,r=a/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:o?a:100,from:o?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),o=t.effects.setMode(s,e.mode||"effect"),a=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?a/100:1,x:"vertical"!==r?a/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==o&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show"===o&&(n.from.opacity=0,n.to.opacity=1),"hide"===o&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(a,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=a.css("position"),_=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&a.show(),s={height:a.height(),width:a.width(),outerHeight:a.outerHeight(),outerWidth:a.outerWidth()},"toggle"===e.mode&&"show"===p?(a.from=e.to||b,a.to=e.from||s):(a.from=e.from||("show"===p?b:s),a.to=e.to||("hide"===p?b:s)),o={from:{y:a.from.height/s.height,x:a.from.width/s.width},to:{y:a.to.height/s.height,x:a.to.width/s.width}},("box"===g||"both"===g)&&(o.from.y!==o.to.y&&(_=_.concat(u),a.from=t.effects.setTransition(a,u,o.from.y,a.from),a.to=t.effects.setTransition(a,u,o.to.y,a.to)),o.from.x!==o.to.x&&(_=_.concat(d),a.from=t.effects.setTransition(a,d,o.from.x,a.from),a.to=t.effects.setTransition(a,d,o.to.x,a.to))),("content"===g||"both"===g)&&o.from.y!==o.to.y&&(_=_.concat(c).concat(l),a.from=t.effects.setTransition(a,c,o.from.y,a.from),a.to=t.effects.setTransition(a,c,o.to.y,a.to)),t.effects.save(a,_),a.show(),t.effects.createWrapper(a),a.css("overflow","hidden").css(a.from),m&&(n=t.effects.getBaseline(m,s),a.from.top=(s.outerHeight-a.outerHeight())*n.y,a.from.left=(s.outerWidth-a.outerWidth())*n.x,a.to.top=(s.outerHeight-a.to.outerHeight)*n.y,a.to.left=(s.outerWidth-a.to.outerWidth)*n.x),a.css(a.from),("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),a.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*o.from.y,width:s.width*o.from.x,outerHeight:s.outerHeight*o.from.y,outerWidth:s.outerWidth*o.from.x},i.to={height:s.height*o.to.y,width:s.width*o.to.x,outerHeight:s.height*o.to.y,outerWidth:s.width*o.to.x},o.from.y!==o.to.y&&(i.from=t.effects.setTransition(i,u,o.from.y,i.from),i.to=t.effects.setTransition(i,u,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=t.effects.setTransition(i,d,o.from.x,i.from),i.to=t.effects.setTransition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,l)})})),a.animate(a.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===a.to.opacity&&a.css("opacity",a.from.opacity),"hide"===p&&a.hide(),t.effects.restore(a,_),f||("static"===v?a.css({position:"relative",top:a.to.top,left:a.to.left}):t.each(["top","left"],function(t,e){a.css(e,function(e,i){var s=parseInt(i,10),n=t?a.to.left:a.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,o),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,g[d]=(p?"+=":"-=")+2*h,m[d]=(p?"-=":"+=")+2*h,n.animate(f,u,e.easing),s=1;l>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}}(jQuery),function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","width","height"],a=t.effects.setMode(n,e.mode||"show"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,o),n.show(),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}}(jQuery),function(t){t.widget("ui.menu",{version:"1.10.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,o,a,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",o=String.fromCharCode(e.keyCode),a=!1,clearTimeout(this.filterTimer),o===n?a=!0:o=n+o,r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=a&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(o=String.fromCharCode(e.keyCode),r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})}(jQuery),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,a=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=n.children()[0];return t("body").append(n),i=a.offsetWidth,n.css("overflow","scroll"),s=a.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),o=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var o,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),k=(e.collision||"flip").split(" "),x={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),x[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),o=i(x.at,p,g),v.left+=o[0],v.top+=o[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,C=d+_+s(this,"marginBottom")+w.height,I=t.extend({},v),P=i(x.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?I.left-=u:"center"===e.my[0]&&(I.left-=u/2),"bottom"===e.my[1]?I.top-=d:"center"===e.my[1]&&(I.top-=d/2),I.left+=P[0],I.top+=P[1],t.support.offsetFractions||(I.left=h(I.left),I.top=h(I.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[k[i]]&&t.ui.position[k[i]][s](I,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:C,offset:[o[0]+P[0],o[1]+P[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=m.left-I.left,s=i+p-u,n=m.top-I.top,o=n+g-d,h={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:I.left,top:I.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>o?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>g&&g>r(n+o)&&(h.vertical="middle"),h.important=a(r(i),r(s))>a(r(n),r(o))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(I,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-o-n;e.collisionWidth>o?h>0&&0>=l?(i=t.left+h+e.collisionWidth-o-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+o-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=a(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-o-n;e.collisionHeight>o?h>0&&0>=l?(i=t.top+h+e.collisionHeight-o-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+o-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=a(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,a=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-a-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-a-o,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,a=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-a-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-a-o,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,o,a=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(a?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)e.style[o]=s[o];e.appendChild(r),i=a||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()}(jQuery),function(t,e){t.widget("ui.progressbar",{version:"1.10.2",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()
-},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})}(jQuery),function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,o.addClass("ui-state-active").focus(),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,o;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),o!==!1&&this.values(e,i,!0))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){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=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,o,a,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(a=this.options.step,n=o=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:o=this._valueMin();break;case t.ui.keyCode.END:o=this._valueMax();break;case t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;o=this._trimAlignValue(n+a);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;o=this._trimAlignValue(n-a)}this._slide(i,r,o)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}(jQuery),function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.2",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(o,""))===decodeURIComponent(location.href.replace(o,""))}var n=0,o=/#.*$/;t.widget("ui.tabs",{version:"1.10.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,o){return t(o).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),o=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:o=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,o),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var o,a,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(o=n.hash,a=e.element.find(e._sanitizeSelector(o))):(r=e._tabId(l),o="#"+r,a=e.element.find(o),a.length||(a=e._createPanel(r),a.insertAfter(e.panels[i-1]||e.tablist)),a.attr("aria-live","polite")),a.length&&(e.panels=e.panels.add(a)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":o.substring(1),"aria-labelledby":h}),a.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,o=this.tabs.eq(e),a=o.find(".ui-tabs-anchor"),r=this._getPanelForTab(o),h={tab:o,panel:r};s(a[0])||(this.xhr=t.ajax(this._ajaxSettings(a,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(o.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),o.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.2",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)
-})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position);if(n){if(a=this._find(s),a.length)return a.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})}(jQuery); \ No newline at end of file
+* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
+* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
+
+(function(e,t){function i(t,i){var s,a,o,r=t.nodeName.toLowerCase();return"area"===r?(s=t.parentNode,a=s.name,t.href&&a&&"map"===s.nodeName.toLowerCase()?(o=e("img[usemap=#"+a+"]")[0],!!o&&n(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,a=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,a=e(this[0]);a.length&&a[0]!==document;){if(n=a.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(a.css("zIndex"),10),!isNaN(s)&&0!==s))return s;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(a,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var a="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?r["inner"+n].call(this):this.each(function(){e(this).css(o,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(o,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;s.length>n;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)}})})(jQuery);(function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix||i:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})})(jQuery);(function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),k=t.position.getScrollInfo(y),w=(e.collision||"flip").split(" "),D={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=h.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=h.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),D[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),a=i(D.at,p,g),v.left+=a[0],v.top+=a[1],this.each(function(){var n,h,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),x=u+f+s(this,"marginRight")+k.width,C=d+_+s(this,"marginBottom")+k.height,M=t.extend({},v),T=i(D.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?M.left-=u:"center"===e.my[0]&&(M.left-=u/2),"bottom"===e.my[1]?M.top-=d:"center"===e.my[1]&&(M.top-=d/2),M.left+=T[0],M.top+=T[1],t.support.offsetFractions||(M.left=l(M.left),M.top=l(M.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[w[i]]&&t.ui.position[w[i]][s](M,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:x,collisionHeight:C,offset:[a[0]+T[0],a[1]+T[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(h=function(t){var i=m.left-M.left,s=i+p-u,n=m.top-M.top,a=n+g-d,l={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:M.left,top:M.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(l.horizontal="center"),d>g&&g>r(n+a)&&(l.vertical="middle"),l.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,l)}),c.offset(t.extend(M,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-o-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-o-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-o-a,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(e){var t=0,i={},a={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",a.height=a.paddingTop=a.paddingBottom=a.borderTopWidth=a.borderBottomWidth="show",e.widget("ui.accordion",{version:"1.10.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e(),content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active 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("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),undefined):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t),undefined)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,a=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:n=this.headers[(s+1)%a];break;case i.LEFT:case i.UP:n=this.headers[(s-1+a)%a];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:n=this.headers[0];break;case i.END:n=this.headers[a-1]}n&&(e(t.target).attr("tabIndex",-1),e(n).attr("tabIndex",0),n.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,a=this.options,s=a.heightStyle,n=this.element.parent(),r=this.accordionId="ui-accordion-"+(this.element.attr("id")||++t);this.active=this._findActive(a.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(t){var i=e(this),a=i.attr("id"),s=i.next(),n=s.attr("id");a||(a=r+"-header-"+t,i.attr("id",a)),n||(n=r+"-panel-"+t,s.attr("id",n)),i.attr("aria-controls",n),s.attr("aria-labelledby",a)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(a.event),"fill"===s?(i=n.height(),this.element.siblings(":visible").each(function(){var t=e(this),a=t.css("position");"absolute"!==a&&"fixed"!==a&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(i=0,this.headers.next().each(function(){i=Math.max(i,e(this).css("height","").height())}).height(i))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,a=this.active,s=e(t.currentTarget),n=s[0]===a[0],r=n&&i.collapsible,o=r?e():s.next(),h=a.next(),d={oldHeader:a,oldPanel:h,newHeader:r?e():s,newPanel:o};t.preventDefault(),n&&!i.collapsible||this._trigger("beforeActivate",t,d)===!1||(i.active=r?!1:this.headers.index(s),this.active=n?e():s,this._toggle(d),a.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&a.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),n||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,a=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=a,this.options.animate?this._animate(i,a,t):(a.hide(),i.show(),this._toggleComplete(t)),a.attr({"aria-hidden":"true"}),a.prev().attr("aria-selected","false"),i.length&&a.length?a.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(e,t,s){var n,r,o,h=this,d=0,c=e.length&&(!t.length||e.index()<t.index()),l=this.options.animate||{},u=c&&l.down||l,v=function(){h._toggleComplete(s)};return"number"==typeof u&&(o=u),"string"==typeof u&&(r=u),r=r||u.easing||l.easing,o=o||u.duration||l.duration,t.length?e.length?(n=e.show().outerHeight(),t.animate(i,{duration:o,easing:r,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(a,{duration:o,easing:r,complete:v,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?d+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(n-t.outerHeight()-d),d=0)}}),undefined):t.animate(i,o,r,v):e.animate(a,o,r,v)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}})})(jQuery);(function(e){e.widget("ui.autocomplete",{version:"1.10.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,undefined;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),undefined):(this._searchTimeout(e),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(e),this._change(e),undefined)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:s})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):undefined},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").append(e("<a>").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[e](t),undefined):(this.search(null,t),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})})(jQuery);(function(e){var t,i="ui-button ui-widget ui-state-default ui-corner-all",n="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",s=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},a=function(t){var i=t.name,n=t.form,s=e([]);return i&&(i=i.replace(/'/g,"\\'"),s=n?e(n).find("[name='"+i+"']"):e("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),s};e.widget("ui.button",{version:"1.10.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,s),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var n=this,o=this.options,r="checkbox"===this.type||"radio"===this.type,h=r?"":"ui-state-active";null===o.label&&(o.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(i).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){o.disabled||this===t&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){o.disabled||e(this).removeClass(h)}).bind("click"+this.eventNamespace,function(e){o.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),r&&this.element.bind("change"+this.eventNamespace,function(){n.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return o.disabled?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(o.disabled)return!1;e(this).addClass("ui-state-active"),n.buttonElement.attr("aria-pressed","true");var t=n.element[0];a(t).not(t).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return o.disabled?!1:(e(this).addClass("ui-state-active"),t=this,n.document.one("mouseup",function(){t=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return o.disabled?!1:(e(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(t){return o.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",o.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(i+" ui-state-active "+n).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.element.prop("disabled",!!t),t&&this.buttonElement.removeClass("ui-state-focus"),undefined):(this._resetButton(),undefined)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?a(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(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("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var t=this.buttonElement.removeClass(n),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),s=this.options.icons,a=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(a?"s":s.primary?"-primary":"-secondary")),s.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(a?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):o.push("ui-button-text-only"),t.addClass(o.join(" "))}}),e.widget("ui.buttonset",{version:"1.10.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function(e,t){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,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:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,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:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.dpDiv=a(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){e.datepicker._isDisabledDatepicker(n.inline?t.parent()[0]:n.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))})}function s(t,i){e.extend(t,i);for(var a in i)null==i[a]&&(t[a]=i[a]);return t}e.extend(e.ui,{datepicker:{version:"1.10.4"}});var n,r="datepicker";e.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return s(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var a,s,n;a=t.nodeName.toLowerCase(),s="div"===a||"span"===a,t.id||(this.uuid+=1,t.id="dp"+this.uuid),n=this._newInst(e(t),s),n.settings=e.extend({},i||{}),"input"===a?this._connectDatepicker(t,n):s&&this._inlineDatepicker(t,n)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?a(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var a=e(t);i.append=e([]),i.trigger=e([]),a.hasClass(this.markerClassName)||(this._attachments(a,i),a.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,r,i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var a,s,n,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=e("<span class='"+this._appendClass+"'>"+r+"</span>"),t[o?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),a=this._get(i,"showOn"),("focus"===a||"both"===a)&&t.focus(this._showDatepicker),("button"===a||"both"===a)&&(s=this._get(i,"buttonText"),n=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:n,alt:s,title:s}):e("<button type='button'></button>").addClass(this._triggerClass).html(n?e("<img/>").attr({src:n,alt:s,title:s}):s)),t[o?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,a,s,n=new Date(2009,11,20),r=this._get(e,"dateFormat");r.match(/[DM]/)&&(t=function(e){for(i=0,a=0,s=0;e.length>s;s++)e[s].length>i&&(i=e[s].length,a=s);return a},n.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),n.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-n.getDay())),e.input.attr("size",this._formatDate(e,n).length)}},_inlineDatepicker:function(t,i){var a=e(t);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(i.dpDiv),e.data(t,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,a,n,o){var u,c,h,l,d,p=this._dialogInst;return p||(this.uuid+=1,u="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+u+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},e.data(this._dialogInput[0],r,p)),s(p.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(c=document.documentElement.clientWidth,h=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[c/2-100+l,h/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(t){var i,a=e(t),s=e.data(t,r);a.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,r),"input"===i?(s.append.remove(),s.trigger.remove(),a.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&a.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,a,s=e(t),n=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,n.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(a=s.children("."+this._inlineClass),a.children().removeClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,a,s=e(t),n=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,n.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(a=s.children("."+this._inlineClass),a.children().addClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,a,n){var r,o,u,c,h=this._getInst(i);return 2===arguments.length&&"string"==typeof a?"defaults"===a?e.extend({},e.datepicker._defaults):h?"all"===a?e.extend({},h.settings):this._get(h,a):null:(r=a||{},"string"==typeof a&&(r={},r[a]=n),h&&(this._curInst===h&&this._hideDatepicker(),o=this._getDateDatepicker(i,!0),u=this._getMinMaxDate(h,"min"),c=this._getMinMaxDate(h,"max"),s(h.settings,r),null!==u&&r.dateFormat!==t&&r.minDate===t&&(h.settings.minDate=this._formatDate(h,u)),null!==c&&r.dateFormat!==t&&r.maxDate===t&&(h.settings.maxDate=this._formatDate(h,c)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(e(i),h),this._autoSize(h),this._setDate(h,o),this._updateAlternate(h),this._updateDatepicker(h)),t)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,a,s,n=e.datepicker._getInst(t.target),r=!0,o=n.dpDiv.is(".ui-datepicker-rtl");if(n._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),r=!1;break;case 13:return s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",n.dpDiv),s[0]&&e.datepicker._selectDay(t.target,n.selectedMonth,n.selectedYear,s[0]),i=e.datepicker._get(n,"onSelect"),i?(a=e.datepicker._formatDate(n),i.apply(n.input?n.input[0]:null,[a,n])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(n,"stepBigMonths"):-e.datepicker._get(n,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(n,"stepBigMonths"):+e.datepicker._get(n,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(n,"stepBigMonths"):-e.datepicker._get(n,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(n,"stepBigMonths"):+e.datepicker._get(n,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(i){var a,s,n=e.datepicker._getInst(i.target);return e.datepicker._get(n,"constrainInput")?(a=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">s||!a||a.indexOf(s)>-1):t},_doKeyUp:function(t){var i,a=e.datepicker._getInst(t.target);if(a.input.val()!==a.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,e.datepicker._getFormatConfig(a)),i&&(e.datepicker._setDateFromField(a),e.datepicker._updateAlternate(a),e.datepicker._updateDatepicker(a))}catch(s){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,a,n,r,o,u,c;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),a=e.datepicker._get(i,"beforeShow"),n=a?a.apply(t,[t,i]):{},n!==!1&&(s(i.settings,n),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),r=!1,e(t).parents().each(function(){return r|="fixed"===e(this).css("position"),!r}),o={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),o=e.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(u=e.datepicker._get(i,"showAnim"),c=e.datepicker._get(i,"duration"),i.dpDiv.zIndex(e(t).zIndex()+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[u]?i.dpDiv.show(u,e.datepicker._get(i,"showOptions"),c):i.dpDiv[u||"show"](u?c:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,n=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,a=this._getNumberOfMonths(t),s=a[1],r=17;t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",r*s+"em"),t.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,a){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,u=document.documentElement.clientWidth+(a?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(a?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?s-r:0,i.left-=a&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=a&&i.top===t.input.offset().top+o?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>u&&u>s?Math.abs(i.left+s-u):0),i.top-=Math.min(i.top,i.top+n>c&&c>n?Math.abs(n+o):0),i},_findPos:function(t){for(var i,a=this._getInst(t),s=this._get(a,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,a,s,n,o=this._curInst;!o||t&&o!==e.data(t,r)||this._datepickerShowing&&(i=this._get(o,"showAnim"),a=this._get(o,"duration"),s=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),a,s):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?a:null,s),i||s(),this._datepickerShowing=!1,n=this._get(o,"onClose"),n&&n.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),a=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==a)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,a){var s=e(t),n=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(n,i+("M"===a?this._get(n,"showCurrentAtPos"):0),a),this._updateDatepicker(n))},_gotoToday:function(t){var i,a=e(t),s=this._getInst(a[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(a)},_selectMonthYear:function(t,i,a){var s=e(t),n=this._getInst(s[0]);n["selected"+("M"===a?"Month":"Year")]=n["draw"+("M"===a?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(n),this._adjustDate(s)},_selectDay:function(t,i,a,s){var n,r=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(n=this._getInst(r[0]),n.selectedDay=n.currentDay=e("a",s).html(),n.selectedMonth=n.currentMonth=i,n.selectedYear=n.currentYear=a,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var a,s=e(t),n=this._getInst(s[0]);i=null!=i?i:this._formatDate(n),n.input&&n.input.val(i),this._updateAlternate(n),a=this._get(n,"onSelect"),a?a.apply(n.input?n.input[0]:null,[i,n]):n.input&&n.input.trigger("change"),n.inline?this._updateDatepicker(n):(this._hideDatepicker(),this._lastInput=n.input[0],"object"!=typeof n.input[0]&&n.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,a,s,n=this._get(t,"altField");n&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),a=this._getDate(t),s=this.formatDate(i,a,this._getFormatConfig(t)),e(n).each(function(){e(this).val(s)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(i,a,s){if(null==i||null==a)throw"Invalid arguments";if(a="object"==typeof a?""+a:a+"",""===a)return null;var n,r,o,u,c=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,l="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,p=(s?s.dayNames:null)||this._defaults.dayNames,g=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,m=(s?s.monthNames:null)||this._defaults.monthNames,f=-1,_=-1,v=-1,k=-1,y=!1,b=function(e){var t=i.length>n+1&&i.charAt(n+1)===e;return t&&n++,t},D=function(e){var t=b(e),i="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s=RegExp("^\\d{1,"+i+"}"),n=a.substring(c).match(s);if(!n)throw"Missing number at position "+c;return c+=n[0].length,parseInt(n[0],10)},w=function(i,s,n){var r=-1,o=e.map(b(i)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,i){var s=i[1];return a.substr(c,s.length).toLowerCase()===s.toLowerCase()?(r=i[0],c+=s.length,!1):t}),-1!==r)return r+1;throw"Unknown name at position "+c},M=function(){if(a.charAt(c)!==i.charAt(n))throw"Unexpected literal at position "+c;c++};for(n=0;i.length>n;n++)if(y)"'"!==i.charAt(n)||b("'")?M():y=!1;else switch(i.charAt(n)){case"d":v=D("d");break;case"D":w("D",d,p);break;case"o":k=D("o");break;case"m":_=D("m");break;case"M":_=w("M",g,m);break;case"y":f=D("y");break;case"@":u=new Date(D("@")),f=u.getFullYear(),_=u.getMonth()+1,v=u.getDate();break;case"!":u=new Date((D("!")-this._ticksTo1970)/1e4),f=u.getFullYear(),_=u.getMonth()+1,v=u.getDate();break;case"'":b("'")?M():y=!0;break;default:M()}if(a.length>c&&(o=a.substr(c),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===f?f=(new Date).getFullYear():100>f&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(l>=f?0:-100)),k>-1)for(_=1,v=k;;){if(r=this._getDaysInMonth(f,_-1),r>=v)break;_++,v-=r}if(u=this._daylightSavingAdjust(new Date(f,_-1,v)),u.getFullYear()!==f||u.getMonth()+1!==_||u.getDate()!==v)throw"Invalid date";return u},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:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var a,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,n=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,u=function(t){var i=e.length>a+1&&e.charAt(a+1)===t;return i&&a++,i},c=function(e,t,i){var a=""+t;if(u(e))for(;i>a.length;)a="0"+a;return a},h=function(e,t,i,a){return u(e)?a[t]:i[t]},l="",d=!1;if(t)for(a=0;e.length>a;a++)if(d)"'"!==e.charAt(a)||u("'")?l+=e.charAt(a):d=!1;else switch(e.charAt(a)){case"d":l+=c("d",t.getDate(),2);break;case"D":l+=h("D",t.getDay(),s,n);break;case"o":l+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":l+=c("m",t.getMonth()+1,2);break;case"M":l+=h("M",t.getMonth(),r,o);break;case"y":l+=u("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":l+=t.getTime();break;case"!":l+=1e4*t.getTime()+this._ticksTo1970;break;case"'":u("'")?l+="'":d=!0;break;default:l+=e.charAt(a)}return l},_possibleChars:function(e){var t,i="",a=!1,s=function(i){var a=e.length>t+1&&e.charAt(t+1)===i;return a&&t++,a};for(t=0;e.length>t;t++)if(a)"'"!==e.charAt(t)||s("'")?i+=e.charAt(t):a=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":a=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,i){return e.settings[i]!==t?e.settings[i]:this._defaults[i]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),a=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),n=s,r=this._getFormatConfig(e);try{n=this.parseDate(i,a,r)||s}catch(o){a=t?"":a}e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),e.currentDay=a?n.getDate():0,e.currentMonth=a?n.getMonth():0,e.currentYear=a?n.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,a){var s=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},n=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(a){}for(var s=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,n=s.getFullYear(),r=s.getMonth(),o=s.getDate(),u=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,c=u.exec(i);c;){switch(c[2]||"d"){case"d":case"D":o+=parseInt(c[1],10);break;case"w":case"W":o+=7*parseInt(c[1],10);break;case"m":case"M":r+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(n,r));break;case"y":case"Y":n+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(n,r))}c=u.exec(i)}return new Date(n,r,o)},r=null==i||""===i?a:"string"==typeof i?n(i):"number"==typeof i?isNaN(i)?a:s(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?a:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var a=!t,s=e.selectedMonth,n=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),s===e.selectedMonth&&n===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(a?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),a="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(a,-i,"M")},next:function(){e.datepicker._adjustDate(a,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(a)},selectDay:function(){return e.datepicker._selectDay(a,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(a,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(a,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,a,s,n,r,o,u,c,h,l,d,p,g,m,f,_,v,k,y,b,D,w,M,C,x,I,N,T,A,E,S,Y,F,P,O,j,K,R,H=new Date,W=this._daylightSavingAdjust(new Date(H.getFullYear(),H.getMonth(),H.getDate())),L=this._get(e,"isRTL"),U=this._get(e,"showButtonPanel"),B=this._get(e,"hideIfNoPrevNext"),z=this._get(e,"navigationAsDateFormat"),q=this._getNumberOfMonths(e),G=this._get(e,"showCurrentAtPos"),J=this._get(e,"stepMonths"),Q=1!==q[0]||1!==q[1],V=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),$=this._getMinMaxDate(e,"min"),X=this._getMinMaxDate(e,"max"),Z=e.drawMonth-G,et=e.drawYear;if(0>Z&&(Z+=12,et--),X)for(t=this._daylightSavingAdjust(new Date(X.getFullYear(),X.getMonth()-q[0]*q[1]+1,X.getDate())),t=$&&$>t?$:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=z?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-J,1)),this._getFormatConfig(e)):i,a=this._canAdjustMonth(e,-1,et,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"e":"w")+"'>"+i+"</span></a>":B?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"e":"w")+"'>"+i+"</span></a>",s=this._get(e,"nextText"),s=z?this.formatDate(s,this._daylightSavingAdjust(new Date(et,Z+J,1)),this._getFormatConfig(e)):s,n=this._canAdjustMonth(e,1,et,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"w":"e")+"'>"+s+"</span></a>":B?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"w":"e")+"'>"+s+"</span></a>",r=this._get(e,"currentText"),o=this._get(e,"gotoCurrent")&&e.currentDay?V:W,r=z?this.formatDate(r,o,this._getFormatConfig(e)):r,u=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",c=U?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(L?u:"")+(this._isInRange(e,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(L?"":u)+"</div>":"",h=parseInt(this._get(e,"firstDay"),10),h=isNaN(h)?0:h,l=this._get(e,"showWeek"),d=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),g=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),f=this._get(e,"beforeShowDay"),_=this._get(e,"showOtherMonths"),v=this._get(e,"selectOtherMonths"),k=this._getDefaultDate(e),y="",D=0;q[0]>D;D++){for(w="",this.maxRows=4,M=0;q[1]>M;M++){if(C=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),x=" ui-corner-all",I="",Q){if(I+="<div class='ui-datepicker-group",q[1]>1)switch(M){case 0:I+=" ui-datepicker-group-first",x=" ui-corner-"+(L?"right":"left");break;case q[1]-1:I+=" ui-datepicker-group-last",x=" ui-corner-"+(L?"left":"right");break;default:I+=" ui-datepicker-group-middle",x=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+x+"'>"+(/all|left/.test(x)&&0===D?L?n:a:"")+(/all|right/.test(x)&&0===D?L?a:n:"")+this._generateMonthYearHeader(e,Z,et,$,X,D>0||M>0,g,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",N=l?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",b=0;7>b;b++)T=(b+h)%7,N+="<th"+((b+h+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[T]+"'>"+p[T]+"</span></th>";for(I+=N+"</tr></thead><tbody>",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),E=(this._getFirstDayOfMonth(et,Z)-h+7)%7,S=Math.ceil((E+A)/7),Y=Q?this.maxRows>S?this.maxRows:S:S,this.maxRows=Y,F=this._daylightSavingAdjust(new Date(et,Z,1-E)),P=0;Y>P;P++){for(I+="<tr>",O=l?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(F)+"</td>":"",b=0;7>b;b++)j=f?f.apply(e.input?e.input[0]:null,[F]):[!0,""],K=F.getMonth()!==Z,R=K&&!v||!j[0]||$&&$>F||X&&F>X,O+="<td class='"+((b+h+6)%7>=5?" ui-datepicker-week-end":"")+(K?" ui-datepicker-other-month":"")+(F.getTime()===C.getTime()&&Z===e.selectedMonth&&e._keyEvent||k.getTime()===F.getTime()&&k.getTime()===C.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(K&&!_?"":" "+j[1]+(F.getTime()===V.getTime()?" "+this._currentClass:"")+(F.getTime()===W.getTime()?" ui-datepicker-today":""))+"'"+(K&&!_||!j[2]?"":" title='"+j[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+F.getMonth()+"' data-year='"+F.getFullYear()+"'")+">"+(K&&!_?"&#xa0;":R?"<span class='ui-state-default'>"+F.getDate()+"</span>":"<a class='ui-state-default"+(F.getTime()===W.getTime()?" ui-state-highlight":"")+(F.getTime()===V.getTime()?" ui-state-active":"")+(K?" ui-priority-secondary":"")+"' href='#'>"+F.getDate()+"</a>")+"</td>",F.setDate(F.getDate()+1),F=this._daylightSavingAdjust(F);I+=O+"</tr>"}Z++,Z>11&&(Z=0,et++),I+="</tbody></table>"+(Q?"</div>"+(q[0]>0&&M===q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),w+=I}y+=w}return y+=c,e._keyEvent=!1,y},_generateMonthYearHeader:function(e,t,i,a,s,n,r,o){var u,c,h,l,d,p,g,m,f=this._get(e,"changeMonth"),_=this._get(e,"changeYear"),v=this._get(e,"showMonthAfterYear"),k="<div class='ui-datepicker-title'>",y="";if(n||!f)y+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(u=a&&a.getFullYear()===i,c=s&&s.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",h=0;12>h;h++)(!u||h>=a.getMonth())&&(!c||s.getMonth()>=h)&&(y+="<option value='"+h+"'"+(h===t?" selected='selected'":"")+">"+o[h]+"</option>");y+="</select>"}if(v||(k+=y+(!n&&f&&_?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",n||!_)k+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(l=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10);
+return isNaN(t)?d:t},g=p(l[0]),m=Math.max(g,p(l[1]||"")),g=a?Math.max(g,a.getFullYear()):g,m=s?Math.min(m,s.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=g;g++)e.yearshtml+="<option value='"+g+"'"+(g===i?" selected='selected'":"")+">"+g+"</option>";e.yearshtml+="</select>",k+=e.yearshtml,e.yearshtml=null}return k+=this._get(e,"yearSuffix"),v&&(k+=(!n&&f&&_?"":"&#xa0;")+y),k+="</div>"},_adjustInstDate:function(e,t,i){var a=e.drawYear+("Y"===i?t:0),s=e.drawMonth+("M"===i?t:0),n=Math.min(e.selectedDay,this._getDaysInMonth(a,s))+("D"===i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(a,s,n)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),s=i&&i>t?i:t;return a&&s>a?a:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,a){var s=this._getNumberOfMonths(e),n=this._daylightSavingAdjust(new Date(i,a+(0>t?t:s[0]*s[1]),1));return 0>t&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth())),this._isInRange(e,n)},_isInRange:function(e,t){var i,a,s=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),r=null,o=null,u=this._get(e,"yearRange");return u&&(i=u.split(":"),a=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=a),i[1].match(/[+\-].*/)&&(o+=a)),(!s||t.getTime()>=s.getTime())&&(!n||t.getTime()<=n.getTime())&&(!r||t.getFullYear()>=r)&&(!o||o>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,a){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(a,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.10.4"})(jQuery);(function(e){var t={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.10.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,a=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._destroyOverlay(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(s){}this._hide(this.uiDialog,this.options.hide,function(){a._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,t){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!t&&this._trigger("focus",e),i},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var e=this.element.find("[autofocus]");e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),undefined;if(t.keyCode===e.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),a=i.filter(":first"),s=i.filter(":last");t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==a[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(s.focus(1),t.preventDefault()):(a.focus(1),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html("&#160;"),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(e.each(i,function(i,a){var s,n;a=e.isFunction(a)?{click:a,text:i}:a,a=e.extend({type:"button"},a),s=a.click,a.click=function(){s.apply(t.element[0],arguments)},n={icons:a.icons,text:a.showText},delete a.icons,delete a.showText,e("<button></button>",a).button(n).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,a=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(a,s){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",a,t(s))},drag:function(e,a){i._trigger("drag",e,t(a))},stop:function(s,n){a.position=[n.position.left-i.document.scrollLeft(),n.position.top-i.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",s,t(n))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,a=this.options,s=a.resizable,n=this.uiDialog.css("position"),r="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:a.maxWidth,maxHeight:a.maxHeight,minWidth:a.minWidth,minHeight:this._minHeight(),handles:r,start:function(a,s){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",a,t(s))},resize:function(e,a){i._trigger("resize",e,t(a))},stop:function(s,n){a.height=e(this).height(),a.width=e(this).width(),e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,t(n))}}).css("position",n)},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(a){var s=this,n=!1,r={};e.each(a,function(e,a){s._setOption(e,a),e in t&&(n=!0),e in i&&(r[e]=a)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(e,t){var i,a,s=this.uiDialog;"dialogClass"===e&&s.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=s.is(":data(ui-draggable)"),i&&!t&&s.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(a=s.is(":data(ui-resizable)"),a&&!t&&s.resizable("destroy"),a&&"string"==typeof t&&s.resizable("option","handles",t),a||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,a=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),a.minWidth>a.width&&(a.width=a.minWidth),e=this.uiDialog.css({height:"auto",width:a.width}).outerHeight(),t=Math.max(0,a.minHeight-e),i="number"==typeof a.maxHeight?Math.max(0,a.maxHeight-e):"none","auto"===a.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,a.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=this,i=this.widgetFullName;e.ui.dialog.overlayInstances||this._delay(function(){e.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(a){t._allowInteraction(a)||(a.preventDefault(),e(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),e.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(e.ui.dialog.overlayInstances--,e.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),e.ui.dialog.overlayInstances=0,e.uiBackCompat!==!1&&e.widget("ui.dialog",e.ui.dialog,{_position:function(){var t,i=this.options.position,a=[],s=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(a=i.split?i.split(" "):[i[0],i[1]],1===a.length&&(a[1]=a[0]),e.each(["left","top"],function(e,t){+a[e]===a[e]&&(s[e]=a[e],a[e]=t)}),i={my:a[0]+(0>s[0]?s[0]:"+"+s[0])+" "+a[1]+(0>s[1]?s[1]:"+"+s[1]),at:a.join(" ")}),i=e.extend({},e.ui.dialog.prototype.options.position,i)):i=e.ui.dialog.prototype.options.position,t=this.uiDialog.is(":visible"),t||this.uiDialog.show(),this.uiDialog.position(i),t||this.uiDialog.hide()}})})(jQuery);(function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<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(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}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 e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=e.pageX,h=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,a=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,a))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,a,o,r,l,h,c,u,d,p=t(this).data("ui-draggable"),g=p.options,f=g.snapTolerance,m=i.offset.left,_=m+p.helperProportions.width,v=i.offset.top,b=v+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,l=r+p.snapElements[u].width,h=p.snapElements[u].top,c=h+p.snapElements[u].height,r-f>_||m>l+f||h-f>b||v>c+f||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==g.snapMode&&(s=f>=Math.abs(h-b),n=f>=Math.abs(c-v),a=f>=Math.abs(r-_),o=f>=Math.abs(l-m),s&&(i.position.top=p._convertPositionTo("relative",{top:h-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),d=s||n||a||o,"outer"!==g.snapMode&&(s=f>=Math.abs(h-v),n=f>=Math.abs(c-b),a=f>=Math.abs(r-m),o=f>=Math.abs(l-_),s&&(i.position.top=p._convertPositionTo("relative",{top:h,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||a||o||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],undefined):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},t.ui.ddmanager.droppables[i.scope]=t.ui.ddmanager.droppables[i.scope]||[],t.ui.ddmanager.droppables[i.scope].push(this),i.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,a,o=(t.positionAbs||t.position.absolute).left,r=(t.positionAbs||t.position.absolute).top,l=o+t.helperProportions.width,h=r+t.helperProportions.height,c=i.offset.left,u=i.offset.top,d=c+i.proportions().width,p=u+i.proportions().height;switch(s){case"fit":return o>=c&&d>=l&&r>=u&&p>=h;case"intersect":return o+t.helperProportions.width/2>c&&d>l-t.helperProportions.width/2&&r+t.helperProportions.height/2>u&&p>h-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,a=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(a,u,i.proportions().height)&&e(n,c,i.proportions().width);case"touch":return(r>=u&&p>=r||h>=u&&p>=h||u>r&&h>p)&&(o>=c&&d>=o||l>=c&&d>=l||c>o&&l>d);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,a=t.ui.ddmanager.droppables[e.options.scope]||[],o=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||e&&!a[s].accept.call(a[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue t}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=t.ui.intersect(e,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),a.length&&(s=t.data(a[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}})(jQuery);(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.toLowerCase(),f(l,function(t,a){var o,r=a.re.exec(i),l=r&&a.parse(r),h=a.space||"rgba";return l?(o=s[h](l),s[c[h].cache]=o[c[h].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,o,r,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,l],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),a=c[n],o=0===this.alpha()?h("transparent"):this,r=o[a.cache]||a.to(o._rgba),l=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],h=s[a],c=u[n.type]||{};null!==h&&(null===o?l[a]=h:(c.mod&&(h-o>c.mod/2?o+=c.mod:o-h>c.mod/2&&(o-=c.mod)),l[a]=i((h-o)*e+o,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),l=Math.min(s,n,a),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-a)/h+360:n===r?60*(a-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,l=n.to,c=n.from;h.fn[s]=function(s){if(l&&!this[o]&&(this[o]=l(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=h(c(d)),n[o]=d,n):h(d)},f(a,function(e,i){h.fn[e]||(h.fn[e]=function(n){var a,o=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),c=h[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=h(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(l){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var l=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",h=l.children?o.find("*").addBack():o;h=h.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),h=h.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.4",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,l=t(this),h=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(l,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;l.parent().is(".ui-effects-wrapper")?t.effects.save(l.parent(),h):t.effects.save(l,h),l.show(),a=t.effects.createWrapper(l).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,m[p]=v?o:0,g||(l.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:o+r),v&&(a.css(p,0),g||a.css(f,r+o)),a.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&l.hide(),t.effects.restore(l,h),t.effects.removeWrapper(l),n()}})}})(jQuery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"effect"),h="hide"===l,c="show"===l,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||h?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=o.queue(),y=b.length;for((c||h)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),d||(d=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-d:2*d).animate(a,g,m)),h&&(d/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m).animate(a,g,m),d=h?2*d:d/2;h&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m)),o.queue(function(){h&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"hide"),h="show"===l,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[d](),h&&(n.css(d,0),n.css(p,a/2)),f[d]=h?a:0,f[p]=h?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){h||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(h,"pos"===c?-s:s),u[h]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var a,o,r,l,h,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(a=0;u>a;a++)for(l=m.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=m.left+o*v,h=o-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?h*v:0),top:l+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:h*v),top:l+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}})(jQuery);(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jQuery);(function(t){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),l="show"===r,h="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=l!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(a,o),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[h?0:1]),l&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=l?n[0]:c,v[f[1]]=l?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){h&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),i()})}})(jQuery);(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jQuery);(function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,l=o||"hide"===a,h=2*(e.times||5)+(l?1:0),c=e.duration/h,u=0,d=n.queue(),p=d.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;h>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,h+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?l:{height:l.height*r,width:l.width*r,outerHeight:l.outerHeight*r,outerWidth:l.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",l=e.origin,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=l||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:h),n.to={height:h.height*c.y,width:h.width*c.x,outerHeight:h.outerHeight*c.y,outerWidth:h.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=o.css("position"),_=f?r:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===g||"both"===g)&&(a.from.y!==a.to.y&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.y,o.from),o.to=t.effects.setTransition(o,u,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.x,o.from),o.to=t.effects.setTransition(o,d,a.to.x,o.to))),("content"===g||"both"===g)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(h),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(n=t.effects.getBaseline(m,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),h=r.concat(u).concat(d),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,h),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,u,a.from.y,i.from),i.to=t.effects.setTransition(i,u,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,d,a.from.x,i.from),i.to=t.effects.setTransition(i,d,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,h)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",l=e.distance||20,h=e.times||3,c=2*h+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+l,g[d]=(p?"+=":"-=")+2*l,m[d]=(p?"-=":"+=")+2*l,n.animate(f,u,e.easing),s=1;h>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setMode(n,e.mode||"show"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(h,c?isNaN(s)?"-"+s:-s:s),u[h]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,l=a?o.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-l,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}})(jQuery);(function(t){t.widget("ui.menu",{version:"1.10.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,l=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:l=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})})(jQuery);(function(t,e){t.widget("ui.progressbar",{version:"1.10.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})})(jQuery);(function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<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("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,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=r.handles||(t(".ui-resizable-handle",this.element).length?{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"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),a="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,a;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,a),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(t(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),o.containment&&(s+=t(o.containment).scrollLeft()||0,n+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-a.left||0,d=e.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,a=s?0:c.sizeDiff.width,o={width:c.helper.width()-a,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(o,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,a=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=i(t.width)&&e.minWidth&&e.minWidth>t.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return o&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),a&&(t.height=e.maxHeight),o&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),a&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,a=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,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}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:o,h=t.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,a,o=t(this).data("ui-resizable"),r=o.options,h=o.containerOffset,l=o.position,c=o._aspectRatio||e.shiftKey,u={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-u.left),c&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),c&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-u.left:o.offset.left-u.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-u.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=Math.abs(o.parentData.left)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,c&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,c&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,a=e.containerElement,o=t(e.helper),r=o.offset(),h=o.outerWidth()-e.sizeDiff.width,l=o.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(a[e]=i||null)}),e.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,a=e.originalPosition,o=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(o)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.top=a.top-u):/^(sw)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.left=a.left-c):(p-l>0?(e.size.height=p,e.position.top=a.top-u):(e.size.height=l,e.position.top=a.top+n.height-l),d-h>0?(e.size.width=d,e.position.left=a.left-c):(e.size.width=h,e.position.left=a.left+n.width-h))}})})(jQuery);(function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=e.pageX,l=e.pageY;return a>r&&(i=r,r=a,a=i),o>l&&(i=l,l=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:l-o}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?h=!(i.left>r||a>i.right||i.top>l||o>i.bottom):"fit"===n.tolerance&&(h=i.left>a&&r>i.right&&i.top>o&&l>i.bottom),h?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})})(jQuery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),l=a.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-a.width()/2,top:e.pageY-l.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){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=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),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},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-t(document).scrollTop()<a.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.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(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[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")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}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 e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=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-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})(jQuery);(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})})(jQuery);(function(t,e){function i(){return++n}function s(t){return t=t.cloneNode(!1),t.hash.length>1&&decodeURIComponent(t.href.replace(a,""))===decodeURIComponent(location.href.replace(a,""))}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.10.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,a){return t(a).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,c))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})})(jQuery);(function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.4",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position);if(n){if(a=this._find(s),a.length)return a.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery); \ No newline at end of file
diff --git a/lib/scripts/jquery/jquery.js b/lib/scripts/jquery/jquery.js
index e2c203fe9..c5c648255 100644
--- a/lib/scripts/jquery/jquery.js
+++ b/lib/scripts/jquery/jquery.js
@@ -1,15 +1,15 @@
/*!
- * jQuery JavaScript Library v1.9.1
+ * jQuery JavaScript Library v1.10.2
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
- * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
- * Date: 2013-2-4
+ * Date: 2013-07-03T13:48Z
*/
(function( window, undefined ) {
@@ -25,13 +25,14 @@ var
// A central reference to the root jQuery(document)
rootjQuery,
- // Support: IE<9
- // For `typeof node.method` instead of `node.method !== undefined`
+ // Support: IE<10
+ // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
core_strundefined = typeof undefined,
// Use the correct document accordingly with window argument (sandbox)
- document = window.document,
location = window.location,
+ document = window.document,
+ docElem = document.documentElement,
// Map over jQuery in case of overwrite
_jQuery = window.jQuery,
@@ -45,7 +46,7 @@ var
// List of deleted data cache ids, so we can reuse them
core_deletedIds = [],
- core_version = "1.9.1",
+ core_version = "1.10.2",
// Save a reference to some core methods
core_concat = core_deletedIds.concat,
@@ -74,7 +75,7 @@ var
// A simple way to check for HTML strings
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
// Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
// Match a standalone tag
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
@@ -227,11 +228,6 @@ jQuery.fn = jQuery.prototype = {
// 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 core_slice.call( this );
},
@@ -380,6 +376,10 @@ jQuery.extend = jQuery.fn.extend = function() {
};
jQuery.extend({
+ // Unique for each copy of jQuery on the page
+ // Non-digits removed to match rinlinejQuery
+ expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
+
noConflict: function( deep ) {
if ( window.$ === jQuery ) {
window.$ = _$;
@@ -450,6 +450,7 @@ jQuery.extend({
},
isWindow: function( obj ) {
+ /* jshint eqeqeq: false */
return obj != null && obj == obj.window;
},
@@ -467,6 +468,8 @@ jQuery.extend({
},
isPlainObject: function( obj ) {
+ var key;
+
// 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
@@ -486,10 +489,16 @@ jQuery.extend({
return false;
}
+ // Support: IE<9
+ // Handle iteration over inherited properties before own properties.
+ if ( jQuery.support.ownLast ) {
+ for ( key in obj ) {
+ return core_hasOwn.call( obj, key );
+ }
+ }
+
// 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 || core_hasOwn.call( obj, key );
@@ -879,6 +888,29 @@ jQuery.extend({
now: function() {
return ( new Date() ).getTime();
+ },
+
+ // A method for quickly swapping in/out CSS properties to get correct calculations.
+ // Note: this method belongs to the css module but it's needed here for the support module.
+ // If support gets modularized, this method should be moved back to the css module.
+ swap: function( elem, options, callback, args ) {
+ var ret, name,
+ old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ ret = callback.apply( elem, args || [] );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+
+ return ret;
}
});
@@ -967,6 +999,1985 @@ function isArraylike( obj ) {
// All jQuery objects should point back to these
rootjQuery = jQuery(document);
+/*!
+ * Sizzle CSS Selector Engine v1.10.2
+ * http://sizzlejs.com/
+ *
+ * Copyright 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-07-03
+ */
+(function( window, undefined ) {
+
+var i,
+ support,
+ cachedruns,
+ Expr,
+ getText,
+ isXML,
+ compile,
+ outermostContext,
+ sortInput,
+
+ // Local document vars
+ setDocument,
+ document,
+ docElem,
+ documentIsHTML,
+ rbuggyQSA,
+ rbuggyMatches,
+ matches,
+ contains,
+
+ // Instance-specific data
+ expando = "sizzle" + -(new Date()),
+ preferredDoc = window.document,
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+ hasDuplicate = false,
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+ return 0;
+ },
+
+ // General-purpose constants
+ strundefined = typeof undefined,
+ MAX_NEGATIVE = 1 << 31,
+
+ // Instance methods
+ hasOwn = ({}).hasOwnProperty,
+ arr = [],
+ pop = arr.pop,
+ push_native = arr.push,
+ push = arr.push,
+ slice = arr.slice,
+ // Use a stripped-down indexOf if we can't use a native one
+ indexOf = arr.indexOf || function( elem ) {
+ var i = 0,
+ len = this.length;
+ for ( ; i < len; i++ ) {
+ if ( this[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+ // Regular expressions
+
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+ // http://www.w3.org/TR/css3-syntax/#characters
+ characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+ // Loosely modeled on CSS identifier characters
+ // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = characterEncoding.replace( "w", "w#" ),
+
+ // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
+ "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
+
+ // Prefer arguments quoted,
+ // then not containing pseudos/brackets,
+ // then attribute selectors/non-parenthetical expressions,
+ // then anything else
+ // These preferences are here to reduce the number of selectors
+ // needing tokenize in the PSEUDO preFilter
+ pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+ rsibling = new RegExp( whitespace + "*[+~]" ),
+ rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
+
+ rpseudo = new RegExp( pseudos ),
+ ridentifier = new RegExp( "^" + identifier + "$" ),
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+ "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+ "ATTR": new RegExp( "^" + attributes ),
+ "PSEUDO": new RegExp( "^" + pseudos ),
+ "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+ // For use in libraries implementing .is()
+ // We use this for POS matching in `select`
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+ },
+
+ rnative = /^[^{]+\{\s*\[native \w/,
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+
+ rescape = /'|\\/g,
+
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+ funescape = function( _, escaped, escapedWhitespace ) {
+ var high = "0x" + escaped - 0x10000;
+ // NaN means non-codepoint
+ // Support: Firefox
+ // Workaround erroneous numeric interpretation of +"0x"
+ return high !== high || escapedWhitespace ?
+ escaped :
+ // BMP codepoint
+ high < 0 ?
+ String.fromCharCode( high + 0x10000 ) :
+ // Supplemental Plane codepoint (surrogate pair)
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+ };
+
+// Optimize for push.apply( _, NodeList )
+try {
+ push.apply(
+ (arr = slice.call( preferredDoc.childNodes )),
+ preferredDoc.childNodes
+ );
+ // Support: Android<4.0
+ // Detect silently failing push.apply
+ arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+ push = { apply: arr.length ?
+
+ // Leverage slice if possible
+ function( target, els ) {
+ push_native.apply( target, slice.call(els) );
+ } :
+
+ // Support: IE<9
+ // Otherwise append directly
+ function( target, els ) {
+ var j = target.length,
+ i = 0;
+ // Can't trust NodeList.length
+ while ( (target[j++] = els[i++]) ) {}
+ target.length = j - 1;
+ }
+ };
+}
+
+function Sizzle( selector, context, results, seed ) {
+ var match, elem, m, nodeType,
+ // QSA vars
+ i, groups, old, nid, newContext, newSelector;
+
+ if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+ setDocument( context );
+ }
+
+ context = context || document;
+ results = results || [];
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( documentIsHTML && !seed ) {
+
+ // Shortcuts
+ if ( (match = rquickExpr.exec( selector )) ) {
+ // Speed-up: Sizzle("#ID")
+ if ( (m = match[1]) ) {
+ if ( nodeType === 9 ) {
+ elem = context.getElementById( m );
+ // 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, Opera, and Webkit return items
+ // by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ // Context is not a document
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+ contains( context, elem ) && elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Speed-up: Sizzle("TAG")
+ } else if ( match[2] ) {
+ push.apply( results, context.getElementsByTagName( selector ) );
+ return results;
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
+ push.apply( results, context.getElementsByClassName( m ) );
+ return results;
+ }
+ }
+
+ // QSA path
+ if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+ nid = old = expando;
+ newContext = context;
+ newSelector = nodeType === 9 && selector;
+
+ // 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
+ if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ groups = tokenize( selector );
+
+ if ( (old = context.getAttribute("id")) ) {
+ nid = old.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", nid );
+ }
+ nid = "[id='" + nid + "'] ";
+
+ i = groups.length;
+ while ( i-- ) {
+ groups[i] = nid + toSelector( groups[i] );
+ }
+ newContext = rsibling.test( selector ) && context.parentNode || context;
+ newSelector = groups.join(",");
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results,
+ newContext.querySelectorAll( newSelector )
+ );
+ return results;
+ } catch(qsaError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ * deleting the oldest entry
+ */
+function createCache() {
+ var keys = [];
+
+ function cache( key, value ) {
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+ if ( keys.push( key += " " ) > Expr.cacheLength ) {
+ // Only keep the most recent entries
+ delete cache[ keys.shift() ];
+ }
+ return (cache[ key ] = value);
+ }
+ return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+ fn[ expando ] = true;
+ return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return !!fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // Remove from its parent by default
+ if ( div.parentNode ) {
+ div.parentNode.removeChild( div );
+ }
+ // release memory in IE
+ div = null;
+ }
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+ var arr = attrs.split("|"),
+ i = attrs.length;
+
+ while ( i-- ) {
+ Expr.attrHandle[ arr[i] ] = handler;
+ }
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+ var cur = b && a,
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
+ ( ~a.sourceIndex || MAX_NEGATIVE );
+
+ // Use IE sourceIndex if available on both nodes
+ if ( diff ) {
+ return diff;
+ }
+
+ // Check if b follows a
+ if ( cur ) {
+ while ( (cur = cur.nextSibling) ) {
+ if ( cur === b ) {
+ return -1;
+ }
+ }
+ }
+
+ return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Detect xml
+ * @param {Element|Object} elem An element or a document
+ */
+isXML = 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).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+ var doc = node ? node.ownerDocument || node : preferredDoc,
+ parent = doc.defaultView;
+
+ // If no document and documentElement is available, return
+ if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+ return document;
+ }
+
+ // Set our document
+ document = doc;
+ docElem = doc.documentElement;
+
+ // Support tests
+ documentIsHTML = !isXML( doc );
+
+ // Support: IE>8
+ // If iframe document is assigned to "document" variable and if iframe has been reloaded,
+ // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+ // IE6-8 do not support the defaultView property so parent will be undefined
+ if ( parent && parent.attachEvent && parent !== parent.top ) {
+ parent.attachEvent( "onbeforeunload", function() {
+ setDocument();
+ });
+ }
+
+ /* Attributes
+ ---------------------------------------------------------------------- */
+
+ // Support: IE<8
+ // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
+ support.attributes = assert(function( div ) {
+ div.className = "i";
+ return !div.getAttribute("className");
+ });
+
+ /* getElement(s)By*
+ ---------------------------------------------------------------------- */
+
+ // Check if getElementsByTagName("*") returns only elements
+ support.getElementsByTagName = assert(function( div ) {
+ div.appendChild( doc.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ });
+
+ // Check if getElementsByClassName can be trusted
+ support.getElementsByClassName = assert(function( div ) {
+ div.innerHTML = "<div class='a'></div><div class='a i'></div>";
+
+ // Support: Safari<4
+ // Catch class over-caching
+ div.firstChild.className = "i";
+ // Support: Opera<10
+ // Catch gEBCN failure to find non-leading classes
+ return div.getElementsByClassName("i").length === 2;
+ });
+
+ // Support: IE<10
+ // Check if getElementById returns elements by name
+ // The broken getElementById methods don't pick up programatically-set names,
+ // so use a roundabout getElementsByName test
+ support.getById = assert(function( div ) {
+ docElem.appendChild( div ).id = expando;
+ return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+ });
+
+ // ID find and filter
+ if ( support.getById ) {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
+ var m = context.getElementById( id );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [m] : [];
+ }
+ };
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ return elem.getAttribute("id") === attrId;
+ };
+ };
+ } else {
+ // Support: IE6/7
+ // getElementById is not reliable as a find shortcut
+ delete Expr.find["ID"];
+
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+ return node && node.value === attrId;
+ };
+ };
+ }
+
+ // Tag
+ Expr.find["TAG"] = support.getElementsByTagName ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== strundefined ) {
+ return context.getElementsByTagName( tag );
+ }
+ } :
+ function( tag, context ) {
+ var elem,
+ tmp = [],
+ i = 0,
+ results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ };
+
+ // Class
+ Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+ if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
+ return context.getElementsByClassName( className );
+ }
+ };
+
+ /* QSA/matchesSelector
+ ---------------------------------------------------------------------- */
+
+ // QSA and matchesSelector support
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ rbuggyMatches = [];
+
+ // qSa(:focus) reports false when true (Chrome 21)
+ // We allow this because of a bug in IE8/9 that throws an error
+ // whenever `document.activeElement` is accessed on an iframe
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
+ // See http://bugs.jquery.com/ticket/13378
+ rbuggyQSA = [];
+
+ if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explicitly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ div.innerHTML = "<select><option selected=''></option></select>";
+
+ // Support: IE8
+ // Boolean attributes and "value" are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+ });
+
+ assert(function( div ) {
+
+ // Support: Opera 10-12/IE8
+ // ^= $= *= and empty values
+ // Should not select anything
+ // Support: Windows 8 Native Apps
+ // The type attribute is restricted during .innerHTML assignment
+ var input = doc.createElement("input");
+ input.setAttribute( "type", "hidden" );
+ div.appendChild( input ).setAttribute( "t", "" );
+
+ if ( div.querySelectorAll("[t^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push( ":enabled", ":disabled" );
+ }
+
+ // Opera 10-11 does not throw on post-comma invalid pseudos
+ div.querySelectorAll("*,:x");
+ rbuggyQSA.push(",.*:");
+ });
+ }
+
+ if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector) )) ) {
+
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ support.disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( div, "[s!='']:x" );
+ rbuggyMatches.push( "!=", pseudos );
+ });
+ }
+
+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+ rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+ /* Contains
+ ---------------------------------------------------------------------- */
+
+ // Element contains another
+ // Purposefully does not implement inclusive descendent
+ // As in, an element does not contain itself
+ contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && (
+ adown.contains ?
+ adown.contains( bup ) :
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+ ));
+ } :
+ function( a, b ) {
+ if ( b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ /* Sorting
+ ---------------------------------------------------------------------- */
+
+ // Document order sorting
+ sortOrder = docElem.compareDocumentPosition ?
+ function( a, b ) {
+
+ // Flag for duplicate removal
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
+
+ if ( compare ) {
+ // Disconnected nodes
+ if ( compare & 1 ||
+ (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+ // Choose the first element that is related to our preferred document
+ if ( a === doc || contains(preferredDoc, a) ) {
+ return -1;
+ }
+ if ( b === doc || contains(preferredDoc, b) ) {
+ return 1;
+ }
+
+ // Maintain original order
+ return sortInput ?
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+ 0;
+ }
+
+ return compare & 4 ? -1 : 1;
+ }
+
+ // Not directly comparable, sort on existence of method
+ return a.compareDocumentPosition ? -1 : 1;
+ } :
+ function( a, b ) {
+ var cur,
+ i = 0,
+ aup = a.parentNode,
+ bup = b.parentNode,
+ ap = [ a ],
+ bp = [ b ];
+
+ // Exit early if the nodes are identical
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // Parentless nodes are either documents or disconnected
+ } else if ( !aup || !bup ) {
+ return a === doc ? -1 :
+ b === doc ? 1 :
+ aup ? -1 :
+ bup ? 1 :
+ sortInput ?
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+ 0;
+
+ // If the nodes are siblings, we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+ }
+
+ // Otherwise we need full lists of their ancestors for comparison
+ cur = a;
+ while ( (cur = cur.parentNode) ) {
+ ap.unshift( cur );
+ }
+ cur = b;
+ while ( (cur = cur.parentNode) ) {
+ bp.unshift( cur );
+ }
+
+ // Walk down the tree looking for a discrepancy
+ while ( ap[i] === bp[i] ) {
+ i++;
+ }
+
+ return i ?
+ // Do a sibling check if the nodes have a common ancestor
+ siblingCheck( ap[i], bp[i] ) :
+
+ // Otherwise nodes in our document sort first
+ ap[i] === preferredDoc ? -1 :
+ bp[i] === preferredDoc ? 1 :
+ 0;
+ };
+
+ return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ if ( support.matchesSelector && documentIsHTML &&
+ ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
+
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || support.disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch(e) {}
+ }
+
+ return Sizzle( expr, document, null, [elem] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+ // Set document vars if needed
+ if ( ( context.ownerDocument || context ) !== document ) {
+ setDocument( context );
+ }
+ return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ var fn = Expr.attrHandle[ name.toLowerCase() ],
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+ fn( elem, name, !documentIsHTML ) :
+ undefined;
+
+ return val === undefined ?
+ support.attributes || !documentIsHTML ?
+ elem.getAttribute( name ) :
+ (val = elem.getAttributeNode(name)) && val.specified ?
+ val.value :
+ null :
+ val;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ j = 0,
+ i = 0;
+
+ // Unless we *know* we can detect duplicates, assume their presence
+ hasDuplicate = !support.detectDuplicates;
+ sortInput = !support.sortStable && results.slice( 0 );
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem === results[ i ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+ // If no nodeType, this is expected to be an array
+ for ( ; (node = elem[i]); i++ ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (see #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ attrHandle: {},
+
+ find: {},
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( runescape, funescape );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 what (child|of-type)
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
+ 5 sign of xn-component
+ 6 x of xn-component
+ 7 sign of y-component
+ 8 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1].slice( 0, 3 ) === "nth" ) {
+ // nth-* requires argument
+ if ( !match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var excess,
+ unquoted = !match[5] && match[2];
+
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ // Accept quoted arguments as-is
+ if ( match[3] && match[4] !== undefined ) {
+ match[2] = match[4];
+
+ // Strip excess characters from unquoted arguments
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ match[0] = match[0].slice( 0, excess );
+ match[2] = unquoted.slice( 0, excess );
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+
+ "TAG": function( nodeNameSelector ) {
+ var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+ return nodeNameSelector === "*" ?
+ function() { return true; } :
+ function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.slice( -check.length ) === check :
+ operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, what, argument, first, last ) {
+ var simple = type.slice( 0, 3 ) !== "nth",
+ forward = type.slice( -4 ) !== "last",
+ ofType = what === "of-type";
+
+ return first === 1 && last === 0 ?
+
+ // Shortcut for :nth-*(n)
+ function( elem ) {
+ return !!elem.parentNode;
+ } :
+
+ function( elem, context, xml ) {
+ var cache, outerCache, node, diff, nodeIndex, start,
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
+ parent = elem.parentNode,
+ name = ofType && elem.nodeName.toLowerCase(),
+ useCache = !xml && !ofType;
+
+ if ( parent ) {
+
+ // :(first|last|only)-(child|of-type)
+ if ( simple ) {
+ while ( dir ) {
+ node = elem;
+ while ( (node = node[ dir ]) ) {
+ if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ // Reverse direction for :only-* (if we haven't yet done so)
+ start = dir = type === "only" && !start && "nextSibling";
+ }
+ return true;
+ }
+
+ start = [ forward ? parent.firstChild : parent.lastChild ];
+
+ // non-xml :nth-child(...) stores cache data on `parent`
+ if ( forward && useCache ) {
+ // Seek `elem` from a previously-cached index
+ outerCache = parent[ expando ] || (parent[ expando ] = {});
+ cache = outerCache[ type ] || [];
+ nodeIndex = cache[0] === dirruns && cache[1];
+ diff = cache[0] === dirruns && cache[2];
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+ // Fallback to seeking `elem` from the start
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ // When found, cache indexes on `parent` and break
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+ break;
+ }
+ }
+
+ // Use previously-cached element index if available
+ } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+ diff = cache[1];
+
+ // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+ } else {
+ // Use the same loop as above to seek `elem` from the start
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+ // Cache the index of each encountered element
+ if ( useCache ) {
+ (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+ }
+
+ if ( node === elem ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset, then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf.call( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ // Potentially complex pseudos
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ // "Whether an element is represented by a :lang() selector
+ // is based solely on the element's language value
+ // being equal to the identifier C,
+ // or beginning with the identifier C immediately followed by "-".
+ // The matching of C against the element's language value is performed case-insensitively.
+ // The identifier C does not have to be a valid language name."
+ // http://www.w3.org/TR/selectors/#lang-pseudo
+ "lang": markFunction( function( lang ) {
+ // lang value must be a valid identifier
+ if ( !ridentifier.test(lang || "") ) {
+ Sizzle.error( "unsupported lang: " + lang );
+ }
+ lang = lang.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ var elemLang;
+ do {
+ if ( (elemLang = documentIsHTML ?
+ elem.lang :
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+ elemLang = elemLang.toLowerCase();
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+ }
+ } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+ return false;
+ };
+ }),
+
+ // Miscellaneous
+ "target": function( elem ) {
+ var hash = window.location && window.location.hash;
+ return hash && hash.slice( 1 ) === elem.id;
+ },
+
+ "root": function( elem ) {
+ return elem === docElem;
+ },
+
+ "focus": function( elem ) {
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ // Boolean properties
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "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;
+ },
+
+ // Contents
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
+ // not comment, processing instructions, or others
+ // Thanks to Diego Perini for the nodeName shortcut
+ // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ // Element/input types
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "text": function( elem ) {
+ var attr;
+ // 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" &&
+ elem.type === "text" &&
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
+ },
+
+ // Position-in-collection
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 0;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 1;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+ Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+ Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+function tokenize( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( tokens = [] );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ // Cast descendant combinators to space
+ type: match[0].replace( rtrim, " " )
+ });
+ soFar = soFar.slice( matched.length );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ type: type,
+ matches: match
+ });
+ soFar = soFar.slice( matched.length );
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+}
+
+function toSelector( tokens ) {
+ var i = 0,
+ len = tokens.length,
+ selector = "";
+ for ( ; i < len; i++ ) {
+ selector += tokens[i].value;
+ }
+ return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ var data, cache, outerCache,
+ dirkey = dirruns + " " + doneName;
+
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ if ( matcher( elem, context, xml ) ) {
+ return true;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ outerCache = elem[ expando ] || (elem[ expando ] = {});
+ if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
+ if ( (data = cache[1]) === true || data === cachedruns ) {
+ return data === true;
+ }
+ } else {
+ cache = outerCache[ dir ] = [ dirkey ];
+ cache[1] = matcher( elem, context, xml ) || cachedruns;
+ if ( cache[1] === true ) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf.call( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && toSelector(
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+ ).replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && toSelector( tokens )
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ // A counter to specify which element is currently being matched
+ var matcherCachedRuns = 0,
+ bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, expandContext ) {
+ var elem, j, matcher,
+ setMatched = [],
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ outermost = expandContext != null,
+ contextBackup = outermostContext,
+ // We must always have either seed elements or context
+ elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
+ // Use integer dirruns iff this is the outermost matcher
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ cachedruns = matcherCachedRuns;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ j = 0;
+ while ( (matcher = elementMatchers[j++]) ) {
+ if ( matcher( elem, context, xml ) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ cachedruns = ++matcherCachedRuns;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // Apply set filters to unmatched elements
+ matchedCount += i;
+ if ( bySet && i !== matchedCount ) {
+ j = 0;
+ while ( (matcher = setMatchers[j++]) ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !group ) {
+ group = tokenize( selector );
+ }
+ i = group.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( group[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+ }
+ return cached;
+};
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function select( selector, context, results, seed ) {
+ var i, tokens, token, type, find,
+ match = tokenize( selector );
+
+ if ( !seed ) {
+ // Try to minimize operations if there is only one group
+ if ( match.length === 1 ) {
+
+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ support.getById && context.nodeType === 9 && documentIsHTML &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+ if ( !context ) {
+ return results;
+ }
+ selector = selector.slice( tokens.shift().value.length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+ while ( i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( runescape, funescape ),
+ rsibling.test( tokens[0].type ) && context.parentNode || context
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && toSelector( tokens );
+ if ( !selector ) {
+ push.apply( results, seed );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function
+ // Provide `match` to avoid retokenization if we modified the selector above
+ compile( selector, match )(
+ seed,
+ context,
+ !documentIsHTML,
+ results,
+ rsibling.test( selector )
+ );
+ return results;
+}
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome<14
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+ // Should return 1, but returns 4 (following)
+ return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+ div.innerHTML = "<a href='#'></a>";
+ return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+ addHandle( "type|href|height|width", function( elem, name, isXML ) {
+ if ( !isXML ) {
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+ }
+ });
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+ div.innerHTML = "<input/>";
+ div.firstChild.setAttribute( "value", "" );
+ return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+ addHandle( "value", function( elem, name, isXML ) {
+ if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+ return elem.defaultValue;
+ }
+ });
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+ return div.getAttribute("disabled") == null;
+}) ) {
+ addHandle( booleans, function( elem, name, isXML ) {
+ var val;
+ if ( !isXML ) {
+ return (val = elem.getAttributeNode( name )) && val.specified ?
+ val.value :
+ elem[ name ] === true ? name.toLowerCase() : null;
+ }
+ });
+}
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})( window );
// String to Object options format cache
var optionsCache = {};
@@ -1114,6 +3125,7 @@ jQuery.Callbacks = function( options ) {
// Remove all callbacks from the list
empty: function() {
list = [];
+ firingLength = 0;
return this;
},
// Have the list do nothing anymore
@@ -1139,9 +3151,9 @@ jQuery.Callbacks = function( options ) {
},
// Call all callbacks with the given context and arguments
fireWith: function( context, args ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
if ( list && ( !fired || stack ) ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
if ( firing ) {
stack.push( args );
} else {
@@ -1304,22 +3316,20 @@ jQuery.extend({
return deferred.promise();
}
});
-jQuery.support = (function() {
+jQuery.support = (function( support ) {
- var support, all, a,
- input, select, fragment,
- opt, eventName, isSupported, i,
+ var all, a, input, select, fragment, opt, eventName, isSupported, i,
div = document.createElement("div");
// Setup
div.setAttribute( "className", "t" );
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
- // Support tests won't run in some limited or non-browser environments
- all = div.getElementsByTagName("*");
+ // Finish early in limited (non-browser) environments
+ all = div.getElementsByTagName("*") || [];
a = div.getElementsByTagName("a")[ 0 ];
- if ( !all || !a || !all.length ) {
- return {};
+ if ( !a || !a.style || !all.length ) {
+ return support;
}
// First batch of tests
@@ -1328,64 +3338,60 @@ jQuery.support = (function() {
input = div.getElementsByTagName("input")[ 0 ];
a.style.cssText = "top:1px;float:left;opacity:.5";
- support = {
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
- getSetAttribute: div.className !== "t",
-
- // 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.5/.test( a.style.opacity ),
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- cssFloat: !!a.style.cssFloat,
-
- // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
- checkOn: !!input.value,
-
- // 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,
-
- // Tests for enctype support on a form (#6743)
- enctype: !!document.createElement("form").enctype,
-
- // Makes sure cloning an html5 element does not cause problems
- // Where outerHTML is undefined, this still works
- html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
-
- // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
- boxModel: document.compatMode === "CSS1Compat",
-
- // Will be defined later
- deleteExpando: true,
- noCloneEvent: true,
- inlineBlockNeedsLayout: false,
- shrinkWrapBlocks: false,
- reliableMarginRight: true,
- boxSizingReliable: true,
- pixelPosition: false
- };
+
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+ support.getSetAttribute = div.className !== "t";
+
+ // IE strips leading whitespace when .innerHTML is used
+ support.leadingWhitespace = div.firstChild.nodeType === 3;
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ support.tbody = !div.getElementsByTagName("tbody").length;
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ support.htmlSerialize = !!div.getElementsByTagName("link").length;
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText instead)
+ support.style = /top/.test( a.getAttribute("style") );
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ support.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
+ support.opacity = /^0.5/.test( a.style.opacity );
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ support.cssFloat = !!a.style.cssFloat;
+
+ // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
+ support.checkOn = !!input.value;
+
+ // 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)
+ support.optSelected = opt.selected;
+
+ // Tests for enctype support on a form (#6743)
+ support.enctype = !!document.createElement("form").enctype;
+
+ // Makes sure cloning an html5 element does not cause problems
+ // Where outerHTML is undefined, this still works
+ support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>";
+
+ // Will be defined later
+ support.inlineBlockNeedsLayout = false;
+ support.shrinkWrapBlocks = false;
+ support.pixelPosition = false;
+ support.deleteExpando = true;
+ support.noCloneEvent = true;
+ support.reliableMarginRight = true;
+ support.boxSizingReliable = true;
// Make sure checked status is properly cloned
input.checked = true;
@@ -1439,7 +3445,7 @@ jQuery.support = (function() {
}
// Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
- // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php
+ // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
for ( i in { submit: true, change: true, focusin: true }) {
div.setAttribute( eventName = "on" + i, "t" );
@@ -1450,6 +3456,13 @@ jQuery.support = (function() {
div.cloneNode( true ).style.backgroundClip = "";
support.clearCloneStyle = div.style.backgroundClip === "content-box";
+ // Support: IE<9
+ // Iteration over object's inherited properties before its own.
+ for ( i in jQuery( support ) ) {
+ break;
+ }
+ support.ownLast = i !== "0";
+
// Run tests that need a body at doc ready
jQuery(function() {
var container, marginDiv, tds,
@@ -1485,11 +3498,15 @@ jQuery.support = (function() {
// Check if empty table cells still have offsetWidth/Height
support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
- // Check box-sizing and margin behavior
+ // Check box-sizing and margin behavior.
div.innerHTML = "";
div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
- support.boxSizing = ( div.offsetWidth === 4 );
- support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
+
+ // Workaround failing boxSizing test due to offsetWidth returning wrong value
+ // with some non-1 values of body zoom, ticket #13543
+ jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {
+ support.boxSizing = div.offsetWidth === 4;
+ });
// Use window.getComputedStyle because jsdom on node.js will break without it.
if ( window.getComputedStyle ) {
@@ -1543,7 +3560,7 @@ jQuery.support = (function() {
all = select = fragment = opt = a = input = null;
return support;
-})();
+})({});
var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
rmultiDash = /([A-Z])/g;
@@ -1553,9 +3570,8 @@ function internalData( elem, name, data, pvt /* Internal Use Only */ ){
return;
}
- var thisCache, ret,
+ var ret, thisCache,
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
@@ -1571,7 +3587,7 @@ function internalData( elem, name, data, pvt /* Internal Use Only */ ){
// 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 || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
+ if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
return;
}
@@ -1579,20 +3595,16 @@ function internalData( elem, name, data, pvt /* Internal Use Only */ ){
// Only DOM nodes need a new unique ID for each element since their data
// ends up in the global cache
if ( isNode ) {
- elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;
+ id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++;
} else {
id = internalKey;
}
}
if ( !cache[ id ] ) {
- cache[ id ] = {};
-
- // Avoids exposing jQuery metadata on plain JS objects when the object
+ // Avoid exposing jQuery metadata on plain JS objects when the object
// is serialized using JSON.stringify
- if ( !isNode ) {
- cache[ id ].toJSON = jQuery.noop;
- }
+ cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
}
// An object can be passed to jQuery.data instead of a key/value pair; this gets
@@ -1624,7 +3636,7 @@ function internalData( elem, name, data, pvt /* Internal Use Only */ ){
// Check for both converted-to-camel and non-converted data property names
// If a data property was specified
- if ( getByName ) {
+ if ( typeof name === "string" ) {
// First Try to find as-is property data
ret = thisCache[ name ];
@@ -1647,7 +3659,7 @@ function internalRemoveData( elem, name, pvt ) {
return;
}
- var i, l, thisCache,
+ var thisCache, i,
isNode = elem.nodeType,
// See jQuery.data for more information
@@ -1692,13 +3704,14 @@ function internalRemoveData( elem, name, pvt ) {
name = name.concat( jQuery.map( name, jQuery.camelCase ) );
}
- for ( i = 0, l = name.length; i < l; i++ ) {
+ i = name.length;
+ while ( i-- ) {
delete thisCache[ name[i] ];
}
// If there is no data left in the cache, we want to continue
// and let the cache object itself get destroyed
- if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
+ if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
return;
}
}
@@ -1720,7 +3733,9 @@ function internalRemoveData( elem, name, pvt ) {
jQuery.cleanData( [ elem ], true );
// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+ /* jshint eqeqeq: false */
} else if ( jQuery.support.deleteExpando || cache != cache.window ) {
+ /* jshint eqeqeq: true */
delete cache[ id ];
// When all else fails, null
@@ -1732,17 +3747,13 @@ function internalRemoveData( elem, name, pvt ) {
jQuery.extend({
cache: {},
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
-
// The following elements throw uncatchable exceptions if you
// attempt to add expando properties to them.
noData: {
+ "applet": true,
"embed": true,
// Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
- "applet": true
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
},
hasData: function( elem ) {
@@ -1784,9 +3795,12 @@ jQuery.extend({
jQuery.fn.extend({
data: function( key, value ) {
var attrs, name,
- elem = this[0],
+ data = null,
i = 0,
- data = null;
+ elem = this[0];
+
+ // Special expections of .data basically thwart jQuery.access,
+ // so implement the relevant behavior ourselves
// Gets all values
if ( key === undefined ) {
@@ -1798,7 +3812,7 @@ jQuery.fn.extend({
for ( ; i < attrs.length; i++ ) {
name = attrs[i].name;
- if ( !name.indexOf( "data-" ) ) {
+ if ( name.indexOf("data-") === 0 ) {
name = jQuery.camelCase( name.slice(5) );
dataAttr( elem, name, data[ name ] );
@@ -1818,17 +3832,16 @@ jQuery.fn.extend({
});
}
- return jQuery.access( this, function( value ) {
-
- if ( value === undefined ) {
- // Try to fetch any internally stored data first
- return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
- }
+ return arguments.length > 1 ?
+ // Sets one value
this.each(function() {
jQuery.data( this, key, value );
- });
- }, null, value, arguments.length > 1, null, true );
+ }) :
+
+ // Gets one value
+ // Try to fetch any internally stored data first
+ elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
},
removeData: function( key ) {
@@ -1922,7 +3935,6 @@ jQuery.extend({
startLength--;
}
- hooks.cur = fn;
if ( fn ) {
// Add a progress sentinel to prevent the fx queue from being
@@ -2033,11 +4045,10 @@ jQuery.fn.extend({
}
});
var nodeHook, boolHook,
- rclass = /[\t\r\n]/g,
+ rclass = /[\t\r\n\f]/g,
rreturn = /\r/g,
rfocusable = /^(?:input|select|textarea|button|object)$/i,
rclickable = /^(?:a|area)$/i,
- rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,
ruseDefault = /^(?:checked|selected)$/i,
getSetAttribute = jQuery.support.getSetAttribute,
getSetInput = jQuery.support.input;
@@ -2146,8 +4157,11 @@ jQuery.fn.extend({
},
toggleClass: function( value, stateVal ) {
- var type = typeof value,
- isBool = typeof stateVal === "boolean";
+ var type = typeof value;
+
+ if ( typeof stateVal === "boolean" && type === "string" ) {
+ return stateVal ? this.addClass( value ) : this.removeClass( value );
+ }
if ( jQuery.isFunction( value ) ) {
return this.each(function( i ) {
@@ -2161,13 +4175,15 @@ jQuery.fn.extend({
var className,
i = 0,
self = jQuery( this ),
- state = stateVal,
classNames = value.match( core_rnotwhite ) || [];
while ( (className = classNames[ i++ ]) ) {
// check each className given, space separated list
- state = isBool ? state : !self.hasClass( className );
- self[ state ? "addClass" : "removeClass" ]( className );
+ if ( self.hasClass( className ) ) {
+ self.removeClass( className );
+ } else {
+ self.addClass( className );
+ }
}
// Toggle whole class name
@@ -2226,15 +4242,14 @@ jQuery.fn.extend({
isFunction = jQuery.isFunction( value );
return this.each(function( i ) {
- var val,
- self = jQuery(this);
+ var val;
if ( this.nodeType !== 1 ) {
return;
}
if ( isFunction ) {
- val = value.call( this, i, self.val() );
+ val = value.call( this, i, jQuery( this ).val() );
} else {
val = value;
}
@@ -2264,10 +4279,11 @@ 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;
+ // Use proper attribute retrieval(#6932, #12072)
+ var val = jQuery.find.attr( elem, "value" );
+ return val != null ?
+ val :
+ elem.text;
}
},
select: {
@@ -2309,13 +4325,20 @@ jQuery.extend({
},
set: function( elem, value ) {
- var values = jQuery.makeArray( value );
+ var optionSet, option,
+ options = elem.options,
+ values = jQuery.makeArray( value ),
+ i = options.length;
- jQuery(elem).find("option").each(function() {
- this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
- });
+ while ( i-- ) {
+ option = options[ i ];
+ if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
+ optionSet = true;
+ }
+ }
- if ( !values.length ) {
+ // force browsers to behave consistently when non-matching value is set
+ if ( !optionSet ) {
elem.selectedIndex = -1;
}
return values;
@@ -2324,7 +4347,7 @@ jQuery.extend({
},
attr: function( elem, name, value ) {
- var hooks, notxml, ret,
+ var hooks, ret,
nType = elem.nodeType;
// don't get/set attributes on text, comment and attribute nodes
@@ -2337,13 +4360,12 @@ jQuery.extend({
return jQuery.prop( elem, name, value );
}
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
// All attributes are lowercase
// Grab necessary hook if one is defined
- if ( notxml ) {
+ if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+ hooks = jQuery.attrHooks[ name ] ||
+ ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
}
if ( value !== undefined ) {
@@ -2351,7 +4373,7 @@ jQuery.extend({
if ( value === null ) {
jQuery.removeAttr( elem, name );
- } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
return ret;
} else {
@@ -2359,16 +4381,11 @@ jQuery.extend({
return value;
}
- } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
return ret;
} else {
-
- // In IE9+, Flash objects don't have .getAttribute (#12945)
- // Support: IE9+
- if ( typeof elem.getAttribute !== core_strundefined ) {
- ret = elem.getAttribute( name );
- }
+ ret = jQuery.find.attr( elem, name );
// Non-existent attributes return null, we normalize to undefined
return ret == null ?
@@ -2387,14 +4404,15 @@ jQuery.extend({
propName = jQuery.propFix[ name ] || name;
// Boolean attributes get special treatment (#10870)
- if ( rboolean.test( name ) ) {
- // Set corresponding property to false for boolean attributes
- // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8
- if ( !getSetAttribute && ruseDefault.test( name ) ) {
+ if ( jQuery.expr.match.bool.test( name ) ) {
+ // Set corresponding property to false
+ if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
+ elem[ propName ] = false;
+ // Support: IE<9
+ // Also clear defaultChecked/defaultSelected (if appropriate)
+ } else {
elem[ jQuery.camelCase( "default-" + name ) ] =
elem[ propName ] = false;
- } else {
- elem[ propName ] = false;
}
// See #9699 for explanation of this approach (setting first, then removal)
@@ -2425,18 +4443,8 @@ jQuery.extend({
},
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"
+ "class": "className"
},
prop: function( elem, name, value ) {
@@ -2457,20 +4465,14 @@ jQuery.extend({
}
if ( value !== undefined ) {
- if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- return ( elem[ name ] = value );
- }
+ return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
+ ret :
+ ( elem[ name ] = value );
} else {
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- return elem[ name ];
- }
+ return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
+ ret :
+ elem[ name ];
}
},
@@ -2479,44 +4481,21 @@ jQuery.extend({
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");
+ // Use proper attribute retrieval(#12072)
+ var tabindex = jQuery.find.attr( elem, "tabindex" );
- return attributeNode && attributeNode.specified ?
- parseInt( attributeNode.value, 10 ) :
+ return tabindex ?
+ parseInt( tabindex, 10 ) :
rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
0 :
- undefined;
+ -1;
}
}
}
});
-// Hook for boolean attributes
+// Hooks for boolean attributes
boolHook = {
- get: function( elem, name ) {
- var
- // Use .prop to determine if this attribute is understood as boolean
- prop = jQuery.prop( elem, name ),
-
- // Fetch it accordingly
- attr = typeof prop === "boolean" && elem.getAttribute( name ),
- detail = typeof prop === "boolean" ?
-
- getSetInput && getSetAttribute ?
- attr != null :
- // oldIE fabricates an empty string for missing boolean attributes
- // and conflates checked/selected into attroperties
- ruseDefault.test( name ) ?
- elem[ jQuery.camelCase( "default-" + name ) ] :
- !!attr :
-
- // fetch an attribute node for properties not recognized as boolean
- elem.getAttributeNode( name );
-
- return detail && detail.value !== false ?
- name.toLowerCase() :
- undefined;
- },
set: function( elem, value, name ) {
if ( value === false ) {
// Remove boolean attributes when set to false
@@ -2533,19 +4512,35 @@ boolHook = {
return name;
}
};
+jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
+ var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
+
+ jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
+ function( elem, name, isXML ) {
+ var fn = jQuery.expr.attrHandle[ name ],
+ ret = isXML ?
+ undefined :
+ /* jshint eqeqeq: false */
+ (jQuery.expr.attrHandle[ name ] = undefined) !=
+ getter( elem, name, isXML ) ?
+
+ name.toLowerCase() :
+ null;
+ jQuery.expr.attrHandle[ name ] = fn;
+ return ret;
+ } :
+ function( elem, name, isXML ) {
+ return isXML ?
+ undefined :
+ elem[ jQuery.camelCase( "default-" + name ) ] ?
+ name.toLowerCase() :
+ null;
+ };
+});
-// fix oldIE value attroperty
+// fix oldIE attroperties
if ( !getSetInput || !getSetAttribute ) {
jQuery.attrHooks.value = {
- get: function( elem, name ) {
- var ret = elem.getAttributeNode( name );
- return jQuery.nodeName( elem, "input" ) ?
-
- // Ignore the value *property* by using defaultValue
- elem.defaultValue :
-
- ret && ret.specified ? ret.value : undefined;
- },
set: function( elem, value, name ) {
if ( jQuery.nodeName( elem, "input" ) ) {
// Does not return so that setAttribute is also used
@@ -2563,13 +4558,7 @@ if ( !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 = elem.getAttributeNode( name );
- return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ?
- ret.value :
- undefined;
- },
+ nodeHook = {
set: function( elem, value, name ) {
// Set the existing or create a new attribute node
var ret = elem.getAttributeNode( name );
@@ -2587,11 +4576,29 @@ if ( !getSetAttribute ) {
undefined;
}
};
+ jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =
+ // Some attributes are constructed with empty-string values when not defined
+ function( elem, name, isXML ) {
+ var ret;
+ return isXML ?
+ undefined :
+ (ret = elem.getAttributeNode( name )) && ret.value !== "" ?
+ ret.value :
+ null;
+ };
+ jQuery.valHooks.button = {
+ get: function( elem, name ) {
+ var ret = elem.getAttributeNode( name );
+ return ret && ret.specified ?
+ ret.value :
+ undefined;
+ },
+ set: nodeHook.set
+ };
// Set contenteditable to false on removals(#10429)
// Setting to empty string throws an error as an invalid value
jQuery.attrHooks.contenteditable = {
- get: nodeHook.get,
set: function( elem, value, name ) {
nodeHook.set( elem, value === "" ? false : value, name );
}
@@ -2600,14 +4607,14 @@ if ( !getSetAttribute ) {
// 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 ], {
+ jQuery.attrHooks[ name ] = {
set: function( elem, value ) {
if ( value === "" ) {
elem.setAttribute( name, "auto" );
return value;
}
}
- });
+ };
});
}
@@ -2615,15 +4622,6 @@ if ( !getSetAttribute ) {
// Some attributes require a special call on IE
// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
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;
- }
- });
- });
-
// href/src property should get the full normalized URL (#10299/#12915)
jQuery.each([ "href", "src" ], function( i, name ) {
jQuery.propHooks[ name ] = {
@@ -2651,7 +4649,7 @@ if ( !jQuery.support.style ) {
// 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, {
+ jQuery.propHooks.selected = {
get: function( elem ) {
var parent = elem.parentNode;
@@ -2665,33 +4663,45 @@ if ( !jQuery.support.optSelected ) {
}
return null;
}
- });
+ };
}
+jQuery.each([
+ "tabIndex",
+ "readOnly",
+ "maxLength",
+ "cellSpacing",
+ "cellPadding",
+ "rowSpan",
+ "colSpan",
+ "useMap",
+ "frameBorder",
+ "contentEditable"
+], function() {
+ jQuery.propFix[ this.toLowerCase() ] = this;
+});
+
// IE6/7 call enctype encoding
if ( !jQuery.support.enctype ) {
jQuery.propFix.enctype = "encoding";
}
// 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 ], {
+ jQuery.valHooks[ this ] = {
set: function( elem, value ) {
if ( jQuery.isArray( value ) ) {
return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
}
}
- });
+ };
+ if ( !jQuery.support.checkOn ) {
+ jQuery.valHooks[ this ].get = function( elem ) {
+ // Support: Webkit
+ // "" is returned instead of "on" if a value isn't specified
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ };
+ }
});
var rformElems = /^(?:input|select|textarea)$/i,
rkeyEvent = /^key/,
@@ -2707,6 +4717,12 @@ function returnFalse() {
return false;
}
+function safeActiveElement() {
+ try {
+ return document.activeElement;
+ } catch ( err ) { }
+}
+
/*
* Helper functions for managing events -- not part of the public interface.
* Props to Dean Edwards' addEvent library for many of the ideas.
@@ -2755,7 +4771,6 @@ jQuery.event = {
}
// Handle multiple events separated by a space
- // jQuery(...).bind("mouseover mouseout", fn);
types = ( types || "" ).match( core_rnotwhite ) || [""];
t = types.length;
while ( t-- ) {
@@ -2763,6 +4778,11 @@ jQuery.event = {
type = origType = tmp[1];
namespaces = ( tmp[2] || "" ).split( "." ).sort();
+ // There *must* be a type, no attaching namespace-only handlers
+ if ( !type ) {
+ continue;
+ }
+
// If event changes its type, use the special event handlers for the changed type
special = jQuery.event.special[ type ] || {};
@@ -2930,7 +4950,8 @@ jQuery.event = {
event :
new jQuery.Event( type, typeof event === "object" && event );
- event.isTrigger = true;
+ // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+ event.isTrigger = onlyHandlers ? 2 : 3;
event.namespace = namespaces.join(".");
event.namespace_re = event.namespace ?
new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
@@ -2997,8 +5018,8 @@ jQuery.event = {
// If nobody prevented the default action, do it now
if ( !onlyHandlers && !event.isDefaultPrevented() ) {
- if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
- !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+ if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
+ 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.
@@ -3102,7 +5123,9 @@ jQuery.event = {
// Avoid non-left-click bubbling in Firefox (#3861)
if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+ /* jshint eqeqeq: false */
for ( ; cur != this; cur = cur.parentNode || this ) {
+ /* jshint eqeqeq: true */
// Don't check non-elements (#13208)
// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
@@ -3239,19 +5262,10 @@ jQuery.event = {
// Prevent triggered image.load events from bubbling to window.load
noBubble: true
},
- click: {
- // For checkbox, fire native event so checked state will be right
- trigger: function() {
- if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
- this.click();
- return false;
- }
- }
- },
focus: {
// Fire native event if possible so blur/focus sequence is correct
trigger: function() {
- if ( this !== document.activeElement && this.focus ) {
+ if ( this !== safeActiveElement() && this.focus ) {
try {
this.focus();
return false;
@@ -3266,13 +5280,27 @@ jQuery.event = {
},
blur: {
trigger: function() {
- if ( this === document.activeElement && this.blur ) {
+ if ( this === safeActiveElement() && this.blur ) {
this.blur();
return false;
}
},
delegateType: "focusout"
},
+ click: {
+ // For checkbox, fire native event so checked state will be right
+ trigger: function() {
+ if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
+ this.click();
+ return false;
+ }
+ },
+
+ // For cross-browser consistency, don't fire native .click() on links
+ _default: function( event ) {
+ return jQuery.nodeName( event.target, "a" );
+ }
+ },
beforeunload: {
postDispatch: function( event ) {
@@ -3292,7 +5320,8 @@ jQuery.event = {
var e = jQuery.extend(
new jQuery.Event(),
event,
- { type: type,
+ {
+ type: type,
isSimulated: true,
originalEvent: {}
}
@@ -3657,21 +5686,6 @@ jQuery.fn.extend({
});
},
- bind: function( types, data, fn ) {
- return this.on( types, null, data, fn );
- },
- unbind: function( types, fn ) {
- return this.off( types, null, fn );
- },
-
- delegate: function( selector, types, data, fn ) {
- return this.on( types, selector, data, fn );
- },
- undelegate: function( selector, types, fn ) {
- // ( namespace ) or ( selector, types [, fn] )
- return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
- },
-
trigger: function( type, data ) {
return this.each(function() {
jQuery.event.trigger( type, data, this );
@@ -3684,1868 +5698,8 @@ jQuery.fn.extend({
}
}
});
-/*!
- * Sizzle CSS Selector Engine
- * Copyright 2012 jQuery Foundation and other contributors
- * Released under the MIT license
- * http://sizzlejs.com/
- */
-(function( window, undefined ) {
-
-var i,
- cachedruns,
- Expr,
- getText,
- isXML,
- compile,
- hasDuplicate,
- outermostContext,
-
- // Local document vars
- setDocument,
- document,
- docElem,
- documentIsXML,
- rbuggyQSA,
- rbuggyMatches,
- matches,
- contains,
- sortOrder,
-
- // Instance-specific data
- expando = "sizzle" + -(new Date()),
- preferredDoc = window.document,
- support = {},
- dirruns = 0,
- done = 0,
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
-
- // General-purpose constants
- strundefined = typeof undefined,
- MAX_NEGATIVE = 1 << 31,
-
- // Array methods
- arr = [],
- pop = arr.pop,
- push = arr.push,
- slice = arr.slice,
- // Use a stripped-down indexOf if we can't use a native one
- indexOf = arr.indexOf || function( elem ) {
- var i = 0,
- len = this.length;
- for ( ; i < len; i++ ) {
- if ( this[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
-
- // Regular expressions
-
- // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
- // http://www.w3.org/TR/css3-syntax/#characters
- characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
- // Loosely modeled on CSS identifier characters
- // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
- // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = characterEncoding.replace( "w", "w#" ),
-
- // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
- operators = "([*^$|!~]?=)",
- attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
- "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
-
- // Prefer arguments quoted,
- // then not containing pseudos/brackets,
- // then attribute selectors/non-parenthetical expressions,
- // then anything else
- // These preferences are here to reduce the number of selectors
- // needing tokenize in the PSEUDO preFilter
- pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
- rpseudo = new RegExp( pseudos ),
- ridentifier = new RegExp( "^" + identifier + "$" ),
-
- matchExpr = {
- "ID": new RegExp( "^#(" + characterEncoding + ")" ),
- "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
- "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
- "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- // For use in libraries implementing .is()
- // We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
- },
-
- rsibling = /[\x20\t\r\n\f]*[+~]/,
-
- rnative = /^[^{]+\{\s*\[native code/,
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
- rescape = /'|\\/g,
- rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
-
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,
- funescape = function( _, escaped ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- return high !== high ?
- escaped :
- // BMP codepoint
- high < 0 ?
- String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- };
-
-// Use a stripped-down slice if we can't use a native one
-try {
- slice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType;
-} catch ( e ) {
- slice = function( i ) {
- var elem,
- results = [];
- while ( (elem = this[i++]) ) {
- results.push( elem );
- }
- return results;
- };
-}
-
-/**
- * For feature detection
- * @param {Function} fn The function to test for native support
- */
-function isNative( fn ) {
- return rnative.test( fn + "" );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var cache,
- keys = [];
-
- return (cache = function( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key += " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- return (cache[ key ] = value);
- });
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return fn( div );
- } catch (e) {
- return false;
- } finally {
- // release memory in IE
- div = null;
- }
-}
-
-function Sizzle( selector, context, results, seed ) {
- var match, elem, m, nodeType,
- // QSA vars
- i, groups, old, nid, newContext, newSelector;
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
-
- context = context || document;
- results = results || [];
-
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
- if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
- return [];
- }
-
- if ( !documentIsXML && !seed ) {
-
- // Shortcuts
- if ( (match = rquickExpr.exec( selector )) ) {
- // Speed-up: Sizzle("#ID")
- if ( (m = match[1]) ) {
- if ( nodeType === 9 ) {
- elem = context.getElementById( m );
- // 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, Opera, and Webkit return items
- // by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
- } else {
- // Context is not a document
- if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
- contains( context, elem ) && elem.id === m ) {
- results.push( elem );
- return results;
- }
- }
-
- // Speed-up: Sizzle("TAG")
- } else if ( match[2] ) {
- push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );
- return results;
-
- // Speed-up: Sizzle(".CLASS")
- } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) {
- push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );
- return results;
- }
- }
-
- // QSA path
- if ( support.qsa && !rbuggyQSA.test(selector) ) {
- old = true;
- nid = expando;
- newContext = context;
- newSelector = nodeType === 9 && selector;
-
- // 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
- if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
- groups = tokenize( selector );
-
- if ( (old = context.getAttribute("id")) ) {
- nid = old.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", nid );
- }
- nid = "[id='" + nid + "'] ";
-
- i = groups.length;
- while ( i-- ) {
- groups[i] = nid + toSelector( groups[i] );
- }
- newContext = rsibling.test( selector ) && context.parentNode || context;
- newSelector = groups.join(",");
- }
-
- if ( newSelector ) {
- try {
- push.apply( results, slice.call( newContext.querySelectorAll(
- newSelector
- ), 0 ) );
- return results;
- } catch(qsaError) {
- } finally {
- if ( !old ) {
- context.removeAttribute("id");
- }
- }
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Detect xml
- * @param {Element|Object} elem An element or a document
- */
-isXML = 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).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
- var doc = node ? node.ownerDocument || node : preferredDoc;
-
- // If no document and documentElement is available, return
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
- return document;
- }
-
- // Set our document
- document = doc;
- docElem = doc.documentElement;
-
- // Support tests
- documentIsXML = isXML( doc );
-
- // Check if getElementsByTagName("*") returns only elements
- support.tagNameNoComments = assert(function( div ) {
- div.appendChild( doc.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
-
- // Check if attributes should be retrieved by attribute nodes
- support.attributes = assert(function( div ) {
- div.innerHTML = "<select></select>";
- var type = typeof div.lastChild.getAttribute("multiple");
- // IE8 returns a string for some attributes even when not present
- return type !== "boolean" && type !== "string";
- });
-
- // Check if getElementsByClassName can be trusted
- support.getByClassName = assert(function( div ) {
- // Opera can't find a second classname (in 9.6)
- div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>";
- if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
- return false;
- }
-
- // Safari 3.2 caches class attributes and doesn't catch changes
- div.lastChild.className = "e";
- return div.getElementsByClassName("e").length === 2;
- });
-
- // Check if getElementById returns elements by name
- // Check if getElementsByName privileges form controls or returns elements by ID
- support.getByName = assert(function( div ) {
- // Inject content
- div.id = expando + 0;
- div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>";
- docElem.insertBefore( div, docElem.firstChild );
-
- // Test
- var pass = doc.getElementsByName &&
- // buggy browsers will return fewer than the correct 2
- doc.getElementsByName( expando ).length === 2 +
- // buggy browsers will return more than the correct 0
- doc.getElementsByName( expando + 0 ).length;
- support.getIdNotName = !doc.getElementById( expando );
-
- // Cleanup
- docElem.removeChild( div );
-
- return pass;
- });
-
- // IE6/7 return modified attributes
- Expr.attrHandle = assert(function( div ) {
- div.innerHTML = "<a href='#'></a>";
- return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
- div.firstChild.getAttribute("href") === "#";
- }) ?
- {} :
- {
- "href": function( elem ) {
- return elem.getAttribute( "href", 2 );
- },
- "type": function( elem ) {
- return elem.getAttribute("type");
- }
- };
-
- // ID find and filter
- if ( support.getIdNotName ) {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== strundefined && !documentIsXML ) {
- var m = context.getElementById( id );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- return m && m.parentNode ? [m] : [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- return elem.getAttribute("id") === attrId;
- };
- };
- } else {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== strundefined && !documentIsXML ) {
- var m = context.getElementById( id );
-
- return m ?
- m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
- [m] :
- undefined :
- [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- };
- }
-
- // Tag
- Expr.find["TAG"] = support.tagNameNoComments ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== strundefined ) {
- return context.getElementsByTagName( tag );
- }
- } :
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- while ( (elem = results[i++]) ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- };
-
- // Name
- Expr.find["NAME"] = support.getByName && function( tag, context ) {
- if ( typeof context.getElementsByName !== strundefined ) {
- return context.getElementsByName( name );
- }
- };
-
- // Class
- Expr.find["CLASS"] = support.getByClassName && function( className, context ) {
- if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) {
- return context.getElementsByClassName( className );
- }
- };
-
- // QSA and matchesSelector support
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21),
- // no need to also add to buggyMatches since matches checks buggyQSA
- // A support test would require too much code (would include document ready)
- rbuggyQSA = [ ":focus" ];
-
- if ( (support.qsa = isNative(doc.querySelectorAll)) ) {
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explictly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- div.innerHTML = "<select><option selected=''></option></select>";
-
- // IE8 - Some boolean attributes are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
- });
-
- assert(function( div ) {
-
- // Opera 10-12/IE8 - ^= $= *= and empty values
- // Should not select anything
- div.innerHTML = "<input type='hidden' i=''/>";
- if ( div.querySelectorAll("[i^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Opera 10-11 does not throw on post-comma invalid pseudos
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
- }
-
- if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.webkitMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
-
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( div, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- });
- }
-
- rbuggyQSA = new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = new RegExp( rbuggyMatches.join("|") );
-
- // Element contains another
- // Purposefully does not implement inclusive descendent
- // As in, an element does not contain itself
- contains = isNative(docElem.contains) || docElem.compareDocumentPosition ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- // Document order sorting
- sortOrder = docElem.compareDocumentPosition ?
- function( a, b ) {
- var compare;
-
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) {
- if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) {
- if ( a === doc || contains( preferredDoc, a ) ) {
- return -1;
- }
- if ( b === doc || contains( preferredDoc, b ) ) {
- return 1;
- }
- return 0;
- }
- return compare & 4 ? -1 : 1;
- }
-
- return a.compareDocumentPosition ? -1 : 1;
- } :
- function( a, b ) {
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // Exit early if the nodes are identical
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
-
- // Parentless nodes are either documents or disconnected
- } else if ( !aup || !bup ) {
- return a === doc ? -1 :
- b === doc ? 1 :
- aup ? -1 :
- bup ? 1 :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( (cur = cur.parentNode) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( (cur = cur.parentNode) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
- i++;
- }
-
- return i ?
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
-
- // Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
- 0;
- };
-
- // Always assume the presence of duplicates if sort doesn't
- // pass them to our comparison function (as in Google Chrome).
- hasDuplicate = false;
- [0, 0].sort( sortOrder );
- support.detectDuplicates = hasDuplicate;
-
- return document;
-};
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- // rbuggyQSA always contains :focus, so no need for an existence check
- if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) {
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch(e) {}
- }
-
- return Sizzle( expr, document, null, [elem] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
- // Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
- setDocument( context );
- }
- return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
- var val;
-
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- if ( !documentIsXML ) {
- name = name.toLowerCase();
- }
- if ( (val = Expr.attrHandle[ name ]) ) {
- return val( elem );
- }
- if ( documentIsXML || support.attributes ) {
- return elem.getAttribute( name );
- }
- return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ?
- name :
- val && val.specified ? val.value : null;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-// Document sorting and removing duplicates
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- i = 1,
- j = 0;
-
- // Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- for ( ; (elem = results[i]); i++ ) {
- if ( elem === results[ i - 1 ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- return results;
-};
-
-function siblingCheck( a, b ) {
- var cur = b && a,
- diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE );
-
- // Use IE sourceIndex if available on both nodes
- if ( diff ) {
- return diff;
- }
-
- // Check if b follows a
- if ( cur ) {
- while ( (cur = cur.nextSibling) ) {
- if ( cur === b ) {
- return -1;
- }
- }
- }
-
- return a ? 1 : -1;
-}
-
-// Returns a function to use in pseudos for input types
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-// Returns a function to use in pseudos for buttons
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-// Returns a function to use in pseudos for positionals
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
- // If no nodeType, this is expected to be an array
- for ( ; (node = elem[i]); i++ ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (see #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
-
- return ret;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- find: {},
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 what (child|of-type)
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 4 xn-component of xn+y argument ([+-]?\d*n|)
- 5 sign of xn-component
- 6 x of xn-component
- 7 sign of y-component
- 8 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1].slice( 0, 3 ) === "nth" ) {
- // nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var excess,
- unquoted = !match[5] && match[2];
-
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- // Accept quoted arguments as-is
- if ( match[4] ) {
- match[2] = match[4];
-
- // Strip excess characters from unquoted arguments
- } else if ( unquoted && rpseudo.test( unquoted ) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
-
- "TAG": function( nodeName ) {
- if ( nodeName === "*" ) {
- return function() { return true; };
- }
-
- nodeName = nodeName.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.slice( -check.length ) === check :
- operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, what, argument, first, last ) {
- var simple = type.slice( 0, 3 ) !== "nth",
- forward = type.slice( -4 ) !== "last",
- ofType = what === "of-type";
-
- return first === 1 && last === 0 ?
-
- // Shortcut for :nth-*(n)
- function( elem ) {
- return !!elem.parentNode;
- } :
-
- function( elem, context, xml ) {
- var cache, outerCache, node, diff, nodeIndex, start,
- dir = simple !== forward ? "nextSibling" : "previousSibling",
- parent = elem.parentNode,
- name = ofType && elem.nodeName.toLowerCase(),
- useCache = !xml && !ofType;
-
- if ( parent ) {
-
- // :(first|last|only)-(child|of-type)
- if ( simple ) {
- while ( dir ) {
- node = elem;
- while ( (node = node[ dir ]) ) {
- if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
- return false;
- }
- }
- // Reverse direction for :only-* (if we haven't yet done so)
- start = dir = type === "only" && !start && "nextSibling";
- }
- return true;
- }
-
- start = [ forward ? parent.firstChild : parent.lastChild ];
-
- // non-xml :nth-child(...) stores cache data on `parent`
- if ( forward && useCache ) {
- // Seek `elem` from a previously-cached index
- outerCache = parent[ expando ] || (parent[ expando ] = {});
- cache = outerCache[ type ] || [];
- nodeIndex = cache[0] === dirruns && cache[1];
- diff = cache[0] === dirruns && cache[2];
- node = nodeIndex && parent.childNodes[ nodeIndex ];
-
- while ( (node = ++nodeIndex && node && node[ dir ] ||
-
- // Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- // When found, cache indexes on `parent` and break
- if ( node.nodeType === 1 && ++diff && node === elem ) {
- outerCache[ type ] = [ dirruns, nodeIndex, diff ];
- break;
- }
- }
-
- // Use previously-cached element index if available
- } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
- diff = cache[1];
-
- // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
- } else {
- // Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
- // Cache the index of each encountered element
- if ( useCache ) {
- (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
- }
-
- if ( node === elem ) {
- break;
- }
- }
- }
- }
-
- // Incorporate the offset, then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf.call( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- // Potentially complex pseudos
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- // "Whether an element is represented by a :lang() selector
- // is based solely on the element's language value
- // being equal to the identifier C,
- // or beginning with the identifier C immediately followed by "-".
- // The matching of C against the element's language value is performed case-insensitively.
- // The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
- // lang value must be a valid identifider
- if ( !ridentifier.test(lang || "") ) {
- Sizzle.error( "unsupported lang: " + lang );
- }
- lang = lang.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- var elemLang;
- do {
- if ( (elemLang = documentIsXML ?
- elem.getAttribute("xml:lang") || elem.getAttribute("lang") :
- elem.lang) ) {
-
- elemLang = elemLang.toLowerCase();
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
- }
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
- return false;
- };
- }),
-
- // Miscellaneous
- "target": function( elem ) {
- var hash = window.location && window.location.hash;
- return hash && hash.slice( 1 ) === elem.id;
- },
-
- "root": function( elem ) {
- return elem === docElem;
- },
-
- "focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- // Boolean properties
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "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;
- },
-
- // Contents
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
- // not comment, processing instructions, or others
- // Thanks to Diego Perini for the nodeName shortcut
- // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
- return false;
- }
- }
- return true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- // Element/input types
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "text": function( elem ) {
- var attr;
- // 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" &&
- elem.type === "text" &&
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
- },
-
- // Position-in-collection
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 0;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 1;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
- Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
- Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-function tokenize( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( tokens = [] );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- matched = match.shift();
- tokens.push( {
- value: matched,
- // Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- } );
- soFar = soFar.slice( matched.length );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
- matched = match.shift();
- tokens.push( {
- value: matched,
- type: type,
- matches: match
- } );
- soFar = soFar.slice( matched.length );
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-}
-
-function toSelector( tokens ) {
- var i = 0,
- len = tokens.length,
- selector = "";
- for ( ; i < len; i++ ) {
- selector += tokens[i].value;
- }
- return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- var data, cache, outerCache,
- dirkey = dirruns + " " + doneName;
-
- // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
- if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- if ( matcher( elem, context, xml ) ) {
- return true;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
- if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
- if ( (data = cache[1]) === true || data === cachedruns ) {
- return data === true;
- }
- } else {
- cache = outerCache[ dir ] = [ dirkey ];
- cache[1] = matcher( elem, context, xml ) || cachedruns;
- if ( cache[1] === true ) {
- return true;
- }
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf.call( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && toSelector( tokens )
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- // A counter to specify which element is currently being matched
- var matcherCachedRuns = 0,
- bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, expandContext ) {
- var elem, j, matcher,
- setMatched = [],
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- outermost = expandContext != null,
- contextBackup = outermostContext,
- // We must always have either seed elements or context
- elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
- // Use integer dirruns iff this is the outermost matcher
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
-
- if ( outermost ) {
- outermostContext = context !== document && context;
- cachedruns = matcherCachedRuns;
- }
-
- // Add elements passing elementMatchers directly to results
- // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
- for ( ; (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- j = 0;
- while ( (matcher = elementMatchers[j++]) ) {
- if ( matcher( elem, context, xml ) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- cachedruns = ++matcherCachedRuns;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // Apply set filters to unmatched elements
- matchedCount += i;
- if ( bySet && i !== matchedCount ) {
- j = 0;
- while ( (matcher = setMatchers[j++]) ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !group ) {
- group = tokenize( selector );
- }
- i = group.length;
- while ( i-- ) {
- cached = matcherFromTokens( group[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
- }
- return cached;
-};
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function select( selector, context, results, seed ) {
- var i, tokens, token, type, find,
- match = tokenize( selector );
-
- if ( !seed ) {
- // Try to minimize operations if there is only one group
- if ( match.length === 1 ) {
-
- // Take a shortcut and set the context if the root selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- context.nodeType === 9 && !documentIsXML &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0];
- if ( !context ) {
- return results;
- }
-
- selector = selector.slice( tokens.shift().value.length );
- }
-
- // Fetch a seed set for right-to-left matching
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
- while ( i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && context.parentNode || context
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, slice.call( seed, 0 ) );
- return results;
- }
-
- break;
- }
- }
- }
- }
- }
-
- // Compile and execute a filtering function
- // Provide `match` to avoid retokenization if we modified the selector above
- compile( selector, match )(
- seed,
- context,
- documentIsXML,
- results,
- rsibling.test( selector )
- );
- return results;
-}
-
-// Deprecated
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Easy API for creating new setFilters
-function setFilters() {}
-Expr.filters = setFilters.prototype = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-// Initialize with the default document
-setDocument();
-
-// Override sizzle attribute retrieval
-Sizzle.attr = jQuery.attr;
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.pseudos;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-})( window );
-var runtil = /Until$/,
+var isSimple = /^.[^:#\[\.,]*$/,
rparentsprev = /^(?:parents|prev(?:Until|All))/,
- isSimple = /^.[^:#\[\.,]*$/,
rneedsContext = jQuery.expr.match.needsContext,
// methods guaranteed to produce a unique set when starting from a unique set
guaranteedUnique = {
@@ -5557,11 +5711,12 @@ var runtil = /Until$/,
jQuery.fn.extend({
find: function( selector ) {
- var i, ret, self,
- len = this.length;
+ var i,
+ ret = [],
+ self = this,
+ len = self.length;
if ( typeof selector !== "string" ) {
- self = this;
return this.pushStack( jQuery( selector ).filter(function() {
for ( i = 0; i < len; i++ ) {
if ( jQuery.contains( self[ i ], this ) ) {
@@ -5571,14 +5726,13 @@ jQuery.fn.extend({
}) );
}
- ret = [];
for ( i = 0; i < len; i++ ) {
- jQuery.find( selector, this[ i ], ret );
+ jQuery.find( selector, self[ i ], ret );
}
// Needed because $( selector, context ) becomes $( context ).find( selector )
ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
- ret.selector = ( this.selector ? this.selector + " " : "" ) + selector;
+ ret.selector = this.selector ? this.selector + " " + selector : selector;
return ret;
},
@@ -5597,22 +5751,24 @@ jQuery.fn.extend({
},
not: function( selector ) {
- return this.pushStack( winnow(this, selector, false) );
+ return this.pushStack( winnow(this, selector || [], true) );
},
filter: function( selector ) {
- return this.pushStack( winnow(this, selector, true) );
+ return this.pushStack( winnow(this, selector || [], false) );
},
is: function( selector ) {
- return !!selector && (
- typeof selector === "string" ?
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- rneedsContext.test( selector ) ?
- jQuery( selector, this.context ).index( this[0] ) >= 0 :
- jQuery.filter( selector, this ).length > 0 :
- this.filter( selector ).length > 0 );
+ return !!winnow(
+ this,
+
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ typeof selector === "string" && rneedsContext.test( selector ) ?
+ jQuery( selector ) :
+ selector || [],
+ false
+ ).length;
},
closest: function( selectors, context ) {
@@ -5625,14 +5781,18 @@ jQuery.fn.extend({
0;
for ( ; i < l; i++ ) {
- cur = this[i];
+ for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
+ // Always skip document fragments
+ if ( cur.nodeType < 11 && (pos ?
+ pos.index(cur) > -1 :
+
+ // Don't pass non-elements to Sizzle
+ cur.nodeType === 1 &&
+ jQuery.find.matchesSelector(cur, selectors)) ) {
- while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {
- if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
- ret.push( cur );
+ cur = ret.push( cur );
break;
}
- cur = cur.parentNode;
}
}
@@ -5675,8 +5835,6 @@ jQuery.fn.extend({
}
});
-jQuery.fn.andSelf = jQuery.fn.addBack;
-
function sibling( cur, dir ) {
do {
cur = cur[ dir ];
@@ -5729,7 +5887,7 @@ jQuery.each({
jQuery.fn[ name ] = function( until, selector ) {
var ret = jQuery.map( this, fn, until );
- if ( !runtil.test( name ) ) {
+ if ( name.slice( -5 ) !== "Until" ) {
selector = until;
}
@@ -5737,10 +5895,16 @@ jQuery.each({
ret = jQuery.filter( selector, ret );
}
- ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+ if ( this.length > 1 ) {
+ // Remove duplicates
+ if ( !guaranteedUnique[ name ] ) {
+ ret = jQuery.unique( ret );
+ }
- if ( this.length > 1 && rparentsprev.test( name ) ) {
- ret = ret.reverse();
+ // Reverse order for parents* and prev-derivatives
+ if ( rparentsprev.test( name ) ) {
+ ret = ret.reverse();
+ }
}
return this.pushStack( ret );
@@ -5749,13 +5913,17 @@ jQuery.each({
jQuery.extend({
filter: function( expr, elems, not ) {
+ var elem = elems[ 0 ];
+
if ( not ) {
expr = ":not(" + expr + ")";
}
- return elems.length === 1 ?
- jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
- jQuery.find.matches(expr, elems);
+ return elems.length === 1 && elem.nodeType === 1 ?
+ jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+ jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+ return elem.nodeType === 1;
+ }));
},
dir: function( elem, dir, until ) {
@@ -5785,37 +5953,32 @@ jQuery.extend({
});
// 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;
-
+function winnow( elements, qualifier, not ) {
if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep(elements, function( elem, i ) {
- var retVal = !!qualifier.call( elem, i, elem );
- return retVal === keep;
+ return jQuery.grep( elements, function( elem, i ) {
+ /* jshint -W018 */
+ return !!qualifier.call( elem, i, elem ) !== not;
});
- } else if ( qualifier.nodeType ) {
- return jQuery.grep(elements, function( elem ) {
- return ( elem === qualifier ) === keep;
- });
+ }
- } else if ( typeof qualifier === "string" ) {
- var filtered = jQuery.grep(elements, function( elem ) {
- return elem.nodeType === 1;
+ if ( qualifier.nodeType ) {
+ return jQuery.grep( elements, function( elem ) {
+ return ( elem === qualifier ) !== not;
});
+ }
+
+ if ( typeof qualifier === "string" ) {
if ( isSimple.test( qualifier ) ) {
- return jQuery.filter(qualifier, filtered, !keep);
- } else {
- qualifier = jQuery.filter( qualifier, filtered );
+ return jQuery.filter( qualifier, elements, not );
}
+
+ qualifier = jQuery.filter( qualifier, elements );
}
- return jQuery.grep(elements, function( elem ) {
- return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
+ return jQuery.grep( elements, function( elem ) {
+ return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
});
}
function createSafeFragment( document ) {
@@ -5880,89 +6043,26 @@ jQuery.fn.extend({
}, null, value, arguments.length );
},
- 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 ) {
- var isFunction = jQuery.isFunction( html );
-
- return this.each(function(i) {
- jQuery( this ).wrapAll( isFunction ? html.call(this, i) : 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 ) {
+ return this.domManip( arguments, function( elem ) {
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- this.appendChild( elem );
+ var target = manipulationTarget( this, elem );
+ target.appendChild( elem );
}
});
},
prepend: function() {
- return this.domManip(arguments, true, function( elem ) {
+ return this.domManip( arguments, function( elem ) {
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- this.insertBefore( elem, this.firstChild );
+ var target = manipulationTarget( this, elem );
+ target.insertBefore( elem, target.firstChild );
}
});
},
before: function() {
- return this.domManip( arguments, false, function( elem ) {
+ return this.domManip( arguments, function( elem ) {
if ( this.parentNode ) {
this.parentNode.insertBefore( elem, this );
}
@@ -5970,7 +6070,7 @@ jQuery.fn.extend({
},
after: function() {
- return this.domManip( arguments, false, function( elem ) {
+ return this.domManip( arguments, function( elem ) {
if ( this.parentNode ) {
this.parentNode.insertBefore( elem, this.nextSibling );
}
@@ -5980,20 +6080,20 @@ jQuery.fn.extend({
// keepData is for internal use only--do not document
remove: function( selector, keepData ) {
var elem,
+ elems = selector ? jQuery.filter( selector, this ) : this,
i = 0;
- for ( ; (elem = this[i]) != null; i++ ) {
- if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) {
- if ( !keepData && elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem ) );
- }
+ for ( ; (elem = elems[i]) != null; i++ ) {
- if ( elem.parentNode ) {
- if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
- setGlobalEval( getAll( elem, "script" ) );
- }
- elem.parentNode.removeChild( elem );
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem ) );
+ }
+
+ if ( elem.parentNode ) {
+ if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
+ setGlobalEval( getAll( elem, "script" ) );
}
+ elem.parentNode.removeChild( elem );
}
}
@@ -6076,31 +6176,39 @@ jQuery.fn.extend({
}, null, value, arguments.length );
},
- replaceWith: function( value ) {
- var isFunc = jQuery.isFunction( value );
-
- // 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 ( !isFunc && typeof value !== "string" ) {
- value = jQuery( value ).not( this ).detach();
- }
+ replaceWith: function() {
+ var
+ // Snapshot the DOM in case .domManip sweeps something relevant into its fragment
+ args = jQuery.map( this, function( elem ) {
+ return [ elem.nextSibling, elem.parentNode ];
+ }),
+ i = 0;
- return this.domManip( [ value ], true, function( elem ) {
- var next = this.nextSibling,
- parent = this.parentNode;
+ // Make the changes, replacing each context element with the new content
+ this.domManip( arguments, function( elem ) {
+ var next = args[ i++ ],
+ parent = args[ i++ ];
if ( parent ) {
+ // Don't use the snapshot next if it has moved (#13810)
+ if ( next && next.parentNode !== parent ) {
+ next = this.nextSibling;
+ }
jQuery( this ).remove();
parent.insertBefore( elem, next );
}
- });
+ // Allow new content to include elements from the context set
+ }, true );
+
+ // Force removal if there was no new content (e.g., from empty arguments)
+ return i ? this : this.remove();
},
detach: function( selector ) {
return this.remove( selector, true );
},
- domManip: function( args, table, callback ) {
+ domManip: function( args, callback, allowIntersection ) {
// Flatten any nested arrays
args = core_concat.apply( [], args );
@@ -6119,14 +6227,14 @@ jQuery.fn.extend({
return this.each(function( index ) {
var self = set.eq( index );
if ( isFunction ) {
- args[0] = value.call( this, index, table ? self.html() : undefined );
+ args[0] = value.call( this, index, self.html() );
}
- self.domManip( args, table, callback );
+ self.domManip( args, callback, allowIntersection );
});
}
if ( l ) {
- fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
+ fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );
first = fragment.firstChild;
if ( fragment.childNodes.length === 1 ) {
@@ -6134,7 +6242,6 @@ jQuery.fn.extend({
}
if ( first ) {
- table = table && jQuery.nodeName( first, "tr" );
scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
hasScripts = scripts.length;
@@ -6152,13 +6259,7 @@ jQuery.fn.extend({
}
}
- callback.call(
- table && jQuery.nodeName( this[i], "table" ) ?
- findOrAppend( this[i], "tbody" ) :
- this[i],
- node,
- i
- );
+ callback.call( this[i], node, i );
}
if ( hasScripts ) {
@@ -6175,14 +6276,7 @@ jQuery.fn.extend({
if ( node.src ) {
// Hope ajax is available...
- jQuery.ajax({
- url: node.src,
- type: "GET",
- dataType: "script",
- async: false,
- global: false,
- "throws": true
- });
+ jQuery._evalUrl( node.src );
} else {
jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
}
@@ -6199,14 +6293,20 @@ jQuery.fn.extend({
}
});
-function findOrAppend( elem, tag ) {
- return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
+// Support: IE<8
+// Manipulating tables requires a tbody
+function manipulationTarget( elem, content ) {
+ return jQuery.nodeName( elem, "table" ) &&
+ jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ?
+
+ elem.getElementsByTagName("tbody")[0] ||
+ elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
+ elem;
}
// Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) {
- var attr = elem.getAttributeNode("type");
- elem.type = ( attr && attr.specified ) + "/" + elem.type;
+ elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
return elem;
}
function restoreScript( elem ) {
@@ -6612,6 +6712,83 @@ jQuery.extend({
}
}
}
+ },
+
+ _evalUrl: function( url ) {
+ return jQuery.ajax({
+ url: url,
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ });
+ }
+});
+jQuery.fn.extend({
+ 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 ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each(function(i) {
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
}
});
var iframe, getStyles, curCSS,
@@ -6750,10 +6927,12 @@ jQuery.fn.extend({
return showHide( this );
},
toggle: function( state ) {
- var bool = typeof state === "boolean";
+ if ( typeof state === "boolean" ) {
+ return state ? this.show() : this.hide();
+ }
return this.each(function() {
- if ( bool ? state : isHidden( this ) ) {
+ if ( isHidden( this ) ) {
jQuery( this ).show();
} else {
jQuery( this ).hide();
@@ -6777,13 +6956,14 @@ jQuery.extend({
}
},
- // Exclude the following css properties to add px
+ // Don't automatically add "px" to these possibly-unitless properties
cssNumber: {
"columnCount": true,
"fillOpacity": true,
"fontWeight": true,
"lineHeight": true,
"opacity": true,
+ "order": true,
"orphans": true,
"widows": true,
"zIndex": true,
@@ -6895,27 +7075,6 @@ jQuery.extend({
return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
}
return val;
- },
-
- // A method for quickly swapping in/out CSS properties to get correct calculations
- swap: function( elem, options, callback, args ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.apply( elem, args || [] );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
}
});
@@ -7404,9 +7563,26 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
};
});
-jQuery.fn.hover = function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
-};
+jQuery.fn.extend({
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ }
+});
var
// Document location
ajaxLocParts,
@@ -7602,25 +7778,6 @@ jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSucces
};
});
-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({
- url: url,
- type: method,
- dataType: type,
- data: data,
- success: callback
- });
- };
-});
-
jQuery.extend({
// Counter for holding the number of active queries
@@ -7666,7 +7823,8 @@ jQuery.extend({
responseFields: {
xml: "responseXML",
- text: "responseText"
+ text: "responseText",
+ json: "responseJSON"
},
// Data converters
@@ -7674,7 +7832,7 @@ jQuery.extend({
converters: {
// Convert anything to text
- "* text": window.String,
+ "* text": String,
// Text to html (true = no transformation)
"text html": true,
@@ -7853,8 +8011,8 @@ jQuery.extend({
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 ) ) )
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
);
}
@@ -8015,13 +8173,19 @@ jQuery.extend({
// Set readyState
jqXHR.readyState = status > 0 ? 4 : 0;
+ // Determine if successful
+ isSuccess = status >= 200 && status < 300 || status === 304;
+
// Get response data
if ( responses ) {
response = ajaxHandleResponses( s, jqXHR, responses );
}
+ // Convert no matter what (that way responseXXX fields are always set)
+ response = ajaxConvert( s, response, jqXHR, isSuccess );
+
// If successful, handle type chaining
- if ( status >= 200 && status < 300 || status === 304 ) {
+ if ( isSuccess ) {
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
if ( s.ifModified ) {
@@ -8036,21 +8200,18 @@ jQuery.extend({
}
// if no content
- if ( status === 204 ) {
- isSuccess = true;
+ if ( status === 204 || s.type === "HEAD" ) {
statusText = "nocontent";
// if not modified
} else if ( status === 304 ) {
- isSuccess = true;
statusText = "notmodified";
// If we have data, let's convert it
} else {
- isSuccess = ajaxConvert( s, response );
- statusText = isSuccess.state;
- success = isSuccess.data;
- error = isSuccess.error;
+ statusText = response.state;
+ success = response.data;
+ error = response.error;
isSuccess = !error;
}
} else {
@@ -8100,32 +8261,42 @@ jQuery.extend({
return jqXHR;
},
- getScript: function( url, callback ) {
- return jQuery.get( url, undefined, callback, "script" );
- },
-
getJSON: function( url, data, callback ) {
return jQuery.get( url, data, callback, "json" );
+ },
+
+ getScript: function( url, callback ) {
+ return jQuery.get( url, undefined, callback, "script" );
}
});
+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({
+ url: url,
+ type: method,
+ dataType: type,
+ data: data,
+ success: callback
+ });
+ };
+});
+
/* 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 firstDataType, ct, finalDataType, type,
contents = s.contents,
- dataTypes = s.dataTypes,
- responseFields = s.responseFields;
-
- // Fill responseXXX fields
- for ( type in responseFields ) {
- if ( type in responses ) {
- jqXHR[ responseFields[type] ] = responses[ type ];
- }
- }
+ dataTypes = s.dataTypes;
// Remove auto dataType and get content-type in the process
while( dataTypes[ 0 ] === "*" ) {
@@ -8174,19 +8345,14 @@ function ajaxHandleResponses( s, jqXHR, responses ) {
}
}
-// Chain conversions given the request and the original response
-function ajaxConvert( s, response ) {
- var conv2, current, conv, tmp,
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+ var conv2, current, conv, tmp, prev,
converters = {},
- i = 0,
// Work with a copy of dataTypes in case we need to modify it for conversion
- dataTypes = s.dataTypes.slice(),
- prev = dataTypes[ 0 ];
-
- // Apply the dataFilter if provided
- if ( s.dataFilter ) {
- response = s.dataFilter( response, s.dataType );
- }
+ dataTypes = s.dataTypes.slice();
// Create converters map with lowercased keys
if ( dataTypes[ 1 ] ) {
@@ -8195,14 +8361,32 @@ function ajaxConvert( s, response ) {
}
}
- // Convert to each sequential dataType, tolerating list modification
- for ( ; (current = dataTypes[++i]); ) {
+ current = dataTypes.shift();
+
+ // Convert to each sequential dataType
+ while ( current ) {
+
+ if ( s.responseFields[ current ] ) {
+ jqXHR[ s.responseFields[ current ] ] = response;
+ }
+
+ // Apply the dataFilter if provided
+ if ( !prev && isSuccess && s.dataFilter ) {
+ response = s.dataFilter( response, s.dataType );
+ }
+
+ prev = current;
+ current = dataTypes.shift();
- // There's only work to do if current dataType is non-auto
- if ( current !== "*" ) {
+ if ( current ) {
+
+ // There's only work to do if current dataType is non-auto
+ if ( current === "*" ) {
+
+ current = prev;
// Convert response if prev dataType is non-auto and differs from current
- if ( prev !== "*" && prev !== current ) {
+ } else if ( prev !== "*" && prev !== current ) {
// Seek a direct converter
conv = converters[ prev + " " + current ] || converters[ "* " + current ];
@@ -8212,7 +8396,7 @@ function ajaxConvert( s, response ) {
for ( conv2 in converters ) {
// If conv2 outputs current
- tmp = conv2.split(" ");
+ tmp = conv2.split( " " );
if ( tmp[ 1 ] === current ) {
// If prev can be converted to accepted input
@@ -8226,9 +8410,8 @@ function ajaxConvert( s, response ) {
// Otherwise, insert the intermediate dataType
} else if ( converters[ conv2 ] !== true ) {
current = tmp[ 0 ];
- dataTypes.splice( i--, 0, current );
+ dataTypes.unshift( tmp[ 1 ] );
}
-
break;
}
}
@@ -8239,7 +8422,7 @@ function ajaxConvert( s, response ) {
if ( conv !== true ) {
// Unless errors are allowed to bubble, catch and return them
- if ( conv && s["throws"] ) {
+ if ( conv && s[ "throws" ] ) {
response = conv( response );
} else {
try {
@@ -8250,9 +8433,6 @@ function ajaxConvert( s, response ) {
}
}
}
-
- // Update prev for next iteration
- prev = current;
}
}
@@ -8638,44 +8818,51 @@ var fxNow, timerId,
animationPrefilters = [ defaultPrefilter ],
tweeners = {
"*": [function( prop, value ) {
- var end, unit,
- tween = this.createTween( prop, value ),
- parts = rfxnum.exec( value ),
+ var tween = this.createTween( prop, value ),
target = tween.cur(),
- start = +target || 0,
+ parts = rfxnum.exec( value ),
+ unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+ // Starting value computation is required for potential unit mismatches
+ start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
+ rfxnum.exec( jQuery.css( tween.elem, prop ) ),
scale = 1,
maxIterations = 20;
- if ( parts ) {
- end = +parts[2];
- unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+ if ( start && start[ 3 ] !== unit ) {
+ // Trust units reported by jQuery.css
+ unit = unit || start[ 3 ];
+
+ // Make sure we update the tween properties later on
+ parts = parts || [];
- // We need to compute starting value
- if ( unit !== "px" && start ) {
- // Iteratively approximate from a nonzero starting point
- // Prefer the current property, because this process will be trivial if it uses the same units
- // Fallback to end or a simple constant
- start = jQuery.css( tween.elem, prop, true ) || end || 1;
+ // Iteratively approximate from a nonzero starting point
+ start = +target || 1;
- do {
- // If previous iteration zeroed out, double until we get *something*
- // Use a string for doubling factor so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
+ do {
+ // If previous iteration zeroed out, double until we get *something*
+ // Use a string for doubling factor so we don't accidentally see scale as unchanged below
+ scale = scale || ".5";
- // Adjust and apply
- start = start / scale;
- jQuery.style( tween.elem, prop, start + unit );
+ // Adjust and apply
+ start = start / scale;
+ jQuery.style( tween.elem, prop, start + unit );
- // Update scale, tolerating zero or NaN from tween.cur()
- // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
- } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
- }
+ // Update scale, tolerating zero or NaN from tween.cur()
+ // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
+ } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+ }
+ // Update tween properties
+ if ( parts ) {
+ start = tween.start = +start || +target || 0;
tween.unit = unit;
- tween.start = start;
// If a +=/-= token was provided, we're doing a relative animation
- tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;
+ tween.end = parts[ 1 ] ?
+ start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
+ +parts[ 2 ];
}
+
return tween;
}]
};
@@ -8688,19 +8875,18 @@ function createFxNow() {
return ( fxNow = jQuery.now() );
}
-function createTweens( animation, props ) {
- jQuery.each( props, function( prop, value ) {
- var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
- index = 0,
- length = collection.length;
- for ( ; index < length; index++ ) {
- if ( collection[ index ].call( animation, prop, value ) ) {
+function createTween( value, prop, animation ) {
+ var tween,
+ collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
+ index = 0,
+ length = collection.length;
+ for ( ; index < length; index++ ) {
+ if ( (tween = collection[ index ].call( animation, prop, value )) ) {
- // we're done with this property
- return;
- }
+ // we're done with this property
+ return tween;
}
- });
+ }
}
function Animation( elem, properties, options ) {
@@ -8786,7 +8972,7 @@ function Animation( elem, properties, options ) {
}
}
- createTweens( animation, props );
+ jQuery.map( props, createTween, animation );
if ( jQuery.isFunction( animation.opts.start ) ) {
animation.opts.start.call( elem, animation );
@@ -8808,7 +8994,7 @@ function Animation( elem, properties, options ) {
}
function propFilter( props, specialEasing ) {
- var value, name, index, easing, hooks;
+ var index, name, easing, value, hooks;
// camelCase, specialEasing and expand cssHook pass
for ( index in props ) {
@@ -8875,15 +9061,13 @@ jQuery.Animation = jQuery.extend( Animation, {
});
function defaultPrefilter( elem, props, opts ) {
- /*jshint validthis:true */
- var prop, index, length,
- value, dataShow, toggle,
- tween, hooks, oldfire,
+ /* jshint validthis: true */
+ var prop, value, toggle, tween, hooks, oldfire,
anim = this,
- style = elem.style,
orig = {},
- handled = [],
- hidden = elem.nodeType && isHidden( elem );
+ style = elem.style,
+ hidden = elem.nodeType && isHidden( elem ),
+ dataShow = jQuery._data( elem, "fxshow" );
// handle queue: false promises
if ( !opts.queue ) {
@@ -8948,23 +9132,25 @@ function defaultPrefilter( elem, props, opts ) {
// show/hide pass
- for ( index in props ) {
- value = props[ index ];
+ for ( prop in props ) {
+ value = props[ prop ];
if ( rfxtypes.exec( value ) ) {
- delete props[ index ];
+ delete props[ prop ];
toggle = toggle || value === "toggle";
if ( value === ( hidden ? "hide" : "show" ) ) {
continue;
}
- handled.push( index );
+ orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
}
}
- length = handled.length;
- if ( length ) {
- dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} );
- if ( "hidden" in dataShow ) {
- hidden = dataShow.hidden;
+ if ( !jQuery.isEmptyObject( orig ) ) {
+ if ( dataShow ) {
+ if ( "hidden" in dataShow ) {
+ hidden = dataShow.hidden;
+ }
+ } else {
+ dataShow = jQuery._data( elem, "fxshow", {} );
}
// store state if its toggle - enables .stop().toggle() to "reverse"
@@ -8985,10 +9171,8 @@ function defaultPrefilter( elem, props, opts ) {
jQuery.style( elem, prop, orig[ prop ] );
}
});
- for ( index = 0 ; index < length ; index++ ) {
- prop = handled[ index ];
- tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );
- orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );
+ for ( prop in orig ) {
+ tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
if ( !( prop in dataShow ) ) {
dataShow[ prop ] = tween.start;
@@ -9084,8 +9268,8 @@ Tween.propHooks = {
}
};
-// Remove in 2.0 - this supports IE8's panic based approach
-// to setting things on disconnected nodes
+// Support: IE <=9
+// Panic based approach to setting things on disconnected nodes
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
set: function( tween ) {
@@ -9119,9 +9303,7 @@ jQuery.fn.extend({
doAnimation = function() {
// Operate on a copy of prop so per-property easing won't be lost
var anim = Animation( this, jQuery.extend( {}, prop ), optall );
- doAnimation.finish = function() {
- anim.stop( true );
- };
+
// Empty animations, or finishing resolves immediately
if ( empty || jQuery._data( this, "finish" ) ) {
anim.stop( true );
@@ -9201,8 +9383,8 @@ jQuery.fn.extend({
// empty the queue first
jQuery.queue( this, type, [] );
- if ( hooks && hooks.cur && hooks.cur.finish ) {
- hooks.cur.finish.call( this );
+ if ( hooks && hooks.stop ) {
+ hooks.stop.call( this, true );
}
// look for any active animations, and finish them
@@ -9486,11 +9668,11 @@ jQuery.fn.extend({
offsetParent: function() {
return this.map(function() {
- var offsetParent = this.offsetParent || document.documentElement;
+ var offsetParent = this.offsetParent || docElem;
while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
offsetParent = offsetParent.offsetParent;
}
- return offsetParent || document.documentElement;
+ return offsetParent || docElem;
});
}
});
@@ -9574,24 +9756,34 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
// Limit scope pollution from any deprecated API
// (function() {
+// The number of elements contained in the matched element set
+jQuery.fn.size = function() {
+ return this.length;
+};
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
// })();
-// Expose jQuery to the global object
-window.jQuery = window.$ = jQuery;
-
-// Expose jQuery as an AMD module, but only for AMD loaders that
-// understand the issues with loading multiple versions of jQuery
-// in a page that all might call define(). The loader will indicate
-// they have special allowances for multiple jQuery versions by
-// specifying define.amd.jQuery = true. Register as a named module,
-// since jQuery can be concatenated with other files that may use define,
-// but not use a proper concatenation script that understands anonymous
-// AMD modules. A named AMD is safest and most robust way to register.
-// Lowercase jquery is used because AMD module names are derived from
-// file names, and jQuery is normally delivered in a lowercase file name.
-// Do this after creating the global so that if an AMD module wants to call
-// noConflict to hide this version of jQuery, it will work.
-if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
- define( "jquery", [], function () { return jQuery; } );
+if ( typeof module === "object" && module && typeof module.exports === "object" ) {
+ // Expose jQuery as module.exports in loaders that implement the Node
+ // module pattern (including browserify). Do not create the global, since
+ // the user will be storing it themselves locally, and globals are frowned
+ // upon in the Node module world.
+ module.exports = jQuery;
+} else {
+ // Otherwise expose jQuery to the global object as usual
+ window.jQuery = window.$ = jQuery;
+
+ // Register as a named AMD module, since jQuery can be concatenated with other
+ // files that may use define, but not via a proper concatenation script that
+ // understands anonymous AMD modules. A named AMD is safest and most robust
+ // way to register. Lowercase jquery is used because AMD module names are
+ // derived from file names, and jQuery is normally delivered in a lowercase
+ // file name. Do this after creating the global so that if an AMD module wants
+ // to call noConflict to hide this version of jQuery, it will work.
+ if ( typeof define === "function" && define.amd ) {
+ define( "jquery", [], function () { return jQuery; } );
+ }
}
})( window );
diff --git a/lib/scripts/jquery/jquery.min.js b/lib/scripts/jquery/jquery.min.js
index 686ae4bf3..ce1b6b6e0 100644
--- a/lib/scripts/jquery/jquery.min.js
+++ b/lib/scripts/jquery/jquery.min.js
@@ -1,4 +1,5 @@
-/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
-*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},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(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;
-return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&&gt(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l)
-}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.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 contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window);
+/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
+*/
+(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
+}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
+u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.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 contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
diff --git a/lib/scripts/jquery/update.sh b/lib/scripts/jquery/update.sh
index b0de441f9..719a0829d 100755
--- a/lib/scripts/jquery/update.sh
+++ b/lib/scripts/jquery/update.sh
@@ -1,16 +1,17 @@
#!/bin/sh
#
-# This script loads the latest jQuery and jQuery-UI 1.* versions from Google's CDN
+# This script loads the latest jQuery and jQuery-UI 1.* versions from Google's and jQuery's CDN
#
# It also loads the 'smoothness' jQuery-UI theme and all referenced images.
#
# @author Andreas Gohr <andi@splitbrain.org>
# @author Stefan Grönke <stefan@gronke.net>
# @link https://code.google.com/apis/libraries/devguide.html#jquery
+# @link http://code.jquery.com/
# 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
+wget -nv http://code.jquery.com/jquery-latest.min.js -O jquery.min.js
+wget -nv http://code.jquery.com/jquery-latest.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
@@ -29,15 +30,17 @@ done
for LNG in ../../../inc/lang/*
do
CODE=`basename $LNG`
- wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-$CODE.js -O $LNG/jquery.ui.datepicker.js
+ wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-$CODE.js -O $LNG/jquery.ui.datepicker.js
if [ ! -s "$LNG/jquery.ui.datepicker.js" ]; then
rm -f $LNG/jquery.ui.datepicker.js
fi
done
# some custom language codes
-wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-de.js -O ../../../inc/lang/de-informal/jquery.ui.datepicker.js
-wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-pt-BR.js -O ../../../inc/lang/pt-br/jquery.ui.datepicker.js
-wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-zh-CN.js -O ../../../inc/lang/zh/jquery.ui.datepicker.js
-wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-zh-TW.js -O ../../../inc/lang/zh-tw/jquery.ui.datepicker.js
+wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-de.js -O ../../../inc/lang/de-informal/jquery.ui.datepicker.js
+wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-pt-BR.js -O ../../../inc/lang/pt-br/jquery.ui.datepicker.js
+wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-zh-CN.js -O ../../../inc/lang/zh/jquery.ui.datepicker.js
+wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-zh-TW.js -O ../../../inc/lang/zh-tw/jquery.ui.datepicker.js
+# strip source maps
+sed -i '/sourceMappingURL/d' *.min.js
diff --git a/lib/scripts/qsearch.js b/lib/scripts/qsearch.js
index e5cc73b49..95c632e45 100644
--- a/lib/scripts/qsearch.js
+++ b/lib/scripts/qsearch.js
@@ -6,165 +6,193 @@
* @author Adrian Lang <lang@cosmocode.de>
* @author Michal Rezler <m.rezler@centrum.cz>
*/
+jQuery.fn.dw_qsearch = function (overrides) {
-var dw_qsearch = {
-
- $inObj: null,
- $outObj: null,
- timer: null,
- curRequest: 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;
- }
+ var dw_qsearch = {
- // attach eventhandler to search field
- do_qsearch = function () {
- // abort any previous request
- if (dw_qsearch.curRequest != null) {
- dw_qsearch.curRequest.abort();
- }
- var value = dw_qsearch.$inObj.val();
- if (value === '') {
- dw_qsearch.clear_results();
+ output: '#qsearch__out',
+
+ $inObj: this,
+ $outObj: null,
+ timer: null,
+ curRequest: null,
+
+ /**
+ * initialize the quick search
+ *
+ * Attaches the event handlers
+ *
+ */
+ init: function () {
+ var do_qsearch;
+
+ dw_qsearch.$outObj = jQuery(dw_qsearch.output);
+
+ // objects found?
+ if (dw_qsearch.$inObj.length === 0 ||
+ dw_qsearch.$outObj.length === 0) {
return;
}
- dw_qsearch.curRequest = 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;
+ // attach eventhandler to search field
+ do_qsearch = function () {
+ // abort any previous request
+ if (dw_qsearch.curRequest != null) {
+ dw_qsearch.curRequest.abort();
}
- 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;
-
- dw_qsearch.curRequest = null;
-
- if (data === '') {
- dw_qsearch.clear_results();
- return;
- }
-
- dw_qsearch.$outObj
- .html(data)
- .show()
- .css('white-space', 'nowrap');
-
- // disable overflow during shortening
- dw_qsearch.$outObj.find('li').css('overflow', 'visible');
-
- $links = dw_qsearch.$outObj.find('a');
- max = dw_qsearch.$outObj[0].clientWidth; // maximum width allowed (but take away paddings below)
- if(document.documentElement.dir === 'rtl'){
- max -= parseInt(dw_qsearch.$outObj.css('padding-left'));
- too_big = function (l) { return l.offsetLeft < 0; };
- }else{
- max -= parseInt(dw_qsearch.$outObj.css('padding-right'));
- too_big = function (l) { return l.offsetWidth + l.offsetLeft > max; };
- }
-
- $links.each(function () {
- var start, length, replace, nsL, nsR, eli, runaway;
+ var value = dw_qsearch.getSearchterm();
+ if (value === '') {
+ dw_qsearch.clear_results();
+ return;
+ }
+ dw_qsearch.curRequest = 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.timer = window.setTimeout(do_qsearch, 500);
+ }
+ );
- if (!too_big(this)) {
+ // attach eventhandler to output field
+ dw_qsearch.$outObj.click(dw_qsearch.clear_results);
+ },
+
+ /**
+ * Read search term from input
+ */
+ getSearchterm: function() {
+ return dw_qsearch.$inObj.val();
+ },
+
+ /**
+ * 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;
+
+ dw_qsearch.curRequest = null;
+
+ if (data === '') {
+ dw_qsearch.clear_results();
return;
}
- // make IE's innerText available to W3C conform browsers
- if(this.textContent){
- this.__defineGetter__('innerText', function(){ return this.textContent });
- this.__defineSetter__('innerText', function(val){ this.textContent = val });
+ dw_qsearch.$outObj
+ .html(data)
+ .show()
+ .css('white-space', 'nowrap');
+
+ // disable overflow during shortening
+ dw_qsearch.$outObj.find('li').css('overflow', 'visible');
+
+ $links = dw_qsearch.$outObj.find('a');
+ max = dw_qsearch.$outObj[0].clientWidth; // maximum width allowed (but take away paddings below)
+ if (document.documentElement.dir === 'rtl') {
+ max -= parseInt(dw_qsearch.$outObj.css('padding-left'));
+ too_big = function (l) {
+ return l.offsetLeft < 0;
+ };
+ } else {
+ max -= parseInt(dw_qsearch.$outObj.css('padding-right'));
+ too_big = function (l) {
+ return l.offsetWidth + l.offsetLeft > max;
+ };
}
- 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 = '…';
+ $links.each(function () {
+ var start, length, replace, nsL, nsR, eli, runaway;
+
+ if (!too_big(this)) {
+ return;
+ }
+
+ // make IE's innerText available to W3C conform browsers
+ if (this.textContent) {
+ this.__defineGetter__('innerText', function () {
+ return this.textContent
+ });
+ this.__defineSetter__('innerText', function (val) {
+ this.textContent = val
+ });
}
- this.innerText = substr_replace(this.innerText,
- replace, start, length);
- eli = this.innerText.indexOf('…');
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);
- // reenable overflow
- dw_qsearch.$outObj.find('li').css('overflow', 'hidden').css('text-overflow','ellipsis');
+ eli = this.innerText.indexOf('…');
+ nsL = this.innerText.indexOf('(');
+ nsR = this.innerText.indexOf(')');
+ }
+ });
+
+ // reenable overflow
+ dw_qsearch.$outObj.find('li').css('overflow', 'hidden').css('text-overflow', 'ellipsis');
+ }
+
+
+ };
+
+ jQuery.extend(dw_qsearch, overrides);
+
+ if (!overrides.deferInit) {
+ dw_qsearch.init();
}
+
+ return dw_qsearch;
};
jQuery(function () {
- dw_qsearch.init('#qsearch__in','#qsearch__out');
+ jQuery('#qsearch__in').dw_qsearch({
+ output: '#qsearch__out'
+ });
});
diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js
index 09c374bc4..1bb02b406 100644
--- a/lib/scripts/toolbar.js
+++ b/lib/scripts/toolbar.js
@@ -199,8 +199,9 @@ function addBtnActionPicker($btn, props, edid) {
jQuery(picker).attr('aria-hidden', 'true');
$btn.click(
- function() {
+ function(e) {
pickerToggle(pickerid,$btn);
+ e.preventDefault();
return '';
}
);
@@ -219,9 +220,10 @@ function addBtnActionPicker($btn, props, edid) {
*/
function addBtnActionLinkwiz($btn, props, edid) {
dw_linkwiz.init(jQuery('#'+edid));
- jQuery($btn).click(function(){
+ jQuery($btn).click(function(e){
dw_linkwiz.val = props;
dw_linkwiz.toggle();
+ e.preventDefault();
return '';
});
return 'link__wiz';
diff --git a/lib/styles/geshi.less b/lib/styles/geshi.less
new file mode 100644
index 000000000..2c7ac6a57
--- /dev/null
+++ b/lib/styles/geshi.less
@@ -0,0 +1,127 @@
+/**
+ * GeSHi syntax highlighting styles
+ *
+ * Generated with https://www.dokuwiki.org/tips:geshi_style_builder
+ * Cleaned up with http://cleancss.com/
+ * Manulally LESSified
+ */
+.code {
+ .co0 {
+ color: #666666;
+ font-style: italic;
+ }
+
+ .co4 {
+ color: #cc0000;
+ font-style: italic;
+ }
+
+ .es5 {
+ color: #006699;
+ font-weight: bold;
+ }
+
+ .es6 {
+ color: #009933;
+ font-weight: bold;
+ }
+
+ .kw2 {
+ color: #000000;
+ font-weight: bold;
+ }
+
+ .kw5 {
+ color: #008000;
+ }
+
+ .kw6 {
+ color: #f08;
+ font-weight: bold;
+ }
+
+ .me0 {
+ color: #004000;
+ }
+
+ .nu0 {
+ color: #cc66cc;
+ }
+
+ .re0 {
+ color: #0000ff;
+ }
+
+ .re3 {
+ color: #ff3333;
+ font-weight: bold;
+ }
+
+ .re4 {
+ color: #009999;
+ }
+
+ .re5 {
+ color: #660033;
+ }
+
+ .sc-2 {
+ color: #404040;
+ }
+
+ .sy3 {
+ color: #000040;
+ }
+
+ .br0, .sy0 {
+ color: #66cc66;
+ }
+
+ .co1, .coMULTI, .sc-1 {
+ color: #808080;
+ font-style: italic;
+ }
+
+ .co2, .sy1 {
+ color: #339933;
+ }
+
+ .co3, .sy4 {
+ color: #008080;
+ }
+
+ .es0, .es1, .esHARD {
+ color: #000099;
+ font-weight: bold;
+ }
+
+ .es2, .es3, .es4 {
+ color: #660099;
+ font-weight: bold;
+ }
+
+ .kw1, .kw8 {
+ color: #b1b100;
+ }
+
+ .kw10, .kw11, .kw12, .kw9 {
+ color: #003399;
+ font-weight: bold;
+ }
+
+ .kw13, .kw14, .kw15, .kw16, .me1, .me2 {
+ color: #006600;
+ }
+
+ .kw3, .kw7, .sy2 {
+ color: #000066;
+ }
+
+ .kw4, .re2 {
+ color: #993333;
+ }
+
+ .re1, .st0, .st_h {
+ color: #ff0000;
+ }
+} \ No newline at end of file
diff --git a/lib/styles/screen.css b/lib/styles/screen.css
index 2d84f65eb..bbc1e86be 100644
--- a/lib/styles/screen.css
+++ b/lib/styles/screen.css
@@ -93,26 +93,4 @@ div.notify {
right: -99999em !important;
}
-/* syntax highlighting code */
-.code .br0 { color: #66cc66; }
-.code .co0 { color: #808080; font-style: italic; }
-.code .co1 { color: #808080; font-style: italic; }
-.code .co2 { color: #808080; font-style: italic; }
-.code .co3 { color: #808080; }
-.code .coMULTI { color: #808080; font-style: italic; }
-.code .es0 { color: #000099; font-weight: bold; }
-.code .kw1 { color: #b1b100; }
-.code .kw2 { color: #000000; font-weight: bold; }
-.code .kw3 { color: #000066; }
-.code .kw4 { color: #993333; }
-.code .kw5 { color: #0000ff; }
-.code .me1 { color: #006600; }
-.code .me2 { color: #006600; }
-.code .nu0 { color: #cc66cc; }
-.code .re0 { color: #0000ff; }
-.code .re1 { color: #0000ff; }
-.code .re2 { color: #0000ff; }
-.code .re3 { color: #ff3333; font-weight:bold; }
-.code .re4 { color: #009999; }
-.code .st0 { color: #ff0000; }
-.code .sy0 { color: #66cc66; }
+@import "geshi.less";
diff --git a/lib/tpl/dokuwiki/css/_diff.css b/lib/tpl/dokuwiki/css/_diff.css
index b7c82d829..bc56a37c4 100644
--- a/lib/tpl/dokuwiki/css/_diff.css
+++ b/lib/tpl/dokuwiki/css/_diff.css
@@ -73,3 +73,65 @@
background-color: inherit;
font-weight: bold;
}
+
+/* diff options */
+
+.dokuwiki .diffoptions form {
+ float: left;
+}
+.dokuwiki .diffoptions p {
+ float: right;
+}
+
+/* diff nav */
+
+.dokuwiki table.diff_sidebyside td.diffnav {
+ padding-bottom: .7em;
+}
+.dokuwiki .diffnav a {
+ display: inline-block;
+ vertical-align: middle;
+}
+.dokuwiki .diffnav a span {
+ display: none;
+}
+
+.dokuwiki .diffnav a:hover,
+.dokuwiki .diffnav a:active,
+.dokuwiki .diffnav a:focus {
+ background-color: @ini_background_alt;
+ text-decoration: none;
+}
+
+.dokuwiki .diffnav a:before {
+ display: inline-block;
+ line-height: 1;
+ padding: .2em .4em;
+ border: 1px solid @ini_border;
+ border-radius: 2px;
+ color: @ini_text;
+}
+
+.dokuwiki .diffnav a.diffprevrev:before {
+ content: '\25C0'; /* left triangle */
+}
+.dokuwiki .diffnav a.diffnextrev:before,
+.dokuwiki .diffnav a.difflastrev:before {
+ content: '\25B6'; /* right triangle */
+}
+.dokuwiki .diffnav a.diffbothprevrev:before {
+ content: '\25C0\25C0';
+}
+.dokuwiki .diffnav a.diffbothnextrev:before {
+ content: '\25B6\25B6';
+}
+
+.dokuwiki .diffnav select {
+ width: 60%;
+ min-width: 9em;
+ height: 1.5em; /* height is necessary for longer options in Webkit */
+}
+
+.dokuwiki .diffnav select option[selected] {
+ font-weight: bold;
+}
diff --git a/lib/tpl/dokuwiki/css/basic.less b/lib/tpl/dokuwiki/css/basic.less
index c296185e9..ac9f6803a 100644
--- a/lib/tpl/dokuwiki/css/basic.less
+++ b/lib/tpl/dokuwiki/css/basic.less
@@ -455,6 +455,7 @@ input[disabled],
button[disabled],
select[disabled],
textarea[disabled],
+option[disabled],
input[readonly],
button[readonly],
select[readonly],
diff --git a/lib/tpl/dokuwiki/css/content.less b/lib/tpl/dokuwiki/css/content.less
index a5ffbf2be..a2e343a33 100644
--- a/lib/tpl/dokuwiki/css/content.less
+++ b/lib/tpl/dokuwiki/css/content.less
@@ -67,19 +67,19 @@
/*____________ lists ____________*/
-#dokuwiki__content ul li,
-#dokuwiki__aside ul li {
- color: @ini_text_alt;
-}
+.dokuwiki .page,
+.dokuwiki .aside {
+ ul li {
+ color: @ini_text_alt;
+ }
-#dokuwiki__content ol li,
-#dokuwiki__aside ol li {
- color: @ini_text_neu;
-}
+ ol li {
+ color: @ini_text_neu;
+ }
-#dokuwiki__content li .li,
-#dokuwiki__aside li .li {
- color: @ini_text;
+ li .li {
+ color: @ini_text;
+ }
}
/*____________ tables ____________*/
diff --git a/lib/tpl/dokuwiki/css/design.less b/lib/tpl/dokuwiki/css/design.less
index 42292de49..66607b5e9 100644
--- a/lib/tpl/dokuwiki/css/design.less
+++ b/lib/tpl/dokuwiki/css/design.less
@@ -48,6 +48,12 @@
margin-bottom: 0;
font-size: 0.875em;
}
+
+ /* make all links in header (including breadcrumb and interwiki) same colour as the rest */
+ a {
+ color: @ini_link;
+ background-color: inherit;
+ }
}
[dir=rtl] #dokuwiki__header h1 img {
@@ -100,7 +106,8 @@
margin-left: 0;
}
-#dokuwiki__usertools a.action {
+#dokuwiki__usertools a.action,
+#dokuwiki__usertools a.iw_user {
padding-left: 20px;
background: transparent url(images/usertools.png) no-repeat 0 0;
}
@@ -137,6 +144,7 @@
background-position: left 0;
}
+ a.iw_user,
a.action.profile {
background-position: left -32px;
}
@@ -186,50 +194,50 @@
text-align: right;
form.search {
- display: block;
font-size: 0.875em;
- position: relative;
+ }
+}
- input.edit {
- width: 18em;
- padding: .35em 22px .35em .1em;
- }
+[dir=rtl] #dokuwiki__sitetools {
+ text-align: left;
+}
- input.button {
- background: transparent url(images/search.png) no-repeat 0 0;
- border-width: 0;
- width: 19px;
- height: 14px;
- text-indent: -99999px;
- margin-left: -20px;
- box-shadow: none;
- padding: 0;
- }
+form.search {
+ display: block;
+ position: relative;
+ margin-bottom: 0.5em;
+
+ input.edit {
+ width: 18em;
+ padding: .35em 22px .35em .1em;
}
- ul {
- margin-top: 0.5em;
+ input.button {
+ background: transparent url(images/search.png) no-repeat 0 0;
+ border-width: 0;
+ width: 19px;
+ height: 14px;
+ text-indent: -99999px;
+ margin-left: -20px;
+ box-shadow: none;
+ padding: 0;
}
}
-[dir=rtl] #dokuwiki__sitetools {
- text-align: left;
-
- form.search {
- input.edit {
- padding: .35em .1em .35em 22px;
- }
+[dir=rtl] form.search {
+ input.edit {
+ padding: .35em .1em .35em 22px;
+ }
- input.button {
- background-position: 5px 0;
- margin-left: 0;
- margin-right: -20px;
- position: relative;
- }
+ input.button {
+ background-position: 5px 0;
+ margin-left: 0;
+ margin-right: -20px;
+ position: relative;
}
}
-#IE7 #dokuwiki__sitetools form.search {
+#IE7 form.search {
min-height: 1px;
z-index: 21;
}
@@ -260,11 +268,6 @@
border-bottom: 1px solid @ini_border;
}
- a {
- color: @ini_link;
- background-color: inherit;
- }
-
.bcsep {
font-size: 0.75em;
}
@@ -278,13 +281,10 @@
/* sidebar
********************************************************************/
-#dokuwiki__aside {
-
- > .pad {
- font-size: 0.875em;
- overflow: hidden;
- word-wrap: break-word;
- }
+.dokuwiki .aside {
+ font-size: 0.875em;
+ overflow: hidden;
+ word-wrap: break-word;
/* make sidebar more condensed */
@@ -340,8 +340,8 @@
}
}
-[dir=rtl] #dokuwiki__aside ul,
-[dir=rtl] #dokuwiki__aside ol {
+[dir=rtl] .dokuwiki .aside ul,
+[dir=rtl] .dokuwiki .aside ol {
padding-right: .5em;
}
diff --git a/lib/tpl/dokuwiki/css/mobile.less b/lib/tpl/dokuwiki/css/mobile.less
index 0fbd0e8fe..c3e517795 100644
--- a/lib/tpl/dokuwiki/css/mobile.less
+++ b/lib/tpl/dokuwiki/css/mobile.less
@@ -105,6 +105,15 @@
overflow: auto;
}
+/* push pagetools closer to content */
+#dokuwiki__pagetools {
+ top: 0;
+}
+.showSidebar #dokuwiki__pagetools {
+ top: 3.5em;
+}
+
+
/* _edit */
.dokuwiki div.section_highlight {
margin: 0 -1em;
@@ -266,11 +275,13 @@ body {
#config__manager td .input,
.dokuwiki fieldset,
.dokuwiki input.edit,
-.dokuwiki textarea,
-.dokuwiki select {
+.dokuwiki textarea {
width: auto !important;
max-width: 100% !important;
}
+.dokuwiki select {
+ max-width: 100% !important;
+}
#config__manager fieldset {
margin-left: 0;
margin-right: 0;
@@ -299,5 +310,17 @@ body {
}
+} /* /@media */
+
+
+/* for screen heights smaller than the pagetools permit
+********************************************************************/
+@media only screen and (max-height: 400px) {
+// 400px is only roughly the required value, this may be wrong under non-standard circumstances
+
+#dokuwiki__pagetools div.tools {
+ position: static;
+}
+
} /* /@media */
diff --git a/lib/tpl/dokuwiki/css/pagetools.less b/lib/tpl/dokuwiki/css/pagetools.less
index ecb3038c3..77d2670a6 100644
--- a/lib/tpl/dokuwiki/css/pagetools.less
+++ b/lib/tpl/dokuwiki/css/pagetools.less
@@ -231,3 +231,4 @@
.pagetools-item(subscribe, 9, subscribe);
.pagetools-item(mediaManager, 11);
.pagetools-item(back, 12);
+.pagetools-item(img_backto, 12);
diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php
index ec846f6fd..8fe2c88a2 100644
--- a/lib/tpl/dokuwiki/detail.php
+++ b/lib/tpl/dokuwiki/detail.php
@@ -55,37 +55,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
<?php tpl_img(900,700); /* parameters: maximum width, maximum height (and more) */ ?>
<div class="img_detail">
- <dl>
- <?php
- // @todo: logic should be transferred to backend
- $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 tpl_img_meta(); ?>
</div>
<?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
<?php endif; ?>
@@ -109,23 +79,17 @@ header('X-UA-Compatible: IE=edge,chrome=1');
<div class="tools">
<ul>
<?php
- $data = array();
- $data['view'] = 'detail';
-
- // View in media manager; @todo: transfer logic to backend
- $imgNS = getNS($IMG);
- $authNS = auth_quickaclcheck("$imgNS:*");
- if (($authNS >= AUTH_UPLOAD) && function_exists('media_managerURL')) {
- $mmURL = media_managerURL(array('ns' => $imgNS, 'image' => $IMG));
- $data['items']['mediaManager'] = '<li><a href="'.$mmURL.'" class="mediaManager"><span>'.$lang['img_manager'].'</span></a></li>';
- }
-
- // Back to [ID]; @todo: transfer logic to backend
- $data['items']['img_backto'] = '<li><a href="'.wl($ID).'" class="back"><span>'.$lang['img_backto'].' '.$ID.'</span></a></li>';
+ $data = array(
+ 'view' => 'detail',
+ 'items' => array(
+ 'mediaManager' => tpl_action('mediaManager', 1, 'li', 1, '<span>', '</span>'),
+ 'img_backto' => tpl_action('img_backto', 1, 'li', 1, '<span>', '</span>'),
+ )
+ );
// the page tools can be amended through a custom plugin hook
$evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data);
- if($evt->advise_before()){
+ if($evt->advise_before()) {
foreach($evt->data['items'] as $k => $html) echo $html;
}
$evt->advise_after();
diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php
index 3bc46406a..44fef81eb 100644
--- a/lib/tpl/dokuwiki/main.php
+++ b/lib/tpl/dokuwiki/main.php
@@ -36,7 +36,7 @@ $showSidebar = $hasSidebar && ($ACT=='show');
<?php if($showSidebar): ?>
<!-- ********** ASIDE ********** -->
- <div id="dokuwiki__aside"><div class="pad include group">
+ <div id="dokuwiki__aside"><div class="pad aside include group">
<h3 class="toggle"><?php echo $lang['sidebar'] ?></h3>
<div class="content">
<?php tpl_flush() ?>
diff --git a/lib/tpl/index.php b/lib/tpl/index.php
index 3c00ab8e8..558f262a7 100644
--- a/lib/tpl/index.php
+++ b/lib/tpl/index.php
@@ -46,7 +46,7 @@ require_once(DOKU_INC.'inc/init.php');
// get merged style.ini
define('SIMPLE_TEST', true); // hack to prevent css output and headers
require_once(DOKU_INC.'lib/exe/css.php');
-$ini = css_styleini(tpl_incdir());
+$ini = css_styleini($conf['template']);
if ($ini) {
echo '<table>';