1 |
- var DOKU_BASE='/';var DOKU_TPL='/lib/tpl/dokuwiki-templates/';var DOKU_COOKIE_PARAM={"path":"\/","secure":true};Object.defineProperty(window,'DOKU_UHN',{get:function(){console.warn('Using DOKU_UHN is deprecated. Please use JSINFO.useHeadingNavigation instead');return JSINFO.useHeadingNavigation;}});Object.defineProperty(window,'DOKU_UHC',{get:function(){console.warn('Using DOKU_UHC is deprecated. Please use JSINFO.useHeadingContent instead');return JSINFO.useHeadingContent;}});LANG={"search_toggle_tools":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0438\u0441\u043a\u0430","willexpire":"\u0412\u0430\u0448\u0430 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0430\u00a0\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0441\u0442\u0435\u043a\u0430\u0435\u0442 \u0432\u00a0\u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043c\u0438\u043d\u0443\u0442\u044b.\\n\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u00bb \u0434\u043b\u044f \u0441\u0431\u0440\u043e\u0441\u0430 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b.","notsavedyet":"\u041d\u0435\u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u044b. \u0412\u044b\u00a0\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c?","searchmedia":"\u041f\u043e\u0438\u0441\u043a \u0444\u0430\u0439\u043b\u043e\u0432","keepopen":"\u041d\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043e\u043a\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0431\u043e\u0440\u0430","hidedetails":"\u0421\u043a\u0440\u044b\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0438","mediatitle":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0441\u044b\u043b\u043a\u0438","mediadisplay":"\u0422\u0438\u043f \u0441\u0441\u044b\u043b\u043a\u0438","mediaalign":"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435","mediasize":"\u0420\u0430\u0437\u043c\u0435\u0440","mediatarget":"\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430","mediaclose":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","mediainsert":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c","mediadisplayimg":"\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","mediadisplaylnk":"\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0441\u044b\u043b\u043a\u0443","mediasmall":"\u041c\u0430\u043b\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f","mediamedium":"\u0421\u0440\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f","medialarge":"\u041a\u0440\u0443\u043f\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f","mediaoriginal":"\u0418\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f","medialnk":"\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438","mediadirect":"\u041f\u0440\u044f\u043c\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430\u00a0\u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b","medianolnk":"\u0411\u0435\u0437 \u0441\u0441\u044b\u043b\u043a\u0438","medianolink":"\u041d\u0435 \u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430\u00a0\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","medialeft":"\u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","mediaright":"\u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","mediacenter":"\u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","medianoalign":"\u041d\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c","nosmblinks":"\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430\u00a0\u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438 Windows \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u00a0MS\u00a0Internet Explorer, \u043d\u043e\u00a0\u0432\u044b\u00a0\u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443.","linkwiz":"\u041c\u0430\u0441\u0442\u0435\u0440 \u0441\u0441\u044b\u043b\u043e\u043a","linkto":"\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430:","del_confirm":"\u0412\u044b\u00a0\u043d\u0430\u00a0\u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0435?","restore_confirm":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u0432\u0435\u0440\u0441\u0438\u044e?","media_diff":"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043e\u0442\u043b\u0438\u0447\u0438\u0439:","media_diff_both":"\u0440\u044f\u0434\u043e\u043c","media_diff_opacity":"\u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c","media_diff_portions":"\u0447\u0430\u0441\u0442\u044f\u043c\u0438","media_select":"\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b\u2026","media_upload_btn":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c","media_done_btn":"\u0413\u043e\u0442\u043e\u0432\u043e","media_drop":"\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u0441\u044e\u0434\u0430 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438","media_cancel":"\u0443\u0431\u0440\u0430\u0442\u044c","media_overwrt":"\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b","data_insecure":"WARNING: It seems your data directory is not properly secured. Please read about <a href=\"https:\/\/www.dokuwiki.org\/security#web_access_security\">Web Access Security in DokuWiki<\/a>.","plugins":{"extension":{"reallydel":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435?","display_viewoptions":"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a:","display_enabled":"\u0432\u043a\u043b\u044e\u0447\u0451\u043d","display_disabled":"\u043e\u0442\u043a\u043b\u044e\u0447\u0451\u043d","display_updatable":"\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435"},"logviewer":{"filter":"Filter Loglines:"},"styling":{"loader":"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440...<br \/>\u0415\u0441\u043b\u0438 \u0437\u0434\u0435\u0441\u044c \u0441\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u0431\u043e\u0439, \u0432\u0430\u0448\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0431\u0440\u043e\u0448\u0435\u043d\u044b","popup":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432\u043e \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u043c \u043e\u043a\u043d\u0435"}}};var toolbar=[{"type":"format","title":"\u041f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u0439","icon":"bold.png","key":"b","open":"**","close":"**","block":false},{"type":"format","title":"\u041a\u0443\u0440\u0441\u0438\u0432","icon":"italic.png","key":"i","open":"\/\/","close":"\/\/","block":false},{"type":"format","title":"\u041f\u043e\u0434\u0447\u0451\u0440\u043a\u043d\u0443\u0442\u044b\u0439","icon":"underline.png","key":"u","open":"__","close":"__","block":false},{"type":"format","title":"\u0422\u0435\u043a\u0441\u0442 \u043a\u043e\u0434\u0430","icon":"mono.png","key":"m","open":"''","close":"''","block":false},{"type":"format","title":"\u0417\u0430\u0447\u0451\u0440\u043a\u043d\u0443\u0442\u044b\u0439","icon":"strike.png","key":"d","open":"<del>","close":"<\/del>","block":false},{"type":"autohead","title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f","icon":"hequal.png","key":"8","text":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","mod":0,"block":true},{"type":"autohead","title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f (\u043f\u043e\u0434\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a)","icon":"hminus.png","key":"9","text":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","mod":1,"block":true},{"type":"autohead","title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f","icon":"hplus.png","key":"0","text":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","mod":-1,"block":true},{"type":"picker","title":"\u0412\u044b\u0431\u043e\u0440 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430","icon":"h.png","class":"pk_hl","list":[{"type":"format","title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1-\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f","icon":"h1.png","key":"1","open":"====== ","close":" ======\\n"},{"type":"format","title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2-\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f","icon":"h2.png","key":"2","open":"===== ","close":" =====\\n"},{"type":"format","title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3-\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f","icon":"h3.png","key":"3","open":"==== ","close":" ====\\n"},{"type":"format","title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 4-\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f","icon":"h4.png","key":"4","open":"=== ","close":" ===\\n"},{"type":"format","title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 5-\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f","icon":"h5.png","key":"5","open":"== ","close":" ==\\n"}],"block":true},{"type":"linkwiz","title":"\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u0441\u0441\u044b\u043b\u043a\u0430","icon":"link.png","key":"l","open":"[[","close":"]]","block":false},{"type":"format","title":"\u0412\u043d\u0435\u0448\u043d\u044f\u044f \u0441\u0441\u044b\u043b\u043a\u0430","icon":"linkextern.png","open":"[[","close":"]]","sample":"http:\/\/example.com|\u0412\u043d\u0435\u0448\u043d\u044f\u044f \u0441\u0441\u044b\u043b\u043a\u0430","block":false},{"type":"formatln","title":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430","icon":"ol.png","open":" - ","close":"","key":"-","block":true},{"type":"formatln","title":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0435\u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430","icon":"ul.png","open":" * ","close":"","key":".","block":true},{"type":"insert","title":"\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043b\u0438\u043d\u0438\u044f","icon":"hr.png","insert":"\\n----\\n","block":true},{"type":"mediapopup","title":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0430\u0439\u043b\u044b (\u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435)","icon":"image.png","url":"lib\/exe\/mediamanager.php?ns=","name":"mediaselect","options":"width=750,height=500,left=20,top=20,scrollbars=yes,resizable=yes","block":false},{"type":"picker","title":"\u0421\u043c\u0430\u0439\u043b\u0438\u043a\u0438","icon":"smiley.png","list":{"8-)":"cool.svg","8-O":"eek.svg","8-o":"eek.svg",":-(":"sad.svg",":-)":"smile.svg","=)":"smile2.svg",":-\/":"doubt.svg",":-\\":"doubt2.svg",":-?":"confused.svg",":-D":"biggrin.svg",":-P":"razz.svg",":-o":"surprised.svg",":-O":"surprised.svg",":-x":"silenced.svg",":-X":"silenced.svg",":-|":"neutral.svg",";-)":"wink.svg","m(":"facepalm.svg","^_^":"fun.svg",":?:":"question.svg",":!:":"exclaim.svg","LOL":"lol.svg","FIXME":"fixme.svg","DELETEME":"deleteme.svg"},"icobase":"smileys","block":false},{"type":"picker","title":"\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b","icon":"chars.png","list":["\u00c0","\u00e0","\u00c1","\u00e1","\u00c2","\u00e2","\u00c3","\u00e3","\u00c4","\u00e4","\u01cd","\u01ce","\u0102","\u0103","\u00c5","\u00e5","\u0100","\u0101","\u0104","\u0105","\u00c6","\u00e6","\u0106","\u0107","\u00c7","\u00e7","\u010c","\u010d","\u0108","\u0109","\u010a","\u010b","\u00d0","\u0111","\u00f0","\u010e","\u010f","\u00c8","\u00e8","\u00c9","\u00e9","\u00ca","\u00ea","\u00cb","\u00eb","\u011a","\u011b","\u0112","\u0113","\u0116","\u0117","\u0118","\u0119","\u0122","\u0123","\u011c","\u011d","\u011e","\u011f","\u0120","\u0121","\u0124","\u0125","\u00cc","\u00ec","\u00cd","\u00ed","\u00ce","\u00ee","\u00cf","\u00ef","\u01cf","\u01d0","\u012a","\u012b","\u0130","\u0131","\u012e","\u012f","\u0134","\u0135","\u0136","\u0137","\u0139","\u013a","\u013b","\u013c","\u013d","\u013e","\u0141","\u0142","\u013f","\u0140","\u0143","\u0144","\u00d1","\u00f1","\u0145","\u0146","\u0147","\u0148","\u00d2","\u00f2","\u00d3","\u00f3","\u00d4","\u00f4","\u00d5","\u00f5","\u00d6","\u00f6","\u01d1","\u01d2","\u014c","\u014d","\u0150","\u0151","\u0152","\u0153","\u00d8","\u00f8","\u0154","\u0155","\u0156","\u0157","\u0158","\u0159","\u015a","\u015b","\u015e","\u015f","\u0160","\u0161","\u015c","\u015d","\u0162","\u0163","\u0164","\u0165","\u00d9","\u00f9","\u00da","\u00fa","\u00db","\u00fb","\u00dc","\u00fc","\u01d3","\u01d4","\u016c","\u016d","\u016a","\u016b","\u016e","\u016f","\u01d6","\u01d8","\u01da","\u01dc","\u0172","\u0173","\u0170","\u0171","\u0174","\u0175","\u00dd","\u00fd","\u0178","\u00ff","\u0176","\u0177","\u0179","\u017a","\u017d","\u017e","\u017b","\u017c","\u00de","\u00fe","\u00df","\u0126","\u0127","\u00bf","\u00a1","\u00a2","\u00a3","\u00a4","\u00a5","\u20ac","\u00a6","\u00a7","\u00aa","\u00ac","\u00af","\u00b0","\u00b1","\u00f7","\u2030","\u00bc","\u00bd","\u00be","\u00b9","\u00b2","\u00b3","\u00b5","\u00b6","\u2020","\u2021","\u00b7","\u2022","\u00ba","\u2200","\u2202","\u2203","\u018f","\u0259","\u2205","\u2207","\u2208","\u2209","\u220b","\u220f","\u2211","\u203e","\u2212","\u2217","\u00d7","\u2044","\u221a","\u221d","\u221e","\u2220","\u2227","\u2228","\u2229","\u222a","\u222b","\u2234","\u223c","\u2245","\u2248","\u2260","\u2261","\u2264","\u2265","\u2282","\u2283","\u2284","\u2286","\u2287","\u2295","\u2297","\u22a5","\u22c5","\u25ca","\u2118","\u2111","\u211c","\u2135","\u2660","\u2663","\u2665","\u2666","\u03b1","\u03b2","\u0393","\u03b3","\u0394","\u03b4","\u03b5","\u03b6","\u03b7","\u0398","\u03b8","\u03b9","\u03ba","\u039b","\u03bb","\u03bc","\u039e","\u03be","\u03a0","\u03c0","\u03c1","\u03a3","\u03c3","\u03a4","\u03c4","\u03c5","\u03a6","\u03c6","\u03c7","\u03a8","\u03c8","\u03a9","\u03c9","\u2605","\u2606","\u260e","\u261a","\u261b","\u261c","\u261d","\u261e","\u261f","\u2639","\u263a","\u2714","\u2718","\u201e","\u201c","\u201d","\u201a","\u2018","\u2019","\u00ab","\u00bb","\u2039","\u203a","\u2014","\u2013","\u2026","\u2190","\u2191","\u2192","\u2193","\u2194","\u21d0","\u21d1","\u21d2","\u21d3","\u21d4","\u00a9","\u2122","\u00ae","\u2032","\u2033","[","]","{","}","~","(",")","%","\u00a7","$","#","|","@"],"block":false},{"type":"signature","title":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u044c","icon":"sig.png","key":"y","block":false}];(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof exports==='object'){factory(require('jquery'));}else{factory(jQuery);}}(function($){var pluses=/\+/g;function encode(s){return config.raw?s:encodeURIComponent(s);}function decode(s){return config.raw?s:decodeURIComponent(s);}function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value));}function parseCookieValue(s){if(s.indexOf('"')===0){s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,'\\');}try{s=decodeURIComponent(s.replace(pluses,' '));return config.json?JSON.parse(s):s;}catch(e){}}function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value;}var config=$.cookie=function(key,value,options){if(value!==undefined&&!$.isFunction(value)){options=$.extend({},config.defaults,options);if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setTime(+t+days*864e+5);}return(document.cookie=[encode(key),'=',stringifyCookieValue(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));}var result=key?undefined:{};var cookies=document.cookie?document.cookie.split('; '):[];for(var i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split('=');var name=decode(parts.shift());var cookie=parts.join('=');if(key&&key===name){result=read(cookie,value);break;}if(!key&&(cookie=read(cookie))!==undefined){result[name]=cookie;}}return result;};config.defaults={};$.removeCookie=function(key,options){if($.cookie(key)===undefined){return false;}$.cookie(key,'',$.extend({},options,{expires:-1}));return!$.cookie(key);};}));(function(factory){if(typeof define==="function"&&define.amd){define(["../widgets/datepicker"],factory);}else{factory(jQuery.datepicker);}}(function(datepicker){datepicker.regional.ru={closeText:"Закрыть",prevText:"<Пред",nextText:"След>",currentText:"Сегодня",monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthNamesShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],dayNames:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],dayNamesShort:["вск","пнд","втр","срд","чтв","птн","сбт"],dayNamesMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],weekHeader:"Нед",dateFormat:"dd.mm.yy",firstDay:1,isRTL:false,showMonthAfterYear:false,yearSuffix:""};datepicker.setDefaults(datepicker.regional.ru);return datepicker.regional.ru;}));var qq=qq||{};qq.extend=function(first,second){for(var prop in second){first[prop]=second[prop];}};qq.indexOf=function(arr,elt,from){if(arr.indexOf)return arr.indexOf(elt,from);from=from||0;var len=arr.length;if(from<0)from+=len;for(;from<len;from++){if(from in arr&&arr[from]===elt){return from;}}return-1;};qq.getUniqueId=(function(){var id=0;return function(){return id++;};})();qq.attach=function(element,type,fn){if(element.addEventListener){element.addEventListener(type,fn,false);}else if(element.attachEvent){element.attachEvent('on'+type,fn);}};qq.detach=function(element,type,fn){if(element.removeEventListener){element.removeEventListener(type,fn,false);}else if(element.attachEvent){element.detachEvent('on'+type,fn);}};qq.preventDefault=function(e){if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}};qq.insertBefore=function(a,b){b.parentNode.insertBefore(a,b);};qq.remove=function(element){element.parentNode.removeChild(element);};qq.contains=function(parent,descendant){if(parent==descendant)return true;if(parent.contains){return parent.contains(descendant);}else{return!!(descendant.compareDocumentPosition(parent)&8);}};qq.toElement=(function(){var div=document.createElement('div');return function(html){div.innerHTML=html;var element=div.firstChild;div.removeChild(element);return element;};})();qq.css=function(element,styles){if(styles.opacity!=null){if(typeof element.style.opacity!='string'&&typeof(element.filters)!='undefined'){styles.filter='alpha(opacity='+Math.round(100*styles.opacity)+')';}}qq.extend(element.style,styles);};qq.hasClass=function(element,name){var re=new RegExp('(^| )'+name+'( |$)');return re.test(element.className);};qq.addClass=function(element,name){if(!qq.hasClass(element,name)){element.className+=' '+name;}};qq.removeClass=function(element,name){var re=new RegExp('(^| )'+name+'( |$)');element.className=element.className.replace(re,' ').replace(/^\s+|\s+$/g,"");};qq.setText=function(element,text){element.innerText=text;element.textContent=text;};qq.children=function(element){var children=[],child=element.firstChild;while(child){if(child.nodeType==1){children.push(child);}child=child.nextSibling;}return children;};qq.getByClass=function(element,className){if(element.querySelectorAll){return element.querySelectorAll('.'+className);}var result=[];var candidates=element.getElementsByTagName("*");var len=candidates.length;for(var i=0;i<len;i++){if(qq.hasClass(candidates[i],className)){result.push(candidates[i]);}}return result;};qq.obj2url=function(obj,temp,prefixDone){var uristrings=[],prefix='&',add=function(nextObj,i){var nextTemp=temp?(/\[\]$/.test(temp))?temp:temp+'['+i+']':i;if((nextTemp!='undefined')&&(i!='undefined')){uristrings.push((typeof nextObj==='object')?qq.obj2url(nextObj,nextTemp,true):(Object.prototype.toString.call(nextObj)==='[object Function]')?encodeURIComponent(nextTemp)+'='+encodeURIComponent(nextObj()):encodeURIComponent(nextTemp)+'='+encodeURIComponent(nextObj));}};if(!prefixDone&&temp){prefix=(/\?/.test(temp))?(/\?$/.test(temp))?'':'&':'?';uristrings.push(temp);uristrings.push(qq.obj2url(obj));}else if((Object.prototype.toString.call(obj)==='[object Array]')&&(typeof obj!='undefined')){for(var i=0,len=obj.length;i<len;++i){add(obj[i],i);}}else if((typeof obj!='undefined')&&(obj!==null)&&(typeof obj==="object")){for(var i in obj){if(obj.hasOwnProperty(i)&&typeof obj[i]!='function'){add(obj[i],i);}}}else{uristrings.push(encodeURIComponent(temp)+'='+encodeURIComponent(obj));}return uristrings.join(prefix).replace(/^&/,'').replace(/%20/g,'+');};var qq=qq||{};qq.FileUploaderBasic=function(o){this._options={debug:false,action:'/server/upload',params:{},button:null,multiple:true,maxConnections:3,allowedExtensions:[],sizeLimit:0,minSizeLimit:0,onSubmit:function(id,fileName){},onProgress:function(id,fileName,loaded,total){},onComplete:function(id,fileName,responseJSON){},onCancel:function(id,fileName){},messages:{typeError:"{file} has invalid extension. Only {extensions} are allowed.",sizeError:"{file} is too large, maximum file size is {sizeLimit}.",minSizeError:"{file} is too small, minimum file size is {minSizeLimit}.",emptyError:"{file} is empty, please select files again without it.",onLeave:"The files are being uploaded, if you leave now the upload will be cancelled."},showMessage:function(message){alert(message);}};qq.extend(this._options,o);this._filesInProgress=0;this._handler=this._createUploadHandler();if(this._options.button){this._button=this._createUploadButton(this._options.button);}this._preventLeaveInProgress();};qq.FileUploaderBasic.prototype={setParams:function(params){this._options.params=params;},getInProgress:function(){return this._filesInProgress;},_createUploadButton:function(element){var self=this;return new qq.UploadButton({element:element,multiple:this._options.multiple&&qq.UploadHandlerXhr.isSupported(),onChange:function(input){self._onInputChange(input);}});},_createUploadHandler:function(){var self=this,handlerClass;if(qq.UploadHandlerXhr.isSupported()){handlerClass='UploadHandlerXhr';}else{handlerClass='UploadHandlerForm';}var handler=new qq[handlerClass]({debug:this._options.debug,action:this._options.action,maxConnections:this._options.maxConnections,onProgress:function(id,fileName,loaded,total){self._onProgress(id,fileName,loaded,total);self._options.onProgress(id,fileName,loaded,total);},onComplete:function(id,fileName,result){self._onComplete(id,fileName,result);self._options.onComplete(id,fileName,result);},onCancel:function(id,fileName){self._onCancel(id,fileName);self._options.onCancel(id,fileName);}});return handler;},_preventLeaveInProgress:function(){var self=this;qq.attach(window,'beforeunload',function(e){if(!self._filesInProgress){return;}var e=e||window.event;e.returnValue=self._options.messages.onLeave;return self._options.messages.onLeave;});},_onSubmit:function(id,fileName){this._filesInProgress++;},_onProgress:function(id,fileName,loaded,total){},_onComplete:function(id,fileName,result){this._filesInProgress--;if(result.error){this._options.showMessage(result.error);}},_onCancel:function(id,fileName){this._filesInProgress--;},_onInputChange:function(input){if(this._handler instanceof qq.UploadHandlerXhr){this._uploadFileList(input.files);}else{if(this._validateFile(input)){this._uploadFile(input);}}this._button.reset();},_uploadFileList:function(files){for(var i=0;i<files.length;i++){if(!this._validateFile(files[i])){return;}}for(var i=0;i<files.length;i++){this._uploadFile(files[i]);}},_uploadFile:function(fileContainer){var id=this._handler.add(fileContainer);var fileName=this._handler.getName(id);if(this._options.onSubmit(id,fileName)!==false){this._onSubmit(id,fileName);this._handler.upload(id,this._options.params);}},_validateFile:function(file){var name,size;if(file.value){name=file.value.replace(/.*(\/|\\)/,"");}else{name=file.fileName!=null?file.fileName:file.name;size=file.fileSize!=null?file.fileSize:file.size;}if(!this._isAllowedExtension(name)){this._error('typeError',name);return false;}else if(size===0){this._error('emptyError',name);return false;}else if(size&&this._options.sizeLimit&&size>this._options.sizeLimit){this._error('sizeError',name);return false;}else if(size&&size<this._options.minSizeLimit){this._error('minSizeError',name);return false;}return true;},_error:function(code,fileName){var message=this._options.messages[code];function r(name,replacement){message=message.replace(name,replacement);}r('{file}',this._formatFileName(fileName));r('{extensions}',this._options.allowedExtensions.join(', '));r('{sizeLimit}',this._formatSize(this._options.sizeLimit));r('{minSizeLimit}',this._formatSize(this._options.minSizeLimit));this._options.showMessage(message);},_formatFileName:function(name){if(name.length>33){name=name.slice(0,19)+'...'+name.slice(-13);}return name;},_isAllowedExtension:function(fileName){var ext=(-1!==fileName.indexOf('.'))?fileName.replace(/.*[.]/,'').toLowerCase():'';var allowed=this._options.allowedExtensions;if(!allowed.length){return true;}for(var i=0;i<allowed.length;i++){if(allowed[i].toLowerCase()==ext){return true;}}return false;},_formatSize:function(bytes){var i=-1;do{bytes=bytes/1024;i++;}while(bytes>99);return Math.max(bytes,0.1).toFixed(1)+['kB','MB','GB','TB','PB','EB'][i];}};qq.FileUploader=function(o){qq.FileUploaderBasic.apply(this,arguments);qq.extend(this._options,{element:null,listElement:null,template:'<div class="qq-uploader">'+'<div class="qq-upload-drop-area"><span>Drop files here to upload</span></div>'+'<div class="qq-upload-button">Upload a file</div>'+'<ul class="qq-upload-list"></ul>'+'</div>',fileTemplate:'<li>'+'<span class="qq-upload-file"></span>'+'<span class="qq-upload-spinner"></span>'+'<span class="qq-upload-size"></span>'+'<a class="qq-upload-cancel" href="#">Cancel</a>'+'<span class="qq-upload-failed-text">Failed</span>'+'</li>',classes:{button:'qq-upload-button',drop:'qq-upload-drop-area',dropActive:'qq-upload-drop-area-active',list:'qq-upload-list',file:'qq-upload-file',spinner:'qq-upload-spinner',size:'qq-upload-size',cancel:'qq-upload-cancel',success:'qq-upload-success',fail:'qq-upload-fail'}});qq.extend(this._options,o);this._element=this._options.element;this._element.innerHTML=this._options.template;this._listElement=this._options.listElement||this._find(this._element,'list');this._classes=this._options.classes;this._button=this._createUploadButton(this._find(this._element,'button'));this._bindCancelEvent();this._setupDragDrop();};qq.extend(qq.FileUploader.prototype,qq.FileUploaderBasic.prototype);qq.extend(qq.FileUploader.prototype,{_find:function(parent,type){var element=qq.getByClass(parent,this._options.classes[type])[0];if(!element){throw new Error('element not found '+type);}return element;},_setupDragDrop:function(){var self=this,dropArea=this._find(this._element,'drop');var dz=new qq.UploadDropZone({element:dropArea,onEnter:function(e){qq.addClass(dropArea,self._classes.dropActive);e.stopPropagation();},onLeave:function(e){e.stopPropagation();},onLeaveNotDescendants:function(e){qq.removeClass(dropArea,self._classes.dropActive);},onDrop:function(e){dropArea.style.display='none';qq.removeClass(dropArea,self._classes.dropActive);self._uploadFileList(e.dataTransfer.files);}});dropArea.style.display='none';qq.attach(document,'dragenter',function(e){if(!dz._isValidFileDrag(e))return;dropArea.style.display='block';});qq.attach(document,'dragleave',function(e){if(!dz._isValidFileDrag(e))return;var relatedTarget=document.elementFromPoint(e.clientX,e.clientY);if(!relatedTarget||relatedTarget.nodeName=="HTML"){dropArea.style.display='none';}});},_onSubmit:function(id,fileName){qq.FileUploaderBasic.prototype._onSubmit.apply(this,arguments);this._addToList(id,fileName);},_onProgress:function(id,fileName,loaded,total){qq.FileUploaderBasic.prototype._onProgress.apply(this,arguments);var item=this._getItemByFileId(id);var size=this._find(item,'size');size.style.display='inline';var text;if(loaded!=total){text=Math.round(loaded/total*100)+'% from '+this._formatSize(total);}else{text=this._formatSize(total);}qq.setText(size,text);},_onComplete:function(id,fileName,result){qq.FileUploaderBasic.prototype._onComplete.apply(this,arguments);var item=this._getItemByFileId(id);qq.remove(this._find(item,'cancel'));qq.remove(this._find(item,'spinner'));if(result.success){qq.addClass(item,this._classes.success);}else{qq.addClass(item,this._classes.fail);}},_addToList:function(id,fileName){var item=qq.toElement(this._options.fileTemplate);item.qqFileId=id;var fileElement=this._find(item,'file');qq.setText(fileElement,this._formatFileName(fileName));this._find(item,'size').style.display='none';this._listElement.appendChild(item);},_getItemByFileId:function(id){var item=this._listElement.firstChild;while(item){if(item.qqFileId==id)return item;item=item.nextSibling;}},_bindCancelEvent:function(){var self=this,list=this._listElement;qq.attach(list,'click',function(e){e=e||window.event;var target=e.target||e.srcElement;if(qq.hasClass(target,self._classes.cancel)){qq.preventDefault(e);var item=target.parentNode;self._handler.cancel(item.qqFileId);qq.remove(item);}});}});qq.UploadDropZone=function(o){this._options={element:null,onEnter:function(e){},onLeave:function(e){},onLeaveNotDescendants:function(e){},onDrop:function(e){}};qq.extend(this._options,o);this._element=this._options.element;this._disableDropOutside();this._attachEvents();};qq.UploadDropZone.prototype={_disableDropOutside:function(e){if(!qq.UploadDropZone.dropOutsideDisabled){qq.attach(document,'dragover',function(e){if(e.dataTransfer){e.dataTransfer.dropEffect='none';e.preventDefault();}});qq.UploadDropZone.dropOutsideDisabled=true;}},_attachEvents:function(){var self=this;qq.attach(self._element,'dragover',function(e){if(!self._isValidFileDrag(e))return;var effect=e.dataTransfer.effectAllowed;if(effect=='move'||effect=='linkMove'){e.dataTransfer.dropEffect='move';}else{e.dataTransfer.dropEffect='copy';}e.stopPropagation();e.preventDefault();});qq.attach(self._element,'dragenter',function(e){if(!self._isValidFileDrag(e))return;self._options.onEnter(e);});qq.attach(self._element,'dragleave',function(e){if(!self._isValidFileDrag(e))return;self._options.onLeave(e);var relatedTarget=document.elementFromPoint(e.clientX,e.clientY);if(qq.contains(this,relatedTarget))return;self._options.onLeaveNotDescendants(e);});qq.attach(self._element,'drop',function(e){if(!self._isValidFileDrag(e))return;e.preventDefault();self._options.onDrop(e);});},_isValidFileDrag:function(e){var dt=e.dataTransfer,isWebkit=navigator.userAgent.indexOf("AppleWebKit")>-1;return dt&&dt.effectAllowed!='none'&&(dt.files||(!isWebkit&&dt.types.contains&&dt.types.contains('Files')));}};qq.UploadButton=function(o){this._options={element:null,multiple:false,name:'file',onChange:function(input){},hoverClass:'qq-upload-button-hover',focusClass:'qq-upload-button-focus'};qq.extend(this._options,o);this._element=this._options.element;qq.css(this._element,{position:'relative',overflow:'hidden',direction:'ltr'});this._input=this._createInput();};qq.UploadButton.prototype={getInput:function(){return this._input;},reset:function(){if(this._input.parentNode){qq.remove(this._input);}qq.removeClass(this._element,this._options.focusClass);this._input=this._createInput();},_createInput:function(){var input=document.createElement("input");if(this._options.multiple){input.setAttribute("multiple","multiple");}input.setAttribute("type","file");input.setAttribute("name",this._options.name);qq.css(input,{position:'absolute',right:0,top:0,fontFamily:'Arial',fontSize:'118px',margin:0,padding:0,cursor:'pointer',opacity:0});this._element.appendChild(input);var self=this;qq.attach(input,'change',function(){self._options.onChange(input);});qq.attach(input,'mouseover',function(){qq.addClass(self._element,self._options.hoverClass);});qq.attach(input,'mouseout',function(){qq.removeClass(self._element,self._options.hoverClass);});qq.attach(input,'focus',function(){qq.addClass(self._element,self._options.focusClass);});qq.attach(input,'blur',function(){qq.removeClass(self._element,self._options.focusClass);});if(window.attachEvent){input.setAttribute('tabIndex',"-1");}return input;}};qq.UploadHandlerAbstract=function(o){this._options={debug:false,action:'/upload.php',maxConnections:999,onProgress:function(id,fileName,loaded,total){},onComplete:function(id,fileName,response){},onCancel:function(id,fileName){}};qq.extend(this._options,o);this._queue=[];this._params=[];};qq.UploadHandlerAbstract.prototype={log:function(str){if(this._options.debug&&window.console)console.log('[uploader] '+str);},add:function(file){},upload:function(id,params){var len=this._queue.push(id);var copy={};qq.extend(copy,params);this._params[id]=copy;if(len<=this._options.maxConnections){this._upload(id,this._params[id]);}},cancel:function(id){this._cancel(id);this._dequeue(id);},cancelAll:function(){for(var i=0;i<this._queue.length;i++){this._cancel(this._queue[i]);}this._queue=[];},getName:function(id){},getSize:function(id){},getQueue:function(){return this._queue;},_upload:function(id){},_cancel:function(id){},_dequeue:function(id){var i=qq.indexOf(this._queue,id);this._queue.splice(i,1);var max=this._options.maxConnections;if(this._queue.length>=max&&i<max){var nextId=this._queue[max-1];this._upload(nextId,this._params[nextId]);}}};qq.UploadHandlerForm=function(o){qq.UploadHandlerAbstract.apply(this,arguments);this._inputs={};};qq.extend(qq.UploadHandlerForm.prototype,qq.UploadHandlerAbstract.prototype);qq.extend(qq.UploadHandlerForm.prototype,{add:function(fileInput){fileInput.setAttribute('name','qqfile');var id='qq-upload-handler-iframe'+qq.getUniqueId();this._inputs[id]=fileInput;if(fileInput.parentNode){qq.remove(fileInput);}return id;},getName:function(id){return this._inputs[id].value.replace(/.*(\/|\\)/,"");},_cancel:function(id){this._options.onCancel(id,this.getName(id));delete this._inputs[id];var iframe=document.getElementById(id);if(iframe){iframe.setAttribute('src','javascript:false;');qq.remove(iframe);}},_upload:function(id,params){var input=this._inputs[id];if(!input){throw new Error('file with passed id was not added, or already uploaded or cancelled');}var fileName=this.getName(id);var iframe=this._createIframe(id);var form=this._createForm(iframe,params);form.appendChild(input);var self=this;this._attachLoadEvent(iframe,function(){self.log('iframe loaded');var response=self._getIframeContentJSON(iframe);self._options.onComplete(id,fileName,response);self._dequeue(id);delete self._inputs[id];setTimeout(function(){qq.remove(iframe);},1);});form.submit();qq.remove(form);return id;},_attachLoadEvent:function(iframe,callback){qq.attach(iframe,'load',function(){if(!iframe.parentNode){return;}if(iframe.contentDocument&&iframe.contentDocument.body&&iframe.contentDocument.body.innerHTML=="false"){return;}callback();});},_getIframeContentJSON:function(iframe){var doc=iframe.contentDocument?iframe.contentDocument:iframe.contentWindow.document,response;this.log("converting iframe's innerHTML to JSON");this.log("innerHTML = "+doc.body.innerHTML);try{response=eval("("+doc.body.innerHTML+")");}catch(err){response={};}return response;},_createIframe:function(id){var iframe=qq.toElement('<iframe src="javascript:false;" name="'+id+'" />');iframe.setAttribute('id',id);iframe.style.display='none';document.body.appendChild(iframe);return iframe;},_createForm:function(iframe,params){var form=qq.toElement('<form method="post" enctype="multipart/form-data"></form>');var queryString=qq.obj2url(params,this._options.action);form.setAttribute('action',queryString);form.setAttribute('target',iframe.name);form.style.display='none';document.body.appendChild(form);return form;}});qq.UploadHandlerXhr=function(o){qq.UploadHandlerAbstract.apply(this,arguments);this._files=[];this._xhrs=[];this._loaded=[];};qq.UploadHandlerXhr.isSupported=function(){var input=document.createElement('input');input.type='file';return('multiple'in input&&typeof File!="undefined"&&typeof(new XMLHttpRequest()).upload!="undefined");};qq.extend(qq.UploadHandlerXhr.prototype,qq.UploadHandlerAbstract.prototype);qq.extend(qq.UploadHandlerXhr.prototype,{add:function(file){if(!(file instanceof File)){throw new Error('Passed obj in not a File (in qq.UploadHandlerXhr)');}return this._files.push(file)-1;},getName:function(id){var file=this._files[id];return file.fileName!=null?file.fileName:file.name;},getSize:function(id){var file=this._files[id];return file.fileSize!=null?file.fileSize:file.size;},getLoaded:function(id){return this._loaded[id]||0;},_upload:function(id,params){var file=this._files[id],name=this.getName(id),size=this.getSize(id);this._loaded[id]=0;var xhr=this._xhrs[id]=new XMLHttpRequest();var self=this;xhr.upload.onprogress=function(e){if(e.lengthComputable){self._loaded[id]=e.loaded;self._options.onProgress(id,name,e.loaded,e.total);}};xhr.onreadystatechange=function(){if(xhr.readyState==4){self._onComplete(id,xhr);}};params=params||{};params['qqfile']=name;var queryString=qq.obj2url(params,this._options.action);xhr.open("POST",queryString,true);xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("X-File-Name",encodeURIComponent(name));xhr.setRequestHeader("Content-Type","application/octet-stream");xhr.send(file);},_onComplete:function(id,xhr){if(!this._files[id])return;var name=this.getName(id);var size=this.getSize(id);this._options.onProgress(id,name,size,size);if(xhr.status==200){this.log("xhr - server response received");this.log("responseText = "+xhr.responseText);var response;try{response=eval("("+xhr.responseText+")");}catch(err){response={};}this._options.onComplete(id,name,response);}else{this._options.onComplete(id,name,{});}this._files[id]=null;this._xhrs[id]=null;this._dequeue(id);},_cancel:function(id){this._options.onCancel(id,this.getName(id));this._files[id]=null;if(this._xhrs[id]){this._xhrs[id].abort();this._xhrs[id]=null;}}});qq.extend(qq.FileUploader.prototype,{_createUploadHandler:function(){var self=this,handlerClass;if(qq.UploadHandlerXhr.isSupported()){handlerClass='UploadHandlerXhr';}else{handlerClass='UploadHandlerForm';}var handler=new qq[handlerClass]({debug:this._options.debug,action:this._options.action,maxConnections:this._options.maxConnections,onProgress:function(id,fileName,loaded,total){self._onProgress(id,fileName,loaded,total);self._options.onProgress(id,fileName,loaded,total);},onComplete:function(id,fileName,result){self._onComplete(id,fileName,result);self._options.onComplete(id,fileName,result);},onCancel:function(id,fileName){self._onCancel(id,fileName);self._options.onCancel(id,fileName);},onUpload:function(){self._onUpload();}});return handler;},_onUpload:function(){this._handler.uploadAll(this._options.params);},_uploadFile:function(fileContainer){var id=this._handler.add(fileContainer);var fileName=this._handler.getName(id);if(this._options.onSubmit(id,fileName)!==false){this._onSubmit(id,fileName);}},_addToList:function(id,fileName){var item=qq.toElement(this._options.fileTemplate);item.qqFileId=id;var fileElement=this._find(item,'file');qq.setText(fileElement,fileName);this._find(item,'size').style.display='none';var nameElement=this._find(item,'nameInput');fileName=fileName.toLowerCase();fileName=fileName.replace(/([ !"#$%&\'()+,\/;<=>?@[\]^`{|}~:]+)/g,'_');fileName=fileName.replace(/^_+/,'');nameElement.value=fileName;nameElement.id='mediamanager__upload_item'+id;this._listElement.appendChild(item);}});qq.FileUploaderExtended=function(o){qq.FileUploaderBasic.apply(this,arguments);qq.extend(this._options,{element:null,listElement:null,template:'<div class="qq-uploader">'+'<div class="qq-upload-drop-area"><span>'+LANG.media_drop+'</span></div>'+'<div class="qq-upload-button">'+LANG.media_select+'</div>'+'<ul class="qq-upload-list"></ul>'+'<div class="qq-action-container">'+' <button class="qq-upload-action" type="submit" id="mediamanager__upload_button">'+LANG.media_upload_btn+'</button>'+' <label class="qq-overwrite-check"><input type="checkbox" value="1" name="ow" class="dw__ow"> <span>'+LANG.media_overwrt+'</span></label>'+'</div>'+'</div>',fileTemplate:'<li>'+'<span class="qq-upload-file hidden"></span>'+' <input class="qq-upload-name-input edit" type="text" value="" />'+' <span class="qq-upload-spinner hidden"></span>'+' <span class="qq-upload-size"></span>'+' <a class="qq-upload-cancel" href="#">'+LANG.media_cancel+'</a>'+' <span class="qq-upload-failed-text error">Failed</span>'+'</li>',classes:{button:'qq-upload-button',drop:'qq-upload-drop-area',dropActive:'qq-upload-drop-area-active',list:'qq-upload-list',nameInput:'qq-upload-name-input',overwriteInput:'qq-overwrite-check',uploadButton:'qq-upload-action',file:'qq-upload-file',spinner:'qq-upload-spinner',size:'qq-upload-size',cancel:'qq-upload-cancel',success:'qq-upload-success',fail:'qq-upload-fail',failedText:'qq-upload-failed-text'}});qq.extend(this._options,o);this._element=this._options.element;this._element.innerHTML=this._options.template;this._listElement=this._options.listElement||this._find(this._element,'list');this._classes=this._options.classes;this._button=this._createUploadButton(this._find(this._element,'button'));this._bindCancelEvent();this._bindUploadEvent();this._setupDragDrop();};qq.extend(qq.FileUploaderExtended.prototype,qq.FileUploader.prototype);qq.extend(qq.FileUploaderExtended.prototype,{_bindUploadEvent:function(){var self=this,list=this._listElement;qq.attach(document.getElementById('mediamanager__upload_button'),'click',function(e){e=e||window.event;var target=e.target||e.srcElement;qq.preventDefault(e);self._handler._options.onUpload();jQuery(".qq-upload-name-input").each(function(i){jQuery(this).prop('disabled',true);});});},_onComplete:function(id,fileName,result){this._filesInProgress--;var item=this._getItemByFileId(id);qq.remove(this._find(item,'cancel'));qq.remove(this._find(item,'spinner'));var nameInput=this._find(item,'nameInput');var fileElement=this._find(item,'file');qq.setText(fileElement,nameInput.value);qq.removeClass(fileElement,'hidden');qq.remove(nameInput);jQuery('.qq-upload-button, #mediamanager__upload_button').remove();jQuery('.dw__ow').parent().hide();jQuery('.qq-upload-drop-area').remove();if(result.success){qq.addClass(item,this._classes.success);$link='<a href="'+result.link+'" id="h_:'+result.id+'" class="select">'+nameInput.value+'</a>';jQuery(fileElement).html($link);}else{qq.addClass(item,this._classes.fail);var fail=this._find(item,'failedText');if(result.error)qq.setText(fail,result.error);}if(document.getElementById('media__content')&&!document.getElementById('mediamanager__done_form')){var action=document.location.href;var i=action.indexOf('?');if(i)action=action.substr(0,i);var button='<form method="post" action="'+action+'" id="mediamanager__done_form"><div>';button+='<input type="hidden" value="'+result.ns+'" name="ns">';button+='<input type="hidden" value="1" name="recent">';button+='<button type="submit">'+LANG.media_done_btn+'</button></div></form>';jQuery('#mediamanager__uploader').append(button);}}});qq.extend(qq.UploadHandlerForm.prototype,{uploadAll:function(params){this._uploadAll(params);},getName:function(id){var file=this._inputs[id];var name=document.getElementById('mediamanager__upload_item'+id);if(name!=null){return name.value;}else{if(file!=null){return file.value.replace(/.*(\/|\\)/,"");}else{return null;}}},_uploadAll:function(params){jQuery(".qq-upload-spinner").each(function(i){jQuery(this).removeClass('hidden');});for(key in this._inputs){this.upload(key,params);}},_upload:function(id,params){var input=this._inputs[id];if(!input){throw new Error('file with passed id was not added, or already uploaded or cancelled');}var fileName=this.getName(id);var iframe=this._createIframe(id);var form=this._createForm(iframe,params);form.appendChild(input);var nameInput=qq.toElement('<input name="mediaid" value="'+fileName+'" type="text">');form.appendChild(nameInput);var checked=jQuery('.dw__ow').is(':checked');var owCheckbox=jQuery('.dw__ow').clone();owCheckbox.attr('checked',checked);jQuery(form).append(owCheckbox);var self=this;this._attachLoadEvent(iframe,function(){self.log('iframe loaded');var response=self._getIframeContentJSON(iframe);self._options.onComplete(id,fileName,response);self._dequeue(id);delete self._inputs[id];setTimeout(function(){qq.remove(iframe);},1);});form.submit();qq.remove(form);return id;}});qq.extend(qq.UploadHandlerXhr.prototype,{uploadAll:function(params){this._uploadAll(params);},getName:function(id){var file=this._files[id];var name=document.getElementById('mediamanager__upload_item'+id);if(name!=null){return name.value;}else{if(file!=null){return file.fileName!=null?file.fileName:file.name;}else{return null;}}},getSize:function(id){var file=this._files[id];if(file==null)return null;return file.fileSize!=null?file.fileSize:file.size;},_upload:function(id,params){var file=this._files[id],name=this.getName(id),size=this.getSize(id);if(name==null||size==null)return;this._loaded[id]=0;var xhr=this._xhrs[id]=new XMLHttpRequest();var self=this;xhr.upload.onprogress=function(e){if(e.lengthComputable){self._loaded[id]=e.loaded;self._options.onProgress(id,name,e.loaded,e.total);}};xhr.onreadystatechange=function(){if(xhr.readyState==4){self._onComplete(id,xhr);}};params=params||{};params['qqfile']=name;params['ow']=jQuery('.dw__ow').is(':checked');var queryString=qq.obj2url(params,this._options.action);xhr.open("POST",queryString,true);xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("X-File-Name",encodeURIComponent(name));xhr.setRequestHeader("Content-Type","application/octet-stream");xhr.send(file);},_uploadAll:function(params){jQuery(".qq-upload-spinner").each(function(i){jQuery(this).removeClass('hidden');});for(key in this._files){this.upload(key,params);}}});function substr_replace(str,replace,start,length){var a2,b1;a2=(start<0?str.length:0)+start;if(typeof length==='undefined'){length=str.length-a2;}else if(length<0&&start<0&&length<=start){length=0;}b1=(length<0?str.length:a2)+length;return str.substring(0,a2)+replace+str.substring(b1);}function bind(fnc){var Aps=Array.prototype.slice,static_args=Aps.call(arguments,1);return function(){return fnc.apply(this,static_args.concat(Aps.call(arguments,0)));};}function logError(e,file){if(window.console&&console.error){console.error('The error "%s: %s" occurred in file "%s". '+'If this is in a plugin try updating or disabling the plugin, '+'if this is in a template try updating the template or switching to the "dokuwiki" template.',e.name,e.message,file);if(e.stack){console.error(e.stack);}}}var timer={_cur_id:0,_handlers:{},execDispatch:function(id){timer._handlers[id]();},add:function(func,timeout){var id=++timer._cur_id;timer._handlers[id]=func;return window.setTimeout('timer.execDispatch('+id+')',timeout);}};function Delay(func,timeout){this.func=func;if(timeout){this.timeout=timeout;}}Delay.prototype={func:null,timeout:500,delTimer:function(){if(this.timer!==null){window.clearTimeout(this.timer);this.timer=null;}},start:function(){DEPRECATED('don\'t use the Delay object, use window.timeout with a callback instead');this.delTimer();var _this=this;this.timer=timer.add(function(){_this.exec.call(_this);},this.timeout);this._data={_this:arguments[0],_params:Array.prototype.slice.call(arguments,2)};},exec:function(){this.delTimer();this.func.call(this._data._this,this._data._params);}};var DokuCookie={data:{},name:'DOKU_PREFS',setValue:function(key,val){var text=[],_this=this;this.init();if(val===false){delete this.data[key];}else{val=val+"";this.data[key]=val;}jQuery.each(_this.data,function(key,val){if(_this.data.hasOwnProperty(key)){text.push(encodeURIComponent(key)+'#'+encodeURIComponent(val));}});jQuery.cookie(this.name,text.join('#'),{expires:365,path:DOKU_COOKIE_PARAM.path,secure:DOKU_COOKIE_PARAM.secure});},getValue:function(key,def){this.init();return this.data.hasOwnProperty(key)?this.data[key]:def;},init:function(){var text,parts,i;if(!jQuery.isEmptyObject(this.data)){return;}text=jQuery.cookie(this.name);if(text){parts=text.split('#');for(i=0;i<parts.length;i+=2){this.data[decodeURIComponent(parts[i])]=decodeURIComponent(parts[i+1]);}}}};if('function'===typeof jQuery&&'function'===typeof jQuery.noConflict){jQuery.noConflict();}var clientPC=navigator.userAgent.toLowerCase();var is_macos=navigator.appVersion.indexOf('Mac')!=-1;var is_gecko=((clientPC.indexOf('gecko')!=-1)&&(clientPC.indexOf('spoofer')==-1)&&(clientPC.indexOf('khtml')==-1)&&(clientPC.indexOf('netscape/7.0')==-1));var is_safari=((clientPC.indexOf('applewebkit')!=-1)&&(clientPC.indexOf('spoofer')==-1));var is_khtml=(navigator.vendor=='KDE'||(document.childNodes&&!document.all&&!navigator.taintEnabled));if(clientPC.indexOf('opera')!=-1){var is_opera=true;var is_opera_preseven=(window.opera&&!document.childNodes);var is_opera_seven=(window.opera&&document.childNodes);}function closePopups(){jQuery('div.JSpopup').hide();}jQuery(function(){jQuery(document).on('click',closePopups);});jQuery.fn.dw_qsearch=function(overrides){var dw_qsearch={output:'#qsearch__out',$inObj:this,$outObj:null,timer:null,curRequest:null,init:function(){var do_qsearch;dw_qsearch.$outObj=jQuery(dw_qsearch.output);if(dw_qsearch.$inObj.length===0||dw_qsearch.$outObj.length===0){return;}do_qsearch=function(){if(dw_qsearch.curRequest!=null){dw_qsearch.curRequest.abort();}var value=dw_qsearch.getSearchterm();if(value===''){dw_qsearch.clear_results();return;}dw_qsearch.$inObj.parents('form').addClass('searching');dw_qsearch.curRequest=jQuery.post(DOKU_BASE+'lib/exe/ajax.php',{call:'qsearch',q:encodeURI(value)},dw_qsearch.onCompletion,'html');};dw_qsearch.$inObj.on('keyup',function(){if(dw_qsearch.timer){window.clearTimeout(dw_qsearch.timer);dw_qsearch.timer=null;}dw_qsearch.timer=window.setTimeout(do_qsearch,500);});dw_qsearch.$outObj.on('click',dw_qsearch.clear_results);},getSearchterm:function(){return dw_qsearch.$inObj.val();},clear_results:function(){dw_qsearch.$inObj.parents('form').removeClass('searching');dw_qsearch.$outObj.hide();dw_qsearch.$outObj.text('');},onCompletion:function(data){var max,$links,too_big;dw_qsearch.$inObj.parents('form').removeClass('searching');dw_qsearch.curRequest=null;if(data===''){dw_qsearch.clear_results();return;}dw_qsearch.$outObj .html(data).show().css('white-space','nowrap');dw_qsearch.$outObj.find('li').css('overflow','visible');$links=dw_qsearch.$outObj.find('a');max=dw_qsearch.$outObj[0].clientWidth;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;if(!too_big(this)){return;}nsL=this.textContent.indexOf('(');nsR=this.textContent.indexOf(')');eli=0;runaway=0;while((nsR-nsL>3)&&too_big(this)&&runaway++<500){if(eli!==0){if((eli-nsL)>(nsR-eli)){start=eli-2;length=2;}else{start=eli+1;length=1;}replace='';}else{start=Math.floor(nsL+((nsR-nsL)/2));length=1;replace='…';}this.textContent=substr_replace(this.textContent,replace,start,length);eli=this.textContent.indexOf('…');nsL=this.textContent.indexOf('(');nsR=this.textContent.indexOf(')');}});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(){jQuery('#qsearch__in').dw_qsearch({output:'#qsearch__out'});});jQuery(function(){'use strict';var $searchForm=jQuery('.search-results-form');if(!$searchForm.length){return;}var $toggleAssistanceButton=jQuery('<button>').addClass('toggleAssistant').attr('type','button').attr('aria-expanded','false').text(LANG.search_toggle_tools).prependTo($searchForm.find('fieldset'));$toggleAssistanceButton.on('click',function(){jQuery('.advancedOptions').toggle(0,function(){var $me=jQuery(this);if($me.attr('aria-hidden')){$me.removeAttr('aria-hidden');$toggleAssistanceButton.attr('aria-expanded','true');DokuCookie.setValue('sa','on');}else{$me.attr('aria-hidden','true');$toggleAssistanceButton.attr('aria-expanded','false');DokuCookie.setValue('sa','off');}});});if(DokuCookie.getValue('sa')==='on'){$toggleAssistanceButton.trigger('click');}$searchForm.find('.advancedOptions .toggle div.current').on('click',function(){var $me=jQuery(this);$me.parent().siblings().removeClass('open');$me.parent().siblings().find('ul:first').attr('aria-expanded','false');$me.parent().toggleClass('open');if($me.parent().hasClass('open')){$me.parent().find('ul:first').attr('aria-expanded','true');}else{$me.parent().find('ul:first').attr('aria-expanded','false');}});});jQuery.fn.dw_tree=function(overrides){var dw_tree={throbber_delay:500,$obj:this,toggle_selector:'a.idx_dir',init:function(){this.$obj.on('click',this.toggle_selector,this,this.toggle);jQuery('ul:first',this.$obj).attr('role','tree');jQuery('ul',this.$obj).not(':first').attr('role','group');jQuery('li',this.$obj).attr('role','treeitem');jQuery('li.open > ul',this.$obj).attr('aria-expanded','true');jQuery('li.closed > ul',this.$obj).attr('aria-expanded','false');jQuery('li.closed',this.$obj).attr('aria-live','assertive');},toggle:function(e){var $listitem,$sublist,timeout,$clicky,show_sublist,dw_tree,opening;e.preventDefault();dw_tree=e.data;$clicky=jQuery(this);$listitem=$clicky.closest('li');$sublist=$listitem.find('ul').first();opening=$listitem.hasClass('closed');dw_tree.toggle_display($clicky,opening);if($sublist.is(':visible')){$listitem.removeClass('open').addClass('closed');$sublist.attr('aria-expanded','false');}else{$listitem.removeClass('closed').addClass('open');$sublist.attr('aria-expanded','true');}if(!opening){$sublist.dw_hide();return;}show_sublist=function(data){$sublist.hide();if(typeof data!=='undefined'){$sublist.html(data);$sublist.parent().attr('aria-busy','false').removeAttr('aria-live');jQuery('li.closed',$sublist).attr('aria-live','assertive');}if($listitem.hasClass('open')){$sublist.dw_show();}};if($sublist.length>0){show_sublist();return;}$sublist=jQuery('<ul class="idx" role="group"/>');$listitem.append($sublist);timeout=window.setTimeout(bind(show_sublist,'<li aria-busy="true"><img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="loading..." title="loading..." /></li>'),dw_tree.throbber_delay);dw_tree.load_data(function(data){window.clearTimeout(timeout);show_sublist(data);},$clicky);},toggle_display:function($clicky,opening){},load_data:function(show_data,$clicky){show_data();}};jQuery.extend(dw_tree,overrides);if(!overrides.deferInit){dw_tree.init();}return dw_tree;};var dw_index=jQuery('#index__tree').dw_tree({deferInit:true,load_data:function(show_sublist,$clicky){jQuery.post(DOKU_BASE+'lib/exe/ajax.php',$clicky[0].search.substr(1)+'&call=index',show_sublist,'html');}});jQuery(function(){var $tree=jQuery('#index__tree');dw_index.$obj=$tree;dw_index.init();});function selection_class(){this.start=0;this.end=0;this.obj=null;this.scroll=0;this.fix=0;this.getLength=function(){return this.end-this.start;};this.getText=function(){return(!this.obj)?'':this.obj.value.substring(this.start,this.end);};}function DWgetSelection(textArea){var sel=new selection_class();textArea.focus();sel.obj=textArea;sel.start=textArea.selectionStart;sel.end=textArea.selectionEnd;sel.scroll=textArea.scrollTop;return sel;}function DWsetSelection(selection){selection.obj.setSelectionRange(selection.start,selection.end);if(selection.scroll)selection.obj.scrollTop=selection.scroll;}function pasteText(selection,text,opts){if(!opts)opts={};selection.obj.value=selection.obj.value.substring(0,selection.start)+text+selection.obj.value.substring(selection.end,selection.obj.value.length);if(is_opera){selection.end=selection.start+text.replace(/\r?\n/g,'\r\n').length;}else{selection.end=selection.start+text.length;}if(opts.startofs)selection.start+=opts.startofs;if(opts.endofs)selection.end-=opts.endofs;if(opts.nosel)selection.start=selection.end;DWsetSelection(selection);}function insertTags(textAreaID,tagOpen,tagClose,sampleText){var txtarea=jQuery('#'+textAreaID)[0];var selection=DWgetSelection(txtarea);var text=selection.getText();var opts;if(text.charAt(text.length-1)==' '){selection.end--;text=selection.getText();}if(!text){text=sampleText;opts={startofs:tagOpen.length,endofs:tagClose.length};}else{opts={nosel:true};}text=tagOpen+text+tagClose;pasteText(selection,text,opts);}function insertAtCarret(textAreaID,text){var txtarea=jQuery('#'+textAreaID)[0];var selection=DWgetSelection(txtarea);pasteText(selection,text,{nosel:true});}var pickercounter=0;function initToolbar(tbid,edid,tb,allowblock){var $toolbar,$edit;if(typeof tbid=='string'){$toolbar=jQuery('#'+tbid);}else{$toolbar=jQuery(tbid);}$edit=jQuery('#'+edid);if($toolbar.length==0||$edit.length==0||$edit.attr('readOnly')){return;}if(typeof allowblock==='undefined'){allowblock=true;}$toolbar.html('');jQuery.each(tb,function(k,val){if(!tb.hasOwnProperty(k)||(!allowblock&&val.block===true)){return;}var actionFunc,$btn;$btn=jQuery(createToolButton(val.icon,val.title,val.key,val.id,val['class']));actionFunc='tb_'+val.type;if(jQuery.isFunction(window[actionFunc])){$btn.on('click',bind(window[actionFunc],$btn,val,edid));$toolbar.append($btn);return;}actionFunc='addBtnAction'+val.type.charAt(0).toUpperCase()+val.type.substring(1);if(jQuery.isFunction(window[actionFunc])){var pickerid=window[actionFunc]($btn,val,edid);if(pickerid!==''){$toolbar.append($btn);$btn.attr('aria-controls',pickerid);if(actionFunc==='addBtnActionPicker'){$btn.attr('aria-haspopup','true');}}return;}alert('unknown toolbar type: '+val.type+' '+actionFunc);});}function tb_format(btn,props,edid){var sample=props.sample||props.title;insertTags(edid,fixtxt(props.open),fixtxt(props.close),fixtxt(sample));pickerClose();return false;}function tb_formatln(btn,props,edid){var sample=props.sample||props.title,opts,selection=DWgetSelection(jQuery('#'+edid)[0]);sample=fixtxt(sample);props.open=fixtxt(props.open);props.close=fixtxt(props.close);if(selection.getLength()){sample=selection.getText();opts={nosel:true};}else{opts={startofs:props.open.length,endofs:props.close.length};}sample=sample.split("\n").join(props.close+"\n"+props.open);sample=props.open+sample+props.close;pasteText(selection,sample,opts);pickerClose();return false;}function tb_insert(btn,props,edid){insertAtCarret(edid,fixtxt(props.insert));pickerClose();return false;}function tb_mediapopup(btn,props,edid){window.open(DOKU_BASE+props.url+encodeURIComponent(NS)+'&edid='+encodeURIComponent(edid),props.name,props.options);return false;}function tb_autohead(btn,props,edid){var lvl=currentHeadlineLevel(edid),tags;lvl+=props.mod;if(lvl<1)lvl=1;if(lvl>5)lvl=5;tags=(new Array(8-lvl)).join('=');insertTags(edid,tags+' ',' '+tags+"\n",props.text);pickerClose();return false;}function addBtnActionPicker($btn,props,edid){var pickerid='picker'+(pickercounter++);var picker=createPicker(pickerid,props,edid);jQuery(picker).attr('aria-hidden','true');$btn.click(function(e){pickerToggle(pickerid,$btn);e.preventDefault();return'';});return pickerid;}function addBtnActionLinkwiz($btn,props,edid){dw_linkwiz.init(jQuery('#'+edid));jQuery($btn).click(function(e){dw_linkwiz.val=props;dw_linkwiz.toggle();e.preventDefault();return'';});return'link__wiz';}function pickerToggle(pickerid,$btn){var $picker=jQuery('#'+pickerid),pos=$btn.offset();if($picker.hasClass('a11y')){$picker.removeClass('a11y').attr('aria-hidden','false');}else{$picker.addClass('a11y').attr('aria-hidden','true');}var picker_left=pos.left+3,picker_width=$picker.width(),window_width=jQuery(window).width();if(picker_width>300){$picker.css("max-width","300");picker_width=300;}if((picker_left+picker_width+40)>window_width){picker_left=window_width-picker_width-40;}if(picker_left<0){picker_left=0;}$picker.offset({left:picker_left,top:pos.top+$btn[0].offsetHeight+3});}function pickerClose(){jQuery('.picker').addClass('a11y');}function fixtxt(str){return str.replace(/\\n/g,"\n");}jQuery(function(){initToolbar('tool__bar','wiki__text',toolbar);jQuery('#tool__bar').attr('role','toolbar');});function createToolButton(icon,label,key,id,classname){var $btn=jQuery(document.createElement('button')),$ico=jQuery(document.createElement('img'));$btn.addClass('toolbutton');if(classname){$btn.addClass(classname);}$btn.attr('title',label).attr('aria-controls','wiki__text');if(key){$btn.attr('title',label+' ['+key.toUpperCase()+']').attr('accessKey',key);}if(id){$btn.attr('id',id);$ico.attr('id',id+'_ico');}if(icon.substr(0,1)!=='/'){icon=DOKU_BASE+'lib/images/toolbar/'+icon;}$ico.attr('src',icon);$ico.attr('alt','');$ico.attr('width',16);$ico.attr('height',16);$btn.append($ico);return $btn[0];}function createPicker(id,props,edid){var $picker=jQuery(document.createElement('div'));$picker.addClass('picker a11y');if(props['class']){$picker.addClass(props['class']);}$picker.attr('id',id).css('position','absolute');function $makebutton(title){var $btn=jQuery(document.createElement('button')).addClass('pickerbutton').attr('title',title).attr('aria-controls',edid).on('click',bind(pickerInsert,title,edid)).appendTo($picker);return $btn;}jQuery.each(props.list,function(key,item){if(!props.list.hasOwnProperty(key)){return;}if(isNaN(key)){if(item.substr(0,1)!=='/'){item=DOKU_BASE+'lib/images/'+props.icobase+'/'+item;}jQuery(document.createElement('img')).attr('src',item).attr('alt','').css('height','16').appendTo($makebutton(key));}else if(typeof item=='string'){$makebutton(item).text(item);}else{initToolbar($picker,edid,props.list);return false;}});jQuery('body').append($picker);return $picker[0];}function pickerInsert(text,edid){insertAtCarret(edid,text);pickerClose();}function addBtnActionSignature($btn,props,edid){if(typeof SIG!='undefined'&&SIG!=''){$btn.on('click',function(e){insertAtCarret(edid,SIG);e.preventDefault();});return edid;}return'';}function currentHeadlineLevel(textboxId){var field=jQuery('#'+textboxId)[0],s=false,opts=[field.value.substr(0,DWgetSelection(field).start)];if(field.form&&field.form.prefix){opts.push(field.form.prefix.value);}jQuery.each(opts,function(_,opt){var str="\n"+opt,lasthl=str.lastIndexOf("\n==");if(lasthl!==-1){s=str.substr(lasthl+1,6);return false;}});if(s===false){return 0;}return 7-s.match(/^={2,6}/)[0].length;}window.textChanged=false;window.doku_edit_text_content='';function deleteDraft(){if(is_opera||window.keepDraft){return;}var $dwform=jQuery('#dw__editform');if($dwform.length===0){return;}jQuery.post(DOKU_BASE+'lib/exe/ajax.php',{call:'draftdel',id:$dwform.find('input[name=id]').val(),sectok:$dwform.find('input[name=sectok]').val()});}jQuery(function(){var $editform=jQuery('#dw__editform');if($editform.length==0){return;}var $edit_text=jQuery('#wiki__text');if($edit_text.length>0){if($edit_text.attr('readOnly')){return;}var sel=DWgetSelection($edit_text[0]);sel.start=0;sel.end=0;DWsetSelection(sel);$edit_text.trigger('focus');doku_edit_text_content=$edit_text.val();}var changeHandler=function(){doku_hasTextBeenModified();doku_summaryCheck();};$editform.change(changeHandler);$editform.keydown(changeHandler);window.onbeforeunload=function(){if(window.textChanged){return LANG.notsavedyet;}};window.onunload=deleteDraft;jQuery('#edbtn__save').on('click',function(){window.onbeforeunload='';textChanged=false;});jQuery('#edbtn__preview').on('click',function(){window.onbeforeunload='';textChanged=false;window.keepDraft=true;});var $summary=jQuery('#edit__summary');$summary.on('change keyup',doku_summaryCheck);if(textChanged)doku_summaryCheck();});function doku_hasTextBeenModified(){if(!textChanged){var $edit_text=jQuery('#wiki__text');if($edit_text.length>0){textChanged=doku_edit_text_content!=$edit_text.val();}else{textChanged=true;}}}function doku_summaryCheck(){var $sum=jQuery('#edit__summary'),missing=$sum.val()==='';$sum.toggleClass('missing',missing).toggleClass('edit',!missing);}var dw_editor={init:function(){var $editor=jQuery('#wiki__text');if($editor.length===0){return;}dw_editor.initSizeCtl('#size__ctl',$editor);if($editor.attr('readOnly')){return;}$editor.keydown(dw_editor.keyHandler);},initSizeCtl:function(ctlarea,editor){var $ctl=jQuery(ctlarea),$textarea=jQuery(editor);if($ctl.length===0||$textarea.length===0){return;}$textarea.css('height',DokuCookie.getValue('sizeCtl')||'300px');var wrp=DokuCookie.getValue('wrapCtl');if(wrp){dw_editor.setWrap($textarea[0],wrp);}jQuery.each([['larger',function(){dw_editor.sizeCtl(editor,100);}],['smaller',function(){dw_editor.sizeCtl(editor,-100);}],['wrap',function(){dw_editor.toggleWrap(editor);}]],function(_,img){jQuery(document.createElement('img')).attr('src',DOKU_BASE+'lib/images/'+img[0]+'.gif').attr('alt','').on('click',img[1]).appendTo($ctl);});},sizeCtl:function(editor,val){var $textarea=jQuery(editor),height=parseInt($textarea.css('height'))+val;$textarea.css('height',height+'px');DokuCookie.setValue('sizeCtl',$textarea.css('height'));},toggleWrap:function(editor){var $textarea=jQuery(editor),wrap=$textarea.attr('wrap');dw_editor.setWrap($textarea[0],(wrap&&wrap.toLowerCase()=='off')?'soft':'off');DokuCookie.setValue('wrapCtl',$textarea.attr('wrap'));},setWrap:function(textarea,wrapAttrValue){textarea.setAttribute('wrap',wrapAttrValue);var parNod=textarea.parentNode;var nxtSib=textarea.nextSibling;parNod.removeChild(textarea);parNod.insertBefore(textarea,nxtSib);},keyHandler:function(e){if(jQuery.inArray(e.keyCode,[8,10,13,32])===-1){return;}var selection=DWgetSelection(this);if(selection.getLength()>0){return;}var search="\n"+this.value.substr(0,selection.start);var linestart=Math.max(search.lastIndexOf("\n"),search.lastIndexOf("\r"));search=search.substr(linestart);if((e.keyCode==13||e.keyCode==10)&&e.ctrlKey){jQuery('#edbtn__save').trigger('click');e.preventDefault();return false;}else if(e.keyCode==13){var match=search.match(/(\n +([\*-] ?)?)/);if(match){var scroll=this.scrollHeight;var match2=search.match(/^\n +[\*-]\s*$/);if(match2&&this.value.substr(selection.start).match(/^($|\r?\n)/)){this.value=this.value.substr(0,linestart)+"\n"+this.value.substr(selection.start);selection.start=linestart+1;selection.end=linestart+1;DWsetSelection(selection);}else{insertAtCarret(this.id,match[1]);}this.scrollTop+=(this.scrollHeight-scroll);e.preventDefault();return false;}}else if(e.keyCode==8){var match=search.match(/(\n +)([*-] ?)$/);if(match){var spaces=match[1].length-1;if(spaces>3){this.value=this.value.substr(0,linestart)+this.value.substr(linestart+2);selection.start=selection.start-2;selection.end=selection.start;}else{this.value=this.value.substr(0,linestart)+this.value.substr(selection.start);selection.start=linestart;selection.end=linestart;}DWsetSelection(selection);e.preventDefault();return false;}}else if(e.keyCode==32){var match=search.match(/(\n +)([*-] )$/);if(match){this.value=this.value.substr(0,linestart)+' '+this.value.substr(linestart);selection.start=selection.start+2;selection.end=selection.start;DWsetSelection(selection);e.preventDefault();return false;}}}};jQuery(dw_editor.init);var dw_locktimer={timeout:0,draft:false,timerID:null,lasttime:null,msg:LANG.willexpire,pageid:'',fieldsToSaveAsDraft:['input[name=prefix]','textarea[name=wikitext]','input[name=suffix]','input[name=date]',],callbacks:[],init:function(timeout,draft,edid){var $edit;edid=edid||'wiki__text';$edit=jQuery('#'+edid);if($edit.length===0||$edit.attr('readonly')){return;}dw_locktimer.timeout=timeout*1000;dw_locktimer.draft=draft;dw_locktimer.lasttime=new Date();dw_locktimer.pageid=jQuery('#dw__editform').find('input[name=id]').val();if(!dw_locktimer.pageid){return;}$edit.keypress(dw_locktimer.refresh);dw_locktimer.reset();},addField:function(selector){dw_locktimer.fieldsToSaveAsDraft.push(selector);},addRefreshCallback:function(callback){dw_locktimer.callbacks.push(callback);},reset:function(){dw_locktimer.clear();dw_locktimer.timerID=window.setTimeout(dw_locktimer.warning,dw_locktimer.timeout);},warning:function(){dw_locktimer.clear();alert(fixtxt(dw_locktimer.msg));},clear:function(){if(dw_locktimer.timerID!==null){window.clearTimeout(dw_locktimer.timerID);dw_locktimer.timerID=null;}},refresh:function(){var now=new Date(),params='call=lock&id='+dw_locktimer.pageid+'&';if(now.getTime()-dw_locktimer.lasttime.getTime()<=30*1000){return;}if(dw_locktimer.draft&&jQuery('#dw__editform').find('textarea[name=wikitext]').length>0){params+=jQuery('#dw__editform').find(dw_locktimer.fieldsToSaveAsDraft.join(', ')).serialize();}jQuery.post(DOKU_BASE+'lib/exe/ajax.php',params,null,'json').done(function dwLocktimerRefreshDoneHandler(data){dw_locktimer.callbacks.forEach(function(callback){callback(data);});});dw_locktimer.lasttime=now;},refreshed:function(data){if(data.errors.length){data.errors.forEach(function(error){jQuery('#draft__status').after(jQuery('<div class="error"></div>').text(error));})}jQuery('#draft__status').html(data.draft);if(data.lock!=='1'){return;}dw_locktimer.reset();}};dw_locktimer.callbacks.push(dw_locktimer.refreshed);var dw_linkwiz={$wiz:null,$entry:null,result:null,timer:null,textArea:null,selected:null,selection:null,init:function($editor){var pos=$editor.position();if(dw_linkwiz.$wiz)return;dw_linkwiz.$wiz=jQuery(document.createElement('div')).dialog({autoOpen:false,draggable:true,title:LANG.linkwiz,resizable:false}).html('<div>'+LANG.linkto+' <input type="text" class="edit" id="link__wiz_entry" autocomplete="off" /></div>'+'<div id="link__wiz_result"></div>').parent().attr('id','link__wiz').css({'position':'absolute','top':(pos.top+20)+'px','left':(pos.left+80)+'px'}).hide().appendTo('.dokuwiki:first');dw_linkwiz.textArea=$editor[0];dw_linkwiz.result=jQuery('#link__wiz_result')[0];jQuery(dw_linkwiz.result).css('position','relative');dw_linkwiz.$entry=jQuery('#link__wiz_entry');if(JSINFO.namespace){dw_linkwiz.$entry.val(JSINFO.namespace+':');}jQuery('#link__wiz .ui-dialog-titlebar-close').on('click',dw_linkwiz.hide);dw_linkwiz.$entry.keyup(dw_linkwiz.onEntry);jQuery(dw_linkwiz.result).on('click','a',dw_linkwiz.onResultClick);},onEntry:function(e){if(e.keyCode==37||e.keyCode==39){return true;}if(e.keyCode==27){dw_linkwiz.hide();e.preventDefault();e.stopPropagation();return false;}if(e.keyCode==38){dw_linkwiz.select(dw_linkwiz.selected-1);e.preventDefault();e.stopPropagation();return false;}if(e.keyCode==40){dw_linkwiz.select(dw_linkwiz.selected+1);e.preventDefault();e.stopPropagation();return false;}if(e.keyCode==13){if(dw_linkwiz.selected>-1){var $obj=dw_linkwiz.$getResult(dw_linkwiz.selected);if($obj.length>0){dw_linkwiz.resultClick($obj.find('a')[0]);}}else if(dw_linkwiz.$entry.val()){dw_linkwiz.insertLink(dw_linkwiz.$entry.val());}e.preventDefault();e.stopPropagation();return false;}dw_linkwiz.autocomplete();},getResult:function(num){DEPRECATED('use dw_linkwiz.$getResult()[0] instead');return dw_linkwiz.$getResult()[0]||null;},$getResult:function(num){return jQuery(dw_linkwiz.result).find('div').eq(num);},select:function(num){if(num<0){dw_linkwiz.deselect();return;}var $obj=dw_linkwiz.$getResult(num);if($obj.length===0){return;}dw_linkwiz.deselect();$obj.addClass('selected');var childPos=$obj.position().top;var yDiff=childPos+$obj.outerHeight()-jQuery(dw_linkwiz.result).innerHeight();if(childPos<0){jQuery(dw_linkwiz.result)[0].scrollTop+=childPos;}else if(yDiff>0){jQuery(dw_linkwiz.result)[0].scrollTop+=yDiff;}dw_linkwiz.selected=num;},deselect:function(){if(dw_linkwiz.selected>-1){dw_linkwiz.$getResult(dw_linkwiz.selected).removeClass('selected');}dw_linkwiz.selected=-1;},onResultClick:function(e){if(!jQuery(this).is('a')){return;}e.stopPropagation();e.preventDefault();dw_linkwiz.resultClick(this);return false;},resultClick:function(a){dw_linkwiz.$entry.val(a.title);if(a.title==''||a.title.substr(a.title.length-1)==':'){dw_linkwiz.autocomplete_exec();}else{if(jQuery(a.nextSibling).is('span')){dw_linkwiz.insertLink(a.nextSibling.innerHTML);}else{dw_linkwiz.insertLink('');}}},insertLink:function(title){var link=dw_linkwiz.$entry.val(),sel,stxt;if(!link){return;}sel=DWgetSelection(dw_linkwiz.textArea);if(sel.start==0&&sel.end==0){sel=dw_linkwiz.selection;}stxt=sel.getText();if(stxt.charAt(stxt.length-1)==' '){sel.end--;stxt=sel.getText();}if(!stxt&&!DOKU_UHC){stxt=title;}if(dw_linkwiz.textArea.form.id.value.indexOf(':')!=-1&&link.indexOf(':')==-1){link=':'+link;}var so=link.length;var eo=0;if(dw_linkwiz.val){if(dw_linkwiz.val.open){so+=dw_linkwiz.val.open.length;link=dw_linkwiz.val.open+link;}link+='|';so+=1;if(stxt){link+=stxt;}if(dw_linkwiz.val.close){link+=dw_linkwiz.val.close;eo=dw_linkwiz.val.close.length;}}pasteText(sel,link,{startofs:so,endofs:eo});dw_linkwiz.hide();var externallinkpattern=new RegExp('^((f|ht)tps?:)?//','i'),entry_value;if(externallinkpattern.test(dw_linkwiz.$entry.val())){if(JSINFO.namespace){entry_value=JSINFO.namespace+':';}else{entry_value='';}}else{entry_value=dw_linkwiz.$entry.val().replace(/[^:]*$/,'')}dw_linkwiz.$entry.val(entry_value);},autocomplete:function(){if(dw_linkwiz.timer!==null){window.clearTimeout(dw_linkwiz.timer);dw_linkwiz.timer=null;}dw_linkwiz.timer=window.setTimeout(dw_linkwiz.autocomplete_exec,350);},autocomplete_exec:function(){var $res=jQuery(dw_linkwiz.result);dw_linkwiz.deselect();$res.html('<img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="" width="16" height="16" />').load(DOKU_BASE+'lib/exe/ajax.php',{call:'linkwiz',q:dw_linkwiz.$entry.val()});},show:function(){dw_linkwiz.selection=DWgetSelection(dw_linkwiz.textArea);dw_linkwiz.$wiz.show();dw_linkwiz.$entry.focus();dw_linkwiz.autocomplete();var temp=dw_linkwiz.$entry.val();dw_linkwiz.$entry.val('');dw_linkwiz.$entry.val(temp);},hide:function(){dw_linkwiz.$wiz.hide();dw_linkwiz.textArea.focus();},toggle:function(){if(dw_linkwiz.$wiz.css('display')=='none'){dw_linkwiz.show();}else{dw_linkwiz.hide();}}};var dw_mediamanager={keepopen:false,hide:false,popup:false,display:false,ext:false,$popup:null,align:false,link:false,size:false,forbidden_opts:{},view_opts:{list:false,sort:false},layout_width:0,minHeights:{thumbs:200,rows:100},init:function(){var $content,$tree;$content=jQuery('#media__content');$tree=jQuery('#media__tree');if(!$tree.length)return;dw_mediamanager.prepare_content($content);dw_mediamanager.attachoptions();dw_mediamanager.initpopup();$content .on('change','#upload__file',dw_mediamanager.suggest).on('click','a.select',dw_mediamanager.select).on('click','#media__content a.btn_media_delete',dw_mediamanager.confirmattach).on('submit','#mediamanager__done_form',dw_mediamanager.list);$tree.dw_tree({toggle_selector:'img',load_data:function(show_sublist,$clicky){var $link=$clicky.parent().find('div.li a.idx_dir');jQuery.post(DOKU_BASE+'lib/exe/ajax.php',$link[0].search.substr(1)+'&call=medians',show_sublist,'html');},toggle_display:function($clicky,opening){$clicky.attr('src',DOKU_BASE+'lib/images/'+(opening?'minus':'plus')+'.gif');}});$tree.on('click','a',dw_mediamanager.list);dw_mediamanager.set_fileview_list();dw_mediamanager.init_options();dw_mediamanager.image_diff();dw_mediamanager.init_ajax_uploader();var $page=jQuery('#mediamanager__page');$page.find('div.filelist').on('click','ul.tabs a',dw_mediamanager.list).on('click','div.panelContent a',dw_mediamanager.details).on('submit','#dw__mediasearch',dw_mediamanager.list).on('change','#upload__file',dw_mediamanager.suggest).on('click','.qq-upload-file a',dw_mediamanager.details);$page.find('div.file').on('click','ul.tabs a',dw_mediamanager.details).on('submit','#mediamanager__btn_update',dw_mediamanager.list).on('submit','#page__revisions',dw_mediamanager.details).on('click','#page__revisions a',dw_mediamanager.details).on('submit','#mediamanager__save_meta',dw_mediamanager.details).on('submit','#mediamanager__btn_delete',dw_mediamanager.details).on('submit','#mediamanager__btn_restore',dw_mediamanager.details).on('submit','.btn_newer, .btn_older',dw_mediamanager.details);dw_mediamanager.update_resizable();dw_mediamanager.layout_width=$page.width();jQuery(window).on('resize',dw_mediamanager.window_resize);},init_options:function(){var $options=jQuery('div.filelist div.panelHeader form.options'),$listType,$sortBy,$both;if($options.length===0){return;}$listType=$options.find('li.listType');$sortBy=$options.find('li.sortBy');$both=$listType.add($sortBy);$options.find('button[type=submit]').parent().hide();$both.find('label').each(function(){var $this=jQuery(this);$this.children('input').appendTo($this.parent());});$both.find("input[type='radio']").checkboxradio({icon:false});$both.controlgroup();$listType.children('input').change(function(){dw_mediamanager.set_fileview_list();});$sortBy.children('input').change(function(event){dw_mediamanager.set_fileview_sort();dw_mediamanager.list.call(jQuery('#dw__mediasearch')[0]||this,event);});},initpopup:function(){var opts,$insp,$insbtn;dw_mediamanager.$popup=jQuery(document.createElement('div')).attr('id','media__popup_content').dialog({autoOpen:false,width:280,modal:true,draggable:true,title:LANG.mediatitle,resizable:false});opts=[{id:'link',label:LANG.mediatarget,btns:['lnk','direct','nolnk','displaylnk']},{id:'align',label:LANG.mediaalign,btns:['noalign','left','center','right']},{id:'size',label:LANG.mediasize,btns:['small','medium','large','original']}];jQuery.each(opts,function(_,opt){var $p,$l;$p=jQuery(document.createElement('p')).attr('id','media__'+opt.id);if(dw_mediamanager.display==="2"){$p.hide();}$l=jQuery(document.createElement('label')).text(opt.label);$p.append($l);jQuery.each(opt.btns,function(i,text){var $btn,$img;$btn=jQuery(document.createElement('button')).addClass('button').attr('id',"media__"+opt.id+"btn"+(i+1)).attr('title',LANG['media'+text]).on('click',bind(dw_mediamanager.setOpt,opt.id));$img=jQuery(document.createElement('img')).attr('src',DOKU_BASE+'lib/images/media_'+opt.id+'_'+text+'.png');$btn.append($img);$p.append($btn);});dw_mediamanager.$popup.append($p);});$insp=jQuery(document.createElement('p'));dw_mediamanager.$popup.append($insp);$insbtn=jQuery(document.createElement('input')).attr('id','media__sendbtn').attr('type','button').addClass('button').val(LANG.mediainsert);$insp.append($insbtn);},insert:function(id){var opts,cb,edid,s;dw_mediamanager.$popup.dialog('close');opts='';if({img:1,swf:1}[dw_mediamanager.ext]===1){if(dw_mediamanager.link==='4'){opts='?linkonly';}else{if(dw_mediamanager.link==="3"&&dw_mediamanager.ext==='img'){opts='?nolink';}else if(dw_mediamanager.link==="2"&&dw_mediamanager.ext==='img'){opts='?direct';}s=parseInt(dw_mediamanager.size,10);var size=s*200;if(s&&s>=1&&s<4){opts+=(opts.length)?'&':'?';opts+=size;if(dw_mediamanager.ext==='swf'){switch(s){case 1:opts+='x62';break;case 2:opts+='x123';break;case 3:opts+='x185';break;}}}}}edid=String.prototype.match.call(document.location,/&edid=([^&]+)/);edid=edid?edid[1]:'wiki__text';cb=String.prototype.match.call(document.location,/&onselect=([^&]+)/);cb=cb?cb[1].replace(/[^\w]+/,''):'dw_mediamanager_item_select';opener[cb](edid,id,opts,dw_mediamanager.align,dw_mediamanager.keepopen);if(!dw_mediamanager.keepopen){window.close();}opener.focus();return false;},suggest:function(){var $file,$name,text;$file=jQuery(this);$name=jQuery('#upload__name');if($name.val()!='')return;if(!$file.length||!$name.length){return;}text=$file.val();text=text.substr(text.lastIndexOf('/')+1);text=text.substr(text.lastIndexOf('\\')+1);$name.val(text);},list:function(event){var $link,$content,params;if(event){event.preventDefault();}jQuery('div.success, div.info, div.error, div.notify').remove();$link=jQuery(this);$content=jQuery('#media__content');if($content.length===0){$content=jQuery('div.filelist');if($link.hasClass('idx_dir')){jQuery('div.file').empty();jQuery('div.namespaces .selected').removeClass('selected');$link.addClass('selected');}}params='call=medialist&';if($link[0].search){params+=$link[0].search.substr(1);}else if($link.is('form')){params+=dw_mediamanager.form_params($link);}else if($link.closest('form').length>0){params+=dw_mediamanager.form_params($link.closest('form'));}dw_mediamanager.update_content($content,params);},form_params:function($form){if(!$form.length)return;var action='';var i=$form[0].action.indexOf('?');if(i>=0){action=$form[0].action.substr(i+1);}return action+'&'+$form.serialize();},set_fileview_list:function(new_type){dw_mediamanager.set_fileview_opt(['list','listType',function(new_type){jQuery('div.filelist div.panelContent ul').toggleClass('rows',new_type==='rows').toggleClass('thumbs',new_type==='thumbs');}],new_type);dw_mediamanager.resize();},set_fileview_sort:function(new_sort){dw_mediamanager.set_fileview_opt(['sort','sortBy',function(new_sort){}],new_sort);},set_fileview_opt:function(opt,new_val){if(typeof new_val==='undefined'){new_val=jQuery('form.options li.'+opt[1]+' input').filter(':checked').val();if(typeof new_val==='undefined'){new_val='thumbs';}}if(new_val!==dw_mediamanager.view_opts[opt[0]]){opt[2](new_val);DokuCookie.setValue(opt[0],new_val);dw_mediamanager.view_opts[opt[0]]=new_val;}},details:function(event){var $link,$content,params,update_list;$link=jQuery(this);event.preventDefault();jQuery('div.success, div.info, div.error, div.notify').remove();if($link[0].id=='mediamanager__btn_delete'&&!confirm(LANG.del_confirm)){return false;}if($link[0].id=='mediamanager__btn_restore'&&!confirm(LANG.restore_confirm)){return false;}$content=jQuery('div.file');params='call=mediadetails&';if($link[0].search){params+=$link[0].search.substr(1);}else if($link.is('form')){params+=dw_mediamanager.form_params($link);}else if($link.closest('form').length>0){params+=dw_mediamanager.form_params($link.closest('form'));}update_list=($link[0].id=='mediamanager__btn_delete'||$link[0].id=='mediamanager__btn_restore');dw_mediamanager.update_content($content,params,update_list);},update_content:function($content,params,update_list){var $container;jQuery.post(DOKU_BASE+'lib/exe/ajax.php',params,function(data){dw_mediamanager.$resizables().resizable('destroy');if(update_list){dw_mediamanager.list.call(jQuery('#mediamanager__page').find('form.options button[type="submit"]')[0]);}$content.html(data);dw_mediamanager.prepare_content($content);dw_mediamanager.updatehide();dw_mediamanager.update_resizable();dw_behaviour.revisionBoxHandler();dw_mediamanager.set_fileview_list(dw_mediamanager.view_opts.list);dw_mediamanager.image_diff();dw_mediamanager.init_ajax_uploader();dw_mediamanager.init_options();},'html');$container=$content.find('div.panelContent');if($container.length===0){$container=$content;}$container.html('<img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="..." class="load" />');},window_resize:function(){dw_mediamanager.resize();dw_mediamanager.opacity_slider();dw_mediamanager.portions_slider();},$resizables:function(){return jQuery('#mediamanager__page').find('div.namespaces, div.filelist');},update_resizable:function(){var $resizables=dw_mediamanager.$resizables();$resizables.resizable({handles:(jQuery('html[dir=rtl]').length?'w':'e'),resize:function(event,ui){var $page=jQuery('#mediamanager__page');var widthFull=$page.width();var widthResizables=0;$resizables.each(function(){widthResizables+=jQuery(this).width();});var $filePanel=$page.find('div.panel.file');var widthOtherResizable=widthResizables-jQuery(this).width();var minWidthNonResizable=parseFloat($filePanel.css("min-width"));var maxWidth=widthFull-(widthOtherResizable+minWidthNonResizable)-1;$resizables.resizable("option","maxWidth",maxWidth);var relWidthNonResizable=99.9-(100*widthResizables/widthFull);$filePanel.width(relWidthNonResizable+'%');dw_mediamanager.resize();dw_mediamanager.opacity_slider();dw_mediamanager.portions_slider();}});dw_mediamanager.resize();},resize:function(){var $contents=jQuery('#mediamanager__page').find('div.panelContent'),height=jQuery(window).height()-jQuery(document.body).height()+Math.max.apply(null,jQuery.map($contents,function(v){return jQuery(v).height();}));if(height<dw_mediamanager.minHeights[dw_mediamanager.view_opts.list]){$contents.add(dw_mediamanager.$resizables()).height('auto');}else{$contents.height(height);dw_mediamanager.$resizables().each(function(){var $this=jQuery(this);$this.height(height+$this.find('div.panelContent').offset().top-$this.offset().top);});}},image_diff:function(){if(jQuery('#mediamanager__difftype').length)return;var $form=jQuery('#mediamanager__form_diffview');if(!$form.length)return;var $label=jQuery(document.createElement('label'));$label.append('<span>'+LANG.media_diff+'</span> ');var $select=jQuery(document.createElement('select')).attr('id','mediamanager__difftype').attr('name','difftype').change(dw_mediamanager.change_diff_type);$select.append(new Option(LANG.media_diff_both,"both"));$select.append(new Option(LANG.media_diff_opacity,"opacity"));$select.append(new Option(LANG.media_diff_portions,"portions"));$label.append($select);$form.append($label);var select=document.getElementById('mediamanager__difftype');select.options[0].text=LANG.media_diff_both;select.options[1].text=LANG.media_diff_opacity;select.options[2].text=LANG.media_diff_portions;},change_diff_type:function(){var $select=jQuery('#mediamanager__difftype');var $content=jQuery('#mediamanager__diff');var params=dw_mediamanager.form_params($select.closest('form'))+'&call=mediadiff';jQuery.post(DOKU_BASE+'lib/exe/ajax.php',params,function(data){$content.html(data);dw_mediamanager.portions_slider();dw_mediamanager.opacity_slider();},'html');},opacity_slider:function(){var $diff=jQuery("#mediamanager__diff");var $slider=$diff.find("div.slider");if(!$slider.length)return;var $image=$diff.find('div.imageDiff.opacity div.image1 img');if(!$image.length)return;$slider.width($image.width()-20);$slider.slider();$slider.slider("option","min",0);$slider.slider("option","max",0.999);$slider.slider("option","step",0.001);$slider.slider("option","value",0.5);$slider.on("slide",function(event,ui){jQuery('#mediamanager__diff').find('div.imageDiff.opacity div.image2 img').css({opacity:$slider.slider("option","value")});});},portions_slider:function(){var $diff=jQuery("#mediamanager__diff");if(!$diff.length)return;var $image1=$diff.find('div.imageDiff.portions div.image1 img');var $image2=$diff.find('div.imageDiff.portions div.image2 img');if(!$image1.length||!$image2.length)return;$diff.width('100%');$image2.parent().width('97%');$image1.width('100%');$image2.width('100%');if($image1.width()<$diff.width()){$diff.width($image1.width());}$image2.parent().width('50%');$image2.width($image1.width());$image1.width($image1.width());var $slider=$diff.find("div.slider");if(!$slider.length)return;$slider.width($image1.width()-20);$slider.slider();$slider.slider("option","min",0);$slider.slider("option","max",97);$slider.slider("option","step",1);$slider.slider("option","value",50);$slider.on("slide",function(event,ui){jQuery('#mediamanager__diff').find('div.imageDiff.portions div.image2').css({width:$slider.slider("option","value")+'%'});});},params_toarray:function(str){var vars=[],hash;var hashes=str.split('&');for(var i=0;i<hashes.length;i++){hash=hashes[i].split('=');vars[decodeURIComponent(hash[0])]=decodeURIComponent(hash[1]);}return vars;},init_ajax_uploader:function(){if(!jQuery('#mediamanager__uploader').length)return;if(jQuery('.qq-upload-list').length)return;var params=dw_mediamanager.form_params(jQuery('#dw__upload'))+'&call=mediaupload';params=dw_mediamanager.params_toarray(params);var uploader=new qq.FileUploaderExtended({element:document.getElementById('mediamanager__uploader'),action:DOKU_BASE+'lib/exe/ajax.php',params:params});},prepare_content:function($content){$content.find('div.example:visible').hide();$content.find('a.allowedmime').on('click',function(event){event.preventDefault();$toggle=jQuery(this);$list=$toggle.next('span');$list.toggle();}).next('span').hide();},select:function(event){var $link,id,dot,ext;event.preventDefault();$link=jQuery(this);id=$link.attr('id').substr(2);if(!opener){jQuery(document.getElementById('ex_'+id.replace(/:/g,'_').replace(/^_/,''))).dw_toggle();return;}dw_mediamanager.ext=false;dot=id.lastIndexOf(".");if(-1===dot){dw_mediamanager.insert(id);return;}ext=id.substr(dot);if({'.jpg':1,'.jpeg':1,'.png':1,'.gif':1,'.swf':1}[ext]!==1){dw_mediamanager.insert(id);return;}var $sendbtn=jQuery('#media__sendbtn');$sendbtn.off().on('click',bind(dw_mediamanager.insert,id));dw_mediamanager.unforbid('ext');if(ext==='.swf'){dw_mediamanager.ext='swf';dw_mediamanager.forbid('ext',{link:['1','2'],size:['4']});}else{dw_mediamanager.ext='img';}dw_mediamanager.setOpt('link');dw_mediamanager.setOpt('align');dw_mediamanager.setOpt('size');jQuery('#media__linkbtn1, #media__linkbtn2, #media__sizebtn4').toggle(dw_mediamanager.ext==='img');dw_mediamanager.$popup.dialog('open');$sendbtn.focus();},confirmattach:function(e){if(!confirm(LANG.del_confirm+"\n"+jQuery(this).attr('title'))){e.preventDefault();}},attachoptions:function(){var $obj,opts;$obj=jQuery('#media__opts');if($obj.length===0){return;}opts=[];if(opener){opts.push(['keepopen','keepopen']);}opts.push(['hide','hidedetails']);jQuery.each(opts,function(_,opt){var $box,$lbl;$box=jQuery(document.createElement('input')).attr('type','checkbox').attr('id','media__'+opt[0]).on('click',bind(dw_mediamanager.toggleOption,opt[0]));if(DokuCookie.getValue(opt[0])){$box.prop('checked',true);dw_mediamanager[opt[0]]=true;}$lbl=jQuery(document.createElement('label')).attr('for','media__'+opt[0]).text(LANG[opt[1]]);$obj.append($box,$lbl,document.createElement('br'));});dw_mediamanager.updatehide();},toggleOption:function(variable){if(jQuery(this).prop('checked')){DokuCookie.setValue(variable,1);dw_mediamanager[variable]=true;}else{DokuCookie.setValue(variable,'');dw_mediamanager[variable]=false;}if(variable==='hide'){dw_mediamanager.updatehide();}},updatehide:function(){jQuery('#media__content').find('div.detail').dw_toggle(!dw_mediamanager.hide);},setOpt:function(opt,e){var val,i;if(typeof e!=='undefined'){val=this.id.substring(this.id.length-1);}else{val=dw_mediamanager.getOpt(opt);}if(val===false){DokuCookie.setValue(opt,'');dw_mediamanager[opt]=false;return;}if(opt==='link'){if(val!=='4'&&dw_mediamanager.link==='4'){dw_mediamanager.unforbid('linkonly');dw_mediamanager.setOpt('align');dw_mediamanager.setOpt('size');}else if(val==='4'){dw_mediamanager.forbid('linkonly',{align:false,size:false});}jQuery("#media__size, #media__align").dw_toggle(val!=='4');}DokuCookie.setValue(opt,val);dw_mediamanager[opt]=val;for(i=1;i<=4;i++){jQuery("#media__"+opt+"btn"+i).removeClass('selected');}jQuery('#media__'+opt+'btn'+val).addClass('selected');},unforbid:function(group){delete dw_mediamanager.forbidden_opts[group];},forbid:function(group,forbids){dw_mediamanager.forbidden_opts[group]=forbids;},allowedOpt:function(opt,val){var ret=true;jQuery.each(dw_mediamanager.forbidden_opts,function(_,forbids){ret=forbids[opt]!==false&&jQuery.inArray(val,forbids[opt])===-1;return ret;});return ret;},getOpt:function(opt){var allowed=bind(dw_mediamanager.allowedOpt,opt);if(dw_mediamanager[opt]!==false&&allowed(dw_mediamanager[opt])){return dw_mediamanager[opt];}if(DokuCookie.getValue(opt)&&allowed(DokuCookie.getValue(opt))){return DokuCookie.getValue(opt);}if(opt==='size'&&allowed('2')){return'2';}return jQuery.grep(['1','2','3','4'],allowed)[0]||false;}};function dw_mediamanager_item_select(edid,mediaid,opts,align,keepopen){var alignleft='';var alignright='';var cursorInImageTag=false;var textArea=jQuery('#'+edid)[0];var selection=DWgetSelection(textArea);selection.end=selection.end+2;var charsAfterCursor=selection.getText();if(charsAfterCursor==='}}'){cursorInImageTag=true;}if(align!=='1'){alignleft=align==='2'?'':' ';alignright=align==='4'?'':' ';}if(keepopen&&cursorInImageTag){selection.start=selection.start+2;DWsetSelection(selection);}insertTags(edid,'{{'+alignleft+mediaid+opts+alignright+'|','}}','');}jQuery(dw_mediamanager.init);function DEPRECATED(msg){if(!window.console)return;if(!msg)msg='';var func;if(arguments.callee)func=arguments.callee.caller.name;if(func)func=' '+func+'()';var line='DEPRECATED function call'+func+'. '+msg;if(console.warn){console.warn(line);}else{console.log(line);}if(console.trace)console.trace();}function DEPRECATED_WRAP(func,context){return function(){DEPRECATED();return func.apply(context||this,arguments);};}jQuery.fn.dw_hide=function(fn,noaria){if(!noaria)this.attr('aria-expanded','false');return this.slideUp('fast',fn);};jQuery.fn.dw_show=function(fn,noaria){if(!noaria)this.attr('aria-expanded','true');return this.slideDown('fast',fn);};jQuery.fn.dw_toggle=function(state,fn,noaria){return this.each(function(){var $this=jQuery(this);if(typeof state==='undefined'){state=$this.is(':hidden');}$this[state?"dw_show":"dw_hide"](fn,noaria);});};var dw_behaviour={init:function(){dw_behaviour.focusMarker();dw_behaviour.scrollToMarker();dw_behaviour.removeHighlightOnClick();dw_behaviour.quickSelect();dw_behaviour.checkWindowsShares();dw_behaviour.subscription();dw_behaviour.pageRestoreConfirm();dw_behaviour.securityCheck();dw_behaviour.revisionBoxHandler();jQuery(document).on('click','#page__revisions input[type=checkbox]',dw_behaviour.revisionBoxHandler);jQuery('.bounce').effect('bounce',{times:10},2000);},scrollToMarker:function(){var $obj=jQuery('#scroll__here');if($obj.length){if($obj.offset().top!=0){jQuery('html, body').animate({scrollTop:$obj.offset().top-100},500);}else{$obj[0].scrollIntoView();}}},pageRestoreConfirm:function(){jQuery('#dokuwiki__pagetools li.revert a').on('click',function(){return confirm(LANG.restore_confirm);});},focusMarker:function(){jQuery('#focus__this').trigger('focus');},removeHighlightOnClick:function(){jQuery('span.search_hit').on('click',function(e){jQuery(e.target).removeClass('search_hit',1000);});},quickSelect:function(){jQuery('.quickselect').change(function(e){HTMLFormElement.prototype.submit.call(e.target.form);}).closest('form').find(':button').not('.show').hide();},checkWindowsShares:function(){if(!LANG.nosmblinks||navigator.userAgent.match(/(Trident|MSIE|Edge)/)){return;}jQuery('a.windows').on('click',function(){alert(LANG.nosmblinks.replace(/\\n/,"\n"));});},subscription:function(){var $form,$list,$digest;$form=jQuery('#subscribe__form');if(0===$form.length)return;$list=$form.find("input[name='sub_style'][value='list']");$digest=$form.find("input[name='sub_style'][value='digest']");$form.find("input[name='sub_target']").on('click',function(){var $this=jQuery(this),show_list;if(!$this.prop('checked')){return;}show_list=$this.val().match(/:$/);$list.parent().dw_toggle(show_list);if(!show_list&&$list.prop('checked')){$digest.prop('checked','checked');}}).filter(':checked').trigger('click');},revisionBoxHandler:function(){var $revisions=jQuery('#page__revisions');var $all=jQuery('input[type="checkbox"][name="rev2[]"]',$revisions);var $checked=$all.filter(':checked');var $button=jQuery('button',$revisions);if($checked.length<2){$all.prop('disabled',false);$button.prop('disabled',true);}else{$all.prop('disabled',true);$button.prop('disabled',false);$checked.each(function(i){jQuery(this).prop('disabled',false);if(i>1){jQuery(this).prop('checked',false);}});}},securityCheck:function(){var $checkDiv=jQuery('#security__check');if(!$checkDiv.length)return;if(sessionStorage.getItem('dw-security-check:'+DOKU_BASE)){$checkDiv.remove();return;}var img=new Image();img.onerror=function(){$checkDiv.remove();sessionStorage.setItem('dw-security-check:'+DOKU_BASE,true);};img.onload=function(){$checkDiv.html(LANG.data_insecure);$checkDiv.addClass('error');};img.src=$checkDiv.data('src')+'?t='+Date.now();}};jQuery(dw_behaviour.init);dw_page={init:function(){dw_page.sectionHighlight();dw_page.currentIDHighlight();jQuery('a.fn_top').on('mouseover',dw_page.footnoteDisplay);dw_page.makeToggle('#dw__toc h3','#dw__toc > div');},sectionHighlight:function(){jQuery('form.btn_secedit').on('mouseover',function(){var $tgt=jQuery(this).parent(),nr=$tgt.attr('class').match(/(\s+|^)editbutton_(\d+)(\s+|$)/)[2],$highlight=jQuery(),$highlightWrap=jQuery('<div class="section_highlight"></div>');while($tgt.length>0&&!($tgt.hasClass('sectionedit'+nr)||$tgt.find('.sectionedit'+nr).length)){$tgt=$tgt.prev();$highlight=$highlight.add($tgt);}$highlight.filter(':last').before($highlightWrap);$highlight.detach().appendTo($highlightWrap);}).on('mouseout',function(){var $highlightWrap=jQuery('.section_highlight');$highlightWrap.before($highlightWrap.children().detach());$highlightWrap.detach();});},currentIDHighlight:function(){jQuery('a.wikilink1, a.wikilink2').filter('[data-wiki-id="'+JSINFO.id+'"]').wrap('<span class="curid"></div>');},insituPopup:function(target,popup_id){var $fndiv=jQuery('#'+popup_id);if($fndiv.length===0){$fndiv=jQuery(document.createElement('div')).attr('id',popup_id).addClass('insitu-footnote JSpopup').attr('aria-hidden','true').on('mouseleave',function(){jQuery(this).hide().attr('aria-hidden','true');}).attr('role','tooltip');jQuery('.dokuwiki:first').append($fndiv);}$fndiv.show().position({my:'left top',at:'left center',of:target}).hide();return $fndiv;},footnoteDisplay:function(){var $content=jQuery(jQuery(this).attr('href')).parent().siblings('.content').clone();if(!$content.length){return;}jQuery('[id]',$content).each(function(){var id=jQuery(this).attr('id');jQuery(this).attr('id','insitu__'+id);});var content=$content.html().trim();dw_page.insituPopup(this,'insitu__fn').html(content).show().attr('aria-hidden','false');},makeToggle:function(handle,content,state){var $handle,$content,$clicky,$child,setClicky;$handle=jQuery(handle);if(!$handle.length)return;$content=jQuery(content);if(!$content.length)return;$child=$content.children();setClicky=function(hiding){if(hiding){$clicky.html('<span>+</span>');$handle.addClass('closed');$handle.removeClass('open');}else{$clicky.html('<span>−</span>');$handle.addClass('open');$handle.removeClass('closed');}};$handle[0].setState=function(state){var hidden;if(!state)state=1;$content.css('min-height',$content.height()).show();$child.stop(true,true);if(state===-1){hidden=false;}else if(state===1){hidden=true;}else{hidden=$child.is(':hidden');}setClicky(!hidden);$child.dw_toggle(hidden,function(){$content.toggle(hidden);$content.attr('aria-expanded',hidden);$content.css('min-height','');},true);};$clicky=jQuery(document.createElement('strong'));$handle.css('cursor','pointer').on('click',$handle[0].setState).prepend($clicky);$handle[0].setState(state);}};jQuery(dw_page.init);var device_class='';var device_classes='desktop mobile tablet phone';function tpl_dokuwiki_mobile(){var screen_mode=jQuery('#screen__mode').css('z-index')+'';switch(screen_mode){case'1':if(device_class.match(/tablet/))return;device_class='mobile tablet';break;case'2':if(device_class.match(/phone/))return;device_class='mobile phone';break;default:if(device_class=='desktop')return;device_class='desktop';}jQuery('html').removeClass(device_classes).addClass(device_class);var $handle=jQuery('#dokuwiki__aside h3.toggle');var $toc=jQuery('#dw__toc h3');if(device_class=='desktop'){if($handle.length){$handle[0].setState(1);$handle.hide();}if($toc.length){$toc[0].setState(1);}}if(device_class.match(/mobile/)){if($handle.length){$handle.show();$handle[0].setState(-1);}if($toc.length){$toc[0].setState(-1);}}}jQuery(function(){var resizeTimer;dw_page.makeToggle('#dokuwiki__aside h3.toggle','#dokuwiki__aside div.content');tpl_dokuwiki_mobile();jQuery(window).on('resize',function(){if(resizeTimer)clearTimeout(resizeTimer);resizeTimer=setTimeout(tpl_dokuwiki_mobile,200);});var sidebar_height=jQuery('.desktop #dokuwiki__aside').height();var pagetool_height=jQuery('.desktop #dokuwiki__pagetools ul:first').height();var content_min=Math.max(sidebar_height||0,pagetool_height||0);var content_height=jQuery('#dokuwiki__content div.page').height();if(content_min&&content_min>content_height){var $content=jQuery('#dokuwiki__content div.page');$content.css('min-height',content_min);}jQuery('#dokuwiki__pagetools div.tools>ul>li>a').on('click',function(){this.blur();});});var dw_acl={init:function(){var $tree;if(jQuery('#acl_manager').length===0){return;}jQuery('#acl__user select').on('change',dw_acl.userselhandler);jQuery('#acl__user button').on('click',dw_acl.loadinfo);$tree=jQuery('#acl__tree');$tree.dw_tree({toggle_selector:'img',load_data:function(show_sublist,$clicky){var $frm=jQuery('#acl__detail form');jQuery.post(DOKU_BASE+'lib/exe/ajax.php',jQuery.extend(dw_acl.parseatt($clicky.parent().find('a')[0].search),{call:'plugin_acl',ajax:'tree',current_ns:$frm.find('input[name=ns]').val(),current_id:$frm.find('input[name=id]').val()}),show_sublist,'html');},toggle_display:function($clicky,opening){$clicky.attr('src',DOKU_BASE+'lib/images/'+(opening?'minus':'plus')+'.gif');}});$tree.delegate('a','click',dw_acl.treehandler);},userselhandler:function(){jQuery('#acl__user input').toggle(this.value==='__g__'||this.value==='__u__');dw_acl.loadinfo();},loadinfo:function(){jQuery('#acl__info').attr('role','alert').html('<img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="..." />').load(DOKU_BASE+'lib/exe/ajax.php',jQuery('#acl__detail form').serialize()+'&call=plugin_acl&ajax=info');return false;},parseatt:function(str){if(str[0]==='?'){str=str.substr(1);}var attributes={};var all=str.split('&');for(var i=0;i<all.length;i++){var att=all[i].split('=');attributes[att[0]]=decodeURIComponent(att[1]);}return attributes;},treehandler:function(){var $link,$frm;$link=jQuery(this);jQuery('#acl__tree a.cur').removeClass('cur');$link.addClass('cur');$frm=jQuery('#acl__detail form');if($link.hasClass('wikilink1')){$frm.find('input[name=ns]').val('');$frm.find('input[name=id]').val(dw_acl.parseatt($link[0].search).id);}else if($link.hasClass('idx_dir')){$frm.find('input[name=ns]').val(dw_acl.parseatt($link[0].search).ns);$frm.find('input[name=id]').val('');}dw_acl.loadinfo();return false;}};jQuery(dw_acl.init);function addBtnActionToggleCommentBlock(btn,props,edid){jQuery(btn).click(function(){var comment='';var selection=DWgetSelection(document.getElementById('wiki__text'));if(selection.getLength()){comment=selection.getText();prevchar=selection.obj.value.substring(selection.start-1,selection.start);nextchar=selection.obj.value.substring(selection.end,selection.end+1);lastchar=comment.substr(-1,1);if(!prevchar)prevchar="\n";if(!nextchar)nextchar="\n";}if(comment==''){alert('no text selected');return false;}if(comment.match(/^\s*\/\*/)&&comment.match(/\*\/\s*$/)){if(prevchar=="\n"){comment=comment.replace(/^ *\/\*+ *\n?/,'');}else{comment=comment.replace(/^ *\/\*+ */,'');}comment=comment.replace(/ *\*+\/\s*$/,'');document.getElementById('wiki__text').focus();pasteText(selection,comment);}else{if(prevchar=="\n"&&lastchar=="\n"){comment="/*\n"+comment+" */\n";}else{if(comment.match(/^\n/)){comment=comment.replace(/^\n?/,"/*\n");comment=comment+" */";}else{comment="/* "+comment+" */";}if(!(prevchar.match(/\s/))){comment=" "+comment;}if(!(nextchar.match(/\s/))){comment=comment+" ";}}document.getElementById('wiki__text').focus();pasteText(selection,comment);}return true;});return false;}jQuery(function(){var $extmgr=jQuery('#extension__manager');$extmgr.find('button.uninstall').on('click',function(e){if(!window.confirm(LANG.plugins.extension.reallydel)){e.preventDefault();return false;}return true;});$extmgr.find('a.extension_screenshot').on('click',function(e){e.preventDefault();var image_href=jQuery(this).attr("href");var $lightbox=jQuery('#plugin__extensionlightbox');if(!$lightbox.length){$lightbox=jQuery('<div id="plugin__extensionlightbox"><p>Click to close</p><div></div></div>').appendTo(jQuery('body')).hide().on('click',function(){$lightbox.hide();});}$lightbox .show().find('div').html('<img src="'+image_href+'" />');return false;});$extmgr.find('button.disable, button.enable').on('click',function(e){e.preventDefault();var $btn=jQuery(this);var extension=$btn.attr('name').split('[')[2];extension=extension.substr(0,extension.length-1);var act=($btn.hasClass('disable'))?'disable':'enable';$btn.attr('disabled','disabled');$btn.css('cursor','wait');jQuery.get(DOKU_BASE+'lib/exe/ajax.php',{call:'plugin_extension',ext:extension,act:act,sectok:$btn.parents('form').find('input[name=sectok]').val()},function(data){$btn.css('cursor','').removeAttr('disabled').removeClass('disable').removeClass('enable').text(data.label).addClass(data.reverse).parents('li').removeClass('disabled').removeClass('enabled').addClass(data.state);}).fail(function(){$btn.css('cursor','').removeAttr('disabled');});});$extmgr.find('a.info').on('click',function(e){e.preventDefault();var $link=jQuery(this);var $details=$link.parent().find('dl.details');if($details.length){$link.toggleClass('close');$details.toggle();return;}$link.addClass('close');jQuery.get(DOKU_BASE+'lib/exe/ajax.php',{call:'plugin_extension',ext:$link.data('extid'),act:'info'},function(data){$link.parent().append(data);});});if($extmgr.find('.plugins, .templates').hasClass('active')){var $extlist=jQuery('#extension__list');$extlist.addClass('hasDisplayOptions');var $displayOpts=jQuery('<p>',{id:'extension__viewoptions'}).appendTo($extmgr.find('.panelHeader'));$displayOpts.append(LANG.plugins.extension.display_viewoptions);var displayOptionsHandler=function(){$extlist.toggleClass(this.name);DokuCookie.setValue('ext_'+this.name,$extlist.hasClass(this.name)?'1':'0');};jQuery(['enabled','disabled','updatable']).each(function(index,chkName){var $label=jQuery('<label></label>').appendTo($displayOpts);var $input=jQuery('<input />',{type:'checkbox',name:chkName}).on('change',displayOptionsHandler).appendTo($label);var previous=DokuCookie.getValue('ext_'+chkName);if(typeof previous==="undefined"||previous=='1'){$input.trigger('click');}jQuery('<span/>').append(' '+LANG.plugins.extension['display_'+chkName]).appendTo($label);});}});jQuery(function(){jQuery('.btn_incledit').mouseover(function(){jQuery(this).closest('.plugin_include_content').addClass('section_highlight');}).mouseout(function(){jQuery('.section_highlight').removeClass('section_highlight');});});jQuery(function(){var $dl=jQuery('#plugin__logviewer').find('dl');if(!$dl.length)return;$dl.animate({scrollTop:$dl.prop("scrollHeight")},500);var $filter=jQuery('<input>');$filter.on('keyup',function(e){var re=new RegExp($filter.val(),'i');$dl.find('dt').each(function(idx,elem){if(elem.innerText.match(re)){jQuery(elem).removeClass('hidden');}else{jQuery(elem).addClass('hidden');}});});$dl.before($filter);$filter.wrap('<label></label>');$filter.before(LANG.plugins.logviewer.filter+' ');});jQuery(function(){function applyPreview(target){var $style=target.jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]');$style.attr('href','');var $loader=target.jQuery('#plugin__styling_loader');if(!$loader.length){$loader=target.jQuery('<div id="plugin__styling_loader">'+LANG.plugins.styling.loader+'</div>');$loader.css({'position':'absolute','width':'100%','height':'100%','top':0,'left':0,'z-index':5000,'background-color':'#fff','opacity':'0.7','color':'#000','font-size':'2.5em','text-align':'center','line-height':1.5,'padding-top':'2em'});target.jQuery('body').append($loader);}setTimeout(function(){var now=new Date().getTime();$style.attr('href',DOKU_BASE+'lib/exe/css.php?preview=1&tseed='+now);},500);}var doreload=1;var $styling_plugin=jQuery('#plugin__styling');if(!$styling_plugin.length){if(DokuCookie.getValue('styling_plugin')==1){applyPreview(window);}return;}if(!$styling_plugin.hasClass('ispopup')){var $form=$styling_plugin.find('form.styling').first();var $btn=jQuery('<button>'+LANG.plugins.styling.popup+'</button>');$form.prepend($btn);$btn.on('click',function(e){var windowFeatures="menubar=no,location=no,resizable=yes,scrollbars=yes,status=false,width=500,height=500";window.open(DOKU_BASE+'lib/plugins/styling/popup.php','styling_popup',windowFeatures);e.preventDefault();e.stopPropagation();}).wrap('<p></p>');return;}window.onunload=function(e){if(doreload){DokuCookie.setValue('styling_plugin',0);if(window.opener)window.opener.document.location.reload();}return null;};jQuery(':button').click(function(e){doreload=false;});if(window.opener)applyPreview(window.opener);DokuCookie.setValue('styling_plugin',1);});jQuery(function(){jQuery('#usrmgr__del').on('click',function(){return confirm(LANG.del_confirm);});});jQuery(function(){dw_locktimer.init(840,1);});
|